From 71dfaca8584a39aa7876fa71e285788cdf3df763 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Thu, 24 Jan 2019 08:00:03 +0000 Subject: [PATCH] composer update --- composer.lock | 586 ++-- vendor/composer/autoload_files.php | 1 + vendor/composer/autoload_psr4.php | 1 + vendor/composer/autoload_static.php | 6 + vendor/composer/installed.json | 616 +++-- .../annotated-command/.scenarios.lock/install | 57 + .../.scenarios.lock/phpunit4/.gitignore | 1 + .../.scenarios.lock/phpunit4/composer.json | 61 + .../.scenarios.lock/phpunit4}/composer.lock | 1328 ++++----- .../.scenarios.lock/symfony2/.gitignore | 2 + .../.scenarios.lock/symfony2/composer.json | 61 + .../.scenarios.lock/symfony4/.gitignore | 1 + .../.scenarios.lock/symfony4/composer.json | 62 + .../.scenarios.lock/symfony4/composer.lock | 2448 +++++++++++++++++ .../annotated-command/CHANGELOG.md | 14 + .../consolidation/annotated-command/LICENSE | 18 +- .../consolidation/annotated-command/README.md | 101 +- .../annotated-command/composer.json | 55 +- .../annotated-command/composer.lock | 502 ++-- .../src/AnnotatedCommand.php | 118 +- .../annotated-command/src/AnnotationData.php | 17 + .../annotated-command/src/CommandData.php | 54 +- .../src/CommandProcessor.php | 223 +- .../annotated-command/src/CommandResult.php | 2 +- .../src/Help/HelpDocumentBuilder.php | 76 + .../src/Input/StdinAwareInterface.php | 34 + .../src/Input/StdinAwareTrait.php | 30 + .../src/Input/StdinHandler.php | 247 ++ .../src/ParameterInjection.php | 57 + .../src/ParameterInjector.php | 10 + .../src/Parser/CommandInfo.php | 16 + .../Parser/Internal/BespokeDocBlockParser.php | 27 +- .../annotated-command/src/ResultWriter.php | 210 ++ .../consolidation/log/.scenarios.lock/install | 57 + .../log/.scenarios.lock/phpunit4/.gitignore | 1 + .../phpunit4}/composer.json | 30 +- .../.scenarios.lock/phpunit4/composer.lock | 1400 ++++++++++ .../log/.scenarios.lock/symfony2/.gitignore | 1 + .../symfony2/composer.json | 30 +- .../.scenarios.lock/symfony2/composer.lock | 1400 ++++++++++ .../symfony2/src | 0 .../symfony2/tests | 0 .../log/.scenarios.lock/symfony4/.gitignore | 1 + .../.scenarios.lock/symfony4/composer.json | 60 + .../.scenarios.lock/symfony4/composer.lock | 2355 ++++++++++++++++ .../symfony4/src | 0 .../symfony4/tests | 0 vendor/consolidation/log/.travis.yml | 17 +- vendor/consolidation/log/CHANGELOG.md | 35 + vendor/consolidation/log/LICENSE | 10 +- vendor/consolidation/log/README.md | 13 +- vendor/consolidation/log/composer.json | 62 +- vendor/consolidation/log/composer.lock | 1171 +++++--- vendor/consolidation/log/phpunit.xml.dist | 2 +- vendor/consolidation/log/scenarios/install | 28 - .../log/scenarios/symfony4/.gitignore | 1 - vendor/consolidation/log/src/Logger.php | 2 +- .../consolidation/log/src/LoggerManager.php | 121 + .../log/src/StylableLoggerInterface.php | 16 + ...{testLogMethods.php => LogMethodTests.php} | 3 +- .../log/tests/LoggerManagerTests.php | 69 + ...s.php => LoggerVerbosityAndStyleTests.php} | 3 +- .../.scenarios.lock/symfony2/composer.json | 4 +- .../.scenarios.lock/symfony4/composer.json | 4 +- .../.scenarios.lock/symfony4/composer.lock | 461 +++- vendor/consolidation/robo/CHANGELOG.md | 15 + vendor/consolidation/robo/LICENSE | 18 +- vendor/consolidation/robo/README.md | 6 +- vendor/consolidation/robo/RoboFile.php | 6 +- vendor/consolidation/robo/composer.json | 4 +- vendor/consolidation/robo/composer.lock | 374 ++- vendor/consolidation/robo/robo | 42 +- .../robo/src/Collection/Collection.php | 15 +- .../src/Exception/AbortTasksException.php | 13 + vendor/consolidation/robo/src/Robo.php | 5 +- vendor/guzzlehttp/psr7/.editorconfig | 9 + vendor/guzzlehttp/psr7/CHANGELOG.md | 231 +- vendor/guzzlehttp/psr7/README.md | 8 +- vendor/guzzlehttp/psr7/composer.json | 14 +- vendor/guzzlehttp/psr7/src/AppendStream.php | 16 +- vendor/guzzlehttp/psr7/src/FnStream.php | 9 + vendor/guzzlehttp/psr7/src/InflateStream.php | 2 +- vendor/guzzlehttp/psr7/src/Request.php | 4 +- vendor/guzzlehttp/psr7/src/Response.php | 4 + vendor/guzzlehttp/psr7/src/Rfc7230.php | 18 + vendor/guzzlehttp/psr7/src/ServerRequest.php | 32 +- vendor/guzzlehttp/psr7/src/Stream.php | 39 +- vendor/guzzlehttp/psr7/src/StreamWrapper.php | 46 +- vendor/guzzlehttp/psr7/src/Uri.php | 88 +- vendor/guzzlehttp/psr7/src/functions.php | 132 +- vendor/masterminds/html5/.gitignore | 3 +- vendor/masterminds/html5/.php_cs.dist | 14 + vendor/masterminds/html5/.travis.yml | 47 +- vendor/masterminds/html5/README.md | 14 +- vendor/masterminds/html5/RELEASE.md | 8 + vendor/masterminds/html5/bin/entities.php | 8 +- vendor/masterminds/html5/composer.json | 4 +- vendor/masterminds/html5/example.php | 7 +- vendor/masterminds/html5/sami.php | 10 +- vendor/masterminds/html5/src/HTML5.php | 127 +- .../masterminds/html5/src/HTML5/Elements.php | 531 ++-- .../masterminds/html5/src/HTML5/Entities.php | 4 +- .../masterminds/html5/src/HTML5/Exception.php | 1 + .../html5/src/HTML5/InstructionProcessor.php | 20 +- .../src/HTML5/Parser/CharacterReference.php | 32 +- .../html5/src/HTML5/Parser/DOMTreeBuilder.php | 181 +- .../html5/src/HTML5/Parser/EventHandler.php | 36 +- .../src/HTML5/Parser/FileInputStream.php | 5 +- .../html5/src/HTML5/Parser/InputStream.php | 24 +- .../html5/src/HTML5/Parser/ParseError.php | 1 + .../html5/src/HTML5/Parser/Scanner.php | 67 +- .../src/HTML5/Parser/StringInputStream.php | 62 +- .../html5/src/HTML5/Parser/Tokenizer.php | 526 ++-- .../src/HTML5/Parser/TreeBuildingRules.php | 31 +- .../html5/src/HTML5/Parser/UTF8Utils.php | 23 +- .../src/HTML5/Serializer/HTML5Entities.php | 6 +- .../src/HTML5/Serializer/OutputRules.php | 114 +- .../src/HTML5/Serializer/RulesInterface.php | 26 +- .../html5/src/HTML5/Serializer/Traverser.php | 37 +- .../html5/test/HTML5/ElementsTest.php | 496 ++-- .../html5/test/HTML5/Html5Test.php | 41 +- .../HTML5/Parser/CharacterReferenceTest.php | 2 +- .../test/HTML5/Parser/DOMTreeBuilderTest.php | 102 +- .../html5/test/HTML5/Parser/EventStack.php | 14 +- .../test/HTML5/Parser/EventStackError.php | 1 + .../HTML5/Parser/InstructionProcessorMock.php | 6 +- .../html5/test/HTML5/Parser/ScannerTest.php | 9 +- .../html5/test/HTML5/Parser/TokenizerTest.php | 269 +- .../HTML5/Parser/TreeBuildingRulesTest.php | 8 +- .../html5/test/HTML5/Parser/UTF8UtilsTest.php | 34 +- .../test/HTML5/Serializer/OutputRulesTest.php | 118 +- .../test/HTML5/Serializer/TraverserTest.php | 15 +- .../masterminds/html5/test/HTML5/TestCase.php | 5 +- .../masterminds/html5/test/benchmark/run.php | 10 +- vendor/nikic/php-parser/.travis.yml | 3 +- vendor/nikic/php-parser/CHANGELOG.md | 29 +- vendor/nikic/php-parser/README.md | 2 +- vendor/nikic/php-parser/composer.json | 21 +- .../php-parser/doc/0_Introduction.markdown | 6 +- .../doc/2_Usage_of_basic_components.markdown | 3 +- .../doc/component/AST_builders.markdown | 2 +- .../component/JSON_representation.markdown | 6 +- .../doc/component/Walking_the_AST.markdown | 10 +- vendor/nikic/php-parser/grammar/php5.y | 5 +- vendor/nikic/php-parser/grammar/php7.y | 20 +- .../lib/PhpParser/Builder/Property.php | 22 +- .../Internal/PrintableNewAnonClassNode.php | 3 +- .../lib/PhpParser/Node/Expr/Cast/Double.php | 5 + .../php-parser/lib/PhpParser/Node/Param.php | 16 +- .../lib/PhpParser/Node/Stmt/Case_.php | 2 +- .../lib/PhpParser/Node/Stmt/Property.php | 19 +- .../PhpParser/NodeVisitor/NameResolver.php | 4 + .../php-parser/lib/PhpParser/Parser/Php5.php | 4 +- .../php-parser/lib/PhpParser/Parser/Php7.php | 1448 +++++----- .../lib/PhpParser/ParserAbstract.php | 15 + .../lib/PhpParser/PrettyPrinter/Standard.php | 14 +- .../lib/PhpParser/PrettyPrinterAbstract.php | 50 +- vendor/nikic/php-parser/phpunit.xml.dist | 4 +- .../NodeVisitor/NameResolverTest.php | 13 + .../php-parser/test/PhpParser/ParserTest.php | 4 + .../addingPropertyType.test | 39 + .../code/formatPreservation/anonClasses.test | 14 +- .../removingPropertyType.test | 22 + .../test/code/parser/commentAtEndOfClass.test | 1 + .../code/parser/errorHandling/recovery.test | 37 +- .../test/code/parser/semiReserved.test | 2 + .../code/parser/stmt/class/anonymous.test | 1 + .../parser/stmt/class/implicitPublic.test | 2 + .../test/code/parser/stmt/class/modifier.test | 5 + .../code/parser/stmt/class/php4Style.test | 1 + .../code/parser/stmt/class/propertyTypes.test | 70 + .../test/code/parser/stmt/class/simple.test | 3 + .../code/prettyPrinter/expr/operators.test | 8 +- .../code/prettyPrinter/stmt/properties.test | 20 + vendor/paragonie/random_compat/build-phar.sh | 5 - .../random_compat/lib/cast_to_int.php | 8 +- .../random_compat/lib/error_polyfill.php | 12 +- .../lib/random_bytes_com_dotnet.php | 14 +- .../lib/random_bytes_dev_urandom.php | 72 +- .../lib/random_bytes_libsodium.php | 10 +- .../lib/random_bytes_libsodium_legacy.php | 10 +- .../random_compat/lib/random_bytes_mcrypt.php | 10 +- .../random_compat/other/build_phar.php | 57 - .../random_compat/psalm-autoload.php | 9 - vendor/paragonie/random_compat/psalm.xml | 28 - vendor/ralouphie/getallheaders/.gitignore | 5 + vendor/ralouphie/getallheaders/.travis.yml | 18 + vendor/ralouphie/getallheaders/LICENSE | 21 + vendor/ralouphie/getallheaders/README.md | 19 + vendor/ralouphie/getallheaders/composer.json | 21 + vendor/ralouphie/getallheaders/phpunit.xml | 22 + .../getallheaders/src/getallheaders.php | 46 + .../getallheaders/tests/GetAllHeadersTest.php | 121 + .../symfony-console-completion/README.md | 4 +- .../src/CompletionCommand.php | 47 +- .../BashCompletion/CompletionCommandTest.php | 41 + vendor/symfony/class-loader/LICENSE | 2 +- vendor/symfony/class-loader/phpunit.xml.dist | 2 +- .../config/ConfigCacheFactoryInterface.php | 2 +- .../symfony/config/Definition/ArrayNode.php | 7 +- vendor/symfony/config/Definition/BaseNode.php | 2 +- .../config/Definition/Builder/ExprBuilder.php | 4 +- .../config/Definition/Builder/NodeBuilder.php | 2 +- .../Definition/Builder/NodeDefinition.php | 2 +- vendor/symfony/config/LICENSE | 2 +- .../Builder/ArrayNodeDefinitionTest.php | 19 + vendor/symfony/config/phpunit.xml.dist | 2 +- vendor/symfony/console/Application.php | 17 +- vendor/symfony/console/Command/Command.php | 17 +- .../console/Formatter/OutputFormatter.php | 9 +- vendor/symfony/console/Helper/TableStyle.php | 2 +- .../console/Input/InputAwareInterface.php | 2 - vendor/symfony/console/LICENSE | 2 +- .../symfony/console/Tester/CommandTester.php | 5 +- .../symfony/console/Tests/ApplicationTest.php | 18 +- .../console/Tests/Command/CommandTest.php | 8 + .../Tests/Tester/CommandTesterTest.php | 25 + vendor/symfony/console/phpunit.xml.dist | 2 +- vendor/symfony/css-selector/LICENSE | 2 +- .../css-selector/Tests/Parser/ParserTest.php | 3 + vendor/symfony/css-selector/phpunit.xml.dist | 2 +- vendor/symfony/debug/DebugClassLoader.php | 18 +- vendor/symfony/debug/LICENSE | 2 +- vendor/symfony/debug/phpunit.xml.dist | 2 +- .../Compiler/AnalyzeServiceReferencesPass.php | 8 +- .../Compiler/AutowirePass.php | 13 +- .../Compiler/InlineServiceDefinitionsPass.php | 14 +- .../Compiler/PassConfig.php | 2 +- .../Compiler/ResolveBindingsPass.php | 2 + .../Compiler/ResolveNamedArgumentsPass.php | 1 + .../Compiler/ServiceReferenceGraph.php | 6 +- .../Compiler/ServiceReferenceGraphEdge.php | 15 +- .../dependency-injection/ContainerBuilder.php | 50 +- .../dependency-injection/Definition.php | 2 +- .../Dumper/GraphvizDumper.php | 8 + .../dependency-injection/Dumper/PhpDumper.php | 190 +- vendor/symfony/dependency-injection/LICENSE | 2 +- .../Loader/IniFileLoader.php | 4 +- .../Loader/YamlFileLoader.php | 2 +- .../dependency-injection/ServiceLocator.php | 17 +- .../Tests/Compiler/IntegrationTest.php | 28 + .../Compiler/ResolveBindingsPassTest.php | 18 + .../ResolveChildDefinitionsPassTest.php | 2 +- .../ResolveNamedArgumentsPassTest.php | 21 + .../Tests/ContainerBuilderTest.php | 4 +- .../Tests/Dumper/GraphvizDumperTest.php | 26 +- .../Tests/Dumper/PhpDumperTest.php | 4 +- .../FactoryDummyWithoutReturnTypes.php | 19 + .../Fixtures/FooForCircularWithAddCalls.php | 19 + .../Tests/Fixtures/TestDefinition1.php | 18 + .../Fixtures/config/instanceof.expected.yml | 6 +- .../Fixtures/config/prototype.expected.yml | 18 +- .../containers/container_almost_circular.php | 30 + .../Fixtures/graphviz/services_inline.dot | 10 + .../Tests/Fixtures/ini/types.ini | 3 +- .../Tests/Fixtures/php/services10.php | 2 +- .../Tests/Fixtures/php/services12.php | 2 +- .../Tests/Fixtures/php/services19.php | 2 +- .../Tests/Fixtures/php/services26.php | 2 +- .../Tests/Fixtures/php/services8.php | 2 +- .../Tests/Fixtures/php/services9.php | 2 +- .../Tests/Fixtures/php/services9_as_files.txt | 5 +- .../Tests/Fixtures/php/services9_compiled.php | 5 +- .../Tests/Fixtures/php/services_adawson.php | 8 +- .../php/services_almost_circular_private.php | 122 +- .../php/services_almost_circular_public.php | 138 +- .../Fixtures/php/services_array_params.php | 2 +- .../Fixtures/php/services_base64_env.php | 2 +- .../Fixtures/php/services_deep_graph.php | 2 +- .../Tests/Fixtures/php/services_env_in_id.php | 6 +- .../Fixtures/php/services_inline_requires.php | 4 +- .../Fixtures/php/services_inline_self_ref.php | 10 +- .../Fixtures/php/services_legacy_privates.php | 2 +- .../Tests/Fixtures/php/services_locator.php | 14 +- .../Fixtures/php/services_private_frozen.php | 4 +- .../php/services_private_in_expression.php | 2 +- .../Tests/Fixtures/php/services_rot13_env.php | 4 +- .../Fixtures/php/services_subscriber.php | 8 +- .../Tests/Fixtures/php/services_tsantos.php | 18 +- .../php/services_uninitialized_ref.php | 2 +- .../Tests/Loader/IniFileLoaderTest.php | 4 +- .../Tests/ServiceLocatorTest.php | 14 + .../dependency-injection/phpunit.xml.dist | 2 +- vendor/symfony/dom-crawler/Form.php | 4 +- vendor/symfony/dom-crawler/LICENSE | 2 +- vendor/symfony/dom-crawler/Tests/FormTest.php | 10 +- vendor/symfony/dom-crawler/phpunit.xml.dist | 2 +- .../Debug/TraceableEventDispatcher.php | 71 +- .../Debug/WrappedListener.php | 11 +- .../EventDispatcherInterface.php | 16 +- .../EventSubscriberInterface.php | 2 +- .../symfony/event-dispatcher/GenericEvent.php | 2 +- vendor/symfony/event-dispatcher/LICENSE | 2 +- .../Tests/AbstractEventDispatcherTest.php | 2 +- .../Debug/TraceableEventDispatcherTest.php | 30 +- .../Tests/Debug/WrappedListenerTest.php | 64 + .../symfony/event-dispatcher/phpunit.xml.dist | 2 +- vendor/symfony/filesystem/LICENSE | 2 +- vendor/symfony/filesystem/phpunit.xml.dist | 2 +- vendor/symfony/finder/LICENSE | 2 +- vendor/symfony/finder/Tests/FinderTest.php | 4 +- vendor/symfony/finder/phpunit.xml.dist | 2 +- vendor/symfony/http-foundation/HeaderBag.php | 6 +- vendor/symfony/http-foundation/LICENSE | 2 +- .../symfony/http-foundation/ParameterBag.php | 2 +- vendor/symfony/http-foundation/Request.php | 26 +- vendor/symfony/http-foundation/Response.php | 3 +- .../Handler/AbstractSessionHandler.php | 4 +- .../Storage/Handler/PdoSessionHandler.php | 2 +- .../Session/Storage/NativeSessionStorage.php | 2 +- .../Fixtures/response-functional/common.inc | 2 +- .../http-foundation/Tests/RequestTest.php | 101 + .../Storage/Handler/PdoSessionHandlerTest.php | 2 +- .../symfony/http-foundation/phpunit.xml.dist | 2 +- .../DataCollector/RequestDataCollector.php | 15 +- .../AddAnnotatedClassesToCachePass.php | 2 +- .../EventListener/ExceptionListener.php | 2 +- .../http-kernel/HttpCache/HttpCache.php | 2 +- vendor/symfony/http-kernel/HttpKernel.php | 3 + vendor/symfony/http-kernel/Kernel.php | 11 +- vendor/symfony/http-kernel/LICENSE | 2 +- .../DataCollector/DumpDataCollectorTest.php | 7 +- .../EventListener/TranslatorListenerTest.php | 4 +- .../Fragment/EsiFragmentRendererTest.php | 2 +- .../Fragment/HIncludeFragmentRendererTest.php | 6 +- .../Fragment/SsiFragmentRendererTest.php | 2 +- .../http-kernel/Tests/HttpKernelTest.php | 8 +- .../http-kernel/Tests/UriSignerTest.php | 16 +- vendor/symfony/http-kernel/UriSigner.php | 7 +- vendor/symfony/http-kernel/phpunit.xml.dist | 2 +- vendor/symfony/process/ExecutableFinder.php | 8 +- vendor/symfony/process/InputStream.php | 4 +- vendor/symfony/process/LICENSE | 2 +- .../process/Tests/ExecutableFinderTest.php | 15 + vendor/symfony/process/phpunit.xml.dist | 2 +- vendor/symfony/routing/LICENSE | 2 +- .../routing/Loader/AnnotationClassLoader.php | 31 +- vendor/symfony/routing/Matcher/UrlMatcher.php | 42 +- vendor/symfony/routing/Router.php | 2 +- .../Loader/AnnotationClassLoaderTest.php | 37 +- .../Matcher/Dumper/PhpMatcherDumperTest.php | 3 - .../Matcher/RedirectableUrlMatcherTest.php | 28 + .../routing/Tests/Matcher/UrlMatcherTest.php | 25 + vendor/symfony/routing/phpunit.xml.dist | 2 +- vendor/symfony/serializer/LICENSE | 2 +- .../Normalizer/AbstractNormalizer.php | 34 +- .../Normalizer/AbstractObjectNormalizer.php | 12 + .../Normalizer/DateTimeNormalizer.php | 3 +- .../DeserializeNestedArrayOfObjectsTest.php | 128 + .../Normalizer/DateTimeNormalizerTest.php | 76 + vendor/symfony/serializer/phpunit.xml.dist | 2 +- .../translation/Catalogue/TargetOperation.php | 4 +- .../translation/DataCollectorTranslator.php | 2 +- .../symfony/translation/Dumper/FileDumper.php | 2 +- vendor/symfony/translation/LICENSE | 2 +- .../translation/Loader/XliffFileLoader.php | 2 +- .../symfony/translation/LoggingTranslator.php | 2 +- .../Tests/Loader/XliffFileLoaderTest.php | 2 +- .../translation/Tests/TranslatorCacheTest.php | 4 +- .../translation/Tests/fixtures/resname.xlf | 3 + vendor/symfony/translation/Translator.php | 2 +- .../translation/TranslatorInterface.php | 2 +- .../translation/Util/ArrayConverter.php | 2 +- vendor/symfony/translation/phpunit.xml.dist | 2 +- vendor/symfony/validator/Constraint.php | 2 +- .../symfony/validator/ConstraintViolation.php | 4 +- .../validator/Constraints/BicValidator.php | 5 + .../validator/Constraints/CountValidator.php | 4 + .../validator/Constraints/IbanValidator.php | 1 + .../validator/Constraints/UuidValidator.php | 8 +- .../Context/ExecutionContextInterface.php | 2 +- vendor/symfony/validator/LICENSE | 2 +- .../Resources/translations/validators.ja.xlf | 4 + .../Resources/translations/validators.vi.xlf | 18 +- .../Tests/ConstraintViolationTest.php | 55 + .../Tests/Constraints/IbanValidatorTest.php | 3 + .../Validator/RecursiveValidatorTest.php | 38 + .../RecursiveContextualValidator.php | 5 + vendor/symfony/validator/phpunit.xml.dist | 2 +- vendor/symfony/var-dumper/CHANGELOG.md | 5 + .../symfony/var-dumper/Caster/ClassStub.php | 39 +- .../var-dumper/Caster/ExceptionCaster.php | 10 +- .../symfony/var-dumper/Caster/IntlCaster.php | 171 ++ .../var-dumper/Caster/MemcachedCaster.php | 79 + .../var-dumper/Caster/ProxyManagerCaster.php | 31 + .../symfony/var-dumper/Caster/RedisCaster.php | 98 +- .../var-dumper/Caster/ReflectionCaster.php | 65 +- .../var-dumper/Cloner/AbstractCloner.php | 12 +- vendor/symfony/var-dumper/Cloner/Data.php | 4 +- .../symfony/var-dumper/Cloner/VarCloner.php | 4 +- .../Command/Descriptor/HtmlDescriptor.php | 2 +- .../var-dumper/Dumper/AbstractDumper.php | 2 +- .../symfony/var-dumper/Dumper/HtmlDumper.php | 78 +- vendor/symfony/var-dumper/LICENSE | 2 +- .../Resources/css/htmlDescriptor.css | 1 + .../var-dumper/Resources/functions/dump.php | 8 +- .../Tests/Caster/ExceptionCasterTest.php | 17 + .../Tests/Caster/IntlCasterTest.php | 299 ++ .../Tests/Caster/MemcachedCasterTest.php | 93 + .../Tests/Caster/RedisCasterTest.php | 4 + .../Tests/Caster/ReflectionCasterTest.php | 51 +- .../var-dumper/Tests/Caster/SplCasterTest.php | 6 +- .../Tests/Caster/StubCasterTest.php | 23 +- .../Command/Descriptor/CliDescriptorTest.php | 134 + .../Command/Descriptor/HtmlDescriptorTest.php | 195 ++ .../var-dumper/Tests/Dumper/CliDumperTest.php | 7 +- .../Tests/Dumper/HtmlDumperTest.php | 9 +- .../Tests/Fixtures/FooInterface.php | 2 +- .../var-dumper/Tests/Fixtures/dumb-var.php | 2 +- vendor/symfony/var-dumper/VarDumper.php | 10 +- vendor/symfony/var-dumper/composer.json | 3 +- vendor/symfony/var-dumper/phpunit.xml.dist | 2 +- vendor/symfony/yaml/Inline.php | 52 +- vendor/symfony/yaml/LICENSE | 2 +- vendor/symfony/yaml/Parser.php | 14 + vendor/symfony/yaml/Tests/ParserTest.php | 42 + vendor/symfony/yaml/phpunit.xml.dist | 2 +- vendor/twig/twig/.php_cs.dist | 8 +- vendor/twig/twig/.travis.yml | 14 +- vendor/twig/twig/CHANGELOG | 24 + vendor/twig/twig/LICENSE | 2 +- vendor/twig/twig/composer.json | 6 +- vendor/twig/twig/doc/advanced.rst | 91 +- vendor/twig/twig/doc/advanced_legacy.rst | 54 +- vendor/twig/twig/doc/api.rst | 50 +- vendor/twig/twig/doc/filters/join.rst | 12 + vendor/twig/twig/doc/filters/json_encode.rst | 6 +- vendor/twig/twig/doc/functions/dump.rst | 4 +- vendor/twig/twig/doc/functions/include.rst | 2 +- vendor/twig/twig/doc/installation.rst | 1 + vendor/twig/twig/doc/internals.rst | 2 +- vendor/twig/twig/doc/intro.rst | 12 +- vendor/twig/twig/doc/recipes.rst | 84 +- vendor/twig/twig/doc/tags/deprecated.rst | 30 + vendor/twig/twig/doc/tags/extends.rst | 2 +- vendor/twig/twig/doc/tags/if.rst | 10 +- vendor/twig/twig/doc/tags/include.rst | 2 +- vendor/twig/twig/doc/tags/index.rst | 1 + vendor/twig/twig/doc/templates.rst | 15 +- vendor/twig/twig/ext/twig/php_twig.h | 2 +- vendor/twig/twig/ext/twig/twig.c | 4 +- vendor/twig/twig/lib/Twig/Autoloader.php | 8 +- .../twig/twig/lib/Twig/Cache/Filesystem.php | 4 +- vendor/twig/twig/lib/Twig/Compiler.php | 10 +- vendor/twig/twig/lib/Twig/Environment.php | 77 +- vendor/twig/twig/lib/Twig/Error.php | 40 +- vendor/twig/twig/lib/Twig/Error/Loader.php | 8 +- vendor/twig/twig/lib/Twig/Error/Syntax.php | 2 +- .../twig/twig/lib/Twig/ExpressionParser.php | 26 +- vendor/twig/twig/lib/Twig/Extension.php | 14 +- vendor/twig/twig/lib/Twig/Extension/Core.php | 379 +-- vendor/twig/twig/lib/Twig/Extension/Debug.php | 8 +- .../twig/twig/lib/Twig/Extension/Escaper.php | 12 +- .../twig/lib/Twig/Extension/Optimizer.php | 2 +- .../twig/twig/lib/Twig/Extension/Profiler.php | 4 +- .../twig/twig/lib/Twig/Extension/Sandbox.php | 4 +- .../twig/twig/lib/Twig/Extension/Staging.php | 12 +- .../twig/lib/Twig/Extension/StringLoader.php | 6 +- .../twig/lib/Twig/FactoryRuntimeLoader.php | 2 +- .../Twig/FileExtensionEscapingStrategy.php | 2 +- vendor/twig/twig/lib/Twig/Filter.php | 8 +- vendor/twig/twig/lib/Twig/Filter/Function.php | 2 +- vendor/twig/twig/lib/Twig/Filter/Method.php | 4 +- vendor/twig/twig/lib/Twig/Filter/Node.php | 2 +- vendor/twig/twig/lib/Twig/Function.php | 10 +- .../twig/twig/lib/Twig/Function/Function.php | 2 +- vendor/twig/twig/lib/Twig/Function/Method.php | 4 +- vendor/twig/twig/lib/Twig/Function/Node.php | 2 +- vendor/twig/twig/lib/Twig/Lexer.php | 36 +- vendor/twig/twig/lib/Twig/Loader/Array.php | 4 +- vendor/twig/twig/lib/Twig/Loader/Chain.php | 16 +- .../twig/twig/lib/Twig/Loader/Filesystem.php | 34 +- vendor/twig/twig/lib/Twig/Node.php | 8 +- vendor/twig/twig/lib/Twig/Node/AutoEscape.php | 2 +- vendor/twig/twig/lib/Twig/Node/Block.php | 4 +- .../twig/lib/Twig/Node/BlockReference.php | 2 +- .../twig/twig/lib/Twig/Node/CheckSecurity.php | 10 +- vendor/twig/twig/lib/Twig/Node/Deprecated.php | 49 + vendor/twig/twig/lib/Twig/Node/Do.php | 2 +- .../twig/lib/Twig/Node/Expression/Array.php | 12 +- .../twig/lib/Twig/Node/Expression/Binary.php | 2 +- .../Twig/Node/Expression/BlockReference.php | 4 +- .../twig/lib/Twig/Node/Expression/Call.php | 46 +- .../lib/Twig/Node/Expression/Conditional.php | 2 +- .../lib/Twig/Node/Expression/Constant.php | 2 +- .../Node/Expression/ExtensionReference.php | 2 +- .../twig/lib/Twig/Node/Expression/Filter.php | 2 +- .../lib/Twig/Node/Expression/Function.php | 2 +- .../twig/lib/Twig/Node/Expression/GetAttr.php | 6 +- .../lib/Twig/Node/Expression/MethodCall.php | 2 +- .../twig/lib/Twig/Node/Expression/Name.php | 6 +- .../twig/lib/Twig/Node/Expression/Parent.php | 2 +- .../lib/Twig/Node/Expression/TempName.php | 2 +- .../twig/lib/Twig/Node/Expression/Test.php | 7 +- .../twig/lib/Twig/Node/Expression/Unary.php | 2 +- vendor/twig/twig/lib/Twig/Node/Flush.php | 2 +- vendor/twig/twig/lib/Twig/Node/For.php | 12 +- vendor/twig/twig/lib/Twig/Node/ForLoop.php | 2 +- vendor/twig/twig/lib/Twig/Node/If.php | 4 +- vendor/twig/twig/lib/Twig/Node/Import.php | 2 +- vendor/twig/twig/lib/Twig/Node/Include.php | 6 +- vendor/twig/twig/lib/Twig/Node/Macro.php | 10 +- vendor/twig/twig/lib/Twig/Node/Module.php | 29 +- vendor/twig/twig/lib/Twig/Node/Print.php | 2 +- vendor/twig/twig/lib/Twig/Node/Sandbox.php | 2 +- vendor/twig/twig/lib/Twig/Node/Set.php | 6 +- vendor/twig/twig/lib/Twig/Node/SetTemp.php | 2 +- vendor/twig/twig/lib/Twig/Node/Spaceless.php | 2 +- vendor/twig/twig/lib/Twig/Node/Text.php | 2 +- vendor/twig/twig/lib/Twig/Node/With.php | 6 +- vendor/twig/twig/lib/Twig/NodeTraverser.php | 6 +- .../twig/lib/Twig/NodeVisitor/Escaper.php | 18 +- .../twig/lib/Twig/NodeVisitor/Optimizer.php | 10 +- .../lib/Twig/NodeVisitor/SafeAnalysis.php | 30 +- .../twig/lib/Twig/NodeVisitor/Sandbox.php | 8 +- vendor/twig/twig/lib/Twig/Parser.php | 40 +- .../lib/Twig/Profiler/Dumper/Blackfire.php | 8 +- .../twig/lib/Twig/Profiler/Dumper/Html.php | 4 +- .../lib/Twig/Profiler/Node/EnterProfile.php | 2 +- .../lib/Twig/Profiler/Node/LeaveProfile.php | 2 +- .../Twig/Profiler/NodeVisitor/Profiler.php | 12 +- .../twig/twig/lib/Twig/Profiler/Profile.php | 20 +- .../twig/lib/Twig/Sandbox/SecurityPolicy.php | 8 +- vendor/twig/twig/lib/Twig/SimpleFilter.php | 8 +- vendor/twig/twig/lib/Twig/SimpleFunction.php | 10 +- vendor/twig/twig/lib/Twig/SimpleTest.php | 18 +- vendor/twig/twig/lib/Twig/Template.php | 50 +- .../twig/twig/lib/Twig/TemplateInterface.php | 2 +- vendor/twig/twig/lib/Twig/TemplateWrapper.php | 20 +- vendor/twig/twig/lib/Twig/Test.php | 8 +- vendor/twig/twig/lib/Twig/Test/Function.php | 2 +- .../lib/Twig/Test/IntegrationTestCase.php | 34 +- vendor/twig/twig/lib/Twig/Test/Method.php | 4 +- vendor/twig/twig/lib/Twig/Test/Node.php | 2 +- .../twig/twig/lib/Twig/Test/NodeTestCase.php | 2 +- .../twig/lib/Twig/TokenParser/AutoEscape.php | 2 +- .../twig/twig/lib/Twig/TokenParser/Block.php | 8 +- .../twig/lib/Twig/TokenParser/Deprecated.php | 42 + .../twig/twig/lib/Twig/TokenParser/Embed.php | 6 +- .../twig/twig/lib/Twig/TokenParser/Filter.php | 2 +- vendor/twig/twig/lib/Twig/TokenParser/For.php | 8 +- .../twig/twig/lib/Twig/TokenParser/From.php | 2 +- vendor/twig/twig/lib/Twig/TokenParser/If.php | 12 +- .../twig/lib/Twig/TokenParser/Include.php | 2 +- .../twig/twig/lib/Twig/TokenParser/Macro.php | 4 +- .../twig/lib/Twig/TokenParser/Sandbox.php | 2 +- vendor/twig/twig/lib/Twig/TokenParser/Set.php | 2 +- .../twig/lib/Twig/TokenParser/Spaceless.php | 2 +- vendor/twig/twig/lib/Twig/TokenParser/Use.php | 4 +- .../twig/twig/lib/Twig/TokenParser/With.php | 2 +- .../twig/twig/lib/Twig/TokenParserBroker.php | 8 +- .../lib/Twig/TokenParserBrokerInterface.php | 2 +- .../lib/Twig/Util/DeprecationCollector.php | 6 +- .../twig/src/Extension/GlobalsInterface.php | 2 +- vendor/twig/twig/src/Node/DeprecatedNode.php | 11 + .../src/TokenParser/DeprecatedTokenParser.php | 11 + .../test/Twig/Tests/Cache/FilesystemTest.php | 20 +- .../twig/test/Twig/Tests/CompilerTest.php | 2 +- .../test/Twig/Tests/CustomExtensionTest.php | 20 +- .../twig/test/Twig/Tests/EnvironmentTest.php | 110 +- .../twig/twig/test/Twig/Tests/ErrorTest.php | 68 +- .../test/Twig/Tests/ExpressionParserTest.php | 162 +- .../test/Twig/Tests/Extension/CoreTest.php | 170 +- .../test/Twig/Tests/Extension/SandboxTest.php | 80 +- .../Twig/Tests/FactoryRuntimeLoaderTest.php | 2 +- .../twig/test/Twig/Tests/FileCachingTest.php | 2 +- .../FileExtensionEscapingStrategyTest.php | 38 +- .../Twig/Tests/Fixtures/autoescape/block.test | 4 +- .../Twig/Tests/Fixtures/autoescape/name.test | 4 +- ...ltiline_array_with_undefined_variable.test | 2 +- ...e_array_with_undefined_variable_again.test | 2 +- ...line_function_with_undefined_variable.test | 2 +- ...multiline_tag_with_undefined_variable.test | 2 +- .../undefined_template_in_child_template.test | 2 +- .../Tests/Fixtures/expressions/_self.test | 2 +- .../Tests/Fixtures/expressions/array.test | 2 +- .../Fixtures/expressions/array_call.test | 2 +- .../Tests/Fixtures/expressions/binary.test | 2 +- .../Tests/Fixtures/expressions/bitwise.test | 2 +- .../Fixtures/expressions/comparison.test | 2 +- .../Fixtures/expressions/divisibleby.test | 2 +- .../Tests/Fixtures/expressions/dotdot.test | 2 +- .../Tests/Fixtures/expressions/ends_with.test | 2 +- .../Tests/Fixtures/expressions/floats.test | 16 + .../Tests/Fixtures/expressions/grouping.test | 2 +- .../Tests/Fixtures/expressions/literals.test | 2 +- .../Fixtures/expressions/magic_call.test | 2 +- .../Tests/Fixtures/expressions/matches.test | 2 +- .../Fixtures/expressions/method_call.test | 4 +- .../expressions/negative_numbers.test | 2 +- .../expressions/operators_as_variables.test | 2 +- .../Tests/Fixtures/expressions/postfix.test | 2 +- .../Tests/Fixtures/expressions/power.test | 2 +- .../Tests/Fixtures/expressions/sameas.test | 2 +- .../Fixtures/expressions/starts_with.test | 2 +- .../Tests/Fixtures/expressions/strings.test | 2 +- .../expressions/ternary_operator.test | 2 +- .../expressions/ternary_operator_noelse.test | 2 +- .../expressions/ternary_operator_nothen.test | 2 +- .../two_word_operators_as_variables.test | 2 +- .../Tests/Fixtures/expressions/unary.test | 2 +- .../expressions/unary_macro_arguments.test | 2 +- .../expressions/unary_precedence.test | 2 +- .../test/Twig/Tests/Fixtures/filters/abs.test | 2 +- .../Twig/Tests/Fixtures/filters/batch.test | 2 +- .../Tests/Fixtures/filters/batch_float.test | 2 +- .../filters/batch_with_empty_fill.test | 2 +- .../filters/batch_with_exact_elements.test | 2 +- .../Fixtures/filters/batch_with_fill.test | 2 +- .../Fixtures/filters/batch_with_keys.test | 2 +- .../filters/batch_with_zero_elements.test | 2 +- .../Fixtures/filters/convert_encoding.test | 2 +- .../Twig/Tests/Fixtures/filters/date.test | 4 +- .../Fixtures/filters/date_default_format.test | 4 +- .../filters/date_default_format_interval.test | 4 +- .../Fixtures/filters/date_immutable.test | 4 +- .../Tests/Fixtures/filters/date_interval.test | 4 +- .../Tests/Fixtures/filters/date_modify.test | 4 +- .../Fixtures/filters/date_namedargs.test | 2 +- .../Twig/Tests/Fixtures/filters/default.test | 24 +- .../Fixtures/filters/dynamic_filter.test | 2 +- .../Twig/Tests/Fixtures/filters/escape.test | 2 +- .../Fixtures/filters/escape_html_attr.test | 2 +- .../Fixtures/filters/escape_javascript.test | 2 +- .../filters/escape_non_supported_charset.test | 2 +- .../Twig/Tests/Fixtures/filters/first.test | 2 +- .../Tests/Fixtures/filters/force_escape.test | 2 +- .../Twig/Tests/Fixtures/filters/format.test | 2 +- .../Twig/Tests/Fixtures/filters/join.test | 28 +- .../Tests/Fixtures/filters/json_encode.test | 2 +- .../Twig/Tests/Fixtures/filters/last.test | 2 +- .../Twig/Tests/Fixtures/filters/length.test | 8 +- .../Tests/Fixtures/filters/length_utf8.test | 2 +- .../Twig/Tests/Fixtures/filters/merge.test | 9 +- .../Twig/Tests/Fixtures/filters/nl2br.test | 2 +- .../Tests/Fixtures/filters/number_format.test | 2 +- .../filters/number_format_default.test | 2 +- .../Twig/Tests/Fixtures/filters/replace.test | 2 +- .../Fixtures/filters/replace_invalid_arg.test | 2 +- .../Twig/Tests/Fixtures/filters/reverse.test | 2 +- .../Twig/Tests/Fixtures/filters/round.test | 2 +- .../Twig/Tests/Fixtures/filters/slice.test | 2 +- .../Twig/Tests/Fixtures/filters/sort.test | 2 +- .../Tests/Fixtures/filters/special_chars.test | 2 +- .../Twig/Tests/Fixtures/filters/split.test | 2 +- .../Tests/Fixtures/filters/split_utf8.test | 2 +- .../Tests/Fixtures/filters/static_calls.test | 2 +- .../Twig/Tests/Fixtures/filters/trim.test | 2 +- .../Tests/Fixtures/filters/urlencode.test | 2 +- .../filters/urlencode_deprecated.test | 2 +- .../Tests/Fixtures/functions/attribute.test | 2 +- .../Twig/Tests/Fixtures/functions/block.test | 2 +- .../functions/block_with_template.test | 4 +- .../functions/block_without_name.test | 2 +- .../Tests/Fixtures/functions/constant.test | 2 +- .../Twig/Tests/Fixtures/functions/cycle.test | 2 +- .../Twig/Tests/Fixtures/functions/date.test | 4 +- .../Fixtures/functions/date_namedargs.test | 2 +- .../Twig/Tests/Fixtures/functions/dump.test | 4 +- .../Tests/Fixtures/functions/dump_array.test | 4 +- .../Fixtures/functions/dynamic_function.test | 2 +- .../functions/include/assignment.test | 2 +- .../functions/include/autoescaping.test | 2 +- .../Fixtures/functions/include/basic.test | 2 +- .../functions/include/expression.test | 2 +- .../functions/include/ignore_missing.test | 2 +- .../Fixtures/functions/include/missing.test | 2 +- .../functions/include/missing_nested.test | 2 +- .../Fixtures/functions/include/sandbox.test | 2 +- .../functions/include/sandbox_disabling.test | 2 +- .../sandbox_disabling_ignore_missing.test | 2 +- .../functions/include/template_instance.test | 2 +- .../functions/include/templates_as_array.test | 2 +- .../functions/include/with_context.test | 2 +- .../functions/include/with_variables.test | 2 +- .../Tests/Fixtures/functions/magic_call.test | 2 +- .../Fixtures/functions/magic_call53.test | 2 +- .../Twig/Tests/Fixtures/functions/max.test | 2 +- .../Twig/Tests/Fixtures/functions/min.test | 2 +- .../Twig/Tests/Fixtures/functions/range.test | 2 +- .../recursive_block_with_inheritance.test | 2 +- .../Twig/Tests/Fixtures/functions/source.test | 2 +- .../Fixtures/functions/special_chars.test | 2 +- .../Fixtures/functions/static_calls.test | 2 +- .../functions/template_from_string.test | 2 +- .../Tests/Fixtures/macros/default_values.test | 2 +- .../Tests/Fixtures/macros/nested_calls.test | 2 +- .../Fixtures/macros/reserved_variables.test | 2 +- .../Twig/Tests/Fixtures/macros/simple.test | 2 +- .../Twig/Tests/Fixtures/macros/varargs.test | 2 +- .../Tests/Fixtures/macros/with_filters.test | 2 +- .../regression/block_names_unicity.test | 2 +- .../regression/combined_debug_info.test | 2 +- .../Fixtures/regression/empty_token.test | 2 +- .../Tests/Fixtures/regression/issue_1143.test | 4 +- .../Fixtures/regression/multi_word_tests.test | 2 +- .../regression/simple_xml_element.test | 2 +- .../regression/strings_like_numbers.test | 2 +- .../Tests/Fixtures/tags/autoescape/basic.test | 2 +- .../Fixtures/tags/autoescape/blocks.test | 2 +- .../tags/autoescape/double_escaping.test | 2 +- .../Fixtures/tags/autoescape/functions.test | 2 +- .../Fixtures/tags/autoescape/literal.test | 2 +- .../Fixtures/tags/autoescape/nested.test | 2 +- .../Fixtures/tags/autoescape/objects.test | 2 +- .../Tests/Fixtures/tags/autoescape/raw.test | 2 +- .../tags/autoescape/strategy.legacy.test | 2 +- .../Fixtures/tags/autoescape/strategy.test | 2 +- .../Tests/Fixtures/tags/autoescape/type.test | 2 +- .../tags/autoescape/with_filters.test | 2 +- .../autoescape/with_filters_arguments.test | 2 +- .../autoescape/with_pre_escape_filters.test | 2 +- .../with_preserves_safety_filters.test | 2 +- .../Twig/Tests/Fixtures/tags/block/basic.test | 2 +- .../tags/block/block_unique_name.test | 2 +- .../Fixtures/tags/block/special_chars.test | 2 +- .../tags/deprecated/block.legacy.test | 20 + .../tags/deprecated/macro.legacy.test | 21 + .../tags/deprecated/template.legacy.test | 12 + .../Twig/Tests/Fixtures/tags/embed/basic.test | 2 +- .../tags/embed/complex_dynamic_parent.test | 2 +- .../Fixtures/tags/embed/dynamic_parent.test | 2 +- .../Tests/Fixtures/tags/embed/error_line.test | 2 +- .../Tests/Fixtures/tags/embed/multiple.test | 2 +- .../Tests/Fixtures/tags/embed/nested.test | 2 +- .../Fixtures/tags/embed/with_extends.test | 2 +- .../Tests/Fixtures/tags/filter/basic.test | 2 +- .../Fixtures/tags/filter/json_encode.test | 2 +- .../Tests/Fixtures/tags/filter/multiple.test | 2 +- .../Tests/Fixtures/tags/filter/nested.test | 2 +- .../Fixtures/tags/filter/with_for_tag.test | 2 +- .../Fixtures/tags/filter/with_if_tag.test | 2 +- .../Tests/Fixtures/tags/for/condition.test | 4 +- .../Twig/Tests/Fixtures/tags/for/context.test | 2 +- .../Twig/Tests/Fixtures/tags/for/else.test | 8 +- .../Fixtures/tags/for/inner_variables.test | 2 +- .../Twig/Tests/Fixtures/tags/for/keys.test | 2 +- .../Fixtures/tags/for/keys_and_values.test | 2 +- .../Tests/Fixtures/tags/for/loop_context.test | 2 +- .../Fixtures/tags/for/loop_context_local.test | 2 +- .../Fixtures/tags/for/loop_not_defined.test | 2 +- .../tags/for/loop_not_defined_cond.test | 2 +- .../Tests/Fixtures/tags/for/nested_else.test | 2 +- .../Twig/Tests/Fixtures/tags/for/objects.test | 4 +- .../Fixtures/tags/for/objects_countable.test | 4 +- .../Tests/Fixtures/tags/for/recursive.test | 2 +- .../Twig/Tests/Fixtures/tags/for/values.test | 2 +- .../test/Twig/Tests/Fixtures/tags/from.test | 2 +- .../Twig/Tests/Fixtures/tags/if/basic.test | 6 +- .../Tests/Fixtures/tags/if/expression.test | 6 +- .../Tests/Fixtures/tags/include/basic.test | 2 +- .../Fixtures/tags/include/expression.test | 2 +- .../Fixtures/tags/include/ignore_missing.test | 2 +- .../Tests/Fixtures/tags/include/missing.test | 2 +- .../Fixtures/tags/include/missing_nested.test | 2 +- .../Tests/Fixtures/tags/include/only.test | 2 +- .../tags/include/template_instance.test | 2 +- .../tags/include/templates_as_array.test | 2 +- .../Fixtures/tags/include/with_variables.test | 2 +- .../Fixtures/tags/inheritance/basic.test | 2 +- .../Fixtures/tags/inheritance/block_expr.test | 12 +- .../tags/inheritance/block_expr2.test | 12 +- .../tags/inheritance/conditional.test | 2 +- .../Fixtures/tags/inheritance/dynamic.test | 2 +- .../Fixtures/tags/inheritance/empty.test | 2 +- .../tags/inheritance/extends_as_array.test | 2 +- .../extends_as_array_with_empty_name.test | 2 +- .../extends_as_array_with_null_name.test | 2 +- .../Fixtures/tags/inheritance/multiple.test | 2 +- .../tags/inheritance/multiple_dynamic.test | 2 +- .../tags/inheritance/nested_blocks.test | 2 +- .../nested_blocks_parent_only.test | 2 +- .../tags/inheritance/nested_inheritance.test | 2 +- .../Fixtures/tags/inheritance/parent.test | 2 +- .../parent_as_template_wrapper.test | 12 + .../tags/inheritance/parent_change.test | 4 +- .../tags/inheritance/parent_isolation.test | 2 +- .../tags/inheritance/parent_nested.test | 2 +- .../parent_without_extends_but_traits.test | 2 +- .../tags/inheritance/template_instance.test | 2 +- .../Tests/Fixtures/tags/inheritance/use.test | 2 +- .../Twig/Tests/Fixtures/tags/macro/basic.test | 2 +- .../Fixtures/tags/macro/endmacro_name.test | 2 +- .../Tests/Fixtures/tags/macro/external.test | 2 +- .../Twig/Tests/Fixtures/tags/macro/from.test | 2 +- .../tags/macro/from_with_reserved_name.test | 2 +- .../Tests/Fixtures/tags/macro/global.test | 2 +- .../tags/macro/import_with_reserved_nam.test | 2 +- .../Fixtures/tags/macro/reserved_name.test | 2 +- .../Fixtures/tags/macro/self_import.test | 2 +- .../Fixtures/tags/macro/special_chars.test | 2 +- .../Fixtures/tags/macro/super_globals.test | 2 +- .../Tests/Fixtures/tags/raw/basic.legacy.test | 2 +- .../tags/raw/mixed_usage_with_raw.legacy.test | 2 +- .../tags/raw/whitespace_control.legacy.test | 2 +- .../Tests/Fixtures/tags/sandbox/simple.test | 2 +- .../Twig/Tests/Fixtures/tags/set/basic.test | 2 +- .../Fixtures/tags/set/capture-empty.test | 2 +- .../Twig/Tests/Fixtures/tags/set/capture.test | 2 +- .../Tests/Fixtures/tags/set/expression.test | 2 +- .../Tests/Fixtures/tags/spaceless/simple.test | 2 +- .../Tests/Fixtures/tags/special_chars.test | 2 +- .../Twig/Tests/Fixtures/tags/trim_block.test | 2 +- .../Twig/Tests/Fixtures/tags/use/aliases.test | 2 +- .../Twig/Tests/Fixtures/tags/use/basic.test | 2 +- .../Twig/Tests/Fixtures/tags/use/deep.test | 2 +- .../Tests/Fixtures/tags/use/deep_empty.test | 2 +- .../Tests/Fixtures/tags/use/inheritance.test | 2 +- .../Tests/Fixtures/tags/use/inheritance2.test | 2 +- .../Tests/Fixtures/tags/use/multiple.test | 2 +- .../Fixtures/tags/use/multiple_aliases.test | 2 +- .../Tests/Fixtures/tags/use/parent_block.test | 2 +- .../Fixtures/tags/use/parent_block2.test | 2 +- .../Fixtures/tags/use/parent_block3.test | 2 +- .../Fixtures/tags/use/use_with_parent.test | 2 +- .../Tests/Fixtures/tags/verbatim/basic.test | 2 +- .../tags/verbatim/mixed_usage_with_raw.test | 2 +- .../tags/verbatim/whitespace_control.test | 2 +- .../Twig/Tests/Fixtures/tags/with/basic.test | 2 +- .../Tests/Fixtures/tags/with/expression.test | 2 +- .../Twig/Tests/Fixtures/tags/with/nested.test | 2 +- .../Fixtures/tags/with/with_no_hash.test | 2 +- .../Tests/Fixtures/tags/with/with_only.test | 2 +- .../test/Twig/Tests/Fixtures/tests/array.test | 18 +- .../Twig/Tests/Fixtures/tests/constant.test | 2 +- .../Twig/Tests/Fixtures/tests/defined.test | 22 +- .../Fixtures/tests/defined_for_attribute.test | 18 +- .../Fixtures/tests/defined_for_blocks.test | 2 +- .../defined_for_blocks_with_template.test | 4 +- .../Fixtures/tests/defined_for_constants.test | 2 +- .../Tests/Fixtures/tests/dynamic_test.test | 14 + .../test/Twig/Tests/Fixtures/tests/empty.test | 8 +- .../test/Twig/Tests/Fixtures/tests/even.test | 2 +- .../test/Twig/Tests/Fixtures/tests/in.test | 2 +- .../Tests/Fixtures/tests/in_with_objects.test | 6 +- .../Twig/Tests/Fixtures/tests/iterable.test | 8 +- .../Tests/Fixtures/tests/null_coalesce.test | 2 +- .../test/Twig/Tests/Fixtures/tests/odd.test | 2 +- .../twig/test/Twig/Tests/IntegrationTest.php | 64 +- .../autoescape/filename.legacy.test | 4 +- .../functions/undefined_block.legacy.test | 2 +- .../Tests/LegacyFixtures/test.legacy.test | 2 +- .../test/Twig/Tests/LegacyIntegrationTest.php | 10 +- .../twig/twig/test/Twig/Tests/LexerTest.php | 4 +- .../twig/test/Twig/Tests/Loader/ArrayTest.php | 26 +- .../twig/test/Twig/Tests/Loader/ChainTest.php | 36 +- .../test/Twig/Tests/Loader/FilesystemTest.php | 131 +- .../test/Twig/Tests/NativeExtensionTest.php | 8 +- .../test/Twig/Tests/Node/AutoEscapeTest.php | 10 +- .../Twig/Tests/Node/BlockReferenceTest.php | 8 +- .../twig/test/Twig/Tests/Node/BlockTest.php | 10 +- .../test/Twig/Tests/Node/DeprecatedTest.php | 71 + .../twig/twig/test/Twig/Tests/Node/DoTest.php | 4 +- .../Twig/Tests/Node/Expression/ArrayTest.php | 12 +- .../Tests/Node/Expression/AssignNameTest.php | 6 +- .../Tests/Node/Expression/Binary/AddTest.php | 6 +- .../Tests/Node/Expression/Binary/AndTest.php | 6 +- .../Node/Expression/Binary/ConcatTest.php | 6 +- .../Tests/Node/Expression/Binary/DivTest.php | 6 +- .../Node/Expression/Binary/FloorDivTest.php | 6 +- .../Tests/Node/Expression/Binary/ModTest.php | 6 +- .../Tests/Node/Expression/Binary/MulTest.php | 6 +- .../Tests/Node/Expression/Binary/OrTest.php | 6 +- .../Tests/Node/Expression/Binary/SubTest.php | 6 +- .../Twig/Tests/Node/Expression/CallTest.php | 54 +- .../Tests/Node/Expression/ConditionalTest.php | 4 +- .../Tests/Node/Expression/ConstantTest.php | 4 +- .../Twig/Tests/Node/Expression/FilterTest.php | 72 +- .../Tests/Node/Expression/FunctionTest.php | 66 +- .../Tests/Node/Expression/GetAttrTest.php | 14 +- .../Twig/Tests/Node/Expression/NameTest.php | 14 +- .../Node/Expression/NullCoalesceTest.php | 8 +- .../Node/Expression/PHP53/FilterInclude.php | 2 +- .../Node/Expression/PHP53/FunctionInclude.php | 2 +- .../Node/Expression/PHP53/TestInclude.php | 2 +- .../Twig/Tests/Node/Expression/ParentTest.php | 4 +- .../Twig/Tests/Node/Expression/TestTest.php | 32 +- .../Tests/Node/Expression/Unary/NegTest.php | 8 +- .../Tests/Node/Expression/Unary/NotTest.php | 6 +- .../Tests/Node/Expression/Unary/PosTest.php | 6 +- .../twig/test/Twig/Tests/Node/ForTest.php | 40 +- .../twig/twig/test/Twig/Tests/Node/IfTest.php | 30 +- .../twig/test/Twig/Tests/Node/ImportTest.php | 6 +- .../twig/test/Twig/Tests/Node/IncludeTest.php | 32 +- .../twig/test/Twig/Tests/Node/MacroTest.php | 22 +- .../twig/test/Twig/Tests/Node/ModuleTest.php | 44 +- .../twig/test/Twig/Tests/Node/PrintTest.php | 4 +- .../twig/test/Twig/Tests/Node/SandboxTest.php | 6 +- .../Twig/Tests/Node/SandboxedPrintTest.php | 6 +- .../twig/test/Twig/Tests/Node/SetTest.php | 38 +- .../test/Twig/Tests/Node/SpacelessTest.php | 12 +- .../twig/test/Twig/Tests/Node/TextTest.php | 4 +- .../Twig/Tests/NodeVisitor/OptimizerTest.php | 46 +- .../twig/twig/test/Twig/Tests/ParserTest.php | 78 +- .../Tests/Profiler/Dumper/AbstractTest.php | 28 +- .../test/Twig/Tests/Profiler/ProfileTest.php | 4 +- .../twig/test/Twig/Tests/TemplateTest.php | 297 +- .../test/Twig/Tests/TemplateWrapperTest.php | 22 +- .../twig/test/Twig/Tests/TokenStreamTest.php | 16 +- .../Tests/Util/DeprecationCollectorTest.php | 8 +- .../twig/test/Twig/Tests/escapingTest.php | 27 +- .../phar-stream-wrapper}/.gitignore | 3 +- vendor/typo3/phar-stream-wrapper/LICENSE | 21 + vendor/typo3/phar-stream-wrapper/README.md | 155 ++ .../typo3/phar-stream-wrapper/composer.json | 24 + .../phar-stream-wrapper/src/Assertable.php | 22 + .../phar-stream-wrapper/src/Behavior.php | 124 + .../phar-stream-wrapper/src/Exception.php | 16 + .../typo3/phar-stream-wrapper/src/Helper.php | 183 ++ .../Interceptor/PharExtensionInterceptor.php | 55 + .../typo3/phar-stream-wrapper/src/Manager.php | 85 + .../src/PharStreamWrapper.php | 477 ++++ vendor/vlucas/phpdotenv/src/Loader.php | 2 +- vendor/webmozart/assert/.composer-auth.json | 7 - vendor/webmozart/assert/.styleci.yml | 11 - vendor/webmozart/assert/CHANGELOG.md | 23 + vendor/webmozart/assert/README.md | 8 +- vendor/webmozart/assert/composer.json | 19 +- vendor/webmozart/assert/src/Assert.php | 106 +- web/core/MAINTAINERS.txt | 2 +- web/core/composer.json | 1 + web/core/includes/common.inc | 70 +- web/core/lib/Drupal.php | 2 +- .../Plugin/ContextAwarePluginBase.php | 19 +- .../Transliteration/PhpTransliteration.php | 23 + .../lib/Drupal/Component/Utility/Mail.php | 67 + .../lib/Drupal/Core/Archiver/ArchiveTar.php | 191 +- web/core/lib/Drupal/Core/Block/BlockBase.php | 10 +- .../lib/Drupal/Core/Cache/MemoryBackend.php | 3 +- .../lib/Drupal/Core/Command/DbDumpCommand.php | 9 +- .../Drupal/Core/Database/Install/Tasks.php | 2 +- .../lib/Drupal/Core/Database/database.api.php | 188 +- web/core/lib/Drupal/Core/DrupalKernel.php | 24 + .../Core/Entity/Entity/EntityViewDisplay.php | 3 +- .../Plugin/DataType/ConfigEntityAdapter.php | 49 +- .../Drupal/Core/Entity/Query/Sql/Tables.php | 8 + .../Entity/Sql/SqlContentEntityStorage.php | 25 +- .../lib/Drupal/Core/Entity/entity.api.php | 8 +- .../lib/Drupal/Core/Extension/module.api.php | 14 + .../Field/FieldFormatter/StringFormatter.php | 8 +- .../Core/Layout/LayoutPluginManager.php | 14 + web/core/lib/Drupal/Core/Mail/MailManager.php | 10 +- .../lib/Drupal/Core/Path/AliasStorage.php | 2 +- .../Core/Plugin/Context/ContextDefinition.php | 2 +- .../ContextAwarePluginAssignmentTrait.php | 5 +- .../Core/Plugin/ContextAwarePluginBase.php | 2 +- .../lib/Drupal/Core/Render/Element/File.php | 2 +- .../Core/Render/Element/StatusMessages.php | 4 +- .../Core/Render/PreviewFallbackInterface.php | 21 + web/core/lib/Drupal/Core/Routing/Router.php | 39 + .../Security/PharExtensionInterceptor.php | 79 + .../Drupal/Core/Session/SessionManager.php | 10 +- .../Core/TempStore/PrivateTempStore.php | 2 + .../RecursiveContextualValidator.php | 8 +- .../lib/Drupal/Core/Update/UpdateKernel.php | 2 + web/core/misc/tableheader.es6.js | 2 +- web/core/misc/tableheader.js | 2 +- .../src/Tests/AggregatorTestBase.php | 19 +- .../src/Functional/AggregatorCronTest.php | 26 +- .../src/Functional/AggregatorTestBase.php | 19 +- .../tests/src/Functional/DeleteFeedTest.php | 4 +- .../tests/src/Functional/FeedParserTest.php | 12 +- .../tests/src/Functional/ImportOpmlTest.php | 28 +- .../src/Functional/UpdateFeedItemTest.php | 25 +- web/core/modules/block/js/block.admin.es6.js | 3 +- web/core/modules/block/js/block.admin.js | 2 +- .../modules/block/src/BlockListBuilder.php | 6 +- .../migrate/source/d7/BlockTranslation.php | 99 + ...ContextAwareNoValidContextOptionsBlock.php | 29 + .../tests/src/Functional/BlockUiTest.php | 52 +- .../d7/MigrateBlockContentTranslationTest.php | 69 + .../Kernel/Migrate/d7/MigrateBlockTest.php | 4 +- .../source/d7/BlockTranslationTest.php | 147 + .../Kernel/BlockContentAccessHandlerTest.php | 2 +- .../Migrate/d7/MigrateCommentTypeTest.php | 11 + .../src/EntityOperations.php | 13 +- .../Field/ModerationStateFieldItemList.php | 2 +- .../ModerationContentTranslationTest.php | 109 + .../src/Kernel/ContentModerationStateTest.php | 84 +- .../ModerationStateFieldItemListTest.php | 37 + ...d6_taxonomy_term_localized_translation.yml | 44 + .../migrations/d7_block_translation.yml | 77 + .../d6/MigrateTaxonomyTermTranslationTest.php | 7 +- .../src/Functional/Views/FilterDateTest.php | 147 + .../tests/src/Kernel/Views/FilterDateTest.php | 33 + .../EntityReferenceAdminTest.php | 195 +- .../EntityReferenceAdminTest.php | 244 ++ .../src/Kernel/String/StringFormatterTest.php | 24 +- .../Functional/ManageFieldsFunctionalTest.php | 2 +- web/core/modules/file/file.module | 369 +-- .../src/Functional/MultipleFileUploadTest.php | 59 + .../src/ConfigurableLanguageManager.php | 12 +- .../ConfigurableLanguageManagerTest.php | 189 ++ ...eContentTaxonomyVocabularySettingsTest.php | 4 +- .../layout_builder/css/layout-builder.css | 29 + .../layout_builder/layout_builder.info.yml | 2 + .../layout_builder/layout_builder.module | 25 +- .../layout_builder/layout_builder.routing.yml | 13 + .../src/Controller/ChooseBlockController.php | 188 +- .../Controller/LayoutBuilderController.php | 14 +- .../Entity/LayoutBuilderEntityViewDisplay.php | 9 +- .../BlockComponentRenderArray.php | 15 +- .../LayoutBuilderEntityViewDisplayForm.php | 7 +- .../src/LayoutEntityHelperTrait.php | 5 +- .../src/LayoutTempstoreRepository.php | 9 + .../LayoutTempstoreRepositoryInterface.php | 11 + .../src/Plugin/Block/ExtraFieldBlock.php | 11 +- .../src/Plugin/Block/FieldBlock.php | 11 +- .../Plugin/Derivative/FieldBlockDeriver.php | 2 +- .../LayoutBuilderLocalTaskDeriver.php | 100 +- .../SectionStorage/DefaultsSectionStorage.php | 28 +- .../OverridesSectionStorage.php | 52 +- ...ctionStorageLocalTaskProviderInterface.php | 29 + .../modules/layout_builder/src/Section.php | 9 + .../SectionStorage/SectionStorageTrait.php | 13 + .../layout_builder_fieldblock_test.schema.yml | 3 + .../layout_builder_fieldblock_test.info.yml | 6 + .../src/Plugin/Block/FieldBlock.php | 27 + .../src/Functional/LayoutBuilderTest.php | 75 +- .../src/Functional/LayoutSectionTest.php | 12 +- .../FunctionalJavascript/FieldBlockTest.php | 11 +- .../InlineBlockPrivateFilesTest.php | 4 +- .../FunctionalJavascript/InlineBlockTest.php | 70 + .../InlineBlockTestBase.php | 30 +- .../LayoutBuilderUiTest.php | 94 + .../tests/src/Kernel/FieldBlockTest.php | 29 +- ...outBuilderFieldLayoutCompatibilityTest.php | 3 +- .../src/Kernel/LayoutBuilderInstallTest.php | 5 +- .../src/Kernel/LayoutSectionItemListTest.php | 5 +- .../src/Kernel/SectionStorageTestBase.php | 11 + .../Unit/BlockComponentRenderArrayTest.php | 93 + .../Unit/LayoutTempstoreRepositoryTest.php | 6 + .../src/Unit/OverridesSectionStorageTest.php | 8 +- .../tests/src/Unit/SectionRenderTest.php | 5 +- web/core/modules/media/src/Entity/Media.php | 13 +- web/core/modules/media/src/MediaTypeForm.php | 11 + .../media/src/OEmbed/ResourceFetcher.php | 42 +- .../media/src/Plugin/media/Source/Image.php | 6 +- .../fixtures/oembed/video_collegehumor.xml | 2 +- .../src/Functional/MediaTypeCreationTest.php | 42 + .../src/Functional/MediaUiFunctionalTest.php | 2 +- .../Functional/Rest/MediaResourceTestBase.php | 4 +- .../MediaSourceImageTest.php | 2 + .../tests/src/Kernel/MediaSourceTest.php | 53 +- .../src/Plugin/Menu/MenuLinkContent.php | 2 +- .../tests/src/Unit/MenuLinkPluginTest.php | 31 + .../src/Plugin/MigrationPluginManager.php | 9 +- .../migrate/src/Plugin/migrate/id_map/Sql.php | 2 +- .../src/Plugin/migrate/process/FormatDate.php | 5 +- .../migrate/source/SourcePluginBase.php | 2 +- .../src/Plugin/migrate/source/SqlBase.php | 9 +- .../tests/src/Kernel/HighWaterTest.php | 66 + .../src/Kernel/MigrateEmbeddedDataTest.php | 5 + .../tests/src/Unit/MigrateSqlIdMapTest.php | 4 +- .../tests/src/Unit/process/FormatDateTest.php | 36 + .../Plugin/migrate/source/DrupalSqlBase.php | 2 +- .../migrate_drupal/tests/fixtures/drupal6.php | 272 +- .../migrate_drupal/tests/fixtures/drupal7.php | 1885 +++++++------ .../migrate/source/ContentEntityTest.php | 2 +- .../src/Unit/source/DrupalSqlBaseTest.php | 16 + .../src/Functional/d6/MigrateUpgrade6Test.php | 4 +- .../d7/MigrateUpgrade7ReviewPageTest.php | 2 +- web/core/modules/node/node.api.php | 8 +- web/core/modules/node/node.module | 8 +- web/core/modules/node/node.post_update.php | 7 + web/core/modules/node/src/NodeViewsData.php | 10 + .../src/Plugin/migrate/source/d7/NodeType.php | 2 +- .../node_access_test/node_access_test.module | 2 +- .../views.view.test_node_revision_nid.yml | 22 + .../views.view.test_node_revision_vid.yml | 23 + .../NodeRevisionPermissionsTest.php | 2 +- .../Views/RevisionRelationshipsTest.php | 42 +- .../Field/FieldType/PathFieldItemList.php | 15 +- .../src/Plugin/Field/FieldType/PathItem.php | 9 +- .../PathAliasConstraintValidator.php | 10 +- .../Functional/PathContentModerationTest.php | 132 +- .../src/Functional/PathLanguageUiTest.php | 34 + .../modules/shortcut/src/ShortcutForm.php | 10 + web/core/modules/simpletest/simpletest.module | 7 +- .../src/Tests/Ajax/ElementValidationTest.php | 39 - .../system/src/Tests/Ajax/FormValuesTest.php | 65 - .../system/src/Tests/Ajax/FrameworkTest.php | 216 -- .../src/Tests/Form/TriggeringElementTest.php | 97 - .../StackSessionHandlerIntegrationTest.php | 47 - .../modules/ajax_forms_test/src/Callbacks.php | 2 +- .../src/Form/AjaxFormsTestSimpleForm.php | 2 +- .../form_test/src/Form/FormTestFileForm.php | 42 + .../src/Functional/Ajax/FrameworkTest.php | 158 ++ .../Form/ElementsTableSelectTest.php | 80 +- .../tests/src/Functional/Form/RebuildTest.php | 61 + .../src/Functional}/Form/StorageTest.php | 82 +- .../tests/src/Functional/Mail/MailTest.php | 26 + .../src/Functional}/Routing/RouterTest.php | 74 +- .../Session/SessionAuthenticationTest.php | 32 +- .../src/Functional}/Session/SessionTest.php | 56 +- .../StackSessionHandlerIntegrationTest.php | 49 + .../Functional}/System/ErrorHandlerTest.php | 52 +- .../tests/src/Functional/Theme/ThemeTest.php | 6 +- .../Form/ElementsTableSelectTest.php | 58 + .../Form/RebuildTest.php | 80 +- .../Form/TriggeringElementTest.php | 111 + .../FunctionalJavascript/FrameworkTest.php | 122 + .../Kernel/Extension/ModuleHandlerTest.php | 4 +- .../tests/src/Kernel/Form/FileElementTest.php | 32 + .../themes/test_theme/test_theme.info.yml | 2 +- .../schema/test_theme_settings.schema.yml | 6 + .../test_theme_settings/theme-settings.php | 11 + .../source/d6/TermLocalizedTranslation.php | 100 + .../Migrate/d6/MigrateTaxonomyTermTest.php | 9 +- .../MigrateTermLocalizedTranslationTest.php | 142 + .../d6/MigrateVocabularyFieldInstanceTest.php | 4 +- .../d6/TermLocalizedTranslationTest.php | 179 ++ .../user/src/Tests/RestRegisterUserTest.php | 173 -- .../src/Functional/RestRegisterUserTest.php | 270 ++ web/core/modules/user/user.api.php | 12 +- .../views/src/Plugin/Block/ViewsBlockBase.php | 7 + .../views/src/Plugin/views/filter/Date.php | 6 +- .../Plugin/views/query/PostgresqlDateSql.php | 3 + .../src/Plugin/views/query/SqliteDateSql.php | 3 + .../views.view.test_click_sort_ajax.yml | 65 + .../views.view.test_mini_pager_ajax.yml | 88 + .../views.view.test_pager_full_ajax.yml | 37 + .../test_views/views.view.test_user_path.yml | 158 ++ .../tests/src/Functional/UserPathTest.php | 32 + .../tests/src/Kernel/ViewElementTest.php | 3 + .../views_ui/src/Tests/PreviewTest.php | 386 --- .../tests/src/Functional/PreviewTest.php | 161 ++ .../src/FunctionalJavascript/PreviewTest.php | 304 ++ .../modules/workspaces/src/EntityTypeInfo.php | 14 + ...eferenceSupportedNewEntitiesConstraint.php | 24 + ...upportedNewEntitiesConstraintValidator.php | 65 + .../workspaces/src/WorkspaceManager.php | 72 +- .../src/WorkspaceManagerInterface.php | 13 + .../tests/src/Functional/WorkspaceTest.php | 34 +- ...rtedNewEntitiesConstraintValidatorTest.php | 81 + .../src/Kernel/WorkspaceIntegrationTest.php | 100 +- .../tests/src/Kernel/WorkspaceTestTrait.php | 67 + web/core/modules/workspaces/workspaces.module | 16 +- .../workspaces/workspaces.services.yml | 2 +- .../install/views.view.articles_aside.yml | 14 + .../install/views.view.featured_articles.yml | 14 + .../config/install/views.view.frontpage.yml | 14 + .../config/install/views.view.recipes.yml | 14 + .../default_content/LICENCE.txt | 1 + .../dairy-free-delicious-milk-chocolate.html | 12 + .../default_content/articles.csv | 3 +- .../images/vegan-chocolate.jpg | Bin 0 -> 65650 bytes .../blocks/footer-promo/footer-promo.css | 3 + .../blocks/search/search-results.css | 8 +- .../css/components/blocks/search/search.css | 44 +- .../content-types/recipe/recipe.css | 12 +- .../components/fields/recipe-instruction.css | 11 +- .../umami/css/components/forms/contact.css | 6 +- .../css/components/messages/messages.css | 11 +- .../navigation/breadcrumbs/breadcrumbs.css | 3 + .../navigation/menu-account/menu-account.css | 11 +- .../navigation/menu-main/menu-main.css | 6 +- .../css/components/navigation/tabs/tabs.css | 5 +- .../css/components/views/promoted-items.css | 12 +- .../profiles/demo_umami/themes/umami/logo.svg | 4 +- .../Ajax/ElementValidationTest.php | 53 + .../Ajax/FormValuesTest.php | 84 + .../Bootstrap/UncaughtExceptionTest.php | 28 +- .../FunctionalTests/BrowserTestBaseTest.php | 15 + .../InstallerDatabaseErrorMessagesTest.php | 2 +- .../Installer/InstallerTranslationTest.php | 4 +- .../Drupal/KernelTests/AssertConfigTrait.php | 6 +- .../KernelTests/Core/Common/SizeTest.php | 9 +- .../Core/Entity/EntityFieldTest.php | 30 + .../Core/Entity/EntityQueryTest.php | 45 +- .../KernelTests/Core/File/PharWrapperTest.php | 33 + .../Core/File/StreamWrapperTest.php | 27 + .../Plugin/EntityContextTypedDataTest.php | 37 + .../KernelTests/Core/Theme/MessageTest.php | 8 + .../tests/Drupal/Tests/BrowserTestBase.php | 18 +- .../Component/Datetime/DateTimePlusTest.php | 8 +- .../PhpTransliterationTest.php | 56 +- .../Tests/Component/Utility/MailTest.php | 60 + .../Tests/Core/Command/QuickStartTest.php | 48 +- .../RssResponseRelativeUrlFilterTest.php | 2 +- .../Core/Layout/LayoutPluginManagerTest.php | 49 +- .../Context/ContextAwarePluginBaseTest.php | 96 + ...EntityContextDefinitionDeprecationTest.php | 167 +- .../Drupal/Tests/Core/Routing/RouterTest.php | 60 + web/core/tests/Drupal/Tests/UiHelperTrait.php | 29 +- web/core/tests/Drupal/Tests/WebAssert.php | 28 + web/core/themes/bartik/bartik.theme | 2 +- web/modules/contrib/webform/README.md | 19 +- web/modules/contrib/webform/composer.json | 2 + .../contrib/webform/composer.libraries.json | 48 +- .../config/install/webform.settings.yml | 31 +- .../install/webform.webform.contact.yml | 5 + .../webform.webform_options.translations.yml | 11 + .../config/schema/webform.action.schema.yml | 4 - .../config/schema/webform.block.schema.yml | 9 +- .../schema/webform.entity.webform.schema.yml | 65 +- .../webform.entity.webform_options.schema.yml | 8 +- .../config/schema/webform.field.schema.yml | 10 +- .../schema/webform.plugin.exporter.schema.yml | 7 +- .../schema/webform.plugin.handler.schema.yml | 65 +- .../config/schema/webform.settings.schema.yml | 28 +- .../webform.third_party.honeypot.schema.yml | 1 - .../webform/css/webform.element.date.css | 8 + .../webform/css/webform.element.datelist.css | 8 + .../css/webform.element.image_file.css | 4 + .../css/webform.element.managed_file.css | 30 + .../webform/css/webform.element.states.css | 11 + .../css/webform.element.video_file.css | 12 +- .../webform/css/webform.theme.seven.css | 36 +- .../webform/docs/DEVELOPMENT-CHEATSHEET.md | 3 +- web/modules/contrib/webform/docs/FEATURES.md | 850 ++++-- .../contrib/webform/docs/RELEASE-NOTES.md | 4 + .../contrib/webform/drush/webform.drush.inc | 4 +- .../webform/images/elements/date-calendar.png | Bin 0 -> 210 bytes .../contrib/webform/includes/webform.date.inc | 108 +- .../includes/webform.install.update.inc | 196 ++ .../webform/includes/webform.libraries.inc | 42 +- .../webform/includes/webform.options.inc | 13 + .../webform/includes/webform.theme.inc | 3 + .../includes/webform.theme.template.inc | 30 +- .../webform/includes/webform.translation.inc | 98 +- .../contrib/webform/js/webform.announce.js | 33 + .../webform/js/webform.element.codemirror.js | 2 +- .../webform/js/webform.element.computed.js | 30 +- .../webform/js/webform.element.date.js | 15 + .../js/webform.element.details.toggle.js | 4 +- .../js/webform.element.location.places.js | 2 +- .../webform/js/webform.element.states.js | 53 + .../contrib/webform/js/webform.states.js | 4 +- .../webform/js/webform.wizard.track.js | 38 +- .../src/Entity/WebformAccessGroup.php | 2 +- .../src/Entity/WebformAccessType.php | 2 +- .../src/Tests/WebformAccessTest.php | 6 +- .../src/WebformAccessGroupForm.php | 17 +- .../webform_access/webform_access.info.yml | 6 +- .../webform_access.links.task.yml | 12 + .../webform_access/webform_access.module | 25 + .../webform_access/webform_access.routing.yml | 4 +- .../webform_bootstrap_test_module.info.yml | 6 +- .../webform_bootstrap_test_theme.info.yml | 6 +- .../webform_bootstrap.info.yml | 6 +- .../webform_bootstrap.module | 23 + .../webform.webform.demo_application.yml | 5 + ...rm.webform.demo_application_evaluation.yml | 5 + ...bform_demo_application_evaluation.info.yml | 6 +- ....field.node.webform_demo_event.webform.yml | 2 +- ...ebform.webform.demo_event_registration.yml | 5 + .../webform_demo_event_registration.info.yml | 6 +- .../webform.webform.demo_region_contact.yml | 5 + .../webform_demo_region_contact.info.yml | 6 +- .../src/Commands/WebformDevelCommands.php | 23 +- .../webform_devel/webform_devel.drush.inc | 2 + .../webform_devel/webform_devel.info.yml | 6 +- .../webform_editorial.info.yml | 6 +- ...form.webform.webform_example_composite.yml | 5 + .../webform_example_composite.info.yml | 6 +- ...ebform.webform.webform_example_element.yml | 5 + .../webform_example_element.info.yml | 6 +- ...ebform.webform.webform_example_handler.yml | 10 +- .../schema/webform_example_handler.schema.yml | 4 +- .../WebformHandler/ExampleWebformHandler.php | 4 +- .../webform_example_handler.info.yml | 6 +- .../webform.webform.example_remote_post.yml | 5 + .../webform_example_remote_post.info.yml | 6 +- ...form.webform.example_computed_elements.yml | 13 +- ...webform.example_computed_elements_ajax.yml | 21 +- ...webform.webform.example_element_states.yml | 5 + ...webform.webform.example_flexbox_layout.yml | 5 + .../webform.webform.example_input_masks.yml | 5 + .../webform.webform.example_style_guide.yml | 17 +- .../webform.webform.example_wizard.yml | 5 + .../webform_examples.info.yml | 6 +- ...webform.example_accessibility_advanced.yml | 15 +- ...rm.webform.example_accessibility_basic.yml | 38 +- ...bform.example_accessibility_containers.yml | 17 +- ...m.webform.example_accessibility_labels.yml | 28 +- ...m.webform.example_accessibility_wizard.yml | 5 + .../webform_examples_accessibility.info.yml | 6 +- .../schema/webform_image_select.schema.yml | 8 +- .../WebformImageSelectImagesController.php | 55 + .../src/Element/WebformImageSelect.php | 2 +- .../src/Entity/WebformImageSelectImages.php | 3 +- .../WebformImageSelectImagesFilterForm.php | 88 + .../WebformElement/WebformImageSelect.php | 4 +- .../WebformImageSelectImagesListBuilder.php | 113 +- ...form.webform.test_element_image_select.yml | 5 + .../webform.webform.test_element_images.yml | 9 +- .../webform_image_select_test.info.yml | 6 +- .../webform_image_select.info.yml | 6 +- .../webform_image_select.module | 57 + .../webform_image_select.routing.yml | 7 + .../WebformNodeSubmissionLogController.php | 22 - ...m.webform.webform_node_test_multiple_a.yml | 5 + ...m.webform.webform_node_test_multiple_b.yml | 5 + .../webform_node_test_multiple.info.yml | 6 +- ....webform.webform_node_test_translation.yml | 10 +- .../webform_node_test_translation.info.yml | 6 +- .../webform_node/webform_node.info.yml | 6 +- .../webform_node/webform_node.links.task.yml | 12 - .../webform_node/webform_node.routing.yml | 32 - .../webform_scheduled_email.settings.yml | 1 + ...scheduled_email.plugin.handler.schema.yml} | 3 + ...ebform_scheduled_email.settings.schema.yml | 7 + .../drush/webform_scheduled_email.drush.inc | 2 + .../WebformScheduledEmailCommands.php | 2 + .../ScheduleEmailWebformHandler.php | 68 +- .../src/Tests/WebformScheduledEmailTest.php | 47 +- .../WebformScheduledEmailTranslationTest.php | 56 + .../src/WebformScheduledEmailManager.php | 192 +- .../WebformScheduledEmailManagerInterface.php | 36 +- ...-handler-scheduled-email-summary.html.twig | 3 + ...m.webform.test_handler_scheduled_email.yml | 21 +- .../webform_scheduled_email_test.info.yml | 6 +- .../config/install/language.entity.es.yml | 8 + ...bform.test_handler_scheduled_translate.yml | 5 + ...bform.test_handler_scheduled_translate.yml | 215 ++ ..._scheduled_email_test_translation.info.yml | 17 + .../webform_scheduled_email.info.yml | 6 +- .../webform_scheduled_email.install | 17 + .../webform_scheduled_email.module | 37 + .../webform_scheduled_email.services.yml | 2 +- .../webform_shortcuts.info.yml | 6 +- .../WebformSubmissionLogController.php | 90 +- .../WebformSubmissionLogRouteSubscriber.php | 41 + .../Tests/WebformSubmissionLogNodeTest.php} | 19 +- .../src/Tests/WebformSubmissionLogTest.php | 34 +- .../src/Tests/WebformSubmissionLogTrait.php | 75 + .../src/WebformSubmissionLogLogger.php | 91 + .../src/WebformSubmissionLogManager.php | 145 + .../WebformSubmissionLogManagerInterface.php | 67 + .../webform_submission_log.info.yml | 13 + .../webform_submission_log.install | 90 + .../webform_submission_log.links.task.yml | 33 + .../webform_submission_log.module | 87 + .../webform_submission_log.permissions.yml | 3 + .../webform_submission_log.routing.yml | 68 + .../webform_submission_log.services.yml | 16 + .../webform.webform.template_contact.yml | 5 + ...m.webform.template_employee_evaluation.yml | 5 + .../webform.webform.template_feedback.yml | 5 + .../webform.webform.template_issue.yml | 5 + ...bform.webform.template_job_application.yml | 7 +- ...rm.webform.template_job_seeker_profile.yml | 6 + .../webform.webform.template_registration.yml | 5 + ...rm.webform.template_session_evaluation.yml | 5 + .../webform.webform.template_subscribe.yml | 5 + .../webform.webform.template_user_profile.yml | 7 +- .../webform_templates.info.yml | 6 +- .../src/Form/WebformUiElementFormBase.php | 5 +- .../Tests/WebformUiElementPropertiesTest.php | 2 +- .../src/WebformUiEntityElementsForm.php | 2 +- .../modules/webform_ui/webform_ui.info.yml | 6 +- .../webform_ui/webform_ui.permissions.yml | 4 - .../src/Commands/WebformCliService.php | 79 +- .../webform/src/Commands/WebformCommands.php | 30 +- .../src/Controller/WebformHelpController.php | 51 + .../Controller/WebformOptionsController.php | 76 +- .../WebformSubmissionViewController.php | 7 + .../src/Controller/WebformTestController.php | 55 +- .../webform/src/Element/WebformCodeMirror.php | 6 + .../src/Element/WebformComputedBase.php | 38 +- .../src/Element/WebformComputedToken.php | 2 +- .../src/Element/WebformComputedTwig.php | 2 +- .../src/Element/WebformElementStates.php | 287 +- .../src/Element/WebformEntityTrait.php | 7 +- .../webform/src/Element/WebformMapping.php | 1 + .../webform/src/Element/WebformMultiple.php | 13 +- .../webform/src/Element/WebformOtherBase.php | 1 + .../webform/src/Element/WebformTime.php | 34 +- .../contrib/webform/src/Entity/Webform.php | 125 +- .../webform/src/Entity/WebformSubmission.php | 5 +- .../WebformEntitySettingsAssetsForm.php | 3 + .../WebformEntitySettingsFormForm.php | 16 + .../WebformEntitySettingsGeneralForm.php | 7 +- .../WebformEntitySettingsSubmissionsForm.php | 15 +- .../WebformExceptionHtmlSubscriber.php | 21 +- .../WebformAdminConfigAdvancedForm.php | 103 +- .../WebformAdminConfigHandlersForm.php | 14 +- .../WebformAdminConfigSubmissionsForm.php | 31 +- .../WebformConfigEntityDeleteFormBase.php | 2 +- .../src/Form/WebformContributeForm.php | 28 +- .../src/Form/WebformEntityFilterForm.php | 2 +- .../webform/src/Form/WebformHelpVideoForm.php | 18 +- .../src/Form/WebformOptionsFilterForm.php | 88 + .../src/Form/WebformResultsCustomForm.php | 2 - .../src/Form/WebformSubmissionFilterForm.php | 2 +- .../webform/src/Plugin/Condition/Webform.php | 3 +- .../WebformEntityReferenceEntityFormatter.php | 25 +- .../WebformEntityReferenceUrlFormatter.php | 52 + .../FieldType/WebformEntityReferenceItem.php | 10 + ...bformEntityReferenceAutocompleteWidget.php | 238 +- .../WebformEntityReferenceSelectWidget.php | 132 +- .../WebformEntityReferenceWidgetTrait.php | 260 ++ .../src/Plugin/WebformElement/Checkboxes.php | 7 + .../src/Plugin/WebformElement/Container.php | 1 + .../Plugin/WebformElement/ContainerBase.php | 27 +- .../src/Plugin/WebformElement/Date.php | 27 +- .../src/Plugin/WebformElement/DateBase.php | 163 +- .../src/Plugin/WebformElement/DateList.php | 22 +- .../src/Plugin/WebformElement/DateTime.php | 109 +- .../src/Plugin/WebformElement/NumericBase.php | 4 +- .../src/Plugin/WebformElement/OptionsBase.php | 30 +- .../src/Plugin/WebformElement/TextBase.php | 128 +- .../src/Plugin/WebformElement/Textarea.php | 1 + .../WebformElement/WebformCodeMirror.php | 6 + .../WebformElement/WebformCompositeBase.php | 42 +- .../WebformElement/WebformComputedBase.php | 18 +- .../WebformElement/WebformComputedTwig.php | 2 +- .../WebformEntityOptionsTrait.php | 8 + .../WebformEntityReferenceTrait.php | 12 +- .../Plugin/WebformElement/WebformLikert.php | 15 + .../WebformElement/WebformManagedFileBase.php | 194 +- .../Plugin/WebformElement/WebformMapping.php | 1 + .../Plugin/WebformElement/WebformSection.php | 1 + .../WebformElement/WebformTableTrait.php | 33 +- .../src/Plugin/WebformElement/WebformTime.php | 31 +- .../webform/src/Plugin/WebformElementBase.php | 82 +- .../src/Plugin/WebformElementInterface.php | 17 +- .../TabularBaseWebformExporter.php | 4 +- .../WebformHandler/ActionWebformHandler.php | 8 +- .../WebformHandler/EmailWebformHandler.php | 71 +- .../RemotePostWebformHandler.php | 26 +- .../WebformHandler/SettingsWebformHandler.php | 5 +- .../webform/src/Plugin/WebformHandlerBase.php | 49 +- .../QueryStringWebformSourceEntity.php | 18 +- .../src/Plugin/WebformSourceEntityManager.php | 2 +- .../Access/WebformAccessEntityJsonApiTest.php | 2 +- .../Access/WebformAccessEntityRulesTest.php | 2 +- .../Composite/WebformCompositeFormatTest.php | 8 +- .../Element/WebformElementCodeMirrorTest.php | 5 + .../Element/WebformElementComputedTest.php | 2 +- .../Element/WebformElementDateListTest.php | 27 +- .../Element/WebformElementDateTimeTest.php | 32 +- .../WebformElementFormatCustomTest.php | 2 +- .../Element/WebformElementFormatTest.php | 28 +- .../Element/WebformElementInputMaskTest.php | 96 + .../WebformElementManagedFilePreviewTest.php | 58 + .../Element/WebformElementManagedFileTest.php | 20 +- .../Element/WebformElementStatesTest.php | 37 +- .../Tests/Element/WebformElementTimeTest.php | 6 +- .../WebformElementValidateUniqueTest.php | 7 +- .../WebformHandlerEmailAdvancedTest.php | 28 +- .../Handler/WebformHandlerEmailBasicTest.php | 37 +- .../Handler/WebformHandlerRemotePostTest.php | 3 +- .../src/Tests/Handler/WebformHandlerTest.php | 35 + .../WebformSettingsConfidentialTest.php | 6 +- .../WebformSettingsConfirmationTest.php | 10 +- .../Settings/WebformSettingsDraftTest.php | 2 +- .../WebformSettingsLimitUniqueTest.php | 34 +- .../Settings/WebformSettingsPathTest.php | 56 +- .../WebformSettingsPrepopulateTest.php | 7 + .../Settings/WebformSettingsPreviewTest.php | 17 +- .../WebformSettingsRemoteAddrTest.php | 36 + .../Tests/WebformEntityTranslationTest.php | 52 + .../src/Tests/WebformLibrariesTest.php | 21 + .../webform/src/Tests/WebformOptionsTest.php | 1 - .../Tests/WebformResultsExportOptionsTest.php | 1 - ...bformSubmissionConditionsValidatorTest.php | 123 +- .../Tests/WebformSubmissionStorageTest.php | 4 + .../src/Tests/WebformSubmissionViewTest.php | 2 +- .../webform/src/Tests/WebformTestBase.php | 67 +- .../webform/src/Tests/WebformTestTrait.php | 1 + .../Tests/WebformTokenSubmissionValueTest.php | 4 +- .../Wizard/WebformWizardAdvancedTest.php | 2 +- .../contrib/webform/src/Utility/Mail.php | 71 + .../src/Utility/WebformArrayHelper.php | 19 + .../webform/src/Utility/WebformDateHelper.php | 97 +- .../src/Utility/WebformElementHelper.php | 38 +- .../webform/src/WebformAccessRulesManager.php | 40 +- .../WebformAccessRulesManagerInterface.php | 51 + .../webform/src/WebformAddonsManager.php | 36 +- .../src/WebformEntityAccessControlHandler.php | 10 +- .../src/WebformEntityElementsValidator.php | 21 + .../webform/src/WebformEntityHandlersForm.php | 17 +- .../webform/src/WebformEntityListBuilder.php | 26 +- .../webform/src/WebformEntityStorage.php | 35 +- .../webform/src/WebformHelpManager.php | 222 +- .../contrib/webform/src/WebformInterface.php | 49 +- .../webform/src/WebformLibrariesManager.php | 30 +- .../webform/src/WebformOptionsListBuilder.php | 113 +- .../WebformSubmissionConditionsValidator.php | 315 ++- ...SubmissionConditionsValidatorInterface.php | 4 +- .../webform/src/WebformSubmissionExporter.php | 52 +- .../webform/src/WebformSubmissionForm.php | 45 +- .../src/WebformSubmissionListBuilder.php | 16 +- .../src/WebformSubmissionNotesForm.php | 25 +- .../webform/src/WebformSubmissionStorage.php | 152 +- .../src/WebformSubmissionStorageInterface.php | 18 +- .../src/WebformSubmissionStorageSchema.php | 69 - .../src/WebformSubmissionViewsData.php | 2 + .../webform/src/WebformTokenManager.php | 14 +- .../src/WebformTokenManagerInterface.php | 38 +- .../webform/src/WebformTranslationManager.php | 13 + .../templates/webform-confirmation.html.twig | 2 +- .../webform-help-video-youtube.html.twig | 2 +- .../templates/webform-submission.html.twig | 4 +- .../install/webform.webform.test_ajax.yml | 5 + ....webform.test_ajax_confirmation_inline.yml | 5 + ...webform.test_ajax_confirmation_message.yml | 5 + ...m.webform.test_ajax_confirmation_modal.yml | 5 + ...rm.webform.test_ajax_confirmation_page.yml | 5 + ...orm.webform.test_ajax_confirmation_url.yml | 5 + ...webform.test_ajax_confirmation_url_msg.yml | 5 + .../webform.webform.test_composite.yml | 11 +- .../webform.webform.test_composite_custom.yml | 23 +- ...orm.webform.test_composite_custom_file.yml | 7 +- .../webform.webform.test_composite_format.yml | 5 + ...webform.test_composite_format_multiple.yml | 5 + ...bform.webform.test_confirmation_inline.yml | 5 + ...form.webform.test_confirmation_message.yml | 5 + ...ebform.webform.test_confirmation_modal.yml | 5 + ...webform.webform.test_confirmation_none.yml | 5 + ...webform.webform.test_confirmation_page.yml | 5 + ....webform.test_confirmation_page_custom.yml | 5 + .../webform.webform.test_confirmation_url.yml | 5 + ....webform.test_confirmation_url_message.yml | 5 + .../install/webform.webform.test_element.yml | 6 + .../webform.webform.test_element_access.yml | 17 +- .../webform.webform.test_element_actions.yml | 5 + ...m.webform.test_element_actions_buttons.yml | 5 + .../webform.webform.test_element_address.yml | 7 +- ...form.webform.test_element_allowed_tags.yml | 5 + ...ebform.webform.test_element_attributes.yml | 6 + ...form.webform.test_element_autocomplete.yml | 7 +- .../webform.webform.test_element_buttons.yml | 5 + .../webform.webform.test_element_captcha.yml | 10 +- ...rm.webform.test_element_checkbox_value.yml | 7 +- ...ebform.webform.test_element_checkboxes.yml | 7 +- ...ebform.webform.test_element_codemirror.yml | 15 +- ...webform.webform.test_element_composite.yml | 7 +- ...webform.test_element_composite_wrapper.yml | 6 +- ...orm.webform.test_element_computed_ajax.yml | 26 +- ...rm.webform.test_element_computed_token.yml | 17 +- ...orm.webform.test_element_computed_twig.yml | 28 +- ...webform.webform.test_element_container.yml | 7 +- .../webform.webform.test_element_counter.yml | 5 + .../webform.webform.test_element_date.yml | 28 +- .../webform.webform.test_element_datelist.yml | 35 +- .../webform.webform.test_element_datetime.yml | 43 +- ...bform.test_element_description_tooltip.yml | 9 +- .../webform.webform.test_element_details.yml | 7 +- .../webform.webform.test_element_disabled.yml | 5 + .../webform.webform.test_element_email.yml | 5 + ....webform.test_element_entity_reference.yml | 5 + .../webform.webform.test_element_fieldset.yml | 21 +- .../webform.webform.test_element_flexbox.yml | 13 +- ...form.webform.test_element_flexbox_flex.yml | 5 + .../webform.webform.test_element_format.yml | 13 +- ...orm.webform.test_element_format_custom.yml | 19 + ...m.webform.test_element_format_multiple.yml | 5 + ...form.webform.test_element_format_token.yml | 5 + .../webform.webform.test_element_help.yml | 5 + ...m.webform.test_element_horizontal_rule.yml | 5 + ...bform.webform.test_element_html_editor.yml | 7 +- ...bform.webform.test_element_html_escape.yml | 9 +- ...bform.webform.test_element_html_markup.yml | 9 +- .../webform.webform.test_element_icheck.yml | 9 +- ...orm.webform.test_element_icheck_styles.yml | 85 +- ...ebform.test_element_ignored_properties.yml | 5 + ...ebform.webform.test_element_image_file.yml | 8 +- ....webform.test_element_image_resolution.yml | 7 +- ...ebform.webform.test_element_input_mask.yml | 240 ++ .../webform.webform.test_element_invalid.yml | 11 +- .../webform.webform.test_element_likert.yml | 19 +- ...m.webform.test_element_loc_geocomplete.yml | 5 + ...ebform.webform.test_element_loc_places.yml | 5 + ...form.webform.test_element_managed_file.yml | 18 +- ....webform.test_element_managed_file_dis.yml | 5 + ...webform.test_element_managed_file_help.yml | 229 ++ ...ebform.test_element_managed_file_limit.yml | 5 + ...webform.test_element_managed_file_name.yml | 5 + ...webform.test_element_managed_file_prev.yml | 217 ++ .../webform.webform.test_element_mapping.yml | 7 +- .../webform.webform.test_element_markup.yml | 5 + ...ebform.webform.test_element_media_file.yml | 5 + .../webform.webform.test_element_message.yml | 5 + .../webform.webform.test_element_more.yml | 7 +- .../webform.webform.test_element_multiple.yml | 11 +- ...orm.webform.test_element_multiple_date.yml | 11 +- ...webform.test_element_multiple_property.yml | 9 +- ...orm.webform.test_element_multiple_text.yml | 5 + .../webform.webform.test_element_options.yml | 15 +- .../webform.webform.test_element_other.yml | 5 + .../webform.webform.test_element_pattern.yml | 11 +- ...bform.webform.test_element_prepopulate.yml | 9 +- .../webform.webform.test_element_private.yml | 5 + .../webform.webform.test_element_radios.yml | 5 + .../webform.webform.test_element_range.yml | 11 +- .../webform.webform.test_element_rating.yml | 5 + .../webform.webform.test_element_readonly.yml | 5 + .../webform.webform.test_element_section.yml | 7 +- .../webform.webform.test_element_select.yml | 7 +- ...webform.webform.test_element_signature.yml | 5 + .../webform.webform.test_element_states.yml | 15 + ....webform.test_element_submission_views.yml | 5 + ...ebform.test_element_submission_views_r.yml | 5 + ...m.webform.test_element_submitted_value.yml | 5 + .../webform.webform.test_element_table.yml | 5 + ...webform.webform.test_element_telephone.yml | 5 + ...rm.webform.test_element_term_reference.yml | 9 +- ....webform.test_element_terms_of_service.yml | 11 +- ...bform.webform.test_element_text_format.yml | 5 + .../webform.webform.test_element_time.yml | 5 + .../webform.webform.test_element_toggle.yml | 5 + ...bform.webform.test_element_users_roles.yml | 5 + ...ebform.test_element_validate_minlength.yml | 5 + ...webform.test_element_validate_multiple.yml | 9 +- ...webform.test_element_validate_required.yml | 5 + ...m.webform.test_element_validate_unique.yml | 14 +- .../webform.webform.test_example_elements.yml | 9 +- ...ebform.test_example_elements_composite.yml | 5 + ...webform.test_exporter_entity_reference.yml | 5 + .../webform.webform.test_exporter_options.yml | 5 + ...ebform.webform.test_form_access_denied.yml | 5 + .../install/webform.webform.test_form_api.yml | 5 + .../webform.webform.test_form_archived.yml | 5 + .../webform.webform.test_form_assets.yml | 5 + .../webform.webform.test_form_autofill.yml | 5 + .../webform.webform.test_form_autofocus.yml | 5 + .../webform.webform.test_form_closed.yml | 5 + ...webform.webform.test_form_confidential.yml | 5 + ...bform.webform.test_form_details_toggle.yml | 5 + ...webform.test_form_disable_autocomplete.yml | 5 + ...webform.webform.test_form_disable_back.yml | 5 + ...ebform.test_form_disable_inline_errors.yml | 5 + ...form.webform.test_form_draft_anonymous.yml | 5 + ....webform.test_form_draft_authenticated.yml | 5 + ...bform.webform.test_form_draft_multiple.yml | 5 + ...ebform.webform.test_form_inline_errors.yml | 5 + .../webform.webform.test_form_limit.yml | 5 + ...m.webform.test_form_limit_total_unique.yml | 5 + ...rm.webform.test_form_limit_user_unique.yml | 5 + .../webform.webform.test_form_long_100.yml | 5 + .../webform.webform.test_form_long_200.yml | 5 + .../webform.webform.test_form_long_300.yml | 5 + .../webform.webform.test_form_novalidate.yml | 5 + .../webform.webform.test_form_opening.yml | 5 + .../webform.webform.test_form_prepopulate.yml | 5 + .../webform.webform.test_form_preview.yml | 53 +- .../webform.webform.test_form_properties.yml | 5 + .../webform.webform.test_form_remote_addr.yml | 175 ++ .../webform.webform.test_form_required.yml | 5 + .../webform.webform.test_form_reset.yml | 5 + ...orm.webform.test_form_results_disabled.yml | 5 + .../webform.webform.test_form_submit_back.yml | 5 + .../webform.webform.test_form_submit_once.yml | 5 + .../webform.webform.test_form_submit_text.yml | 5 + .../webform.webform.test_form_template.yml | 5 + .../webform.webform.test_form_unsaved.yml | 5 + .../webform.webform.test_form_validate.yml | 5 + ...ebform.webform.test_form_wizard_access.yml | 5 + ...form.webform.test_form_wizard_advanced.yml | 5 + ...webform.webform.test_form_wizard_basic.yml | 5 + ...m.webform.test_form_wizard_conditional.yml | 19 +- ...ebform.webform.test_form_wizard_custom.yml | 5 + ...webform.webform.test_form_wizard_links.yml | 5 + ...form.webform.test_form_wizard_long_100.yml | 5 + ...form.webform.test_form_wizard_long_200.yml | 5 + ...form.webform.test_form_wizard_long_300.yml | 5 + ...form.webform.test_form_wizard_validate.yml | 5 + ...webform.test_form_wizard_validate_comp.yml | 5 + .../webform.webform.test_handler_action.yml | 5 + .../webform.webform.test_handler_email.yml | 5 + ...rm.webform.test_handler_email_advanced.yml | 5 + ...orm.webform.test_handler_email_mapping.yml | 5 + ...bform.webform.test_handler_email_roles.yml | 7 +- ...form.webform.test_handler_email_states.yml | 5 + ...ebform.webform.test_handler_email_twig.yml | 5 + .../webform.webform.test_handler_settings.yml | 5 + ...ebform.webform.test_libraries_optional.yml | 5 + .../webform.webform.test_rendering.yml | 5 + ...es.yml => webform.webform.test_states.yml} | 19 +- ...bform.webform.test_states_autocomplete.yml | 316 +++ ...webform.webform.test_states_crosspage.yml} | 84 +- ...form.webform.test_states_server_clear.yml} | 25 +- ...bform.webform.test_states_server_comp.yml} | 26 +- ....webform.test_states_server_containers.yml | 230 ++ ...orm.webform.test_states_server_custom.yml} | 11 +- ...m.webform.test_states_server_multiple.yml} | 9 +- ...form.webform.test_states_server_nested.yml | 215 ++ ...rm.webform.test_states_server_preview.yml} | 7 +- ...m.webform.test_states_server_required.yml} | 9 +- ...bform.webform.test_states_server_save.yml} | 7 +- ...orm.webform.test_states_server_wizard.yml} | 17 +- ... webform.webform.test_states_triggers.yml} | 7 +- .../webform.webform.test_submission_label.yml | 5 + .../webform.webform.test_submission_log.yml | 5 + .../webform.webform.test_submission_views.yml | 5 + .../install/webform.webform.test_token.yml | 9 + ...rm.webform.test_token_submission_value.yml | 25 +- .../webform.webform.test_token_update.yml | 5 + .../webform_test.test_form_states.inc | 10 +- .../webform_test/webform_test.info.yml | 6 +- .../webform_test_ajax.info.yml | 6 +- .../webform_test_alter_hooks.info.yml | 6 +- .../webform_test_block_context.info.yml | 6 +- .../webform_test_block_custom.info.yml | 6 +- ...bform_test_block_submission_limit.info.yml | 6 +- .../webform_test_config_performance.info.yml | 6 +- .../webform_test_custom_properties.info.yml | 6 +- ....webform.test_element_comp_file_plugin.yml | 5 + ....webform.test_element_composite_plugin.yml | 5 + .../webform.webform.test_element_plugin.yml | 6 + .../webform_test_element.info.yml | 6 +- .../webform_test_exporter.info.yml | 6 +- ...ebform.webform.test_handler_conditions.yml | 5 + .../webform.webform.test_handler_test.yml | 13 + .../webform_test_handler.webform.schema.yml | 11 +- .../TestEntityMappingWebformHandler.php | 4 +- .../webform_test_handler.info.yml | 6 +- ...webform_test_handler_invoke_alter.info.yml | 6 +- ...ebform.webform.test_handler_remote_get.yml | 5 + ...bform.webform.test_handler_remote_post.yml | 5 + ....webform.test_handler_remote_post_file.yml | 5 + ...ebform.webform.test_handler_remote_put.yml | 5 + .../webform_test_handler_remote_post.info.yml | 6 +- .../webform_test_message_custom.info.yml | 6 +- .../install/webform.webform.test_options.yml | 5 + .../webform_test_options.info.yml | 6 +- .../webform_test_paragraphs.info.yml | 6 +- .../webform_test_rest.info.yml | 6 +- .../webform_test_submission_views.info.yml | 16 - .../webform.webform.test_submissions.yml | 5 + .../webform_test_submissions.info.yml | 6 +- ...webform_test_third_party_settings.info.yml | 6 +- .../install/language/es/webform.settings.yml | 6 +- .../es/webform.webform.test_translation.yml | 8 + ...bform.webform_options.test_translation.yml | 1 + .../webform.webform.test_translation.yml | 10 +- .../webform_test_translation.info.yml | 6 +- ...webform_test_translation_lingotek.info.yml | 6 +- .../webform_test_validate.info.yml | 6 +- .../views.view.webform_test_views_access.yml | 298 ++ .../webform_test_views.info.yml | 6 +- .../webform_test_wizard_custom.info.yml | 6 +- .../Functional/WebformAssertLegacyTrait.php | 768 ++++++ .../src/Functional/WebformBrowserTestBase.php | 475 ++++ .../Functional/WebformBrowserTestBaseTest.php | 81 + .../WebformContributeFunctionalTest.php | 4 +- .../WebformSubmissionViewsAccessTest.php | 190 ++ .../WebformEntityElementsValidationTest.php | 12 + .../Kernel/WebformSubmissionStorageTest.php | 2 + .../QueryStringWebformSourceEntityTest.php | 6 +- .../Unit/Utility/WebformDateHelperTest.php | 54 - .../WebformEntityAccessControlHandlerTest.php | 16 +- .../webform_test_bartik.info.yml | 6 +- web/modules/contrib/webform/webform.info.yml | 8 +- .../contrib/webform/webform.libraries.yml | 52 +- .../contrib/webform/webform.links.task.yml | 34 +- web/modules/contrib/webform/webform.module | 206 +- .../contrib/webform/webform.permissions.yml | 8 +- .../contrib/webform/webform.routing.yml | 70 +- .../contrib/webform/webform.services.yml | 7 +- 1753 files changed, 45274 insertions(+), 14619 deletions(-) create mode 100755 vendor/consolidation/annotated-command/.scenarios.lock/install create mode 100644 vendor/consolidation/annotated-command/.scenarios.lock/phpunit4/.gitignore create mode 100644 vendor/consolidation/annotated-command/.scenarios.lock/phpunit4/composer.json rename vendor/consolidation/{log/scenarios/symfony4 => annotated-command/.scenarios.lock/phpunit4}/composer.lock (68%) create mode 100644 vendor/consolidation/annotated-command/.scenarios.lock/symfony2/.gitignore create mode 100644 vendor/consolidation/annotated-command/.scenarios.lock/symfony2/composer.json create mode 100644 vendor/consolidation/annotated-command/.scenarios.lock/symfony4/.gitignore create mode 100644 vendor/consolidation/annotated-command/.scenarios.lock/symfony4/composer.json create mode 100644 vendor/consolidation/annotated-command/.scenarios.lock/symfony4/composer.lock create mode 100644 vendor/consolidation/annotated-command/src/Help/HelpDocumentBuilder.php create mode 100644 vendor/consolidation/annotated-command/src/Input/StdinAwareInterface.php create mode 100644 vendor/consolidation/annotated-command/src/Input/StdinAwareTrait.php create mode 100644 vendor/consolidation/annotated-command/src/Input/StdinHandler.php create mode 100644 vendor/consolidation/annotated-command/src/ParameterInjection.php create mode 100644 vendor/consolidation/annotated-command/src/ParameterInjector.php create mode 100644 vendor/consolidation/annotated-command/src/ResultWriter.php create mode 100755 vendor/consolidation/log/.scenarios.lock/install create mode 100644 vendor/consolidation/log/.scenarios.lock/phpunit4/.gitignore rename vendor/consolidation/log/{scenarios/symfony4 => .scenarios.lock/phpunit4}/composer.json (62%) create mode 100644 vendor/consolidation/log/.scenarios.lock/phpunit4/composer.lock create mode 100644 vendor/consolidation/log/.scenarios.lock/symfony2/.gitignore rename vendor/consolidation/log/{scenarios => .scenarios.lock}/symfony2/composer.json (61%) create mode 100644 vendor/consolidation/log/.scenarios.lock/symfony2/composer.lock rename vendor/consolidation/log/{scenarios => .scenarios.lock}/symfony2/src (100%) rename vendor/consolidation/log/{scenarios => .scenarios.lock}/symfony2/tests (100%) create mode 100644 vendor/consolidation/log/.scenarios.lock/symfony4/.gitignore create mode 100644 vendor/consolidation/log/.scenarios.lock/symfony4/composer.json create mode 100644 vendor/consolidation/log/.scenarios.lock/symfony4/composer.lock rename vendor/consolidation/log/{scenarios => .scenarios.lock}/symfony4/src (100%) rename vendor/consolidation/log/{scenarios => .scenarios.lock}/symfony4/tests (100%) create mode 100644 vendor/consolidation/log/CHANGELOG.md delete mode 100755 vendor/consolidation/log/scenarios/install delete mode 100644 vendor/consolidation/log/scenarios/symfony4/.gitignore create mode 100644 vendor/consolidation/log/src/LoggerManager.php create mode 100644 vendor/consolidation/log/src/StylableLoggerInterface.php rename vendor/consolidation/log/tests/{testLogMethods.php => LogMethodTests.php} (95%) create mode 100644 vendor/consolidation/log/tests/LoggerManagerTests.php rename vendor/consolidation/log/tests/{testLoggerVerbosityAndStyles.php => LoggerVerbosityAndStyleTests.php} (98%) create mode 100644 vendor/consolidation/robo/src/Exception/AbortTasksException.php create mode 100644 vendor/guzzlehttp/psr7/.editorconfig create mode 100644 vendor/guzzlehttp/psr7/src/Rfc7230.php create mode 100644 vendor/masterminds/html5/.php_cs.dist create mode 100644 vendor/nikic/php-parser/test/code/formatPreservation/addingPropertyType.test create mode 100644 vendor/nikic/php-parser/test/code/formatPreservation/removingPropertyType.test create mode 100644 vendor/nikic/php-parser/test/code/parser/stmt/class/propertyTypes.test create mode 100644 vendor/nikic/php-parser/test/code/prettyPrinter/stmt/properties.test delete mode 100755 vendor/paragonie/random_compat/build-phar.sh delete mode 100644 vendor/paragonie/random_compat/other/build_phar.php delete mode 100644 vendor/paragonie/random_compat/psalm-autoload.php delete mode 100644 vendor/paragonie/random_compat/psalm.xml create mode 100644 vendor/ralouphie/getallheaders/.gitignore create mode 100644 vendor/ralouphie/getallheaders/.travis.yml create mode 100644 vendor/ralouphie/getallheaders/LICENSE create mode 100644 vendor/ralouphie/getallheaders/README.md create mode 100644 vendor/ralouphie/getallheaders/composer.json create mode 100644 vendor/ralouphie/getallheaders/phpunit.xml create mode 100644 vendor/ralouphie/getallheaders/src/getallheaders.php create mode 100644 vendor/ralouphie/getallheaders/tests/GetAllHeadersTest.php create mode 100644 vendor/stecman/symfony-console-completion/tests/Stecman/Component/Symfony/Console/BashCompletion/CompletionCommandTest.php create mode 100644 vendor/symfony/dependency-injection/Tests/Fixtures/FactoryDummyWithoutReturnTypes.php create mode 100644 vendor/symfony/dependency-injection/Tests/Fixtures/FooForCircularWithAddCalls.php create mode 100644 vendor/symfony/dependency-injection/Tests/Fixtures/TestDefinition1.php create mode 100644 vendor/symfony/dependency-injection/Tests/Fixtures/graphviz/services_inline.dot create mode 100644 vendor/symfony/event-dispatcher/Tests/Debug/WrappedListenerTest.php create mode 100644 vendor/symfony/serializer/Tests/DeserializeNestedArrayOfObjectsTest.php create mode 100644 vendor/symfony/var-dumper/Caster/IntlCaster.php create mode 100644 vendor/symfony/var-dumper/Caster/MemcachedCaster.php create mode 100644 vendor/symfony/var-dumper/Caster/ProxyManagerCaster.php create mode 100644 vendor/symfony/var-dumper/Tests/Caster/IntlCasterTest.php create mode 100644 vendor/symfony/var-dumper/Tests/Caster/MemcachedCasterTest.php create mode 100644 vendor/symfony/var-dumper/Tests/Command/Descriptor/CliDescriptorTest.php create mode 100644 vendor/symfony/var-dumper/Tests/Command/Descriptor/HtmlDescriptorTest.php create mode 100644 vendor/twig/twig/doc/tags/deprecated.rst create mode 100644 vendor/twig/twig/lib/Twig/Node/Deprecated.php create mode 100644 vendor/twig/twig/lib/Twig/TokenParser/Deprecated.php create mode 100644 vendor/twig/twig/src/Node/DeprecatedNode.php create mode 100644 vendor/twig/twig/src/TokenParser/DeprecatedTokenParser.php create mode 100644 vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/floats.test create mode 100644 vendor/twig/twig/test/Twig/Tests/Fixtures/tags/deprecated/block.legacy.test create mode 100644 vendor/twig/twig/test/Twig/Tests/Fixtures/tags/deprecated/macro.legacy.test create mode 100644 vendor/twig/twig/test/Twig/Tests/Fixtures/tags/deprecated/template.legacy.test create mode 100644 vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/parent_as_template_wrapper.test create mode 100644 vendor/twig/twig/test/Twig/Tests/Fixtures/tests/dynamic_test.test create mode 100644 vendor/twig/twig/test/Twig/Tests/Node/DeprecatedTest.php rename vendor/{consolidation/log/scenarios/symfony2 => typo3/phar-stream-wrapper}/.gitignore (50%) create mode 100644 vendor/typo3/phar-stream-wrapper/LICENSE create mode 100644 vendor/typo3/phar-stream-wrapper/README.md create mode 100644 vendor/typo3/phar-stream-wrapper/composer.json create mode 100644 vendor/typo3/phar-stream-wrapper/src/Assertable.php create mode 100644 vendor/typo3/phar-stream-wrapper/src/Behavior.php create mode 100644 vendor/typo3/phar-stream-wrapper/src/Exception.php create mode 100644 vendor/typo3/phar-stream-wrapper/src/Helper.php create mode 100644 vendor/typo3/phar-stream-wrapper/src/Interceptor/PharExtensionInterceptor.php create mode 100644 vendor/typo3/phar-stream-wrapper/src/Manager.php create mode 100644 vendor/typo3/phar-stream-wrapper/src/PharStreamWrapper.php delete mode 100644 vendor/webmozart/assert/.composer-auth.json delete mode 100644 vendor/webmozart/assert/.styleci.yml create mode 100644 web/core/lib/Drupal/Component/Utility/Mail.php create mode 100644 web/core/lib/Drupal/Core/Render/PreviewFallbackInterface.php create mode 100644 web/core/lib/Drupal/Core/Security/PharExtensionInterceptor.php create mode 100644 web/core/modules/block/src/Plugin/migrate/source/d7/BlockTranslation.php create mode 100644 web/core/modules/block/tests/modules/block_test/src/Plugin/Block/TestContextAwareNoValidContextOptionsBlock.php create mode 100644 web/core/modules/block/tests/src/Kernel/Migrate/d7/MigrateBlockContentTranslationTest.php create mode 100644 web/core/modules/block/tests/src/Kernel/Plugin/migrate/source/d7/BlockTranslationTest.php create mode 100644 web/core/modules/content_moderation/tests/src/Functional/ModerationContentTranslationTest.php create mode 100644 web/core/modules/content_translation/migrations/d6_taxonomy_term_localized_translation.yml create mode 100644 web/core/modules/content_translation/migrations/d7_block_translation.yml create mode 100644 web/core/modules/datetime/tests/src/Functional/Views/FilterDateTest.php rename web/core/modules/field/{src/Tests => tests/src/Functional}/EntityReference/EntityReferenceAdminTest.php (64%) create mode 100644 web/core/modules/field/tests/src/FunctionalJavascript/EntityReference/EntityReferenceAdminTest.php create mode 100644 web/core/modules/file/tests/src/Functional/MultipleFileUploadTest.php create mode 100644 web/core/modules/language/tests/src/Functional/ConfigurableLanguageManagerTest.php create mode 100644 web/core/modules/layout_builder/src/Plugin/SectionStorage/SectionStorageLocalTaskProviderInterface.php create mode 100644 web/core/modules/layout_builder/tests/modules/layout_builder_fieldblock_test/config/schema/layout_builder_fieldblock_test.schema.yml create mode 100644 web/core/modules/layout_builder/tests/modules/layout_builder_fieldblock_test/layout_builder_fieldblock_test.info.yml create mode 100644 web/core/modules/layout_builder/tests/modules/layout_builder_fieldblock_test/src/Plugin/Block/FieldBlock.php create mode 100644 web/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderUiTest.php create mode 100644 web/core/modules/media/tests/src/Functional/MediaTypeCreationTest.php create mode 100644 web/core/modules/menu_link_content/tests/src/Unit/MenuLinkPluginTest.php delete mode 100644 web/core/modules/system/src/Tests/Ajax/ElementValidationTest.php delete mode 100644 web/core/modules/system/src/Tests/Ajax/FormValuesTest.php delete mode 100644 web/core/modules/system/src/Tests/Ajax/FrameworkTest.php delete mode 100644 web/core/modules/system/src/Tests/Form/TriggeringElementTest.php delete mode 100644 web/core/modules/system/src/Tests/Session/StackSessionHandlerIntegrationTest.php create mode 100644 web/core/modules/system/tests/modules/form_test/src/Form/FormTestFileForm.php create mode 100644 web/core/modules/system/tests/src/Functional/Ajax/FrameworkTest.php rename web/core/modules/system/{src/Tests => tests/src/Functional}/Form/ElementsTableSelectTest.php (65%) create mode 100644 web/core/modules/system/tests/src/Functional/Form/RebuildTest.php rename web/core/modules/system/{src/Tests => tests/src/Functional}/Form/StorageTest.php (61%) rename web/core/modules/system/{src/Tests => tests/src/Functional}/Routing/RouterTest.php (79%) rename web/core/modules/system/{src/Tests => tests/src/Functional}/Session/SessionAuthenticationTest.php (77%) rename web/core/modules/system/{src/Tests => tests/src/Functional}/Session/SessionTest.php (89%) create mode 100644 web/core/modules/system/tests/src/Functional/Session/StackSessionHandlerIntegrationTest.php rename web/core/modules/system/{src/Tests => tests/src/Functional}/System/ErrorHandlerTest.php (68%) create mode 100644 web/core/modules/system/tests/src/FunctionalJavascript/Form/ElementsTableSelectTest.php rename web/core/modules/system/{src/Tests => tests/src/FunctionalJavascript}/Form/RebuildTest.php (53%) create mode 100644 web/core/modules/system/tests/src/FunctionalJavascript/Form/TriggeringElementTest.php create mode 100644 web/core/modules/system/tests/src/FunctionalJavascript/FrameworkTest.php create mode 100644 web/core/modules/system/tests/src/Kernel/Form/FileElementTest.php create mode 100644 web/core/modules/taxonomy/src/Plugin/migrate/source/d6/TermLocalizedTranslation.php create mode 100644 web/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTermLocalizedTranslationTest.php create mode 100644 web/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/TermLocalizedTranslationTest.php delete mode 100644 web/core/modules/user/src/Tests/RestRegisterUserTest.php create mode 100644 web/core/modules/user/tests/src/Functional/RestRegisterUserTest.php create mode 100644 web/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_click_sort_ajax.yml create mode 100644 web/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_mini_pager_ajax.yml create mode 100644 web/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_pager_full_ajax.yml create mode 100644 web/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_user_path.yml create mode 100644 web/core/modules/views/tests/src/Functional/UserPathTest.php delete mode 100644 web/core/modules/views_ui/src/Tests/PreviewTest.php create mode 100644 web/core/modules/views_ui/tests/src/Functional/PreviewTest.php create mode 100644 web/core/modules/views_ui/tests/src/FunctionalJavascript/PreviewTest.php create mode 100644 web/core/modules/workspaces/src/Plugin/Validation/Constraint/EntityReferenceSupportedNewEntitiesConstraint.php create mode 100644 web/core/modules/workspaces/src/Plugin/Validation/Constraint/EntityReferenceSupportedNewEntitiesConstraintValidator.php create mode 100644 web/core/modules/workspaces/tests/src/Kernel/EntityReferenceSupportedNewEntitiesConstraintValidatorTest.php create mode 100644 web/core/modules/workspaces/tests/src/Kernel/WorkspaceTestTrait.php create mode 100644 web/core/profiles/demo_umami/modules/demo_umami_content/default_content/article_body/dairy-free-delicious-milk-chocolate.html create mode 100644 web/core/profiles/demo_umami/modules/demo_umami_content/default_content/images/vegan-chocolate.jpg create mode 100644 web/core/tests/Drupal/FunctionalJavascriptTests/Ajax/ElementValidationTest.php create mode 100644 web/core/tests/Drupal/FunctionalJavascriptTests/Ajax/FormValuesTest.php create mode 100644 web/core/tests/Drupal/KernelTests/Core/File/PharWrapperTest.php create mode 100644 web/core/tests/Drupal/KernelTests/Core/Plugin/EntityContextTypedDataTest.php create mode 100644 web/core/tests/Drupal/Tests/Component/Utility/MailTest.php create mode 100644 web/core/tests/Drupal/Tests/Core/Plugin/Context/ContextAwarePluginBaseTest.php create mode 100644 web/core/tests/Drupal/Tests/Core/Routing/RouterTest.php create mode 100644 web/modules/contrib/webform/config/install/webform.webform_options.translations.yml create mode 100644 web/modules/contrib/webform/css/webform.element.date.css create mode 100644 web/modules/contrib/webform/css/webform.element.datelist.css create mode 100644 web/modules/contrib/webform/css/webform.element.managed_file.css create mode 100644 web/modules/contrib/webform/images/elements/date-calendar.png create mode 100644 web/modules/contrib/webform/js/webform.announce.js create mode 100644 web/modules/contrib/webform/js/webform.element.states.js create mode 100644 web/modules/contrib/webform/modules/webform_image_select/src/Controller/WebformImageSelectImagesController.php create mode 100644 web/modules/contrib/webform/modules/webform_image_select/src/Form/WebformImageSelectImagesFilterForm.php delete mode 100644 web/modules/contrib/webform/modules/webform_node/src/Controller/WebformNodeSubmissionLogController.php create mode 100644 web/modules/contrib/webform/modules/webform_scheduled_email/config/install/webform_scheduled_email.settings.yml rename web/modules/contrib/webform/modules/webform_scheduled_email/config/schema/{webform_scheduled_email.yml => webform_scheduled_email.plugin.handler.schema.yml} (95%) create mode 100644 web/modules/contrib/webform/modules/webform_scheduled_email/config/schema/webform_scheduled_email.settings.schema.yml create mode 100644 web/modules/contrib/webform/modules/webform_scheduled_email/src/Tests/WebformScheduledEmailTranslationTest.php create mode 100644 web/modules/contrib/webform/modules/webform_scheduled_email/tests/modules/webform_scheduled_email_test_translation/config/install/language.entity.es.yml create mode 100644 web/modules/contrib/webform/modules/webform_scheduled_email/tests/modules/webform_scheduled_email_test_translation/config/install/language/es/webform.webform.test_handler_scheduled_translate.yml create mode 100644 web/modules/contrib/webform/modules/webform_scheduled_email/tests/modules/webform_scheduled_email_test_translation/config/install/webform.webform.test_handler_scheduled_translate.yml create mode 100644 web/modules/contrib/webform/modules/webform_scheduled_email/tests/modules/webform_scheduled_email_test_translation/webform_scheduled_email_test_translation.info.yml rename web/modules/contrib/webform/{ => modules/webform_submission_log}/src/Controller/WebformSubmissionLogController.php (74%) create mode 100644 web/modules/contrib/webform/modules/webform_submission_log/src/Routing/WebformSubmissionLogRouteSubscriber.php rename web/modules/contrib/webform/modules/{webform_node/src/Tests/WebformNodeSubmissionLogTest.php => webform_submission_log/src/Tests/WebformSubmissionLogNodeTest.php} (69%) rename web/modules/contrib/webform/{ => modules/webform_submission_log}/src/Tests/WebformSubmissionLogTest.php (81%) create mode 100644 web/modules/contrib/webform/modules/webform_submission_log/src/Tests/WebformSubmissionLogTrait.php create mode 100644 web/modules/contrib/webform/modules/webform_submission_log/src/WebformSubmissionLogLogger.php create mode 100644 web/modules/contrib/webform/modules/webform_submission_log/src/WebformSubmissionLogManager.php create mode 100644 web/modules/contrib/webform/modules/webform_submission_log/src/WebformSubmissionLogManagerInterface.php create mode 100644 web/modules/contrib/webform/modules/webform_submission_log/webform_submission_log.info.yml create mode 100644 web/modules/contrib/webform/modules/webform_submission_log/webform_submission_log.install create mode 100644 web/modules/contrib/webform/modules/webform_submission_log/webform_submission_log.links.task.yml create mode 100644 web/modules/contrib/webform/modules/webform_submission_log/webform_submission_log.module create mode 100644 web/modules/contrib/webform/modules/webform_submission_log/webform_submission_log.permissions.yml create mode 100644 web/modules/contrib/webform/modules/webform_submission_log/webform_submission_log.routing.yml create mode 100644 web/modules/contrib/webform/modules/webform_submission_log/webform_submission_log.services.yml delete mode 100644 web/modules/contrib/webform/modules/webform_ui/webform_ui.permissions.yml create mode 100644 web/modules/contrib/webform/src/Controller/WebformHelpController.php create mode 100644 web/modules/contrib/webform/src/Form/WebformOptionsFilterForm.php create mode 100644 web/modules/contrib/webform/src/Plugin/Field/FieldFormatter/WebformEntityReferenceUrlFormatter.php create mode 100644 web/modules/contrib/webform/src/Plugin/Field/FieldWidget/WebformEntityReferenceWidgetTrait.php create mode 100644 web/modules/contrib/webform/src/Tests/Element/WebformElementInputMaskTest.php create mode 100644 web/modules/contrib/webform/src/Tests/Element/WebformElementManagedFilePreviewTest.php create mode 100644 web/modules/contrib/webform/src/Tests/Settings/WebformSettingsRemoteAddrTest.php create mode 100644 web/modules/contrib/webform/src/Utility/Mail.php create mode 100644 web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_input_mask.yml create mode 100644 web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_managed_file_help.yml create mode 100644 web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_managed_file_prev.yml create mode 100644 web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_remote_addr.yml rename web/modules/contrib/webform/tests/modules/webform_test/config/install/{webform.webform.test_form_states.yml => webform.webform.test_states.yml} (99%) create mode 100644 web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_states_autocomplete.yml rename web/modules/contrib/webform/tests/modules/webform_test/config/install/{webform.webform.test_form_states_server_nested.yml => webform.webform.test_states_crosspage.yml} (73%) rename web/modules/contrib/webform/tests/modules/webform_test/config/install/{webform.webform.test_form_states_server_clear.yml => webform.webform.test_states_server_clear.yml} (94%) rename web/modules/contrib/webform/tests/modules/webform_test/config/install/{webform.webform.test_form_states_server_comp.yml => webform.webform.test_states_server_comp.yml} (88%) create mode 100644 web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_states_server_containers.yml rename web/modules/contrib/webform/tests/modules/webform_test/config/install/{webform.webform.test_form_states_server_custom.yml => webform.webform.test_states_server_custom.yml} (97%) rename web/modules/contrib/webform/tests/modules/webform_test/config/install/{webform.webform.test_form_states_server_multiple.yml => webform.webform.test_states_server_multiple.yml} (96%) create mode 100644 web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_states_server_nested.yml rename web/modules/contrib/webform/tests/modules/webform_test/config/install/{webform.webform.test_form_states_server_preview.yml => webform.webform.test_states_server_preview.yml} (97%) rename web/modules/contrib/webform/tests/modules/webform_test/config/install/{webform.webform.test_form_states_server_required.yml => webform.webform.test_states_server_required.yml} (99%) rename web/modules/contrib/webform/tests/modules/webform_test/config/install/{webform.webform.test_form_states_server_save.yml => webform.webform.test_states_server_save.yml} (97%) rename web/modules/contrib/webform/tests/modules/webform_test/config/install/{webform.webform.test_form_states_server_wizard.yml => webform.webform.test_states_server_wizard.yml} (96%) rename web/modules/contrib/webform/tests/modules/webform_test/config/install/{webform.webform.test_form_states_triggers.yml => webform.webform.test_states_triggers.yml} (98%) delete mode 100644 web/modules/contrib/webform/tests/modules/webform_test_submission_views/webform_test_submission_views.info.yml create mode 100644 web/modules/contrib/webform/tests/modules/webform_test_views/config/install/views.view.webform_test_views_access.yml create mode 100644 web/modules/contrib/webform/tests/src/Functional/WebformAssertLegacyTrait.php create mode 100644 web/modules/contrib/webform/tests/src/Functional/WebformBrowserTestBase.php create mode 100644 web/modules/contrib/webform/tests/src/Functional/WebformBrowserTestBaseTest.php create mode 100644 web/modules/contrib/webform/tests/src/Functional/WebformSubmissionViewsAccessTest.php delete mode 100644 web/modules/contrib/webform/tests/src/Unit/Utility/WebformDateHelperTest.php diff --git a/composer.lock b/composer.lock index 7e6c89a3a..a5563855e 100644 --- a/composer.lock +++ b/composer.lock @@ -351,16 +351,16 @@ }, { "name": "consolidation/annotated-command", - "version": "2.10.0", + "version": "2.11.0", "source": { "type": "git", "url": "https://github.com/consolidation/annotated-command.git", - "reference": "8e7d1a05230dc1159c751809e98b74f2b7f71873" + "reference": "edea407f57104ed518cc3c3b47d5b84403ee267a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/consolidation/annotated-command/zipball/8e7d1a05230dc1159c751809e98b74f2b7f71873", - "reference": "8e7d1a05230dc1159c751809e98b74f2b7f71873", + "url": "https://api.github.com/repos/consolidation/annotated-command/zipball/edea407f57104ed518cc3c3b47d5b84403ee267a", + "reference": "edea407f57104ed518cc3c3b47d5b84403ee267a", "shasum": "" }, "require": { @@ -372,13 +372,57 @@ "symfony/finder": "^2.5|^3|^4" }, "require-dev": { - "g1a/composer-test-scenarios": "^2", + "g1a/composer-test-scenarios": "^3", + "php-coveralls/php-coveralls": "^1", "phpunit/phpunit": "^6", - "satooshi/php-coveralls": "^2", "squizlabs/php_codesniffer": "^2.7" }, "type": "library", "extra": { + "scenarios": { + "symfony4": { + "require": { + "symfony/console": "^4.0" + }, + "config": { + "platform": { + "php": "7.1.3" + } + } + }, + "symfony2": { + "require": { + "symfony/console": "^2.8" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.36" + }, + "remove": [ + "php-coveralls/php-coveralls" + ], + "config": { + "platform": { + "php": "5.4.8" + } + }, + "scenario-options": { + "create-lockfile": "false" + } + }, + "phpunit4": { + "require-dev": { + "phpunit/phpunit": "^4.8.36" + }, + "remove": [ + "php-coveralls/php-coveralls" + ], + "config": { + "platform": { + "php": "5.4.8" + } + } + } + }, "branch-alias": { "dev-master": "2.x-dev" } @@ -399,7 +443,7 @@ } ], "description": "Initialize Symfony Console commands from annotated command class methods.", - "time": "2018-11-15T01:46:18+00:00" + "time": "2018-12-29T04:43:17+00:00" }, { "name": "consolidation/config", @@ -457,31 +501,72 @@ }, { "name": "consolidation/log", - "version": "1.0.6", + "version": "1.1.1", "source": { "type": "git", "url": "https://github.com/consolidation/log.git", - "reference": "dfd8189a771fe047bf3cd669111b2de5f1c79395" + "reference": "b2e887325ee90abc96b0a8b7b474cd9e7c896e3a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/consolidation/log/zipball/dfd8189a771fe047bf3cd669111b2de5f1c79395", - "reference": "dfd8189a771fe047bf3cd669111b2de5f1c79395", + "url": "https://api.github.com/repos/consolidation/log/zipball/b2e887325ee90abc96b0a8b7b474cd9e7c896e3a", + "reference": "b2e887325ee90abc96b0a8b7b474cd9e7c896e3a", "shasum": "" }, "require": { - "php": ">=5.5.0", - "psr/log": "~1.0", + "php": ">=5.4.5", + "psr/log": "^1.0", "symfony/console": "^2.8|^3|^4" }, "require-dev": { - "g1a/composer-test-scenarios": "^1", - "phpunit/phpunit": "4.*", - "satooshi/php-coveralls": "^2", - "squizlabs/php_codesniffer": "2.*" + "g1a/composer-test-scenarios": "^3", + "php-coveralls/php-coveralls": "^1", + "phpunit/phpunit": "^6", + "squizlabs/php_codesniffer": "^2" }, "type": "library", "extra": { + "scenarios": { + "symfony4": { + "require": { + "symfony/console": "^4.0" + }, + "config": { + "platform": { + "php": "7.1.3" + } + } + }, + "symfony2": { + "require": { + "symfony/console": "^2.8" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.36" + }, + "remove": [ + "php-coveralls/php-coveralls" + ], + "config": { + "platform": { + "php": "5.4.8" + } + } + }, + "phpunit4": { + "require-dev": { + "phpunit/phpunit": "^4.8.36" + }, + "remove": [ + "php-coveralls/php-coveralls" + ], + "config": { + "platform": { + "php": "5.4.8" + } + } + } + }, "branch-alias": { "dev-master": "1.x-dev" } @@ -502,7 +587,7 @@ } ], "description": "Improved Psr-3 / Psr\\Log logger based on Symfony Console components.", - "time": "2018-05-25T18:14:39+00:00" + "time": "2019-01-01T17:30:51+00:00" }, { "name": "consolidation/output-formatters", @@ -562,20 +647,20 @@ }, { "name": "consolidation/robo", - "version": "1.3.2", + "version": "1.4.3", "source": { "type": "git", "url": "https://github.com/consolidation/Robo.git", - "reference": "a9bd9ecf00751aa92754903c0d17612c4e840ce8" + "reference": "d0b6f516ec940add7abed4f1432d30cca5f8ae0c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/consolidation/Robo/zipball/a9bd9ecf00751aa92754903c0d17612c4e840ce8", - "reference": "a9bd9ecf00751aa92754903c0d17612c4e840ce8", + "url": "https://api.github.com/repos/consolidation/Robo/zipball/d0b6f516ec940add7abed4f1432d30cca5f8ae0c", + "reference": "d0b6f516ec940add7abed4f1432d30cca5f8ae0c", "shasum": "" }, "require": { - "consolidation/annotated-command": "^2.8.2", + "consolidation/annotated-command": "^2.10.2", "consolidation/config": "^1.0.10", "consolidation/log": "~1", "consolidation/output-formatters": "^3.1.13", @@ -647,7 +732,7 @@ } }, "branch-alias": { - "dev-master": "1.x-dev" + "dev-master": "2.x-dev" } }, "autoload": { @@ -666,7 +751,7 @@ } ], "description": "Modern task runner", - "time": "2018-11-22T05:43:44+00:00" + "time": "2019-01-02T21:33:28+00:00" }, { "name": "consolidation/self-update", @@ -2079,16 +2164,16 @@ }, { "name": "drupal/core", - "version": "8.6.3", + "version": "8.6.7", "source": { "type": "git", "url": "https://github.com/drupal/core.git", - "reference": "9e9a1dd9e280ebaf10622217e54448b529167965" + "reference": "e0a09bda1da7552204464894811a59387608c9f9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/drupal/core/zipball/9e9a1dd9e280ebaf10622217e54448b529167965", - "reference": "9e9a1dd9e280ebaf10622217e54448b529167965", + "url": "https://api.github.com/repos/drupal/core/zipball/e0a09bda1da7552204464894811a59387608c9f9", + "reference": "e0a09bda1da7552204464894811a59387608c9f9", "shasum": "" }, "require": { @@ -2132,6 +2217,7 @@ "symfony/validator": "~3.4.0", "symfony/yaml": "~3.4.5", "twig/twig": "^1.35.0", + "typo3/phar-stream-wrapper": "^2.0.1", "zendframework/zend-diactoros": "^1.1", "zendframework/zend-feed": "^2.4" }, @@ -2313,7 +2399,7 @@ "GPL-2.0-or-later" ], "description": "Drupal is an open source content management platform powering millions of websites and applications.", - "time": "2018-11-07T14:45:40+00:00" + "time": "2019-01-16T23:30:03+00:00" }, { "name": "drupal/ctools", @@ -2613,26 +2699,28 @@ }, { "name": "drupal/webform", - "version": "5.0.0-rc26", + "version": "5.1.0", "source": { "type": "git", "url": "https://git.drupal.org/project/webform", - "reference": "8.x-5.0-rc26" + "reference": "8.x-5.1" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/webform-8.x-5.0-rc26.zip", - "reference": "8.x-5.0-rc26", - "shasum": "9bcddf036572a1b8896412aa7d7f214152f8a717" + "url": "https://ftp.drupal.org/files/projects/webform-8.x-5.1.zip", + "reference": "8.x-5.1", + "shasum": "d04743f078dc154685f9532253e6b5ea8dda1a56" }, "require": { "drupal/core": "*" }, "require-dev": { "drupal/address": "~1.4", + "drupal/chosen": "~2.6", "drupal/devel": "*", "drupal/jsonapi": "~2.0", - "drupal/token": "*", + "drupal/select2": "~1.1", + "drupal/token": "~1.3", "drupal/webform_access": "*", "drupal/webform_node": "*", "drupal/webform_scheduled_email": "*", @@ -2644,11 +2732,11 @@ "dev-5.x": "5.x-dev" }, "drupal": { - "version": "8.x-5.0-rc26", - "datestamp": "1541466481", + "version": "8.x-5.1", + "datestamp": "1546458480", "security-coverage": { - "status": "not-covered", - "message": "RC releases are not covered by Drupal security advisories." + "status": "covered", + "message": "Covered by Drupal's security advisory policy" } }, "drush": { @@ -3143,32 +3231,33 @@ }, { "name": "guzzlehttp/psr7", - "version": "1.4.2", + "version": "1.5.2", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c" + "reference": "9f83dded91781a01c63574e387eaa769be769115" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/f5b8a8512e2b58b0071a7280e39f14f72e05d87c", - "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/9f83dded91781a01c63574e387eaa769be769115", + "reference": "9f83dded91781a01c63574e387eaa769be769115", "shasum": "" }, "require": { "php": ">=5.4.0", - "psr/http-message": "~1.0" + "psr/http-message": "~1.0", + "ralouphie/getallheaders": "^2.0.5" }, "provide": { "psr/http-message-implementation": "1.0" }, "require-dev": { - "phpunit/phpunit": "~4.0" + "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "1.5-dev" } }, "autoload": { @@ -3198,13 +3287,14 @@ "keywords": [ "http", "message", + "psr-7", "request", "response", "stream", "uri", "url" ], - "time": "2017-03-20T17:10:46+00:00" + "time": "2018-12-04T20:46:45+00:00" }, { "name": "jakub-onderka/php-console-color", @@ -3361,16 +3451,16 @@ }, { "name": "masterminds/html5", - "version": "2.4.0", + "version": "2.5.0", "source": { "type": "git", "url": "https://github.com/Masterminds/html5-php.git", - "reference": "cadcfaaa13153e0e8eb92c49a53e140cf1a85dea" + "reference": "b5d892a4bd058d61f736935d32a9c248f11ccc93" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Masterminds/html5-php/zipball/cadcfaaa13153e0e8eb92c49a53e140cf1a85dea", - "reference": "cadcfaaa13153e0e8eb92c49a53e140cf1a85dea", + "url": "https://api.github.com/repos/Masterminds/html5-php/zipball/b5d892a4bd058d61f736935d32a9c248f11ccc93", + "reference": "b5d892a4bd058d61f736935d32a9c248f11ccc93", "shasum": "" }, "require": { @@ -3380,14 +3470,14 @@ "php": ">=5.3.0" }, "require-dev": { - "phpunit/phpunit": "4.*", + "phpunit/phpunit": "^4.8.35", "sami/sami": "~2.0", "satooshi/php-coveralls": "1.0.*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.2-dev" + "dev-master": "2.4-dev" } }, "autoload": { @@ -3424,20 +3514,20 @@ "serializer", "xml" ], - "time": "2018-11-17T20:24:36+00:00" + "time": "2018-12-27T22:03:43+00:00" }, { "name": "nikic/php-parser", - "version": "v4.1.0", + "version": "v4.2.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "d0230c5c77a7e3cfa69446febf340978540958c0" + "reference": "594bcae1fc0bccd3993d2f0d61a018e26ac2865a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/d0230c5c77a7e3cfa69446febf340978540958c0", - "reference": "d0230c5c77a7e3cfa69446febf340978540958c0", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/594bcae1fc0bccd3993d2f0d61a018e26ac2865a", + "reference": "594bcae1fc0bccd3993d2f0d61a018e26ac2865a", "shasum": "" }, "require": { @@ -3453,7 +3543,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "4.2-dev" } }, "autoload": { @@ -3475,20 +3565,20 @@ "parser", "php" ], - "time": "2018-10-10T09:24:14+00:00" + "time": "2019-01-12T16:31:37+00:00" }, { "name": "paragonie/random_compat", - "version": "v2.0.17", + "version": "v2.0.18", "source": { "type": "git", "url": "https://github.com/paragonie/random_compat.git", - "reference": "29af24f25bab834fcbb38ad2a69fa93b867e070d" + "reference": "0a58ef6e3146256cc3dc7cc393927bcc7d1b72db" }, "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/0a58ef6e3146256cc3dc7cc393927bcc7d1b72db", + "reference": "0a58ef6e3146256cc3dc7cc393927bcc7d1b72db", "shasum": "" }, "require": { @@ -3524,7 +3614,7 @@ "pseudorandom", "random" ], - "time": "2018-07-04T16:31:37+00:00" + "time": "2019-01-03T20:59:08+00:00" }, { "name": "psr/container", @@ -3746,6 +3836,46 @@ ], "time": "2018-10-13T15:16:03+00:00" }, + { + "name": "ralouphie/getallheaders", + "version": "2.0.5", + "source": { + "type": "git", + "url": "https://github.com/ralouphie/getallheaders.git", + "reference": "5601c8a83fbba7ef674a7369456d12f1e0d0eafa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/5601c8a83fbba7ef674a7369456d12f1e0d0eafa", + "reference": "5601c8a83fbba7ef674a7369456d12f1e0d0eafa", + "shasum": "" + }, + "require": { + "php": ">=5.3" + }, + "require-dev": { + "phpunit/phpunit": "~3.7.0", + "satooshi/php-coveralls": ">=1.0" + }, + "type": "library", + "autoload": { + "files": [ + "src/getallheaders.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" + } + ], + "description": "A polyfill for getallheaders.", + "time": "2016-02-11T07:05:27+00:00" + }, { "name": "stack/builder", "version": "v1.0.5", @@ -3797,16 +3927,16 @@ }, { "name": "stecman/symfony-console-completion", - "version": "0.8.0", + "version": "0.9.0", "source": { "type": "git", "url": "https://github.com/stecman/symfony-console-completion.git", - "reference": "cd738867503477e91dbe84173dfabd431c883431" + "reference": "bd07a24190541de2828c1d6469a8ddce599d3c5a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/stecman/symfony-console-completion/zipball/cd738867503477e91dbe84173dfabd431c883431", - "reference": "cd738867503477e91dbe84173dfabd431c883431", + "url": "https://api.github.com/repos/stecman/symfony-console-completion/zipball/bd07a24190541de2828c1d6469a8ddce599d3c5a", + "reference": "bd07a24190541de2828c1d6469a8ddce599d3c5a", "shasum": "" }, "require": { @@ -3838,7 +3968,7 @@ } ], "description": "Automatic BASH completion for Symfony Console Component based applications.", - "time": "2018-02-10T04:28:01+00:00" + "time": "2019-01-19T21:25:25+00:00" }, { "name": "symfony-cmf/routing", @@ -3901,16 +4031,16 @@ }, { "name": "symfony/class-loader", - "version": "v3.4.18", + "version": "v3.4.21", "source": { "type": "git", "url": "https://github.com/symfony/class-loader.git", - "reference": "5605edec7b8f034ead2497ff4aab17bb70d558c1" + "reference": "4513348012c25148f8cbc3a7761a1d1e60ca3e87" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/class-loader/zipball/5605edec7b8f034ead2497ff4aab17bb70d558c1", - "reference": "5605edec7b8f034ead2497ff4aab17bb70d558c1", + "url": "https://api.github.com/repos/symfony/class-loader/zipball/4513348012c25148f8cbc3a7761a1d1e60ca3e87", + "reference": "4513348012c25148f8cbc3a7761a1d1e60ca3e87", "shasum": "" }, "require": { @@ -3953,20 +4083,20 @@ ], "description": "Symfony ClassLoader Component", "homepage": "https://symfony.com", - "time": "2018-10-31T09:06:03+00:00" + "time": "2019-01-01T13:45:19+00:00" }, { "name": "symfony/config", - "version": "v3.4.18", + "version": "v3.4.21", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "99b2fa8acc244e656cdf324ff419fbe6fd300a4d" + "reference": "17c5d8941eb75a03d19bc76a43757738632d87b3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/99b2fa8acc244e656cdf324ff419fbe6fd300a4d", - "reference": "99b2fa8acc244e656cdf324ff419fbe6fd300a4d", + "url": "https://api.github.com/repos/symfony/config/zipball/17c5d8941eb75a03d19bc76a43757738632d87b3", + "reference": "17c5d8941eb75a03d19bc76a43757738632d87b3", "shasum": "" }, "require": { @@ -4017,20 +4147,20 @@ ], "description": "Symfony Config Component", "homepage": "https://symfony.com", - "time": "2018-10-31T09:06:03+00:00" + "time": "2019-01-01T13:45:19+00:00" }, { "name": "symfony/console", - "version": "v3.4.18", + "version": "v3.4.21", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "1d228fb4602047d7b26a0554e0d3efd567da5803" + "reference": "a700b874d3692bc8342199adfb6d3b99f62cc61a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/1d228fb4602047d7b26a0554e0d3efd567da5803", - "reference": "1d228fb4602047d7b26a0554e0d3efd567da5803", + "url": "https://api.github.com/repos/symfony/console/zipball/a700b874d3692bc8342199adfb6d3b99f62cc61a", + "reference": "a700b874d3692bc8342199adfb6d3b99f62cc61a", "shasum": "" }, "require": { @@ -4086,20 +4216,20 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2018-10-30T16:50:50+00:00" + "time": "2019-01-04T04:42:43+00:00" }, { "name": "symfony/css-selector", - "version": "v3.4.18", + "version": "v3.4.21", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "3503415d4aafabc31cd08c3a4ebac7f43fde8feb" + "reference": "12f86295c46c36af9896cf21db6b6b8a1465315d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/3503415d4aafabc31cd08c3a4ebac7f43fde8feb", - "reference": "3503415d4aafabc31cd08c3a4ebac7f43fde8feb", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/12f86295c46c36af9896cf21db6b6b8a1465315d", + "reference": "12f86295c46c36af9896cf21db6b6b8a1465315d", "shasum": "" }, "require": { @@ -4139,20 +4269,20 @@ ], "description": "Symfony CssSelector Component", "homepage": "https://symfony.com", - "time": "2018-10-02T16:33:53+00:00" + "time": "2019-01-02T09:30:52+00:00" }, { "name": "symfony/debug", - "version": "v3.4.18", + "version": "v3.4.21", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "fe9793af008b651c5441bdeab21ede8172dab097" + "reference": "26d7f23b9bd0b93bee5583e4d6ca5cb1ab31b186" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/fe9793af008b651c5441bdeab21ede8172dab097", - "reference": "fe9793af008b651c5441bdeab21ede8172dab097", + "url": "https://api.github.com/repos/symfony/debug/zipball/26d7f23b9bd0b93bee5583e4d6ca5cb1ab31b186", + "reference": "26d7f23b9bd0b93bee5583e4d6ca5cb1ab31b186", "shasum": "" }, "require": { @@ -4195,20 +4325,20 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "time": "2018-10-31T09:06:03+00:00" + "time": "2019-01-01T13:45:19+00:00" }, { "name": "symfony/dependency-injection", - "version": "v3.4.18", + "version": "v3.4.21", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "9c98452ac7fff4b538956775630bc9701f5384ba" + "reference": "928a38b18bd632d67acbca74d0b2eed09915e83e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/9c98452ac7fff4b538956775630bc9701f5384ba", - "reference": "9c98452ac7fff4b538956775630bc9701f5384ba", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/928a38b18bd632d67acbca74d0b2eed09915e83e", + "reference": "928a38b18bd632d67acbca74d0b2eed09915e83e", "shasum": "" }, "require": { @@ -4266,20 +4396,20 @@ ], "description": "Symfony DependencyInjection Component", "homepage": "https://symfony.com", - "time": "2018-10-31T10:49:51+00:00" + "time": "2019-01-05T12:26:58+00:00" }, { "name": "symfony/dom-crawler", - "version": "v3.4.18", + "version": "v3.4.21", "source": { "type": "git", "url": "https://github.com/symfony/dom-crawler.git", - "reference": "c705bee03ade5b47c087807dd9ffaaec8dda2722" + "reference": "311f666d85d1075b0a294ba1f3de4ae9307d8180" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/c705bee03ade5b47c087807dd9ffaaec8dda2722", - "reference": "c705bee03ade5b47c087807dd9ffaaec8dda2722", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/311f666d85d1075b0a294ba1f3de4ae9307d8180", + "reference": "311f666d85d1075b0a294ba1f3de4ae9307d8180", "shasum": "" }, "require": { @@ -4323,20 +4453,20 @@ ], "description": "Symfony DomCrawler Component", "homepage": "https://symfony.com", - "time": "2018-10-02T12:28:39+00:00" + "time": "2019-01-01T13:45:19+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v3.4.18", + "version": "v3.4.21", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "db9e829c8f34c3d35cf37fcd4cdb4293bc4a2f14" + "reference": "d1cdd46c53c264a2bd42505bd0e8ce21423bd0e2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/db9e829c8f34c3d35cf37fcd4cdb4293bc4a2f14", - "reference": "db9e829c8f34c3d35cf37fcd4cdb4293bc4a2f14", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/d1cdd46c53c264a2bd42505bd0e8ce21423bd0e2", + "reference": "d1cdd46c53c264a2bd42505bd0e8ce21423bd0e2", "shasum": "" }, "require": { @@ -4386,20 +4516,20 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2018-10-30T16:50:50+00:00" + "time": "2019-01-01T18:08:36+00:00" }, { "name": "symfony/filesystem", - "version": "v3.4.18", + "version": "v3.4.21", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "d69930fc337d767607267d57c20a7403d0a822a4" + "reference": "c24ce3d18ccc9bb9d7e1d6ce9330fcc6061cafde" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/d69930fc337d767607267d57c20a7403d0a822a4", - "reference": "d69930fc337d767607267d57c20a7403d0a822a4", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/c24ce3d18ccc9bb9d7e1d6ce9330fcc6061cafde", + "reference": "c24ce3d18ccc9bb9d7e1d6ce9330fcc6061cafde", "shasum": "" }, "require": { @@ -4436,20 +4566,20 @@ ], "description": "Symfony Filesystem Component", "homepage": "https://symfony.com", - "time": "2018-10-02T12:28:39+00:00" + "time": "2019-01-01T13:45:19+00:00" }, { "name": "symfony/finder", - "version": "v3.4.18", + "version": "v3.4.21", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "54ba444dddc5bd5708a34bd095ea67c6eb54644d" + "reference": "3f2a2ab6315dd7682d4c16dcae1e7b95c8b8555e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/54ba444dddc5bd5708a34bd095ea67c6eb54644d", - "reference": "54ba444dddc5bd5708a34bd095ea67c6eb54644d", + "url": "https://api.github.com/repos/symfony/finder/zipball/3f2a2ab6315dd7682d4c16dcae1e7b95c8b8555e", + "reference": "3f2a2ab6315dd7682d4c16dcae1e7b95c8b8555e", "shasum": "" }, "require": { @@ -4485,20 +4615,20 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2018-10-03T08:46:40+00:00" + "time": "2019-01-01T13:45:19+00:00" }, { "name": "symfony/http-foundation", - "version": "v3.4.18", + "version": "v3.4.21", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "5aea7a86ca3203dd7a257e765b4b9c9cfd01c6c0" + "reference": "2b97319e68816d2120eee7f13f4b76da12e04d03" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/5aea7a86ca3203dd7a257e765b4b9c9cfd01c6c0", - "reference": "5aea7a86ca3203dd7a257e765b4b9c9cfd01c6c0", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/2b97319e68816d2120eee7f13f4b76da12e04d03", + "reference": "2b97319e68816d2120eee7f13f4b76da12e04d03", "shasum": "" }, "require": { @@ -4539,20 +4669,20 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "https://symfony.com", - "time": "2018-10-31T08:57:11+00:00" + "time": "2019-01-05T08:05:37+00:00" }, { "name": "symfony/http-kernel", - "version": "v3.4.18", + "version": "v3.4.21", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "4bf0be7c7fe63eff6a5eae2f21c83e77e31a56fb" + "reference": "60bd9d7444ca436e131c347d78ec039dd99a34b4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/4bf0be7c7fe63eff6a5eae2f21c83e77e31a56fb", - "reference": "4bf0be7c7fe63eff6a5eae2f21c83e77e31a56fb", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/60bd9d7444ca436e131c347d78ec039dd99a34b4", + "reference": "60bd9d7444ca436e131c347d78ec039dd99a34b4", "shasum": "" }, "require": { @@ -4628,7 +4758,7 @@ ], "description": "Symfony HttpKernel Component", "homepage": "https://symfony.com", - "time": "2018-11-03T10:03:02+00:00" + "time": "2019-01-06T15:53:59+00:00" }, { "name": "symfony/polyfill-ctype", @@ -4922,16 +5052,16 @@ }, { "name": "symfony/process", - "version": "v3.4.18", + "version": "v3.4.21", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "35c2914a9f50519bd207164c353ae4d59182c2cb" + "reference": "0d41dd7d95ed179aed6a13393b0f4f97bfa2d25c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/35c2914a9f50519bd207164c353ae4d59182c2cb", - "reference": "35c2914a9f50519bd207164c353ae4d59182c2cb", + "url": "https://api.github.com/repos/symfony/process/zipball/0d41dd7d95ed179aed6a13393b0f4f97bfa2d25c", + "reference": "0d41dd7d95ed179aed6a13393b0f4f97bfa2d25c", "shasum": "" }, "require": { @@ -4967,7 +5097,7 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2018-10-14T17:33:21+00:00" + "time": "2019-01-02T21:24:08+00:00" }, { "name": "symfony/psr-http-message-bridge", @@ -5032,16 +5162,16 @@ }, { "name": "symfony/routing", - "version": "v3.4.18", + "version": "v3.4.21", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "585f6e2d740393d546978769dd56e496a6233e0b" + "reference": "445d3629a26930158347a50d1a5f2456c49e0ae6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/585f6e2d740393d546978769dd56e496a6233e0b", - "reference": "585f6e2d740393d546978769dd56e496a6233e0b", + "url": "https://api.github.com/repos/symfony/routing/zipball/445d3629a26930158347a50d1a5f2456c49e0ae6", + "reference": "445d3629a26930158347a50d1a5f2456c49e0ae6", "shasum": "" }, "require": { @@ -5105,20 +5235,20 @@ "uri", "url" ], - "time": "2018-10-02T12:28:39+00:00" + "time": "2019-01-01T13:45:19+00:00" }, { "name": "symfony/serializer", - "version": "v3.4.18", + "version": "v3.4.21", "source": { "type": "git", "url": "https://github.com/symfony/serializer.git", - "reference": "8bc00ef47a428bfebc4641f29d158e7c56137fcb" + "reference": "3bb84f8a785bf30be3d4aef6f3c80f103acc54df" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/serializer/zipball/8bc00ef47a428bfebc4641f29d158e7c56137fcb", - "reference": "8bc00ef47a428bfebc4641f29d158e7c56137fcb", + "url": "https://api.github.com/repos/symfony/serializer/zipball/3bb84f8a785bf30be3d4aef6f3c80f103acc54df", + "reference": "3bb84f8a785bf30be3d4aef6f3c80f103acc54df", "shasum": "" }, "require": { @@ -5184,20 +5314,20 @@ ], "description": "Symfony Serializer Component", "homepage": "https://symfony.com", - "time": "2018-10-02T12:28:39+00:00" + "time": "2019-01-01T13:45:19+00:00" }, { "name": "symfony/translation", - "version": "v3.4.18", + "version": "v3.4.21", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "94bc3a79008e6640defedf5e14eb3b4f20048352" + "reference": "5f357063f4907cef47e5cf82fa3187fbfb700456" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/94bc3a79008e6640defedf5e14eb3b4f20048352", - "reference": "94bc3a79008e6640defedf5e14eb3b4f20048352", + "url": "https://api.github.com/repos/symfony/translation/zipball/5f357063f4907cef47e5cf82fa3187fbfb700456", + "reference": "5f357063f4907cef47e5cf82fa3187fbfb700456", "shasum": "" }, "require": { @@ -5252,20 +5382,20 @@ ], "description": "Symfony Translation Component", "homepage": "https://symfony.com", - "time": "2018-10-02T16:33:53+00:00" + "time": "2019-01-01T13:45:19+00:00" }, { "name": "symfony/validator", - "version": "v3.4.18", + "version": "v3.4.21", "source": { "type": "git", "url": "https://github.com/symfony/validator.git", - "reference": "6ab5fee7c0763d90753f37fce6db9fdbca1b1a4c" + "reference": "cd3fba16d309347883b74bb0ee8cb4720a60554c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/validator/zipball/6ab5fee7c0763d90753f37fce6db9fdbca1b1a4c", - "reference": "6ab5fee7c0763d90753f37fce6db9fdbca1b1a4c", + "url": "https://api.github.com/repos/symfony/validator/zipball/cd3fba16d309347883b74bb0ee8cb4720a60554c", + "reference": "cd3fba16d309347883b74bb0ee8cb4720a60554c", "shasum": "" }, "require": { @@ -5337,20 +5467,20 @@ ], "description": "Symfony Validator Component", "homepage": "https://symfony.com", - "time": "2018-10-14T18:32:13+00:00" + "time": "2019-01-06T14:07:11+00:00" }, { "name": "symfony/var-dumper", - "version": "v4.1.7", + "version": "v4.2.2", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "60319b45653580b0cdacca499344577d87732f16" + "reference": "85bde661b178173d85c6f11ea9d03b61d1212bb2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/60319b45653580b0cdacca499344577d87732f16", - "reference": "60319b45653580b0cdacca499344577d87732f16", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/85bde661b178173d85c6f11ea9d03b61d1212bb2", + "reference": "85bde661b178173d85c6f11ea9d03b61d1212bb2", "shasum": "" }, "require": { @@ -5364,6 +5494,7 @@ }, "require-dev": { "ext-iconv": "*", + "symfony/console": "~3.4|~4.0", "symfony/process": "~3.4|~4.0", "twig/twig": "~1.34|~2.4" }, @@ -5378,7 +5509,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "4.2-dev" } }, "autoload": { @@ -5412,20 +5543,20 @@ "debug", "dump" ], - "time": "2018-10-02T16:36:10+00:00" + "time": "2019-01-03T09:07:35+00:00" }, { "name": "symfony/yaml", - "version": "v3.4.18", + "version": "v3.4.21", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "640b6c27fed4066d64b64d5903a86043f4a4de7f" + "reference": "554a59a1ccbaac238a89b19c8e551a556fd0e2ea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/640b6c27fed4066d64b64d5903a86043f4a4de7f", - "reference": "640b6c27fed4066d64b64d5903a86043f4a4de7f", + "url": "https://api.github.com/repos/symfony/yaml/zipball/554a59a1ccbaac238a89b19c8e551a556fd0e2ea", + "reference": "554a59a1ccbaac238a89b19c8e551a556fd0e2ea", "shasum": "" }, "require": { @@ -5471,35 +5602,35 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2018-10-02T16:33:53+00:00" + "time": "2019-01-01T13:45:19+00:00" }, { "name": "twig/twig", - "version": "v1.35.4", + "version": "v1.37.1", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "7e081e98378a1e78c29cc9eba4aefa5d78a05d2a" + "reference": "66be9366c76cbf23e82e7171d47cbfa54a057a62" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/7e081e98378a1e78c29cc9eba4aefa5d78a05d2a", - "reference": "7e081e98378a1e78c29cc9eba4aefa5d78a05d2a", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/66be9366c76cbf23e82e7171d47cbfa54a057a62", + "reference": "66be9366c76cbf23e82e7171d47cbfa54a057a62", "shasum": "" }, "require": { - "php": ">=5.3.3", + "php": ">=5.4.0", "symfony/polyfill-ctype": "^1.8" }, "require-dev": { "psr/container": "^1.0", "symfony/debug": "^2.7", - "symfony/phpunit-bridge": "^3.3" + "symfony/phpunit-bridge": "^3.4.19|^4.1.8" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.35-dev" + "dev-master": "1.37-dev" } }, "autoload": { @@ -5537,20 +5668,60 @@ "keywords": [ "templating" ], - "time": "2018-07-13T07:12:17+00:00" + "time": "2019-01-14T14:59:29+00:00" }, { - "name": "vlucas/phpdotenv", - "version": "v2.5.1", + "name": "typo3/phar-stream-wrapper", + "version": "v2.0.1", "source": { "type": "git", - "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "8abb4f9aa89ddea9d52112c65bbe8d0125e2fa8e" + "url": "https://github.com/TYPO3/phar-stream-wrapper.git", + "reference": "0469d9fefa0146ea4299d3b11cfbb76faa7045bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/8abb4f9aa89ddea9d52112c65bbe8d0125e2fa8e", - "reference": "8abb4f9aa89ddea9d52112c65bbe8d0125e2fa8e", + "url": "https://api.github.com/repos/TYPO3/phar-stream-wrapper/zipball/0469d9fefa0146ea4299d3b11cfbb76faa7045bf", + "reference": "0469d9fefa0146ea4299d3b11cfbb76faa7045bf", + "shasum": "" + }, + "require": { + "php": "^5.3.3|^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.36" + }, + "type": "library", + "autoload": { + "psr-4": { + "TYPO3\\PharStreamWrapper\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Interceptors for PHP's native phar:// stream handling", + "homepage": "https://typo3.org/", + "keywords": [ + "phar", + "php", + "security", + "stream-wrapper" + ], + "time": "2018-10-18T08:46:28+00:00" + }, + { + "name": "vlucas/phpdotenv", + "version": "v2.5.2", + "source": { + "type": "git", + "url": "https://github.com/vlucas/phpdotenv.git", + "reference": "cfd5dc225767ca154853752abc93aeec040fcf36" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/cfd5dc225767ca154853752abc93aeec040fcf36", + "reference": "cfd5dc225767ca154853752abc93aeec040fcf36", "shasum": "" }, "require": { @@ -5587,7 +5758,7 @@ "env", "environment" ], - "time": "2018-07-29T20:33:41+00:00" + "time": "2018-10-30T17:29:25+00:00" }, { "name": "webflo/drupal-finder", @@ -5628,20 +5799,21 @@ }, { "name": "webmozart/assert", - "version": "1.3.0", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/webmozart/assert.git", - "reference": "0df1908962e7a3071564e857d86874dad1ef204a" + "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/0df1908962e7a3071564e857d86874dad1ef204a", - "reference": "0df1908962e7a3071564e857d86874dad1ef204a", + "url": "https://api.github.com/repos/webmozart/assert/zipball/83e253c8e0be5b0257b881e1827274667c5c17a9", + "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0" + "php": "^5.3.3 || ^7.0", + "symfony/polyfill-ctype": "^1.8" }, "require-dev": { "phpunit/phpunit": "^4.6", @@ -5674,7 +5846,7 @@ "check", "validate" ], - "time": "2018-01-29T19:49:41+00:00" + "time": "2018-12-25T11:19:39+00:00" }, { "name": "webmozart/path-util", @@ -7855,16 +8027,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "3.3.2", + "version": "3.4.0", "source": { "type": "git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "6ad28354c04b364c3c71a34e4a18b629cc3b231e" + "reference": "379deb987e26c7cd103a7b387aea178baec96e48" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/6ad28354c04b364c3c71a34e4a18b629cc3b231e", - "reference": "6ad28354c04b364c3c71a34e4a18b629cc3b231e", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/379deb987e26c7cd103a7b387aea178baec96e48", + "reference": "379deb987e26c7cd103a7b387aea178baec96e48", "shasum": "" }, "require": { @@ -7902,20 +8074,20 @@ "phpcs", "standards" ], - "time": "2018-09-23T23:08:17+00:00" + "time": "2018-12-19T23:57:18+00:00" }, { "name": "symfony/browser-kit", - "version": "v4.1.7", + "version": "v4.2.2", "source": { "type": "git", "url": "https://github.com/symfony/browser-kit.git", - "reference": "c55fe9257003b2d95c0211b3f6941e8dfd26dffd" + "reference": "313512c878805971aebddb5d1707bcf3f4e25df7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/browser-kit/zipball/c55fe9257003b2d95c0211b3f6941e8dfd26dffd", - "reference": "c55fe9257003b2d95c0211b3f6941e8dfd26dffd", + "url": "https://api.github.com/repos/symfony/browser-kit/zipball/313512c878805971aebddb5d1707bcf3f4e25df7", + "reference": "313512c878805971aebddb5d1707bcf3f4e25df7", "shasum": "" }, "require": { @@ -7932,7 +8104,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "4.2-dev" } }, "autoload": { @@ -7959,20 +8131,20 @@ ], "description": "Symfony BrowserKit Component", "homepage": "https://symfony.com", - "time": "2018-07-26T09:10:45+00:00" + "time": "2019-01-03T09:07:35+00:00" }, { "name": "symfony/phpunit-bridge", - "version": "v3.4.18", + "version": "v3.4.21", "source": { "type": "git", "url": "https://github.com/symfony/phpunit-bridge.git", - "reference": "76e013a98031356604e5a730c9eb22713dc4dda4" + "reference": "5dab0d4b2ac99ab22b447b615fdfdc10ec4af3d5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/phpunit-bridge/zipball/76e013a98031356604e5a730c9eb22713dc4dda4", - "reference": "76e013a98031356604e5a730c9eb22713dc4dda4", + "url": "https://api.github.com/repos/symfony/phpunit-bridge/zipball/5dab0d4b2ac99ab22b447b615fdfdc10ec4af3d5", + "reference": "5dab0d4b2ac99ab22b447b615fdfdc10ec4af3d5", "shasum": "" }, "require": { @@ -8025,7 +8197,7 @@ ], "description": "Symfony PHPUnit Bridge", "homepage": "https://symfony.com", - "time": "2018-10-02T12:28:39+00:00" + "time": "2019-01-01T13:45:19+00:00" }, { "name": "theseer/tokenizer", @@ -8069,13 +8241,13 @@ }, { "name": "webflo/drupal-core-require-dev", - "version": "8.6.3", + "version": "8.6.7", "require": { "behat/mink": "1.7.x-dev", "behat/mink-goutte-driver": "^1.2", "behat/mink-selenium2-driver": "1.3.x-dev", "drupal/coder": "^8.2.12", - "drupal/core": "8.6.3", + "drupal/core": "8.6.7", "jcalderonzumba/gastonjs": "^1.0.2", "jcalderonzumba/mink-phantomjs-driver": "^0.3.1", "mikey179/vfsstream": "^1.2", @@ -8091,7 +8263,7 @@ "GPL-2.0-or-later" ], "description": "require-dev dependencies from drupal/core", - "time": "2018-11-07T15:01:41+00:00" + "time": "2019-01-17T00:01:35+00:00" } ], "aliases": [], diff --git a/vendor/composer/autoload_files.php b/vendor/composer/autoload_files.php index b322b262d..55f3c4b15 100644 --- a/vendor/composer/autoload_files.php +++ b/vendor/composer/autoload_files.php @@ -12,6 +12,7 @@ return array( '023d27dca8066ef29e6739335ea73bad' => $vendorDir . '/symfony/polyfill-php70/bootstrap.php', '25072dd6e2470089de65ae7bf11d3109' => $vendorDir . '/symfony/polyfill-php72/bootstrap.php', '667aeda72477189d0494fecd327c3641' => $vendorDir . '/symfony/var-dumper/Resources/functions/dump.php', + '7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php', 'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php', 'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php', '37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php', diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php index 9be7df849..abaac76e1 100644 --- a/vendor/composer/autoload_psr4.php +++ b/vendor/composer/autoload_psr4.php @@ -16,6 +16,7 @@ return array( 'Webmozart\\Assert\\' => array($vendorDir . '/webmozart/assert/src'), 'Unish\\' => array($vendorDir . '/drush/drush/tests'), 'Twig\\' => array($vendorDir . '/twig/twig/src'), + 'TYPO3\\PharStreamWrapper\\' => array($vendorDir . '/typo3/phar-stream-wrapper/src'), 'Symfony\\Polyfill\\Php72\\' => array($vendorDir . '/symfony/polyfill-php72'), 'Symfony\\Polyfill\\Php70\\' => array($vendorDir . '/symfony/polyfill-php70'), 'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'), diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index a7e634fdb..50c565744 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -13,6 +13,7 @@ class ComposerStaticInit5b1c1b80ca16f098d2571547d6c6045f '023d27dca8066ef29e6739335ea73bad' => __DIR__ . '/..' . '/symfony/polyfill-php70/bootstrap.php', '25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php', '667aeda72477189d0494fecd327c3641' => __DIR__ . '/..' . '/symfony/var-dumper/Resources/functions/dump.php', + '7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php', 'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php', 'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php', '37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php', @@ -59,6 +60,7 @@ class ComposerStaticInit5b1c1b80ca16f098d2571547d6c6045f 'T' => array ( 'Twig\\' => 5, + 'TYPO3\\PharStreamWrapper\\' => 24, ), 'S' => array ( @@ -204,6 +206,10 @@ class ComposerStaticInit5b1c1b80ca16f098d2571547d6c6045f array ( 0 => __DIR__ . '/..' . '/twig/twig/src', ), + 'TYPO3\\PharStreamWrapper\\' => + array ( + 0 => __DIR__ . '/..' . '/typo3/phar-stream-wrapper/src', + ), 'Symfony\\Polyfill\\Php72\\' => array ( 0 => __DIR__ . '/..' . '/symfony/polyfill-php72', diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index 0ac39aeac..600a11959 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -354,17 +354,17 @@ }, { "name": "consolidation/annotated-command", - "version": "2.10.0", - "version_normalized": "2.10.0.0", + "version": "2.11.0", + "version_normalized": "2.11.0.0", "source": { "type": "git", "url": "https://github.com/consolidation/annotated-command.git", - "reference": "8e7d1a05230dc1159c751809e98b74f2b7f71873" + "reference": "edea407f57104ed518cc3c3b47d5b84403ee267a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/consolidation/annotated-command/zipball/8e7d1a05230dc1159c751809e98b74f2b7f71873", - "reference": "8e7d1a05230dc1159c751809e98b74f2b7f71873", + "url": "https://api.github.com/repos/consolidation/annotated-command/zipball/edea407f57104ed518cc3c3b47d5b84403ee267a", + "reference": "edea407f57104ed518cc3c3b47d5b84403ee267a", "shasum": "" }, "require": { @@ -376,14 +376,58 @@ "symfony/finder": "^2.5|^3|^4" }, "require-dev": { - "g1a/composer-test-scenarios": "^2", + "g1a/composer-test-scenarios": "^3", + "php-coveralls/php-coveralls": "^1", "phpunit/phpunit": "^6", - "satooshi/php-coveralls": "^2", "squizlabs/php_codesniffer": "^2.7" }, - "time": "2018-11-15T01:46:18+00:00", + "time": "2018-12-29T04:43:17+00:00", "type": "library", "extra": { + "scenarios": { + "symfony4": { + "require": { + "symfony/console": "^4.0" + }, + "config": { + "platform": { + "php": "7.1.3" + } + } + }, + "symfony2": { + "require": { + "symfony/console": "^2.8" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.36" + }, + "remove": [ + "php-coveralls/php-coveralls" + ], + "config": { + "platform": { + "php": "5.4.8" + } + }, + "scenario-options": { + "create-lockfile": "false" + } + }, + "phpunit4": { + "require-dev": { + "phpunit/phpunit": "^4.8.36" + }, + "remove": [ + "php-coveralls/php-coveralls" + ], + "config": { + "platform": { + "php": "5.4.8" + } + } + } + }, "branch-alias": { "dev-master": "2.x-dev" } @@ -464,33 +508,74 @@ }, { "name": "consolidation/log", - "version": "1.0.6", - "version_normalized": "1.0.6.0", + "version": "1.1.1", + "version_normalized": "1.1.1.0", "source": { "type": "git", "url": "https://github.com/consolidation/log.git", - "reference": "dfd8189a771fe047bf3cd669111b2de5f1c79395" + "reference": "b2e887325ee90abc96b0a8b7b474cd9e7c896e3a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/consolidation/log/zipball/dfd8189a771fe047bf3cd669111b2de5f1c79395", - "reference": "dfd8189a771fe047bf3cd669111b2de5f1c79395", + "url": "https://api.github.com/repos/consolidation/log/zipball/b2e887325ee90abc96b0a8b7b474cd9e7c896e3a", + "reference": "b2e887325ee90abc96b0a8b7b474cd9e7c896e3a", "shasum": "" }, "require": { - "php": ">=5.5.0", - "psr/log": "~1.0", + "php": ">=5.4.5", + "psr/log": "^1.0", "symfony/console": "^2.8|^3|^4" }, "require-dev": { - "g1a/composer-test-scenarios": "^1", - "phpunit/phpunit": "4.*", - "satooshi/php-coveralls": "^2", - "squizlabs/php_codesniffer": "2.*" + "g1a/composer-test-scenarios": "^3", + "php-coveralls/php-coveralls": "^1", + "phpunit/phpunit": "^6", + "squizlabs/php_codesniffer": "^2" }, - "time": "2018-05-25T18:14:39+00:00", + "time": "2019-01-01T17:30:51+00:00", "type": "library", "extra": { + "scenarios": { + "symfony4": { + "require": { + "symfony/console": "^4.0" + }, + "config": { + "platform": { + "php": "7.1.3" + } + } + }, + "symfony2": { + "require": { + "symfony/console": "^2.8" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.36" + }, + "remove": [ + "php-coveralls/php-coveralls" + ], + "config": { + "platform": { + "php": "5.4.8" + } + } + }, + "phpunit4": { + "require-dev": { + "phpunit/phpunit": "^4.8.36" + }, + "remove": [ + "php-coveralls/php-coveralls" + ], + "config": { + "platform": { + "php": "5.4.8" + } + } + } + }, "branch-alias": { "dev-master": "1.x-dev" } @@ -573,21 +658,21 @@ }, { "name": "consolidation/robo", - "version": "1.3.2", - "version_normalized": "1.3.2.0", + "version": "1.4.3", + "version_normalized": "1.4.3.0", "source": { "type": "git", "url": "https://github.com/consolidation/Robo.git", - "reference": "a9bd9ecf00751aa92754903c0d17612c4e840ce8" + "reference": "d0b6f516ec940add7abed4f1432d30cca5f8ae0c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/consolidation/Robo/zipball/a9bd9ecf00751aa92754903c0d17612c4e840ce8", - "reference": "a9bd9ecf00751aa92754903c0d17612c4e840ce8", + "url": "https://api.github.com/repos/consolidation/Robo/zipball/d0b6f516ec940add7abed4f1432d30cca5f8ae0c", + "reference": "d0b6f516ec940add7abed4f1432d30cca5f8ae0c", "shasum": "" }, "require": { - "consolidation/annotated-command": "^2.8.2", + "consolidation/annotated-command": "^2.10.2", "consolidation/config": "^1.0.10", "consolidation/log": "~1", "consolidation/output-formatters": "^3.1.13", @@ -625,7 +710,7 @@ "patchwork/jsqueeze": "For minifying JS files in taskMinify", "pear/archive_tar": "Allows tar archives to be created and extracted in taskPack and taskExtract, respectively." }, - "time": "2018-11-22T05:43:44+00:00", + "time": "2019-01-02T21:33:28+00:00", "bin": [ "robo" ], @@ -660,7 +745,7 @@ } }, "branch-alias": { - "dev-master": "1.x-dev" + "dev-master": "2.x-dev" } }, "installation-source": "dist", @@ -2138,17 +2223,17 @@ }, { "name": "drupal/core", - "version": "8.6.3", - "version_normalized": "8.6.3.0", + "version": "8.6.7", + "version_normalized": "8.6.7.0", "source": { "type": "git", "url": "https://github.com/drupal/core.git", - "reference": "9e9a1dd9e280ebaf10622217e54448b529167965" + "reference": "e0a09bda1da7552204464894811a59387608c9f9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/drupal/core/zipball/9e9a1dd9e280ebaf10622217e54448b529167965", - "reference": "9e9a1dd9e280ebaf10622217e54448b529167965", + "url": "https://api.github.com/repos/drupal/core/zipball/e0a09bda1da7552204464894811a59387608c9f9", + "reference": "e0a09bda1da7552204464894811a59387608c9f9", "shasum": "" }, "require": { @@ -2192,6 +2277,7 @@ "symfony/validator": "~3.4.0", "symfony/yaml": "~3.4.5", "twig/twig": "^1.35.0", + "typo3/phar-stream-wrapper": "^2.0.1", "zendframework/zend-diactoros": "^1.1", "zendframework/zend-feed": "^2.4" }, @@ -2320,7 +2406,7 @@ "symfony/debug": "^3.4.0", "symfony/phpunit-bridge": "^3.4.3" }, - "time": "2018-11-07T14:45:40+00:00", + "time": "2019-01-16T23:30:03+00:00", "type": "drupal-core", "extra": { "merge-plugin": { @@ -2682,27 +2768,29 @@ }, { "name": "drupal/webform", - "version": "5.0.0-rc26", - "version_normalized": "5.0.0.0-RC26", + "version": "5.1.0", + "version_normalized": "5.1.0.0", "source": { "type": "git", "url": "https://git.drupal.org/project/webform", - "reference": "8.x-5.0-rc26" + "reference": "8.x-5.1" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/webform-8.x-5.0-rc26.zip", - "reference": "8.x-5.0-rc26", - "shasum": "9bcddf036572a1b8896412aa7d7f214152f8a717" + "url": "https://ftp.drupal.org/files/projects/webform-8.x-5.1.zip", + "reference": "8.x-5.1", + "shasum": "d04743f078dc154685f9532253e6b5ea8dda1a56" }, "require": { "drupal/core": "*" }, "require-dev": { "drupal/address": "~1.4", + "drupal/chosen": "~2.6", "drupal/devel": "*", "drupal/jsonapi": "~2.0", - "drupal/token": "*", + "drupal/select2": "~1.1", + "drupal/token": "~1.3", "drupal/webform_access": "*", "drupal/webform_node": "*", "drupal/webform_scheduled_email": "*", @@ -2714,11 +2802,11 @@ "dev-5.x": "5.x-dev" }, "drupal": { - "version": "8.x-5.0-rc26", - "datestamp": "1541466481", + "version": "8.x-5.1", + "datestamp": "1546458480", "security-coverage": { - "status": "not-covered", - "message": "RC releases are not covered by Drupal security advisories." + "status": "covered", + "message": "Covered by Drupal's security advisory policy" } }, "drush": { @@ -3228,34 +3316,35 @@ }, { "name": "guzzlehttp/psr7", - "version": "1.4.2", - "version_normalized": "1.4.2.0", + "version": "1.5.2", + "version_normalized": "1.5.2.0", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c" + "reference": "9f83dded91781a01c63574e387eaa769be769115" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/f5b8a8512e2b58b0071a7280e39f14f72e05d87c", - "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/9f83dded91781a01c63574e387eaa769be769115", + "reference": "9f83dded91781a01c63574e387eaa769be769115", "shasum": "" }, "require": { "php": ">=5.4.0", - "psr/http-message": "~1.0" + "psr/http-message": "~1.0", + "ralouphie/getallheaders": "^2.0.5" }, "provide": { "psr/http-message-implementation": "1.0" }, "require-dev": { - "phpunit/phpunit": "~4.0" + "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8" }, - "time": "2017-03-20T17:10:46+00:00", + "time": "2018-12-04T20:46:45+00:00", "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "1.5-dev" } }, "installation-source": "dist", @@ -3286,6 +3375,7 @@ "keywords": [ "http", "message", + "psr-7", "request", "response", "stream", @@ -3454,17 +3544,17 @@ }, { "name": "masterminds/html5", - "version": "2.4.0", - "version_normalized": "2.4.0.0", + "version": "2.5.0", + "version_normalized": "2.5.0.0", "source": { "type": "git", "url": "https://github.com/Masterminds/html5-php.git", - "reference": "cadcfaaa13153e0e8eb92c49a53e140cf1a85dea" + "reference": "b5d892a4bd058d61f736935d32a9c248f11ccc93" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Masterminds/html5-php/zipball/cadcfaaa13153e0e8eb92c49a53e140cf1a85dea", - "reference": "cadcfaaa13153e0e8eb92c49a53e140cf1a85dea", + "url": "https://api.github.com/repos/Masterminds/html5-php/zipball/b5d892a4bd058d61f736935d32a9c248f11ccc93", + "reference": "b5d892a4bd058d61f736935d32a9c248f11ccc93", "shasum": "" }, "require": { @@ -3474,15 +3564,15 @@ "php": ">=5.3.0" }, "require-dev": { - "phpunit/phpunit": "4.*", + "phpunit/phpunit": "^4.8.35", "sami/sami": "~2.0", "satooshi/php-coveralls": "1.0.*" }, - "time": "2018-11-17T20:24:36+00:00", + "time": "2018-12-27T22:03:43+00:00", "type": "library", "extra": { "branch-alias": { - "dev-master": "2.2-dev" + "dev-master": "2.4-dev" } }, "installation-source": "dist", @@ -3523,17 +3613,17 @@ }, { "name": "nikic/php-parser", - "version": "v4.1.0", - "version_normalized": "4.1.0.0", + "version": "v4.2.0", + "version_normalized": "4.2.0.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "d0230c5c77a7e3cfa69446febf340978540958c0" + "reference": "594bcae1fc0bccd3993d2f0d61a018e26ac2865a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/d0230c5c77a7e3cfa69446febf340978540958c0", - "reference": "d0230c5c77a7e3cfa69446febf340978540958c0", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/594bcae1fc0bccd3993d2f0d61a018e26ac2865a", + "reference": "594bcae1fc0bccd3993d2f0d61a018e26ac2865a", "shasum": "" }, "require": { @@ -3543,14 +3633,14 @@ "require-dev": { "phpunit/phpunit": "^6.5 || ^7.0" }, - "time": "2018-10-10T09:24:14+00:00", + "time": "2019-01-12T16:31:37+00:00", "bin": [ "bin/php-parse" ], "type": "library", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "4.2-dev" } }, "installation-source": "dist", @@ -3576,17 +3666,17 @@ }, { "name": "paragonie/random_compat", - "version": "v2.0.17", - "version_normalized": "2.0.17.0", + "version": "v2.0.18", + "version_normalized": "2.0.18.0", "source": { "type": "git", "url": "https://github.com/paragonie/random_compat.git", - "reference": "29af24f25bab834fcbb38ad2a69fa93b867e070d" + "reference": "0a58ef6e3146256cc3dc7cc393927bcc7d1b72db" }, "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/0a58ef6e3146256cc3dc7cc393927bcc7d1b72db", + "reference": "0a58ef6e3146256cc3dc7cc393927bcc7d1b72db", "shasum": "" }, "require": { @@ -3598,7 +3688,7 @@ "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": "2019-01-03T20:59:08+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -3853,6 +3943,48 @@ "shell" ] }, + { + "name": "ralouphie/getallheaders", + "version": "2.0.5", + "version_normalized": "2.0.5.0", + "source": { + "type": "git", + "url": "https://github.com/ralouphie/getallheaders.git", + "reference": "5601c8a83fbba7ef674a7369456d12f1e0d0eafa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/5601c8a83fbba7ef674a7369456d12f1e0d0eafa", + "reference": "5601c8a83fbba7ef674a7369456d12f1e0d0eafa", + "shasum": "" + }, + "require": { + "php": ">=5.3" + }, + "require-dev": { + "phpunit/phpunit": "~3.7.0", + "satooshi/php-coveralls": ">=1.0" + }, + "time": "2016-02-11T07:05:27+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "files": [ + "src/getallheaders.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" + } + ], + "description": "A polyfill for getallheaders." + }, { "name": "stack/builder", "version": "v1.0.5", @@ -3906,17 +4038,17 @@ }, { "name": "stecman/symfony-console-completion", - "version": "0.8.0", - "version_normalized": "0.8.0.0", + "version": "0.9.0", + "version_normalized": "0.9.0.0", "source": { "type": "git", "url": "https://github.com/stecman/symfony-console-completion.git", - "reference": "cd738867503477e91dbe84173dfabd431c883431" + "reference": "bd07a24190541de2828c1d6469a8ddce599d3c5a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/stecman/symfony-console-completion/zipball/cd738867503477e91dbe84173dfabd431c883431", - "reference": "cd738867503477e91dbe84173dfabd431c883431", + "url": "https://api.github.com/repos/stecman/symfony-console-completion/zipball/bd07a24190541de2828c1d6469a8ddce599d3c5a", + "reference": "bd07a24190541de2828c1d6469a8ddce599d3c5a", "shasum": "" }, "require": { @@ -3926,7 +4058,7 @@ "require-dev": { "phpunit/phpunit": "~4.8.36 || ~5.7 || ~6.4" }, - "time": "2018-02-10T04:28:01+00:00", + "time": "2019-01-19T21:25:25+00:00", "type": "library", "extra": { "branch-alias": { @@ -4014,17 +4146,17 @@ }, { "name": "symfony/class-loader", - "version": "v3.4.18", - "version_normalized": "3.4.18.0", + "version": "v3.4.21", + "version_normalized": "3.4.21.0", "source": { "type": "git", "url": "https://github.com/symfony/class-loader.git", - "reference": "5605edec7b8f034ead2497ff4aab17bb70d558c1" + "reference": "4513348012c25148f8cbc3a7761a1d1e60ca3e87" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/class-loader/zipball/5605edec7b8f034ead2497ff4aab17bb70d558c1", - "reference": "5605edec7b8f034ead2497ff4aab17bb70d558c1", + "url": "https://api.github.com/repos/symfony/class-loader/zipball/4513348012c25148f8cbc3a7761a1d1e60ca3e87", + "reference": "4513348012c25148f8cbc3a7761a1d1e60ca3e87", "shasum": "" }, "require": { @@ -4037,7 +4169,7 @@ "suggest": { "symfony/polyfill-apcu": "For using ApcClassLoader on HHVM" }, - "time": "2018-10-31T09:06:03+00:00", + "time": "2019-01-01T13:45:19+00:00", "type": "library", "extra": { "branch-alias": { @@ -4072,17 +4204,17 @@ }, { "name": "symfony/config", - "version": "v3.4.18", - "version_normalized": "3.4.18.0", + "version": "v3.4.21", + "version_normalized": "3.4.21.0", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "99b2fa8acc244e656cdf324ff419fbe6fd300a4d" + "reference": "17c5d8941eb75a03d19bc76a43757738632d87b3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/99b2fa8acc244e656cdf324ff419fbe6fd300a4d", - "reference": "99b2fa8acc244e656cdf324ff419fbe6fd300a4d", + "url": "https://api.github.com/repos/symfony/config/zipball/17c5d8941eb75a03d19bc76a43757738632d87b3", + "reference": "17c5d8941eb75a03d19bc76a43757738632d87b3", "shasum": "" }, "require": { @@ -4103,7 +4235,7 @@ "suggest": { "symfony/yaml": "To use the yaml reference dumper" }, - "time": "2018-10-31T09:06:03+00:00", + "time": "2019-01-01T13:45:19+00:00", "type": "library", "extra": { "branch-alias": { @@ -4138,17 +4270,17 @@ }, { "name": "symfony/console", - "version": "v3.4.18", - "version_normalized": "3.4.18.0", + "version": "v3.4.21", + "version_normalized": "3.4.21.0", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "1d228fb4602047d7b26a0554e0d3efd567da5803" + "reference": "a700b874d3692bc8342199adfb6d3b99f62cc61a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/1d228fb4602047d7b26a0554e0d3efd567da5803", - "reference": "1d228fb4602047d7b26a0554e0d3efd567da5803", + "url": "https://api.github.com/repos/symfony/console/zipball/a700b874d3692bc8342199adfb6d3b99f62cc61a", + "reference": "a700b874d3692bc8342199adfb6d3b99f62cc61a", "shasum": "" }, "require": { @@ -4174,7 +4306,7 @@ "symfony/lock": "", "symfony/process": "" }, - "time": "2018-10-30T16:50:50+00:00", + "time": "2019-01-04T04:42:43+00:00", "type": "library", "extra": { "branch-alias": { @@ -4209,23 +4341,23 @@ }, { "name": "symfony/css-selector", - "version": "v3.4.18", - "version_normalized": "3.4.18.0", + "version": "v3.4.21", + "version_normalized": "3.4.21.0", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "3503415d4aafabc31cd08c3a4ebac7f43fde8feb" + "reference": "12f86295c46c36af9896cf21db6b6b8a1465315d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/3503415d4aafabc31cd08c3a4ebac7f43fde8feb", - "reference": "3503415d4aafabc31cd08c3a4ebac7f43fde8feb", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/12f86295c46c36af9896cf21db6b6b8a1465315d", + "reference": "12f86295c46c36af9896cf21db6b6b8a1465315d", "shasum": "" }, "require": { "php": "^5.5.9|>=7.0.8" }, - "time": "2018-10-02T16:33:53+00:00", + "time": "2019-01-02T09:30:52+00:00", "type": "library", "extra": { "branch-alias": { @@ -4264,17 +4396,17 @@ }, { "name": "symfony/debug", - "version": "v3.4.18", - "version_normalized": "3.4.18.0", + "version": "v3.4.21", + "version_normalized": "3.4.21.0", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "fe9793af008b651c5441bdeab21ede8172dab097" + "reference": "26d7f23b9bd0b93bee5583e4d6ca5cb1ab31b186" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/fe9793af008b651c5441bdeab21ede8172dab097", - "reference": "fe9793af008b651c5441bdeab21ede8172dab097", + "url": "https://api.github.com/repos/symfony/debug/zipball/26d7f23b9bd0b93bee5583e4d6ca5cb1ab31b186", + "reference": "26d7f23b9bd0b93bee5583e4d6ca5cb1ab31b186", "shasum": "" }, "require": { @@ -4287,7 +4419,7 @@ "require-dev": { "symfony/http-kernel": "~2.8|~3.0|~4.0" }, - "time": "2018-10-31T09:06:03+00:00", + "time": "2019-01-01T13:45:19+00:00", "type": "library", "extra": { "branch-alias": { @@ -4322,17 +4454,17 @@ }, { "name": "symfony/dependency-injection", - "version": "v3.4.18", - "version_normalized": "3.4.18.0", + "version": "v3.4.21", + "version_normalized": "3.4.21.0", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "9c98452ac7fff4b538956775630bc9701f5384ba" + "reference": "928a38b18bd632d67acbca74d0b2eed09915e83e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/9c98452ac7fff4b538956775630bc9701f5384ba", - "reference": "9c98452ac7fff4b538956775630bc9701f5384ba", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/928a38b18bd632d67acbca74d0b2eed09915e83e", + "reference": "928a38b18bd632d67acbca74d0b2eed09915e83e", "shasum": "" }, "require": { @@ -4360,7 +4492,7 @@ "symfony/proxy-manager-bridge": "Generate service proxies to lazy load them", "symfony/yaml": "" }, - "time": "2018-10-31T10:49:51+00:00", + "time": "2019-01-05T12:26:58+00:00", "type": "library", "extra": { "branch-alias": { @@ -4395,17 +4527,17 @@ }, { "name": "symfony/dom-crawler", - "version": "v3.4.18", - "version_normalized": "3.4.18.0", + "version": "v3.4.21", + "version_normalized": "3.4.21.0", "source": { "type": "git", "url": "https://github.com/symfony/dom-crawler.git", - "reference": "c705bee03ade5b47c087807dd9ffaaec8dda2722" + "reference": "311f666d85d1075b0a294ba1f3de4ae9307d8180" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/c705bee03ade5b47c087807dd9ffaaec8dda2722", - "reference": "c705bee03ade5b47c087807dd9ffaaec8dda2722", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/311f666d85d1075b0a294ba1f3de4ae9307d8180", + "reference": "311f666d85d1075b0a294ba1f3de4ae9307d8180", "shasum": "" }, "require": { @@ -4419,7 +4551,7 @@ "suggest": { "symfony/css-selector": "" }, - "time": "2018-10-02T12:28:39+00:00", + "time": "2019-01-01T13:45:19+00:00", "type": "library", "extra": { "branch-alias": { @@ -4454,17 +4586,17 @@ }, { "name": "symfony/event-dispatcher", - "version": "v3.4.18", - "version_normalized": "3.4.18.0", + "version": "v3.4.21", + "version_normalized": "3.4.21.0", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "db9e829c8f34c3d35cf37fcd4cdb4293bc4a2f14" + "reference": "d1cdd46c53c264a2bd42505bd0e8ce21423bd0e2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/db9e829c8f34c3d35cf37fcd4cdb4293bc4a2f14", - "reference": "db9e829c8f34c3d35cf37fcd4cdb4293bc4a2f14", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/d1cdd46c53c264a2bd42505bd0e8ce21423bd0e2", + "reference": "d1cdd46c53c264a2bd42505bd0e8ce21423bd0e2", "shasum": "" }, "require": { @@ -4484,7 +4616,7 @@ "symfony/dependency-injection": "", "symfony/http-kernel": "" }, - "time": "2018-10-30T16:50:50+00:00", + "time": "2019-01-01T18:08:36+00:00", "type": "library", "extra": { "branch-alias": { @@ -4519,24 +4651,24 @@ }, { "name": "symfony/filesystem", - "version": "v3.4.18", - "version_normalized": "3.4.18.0", + "version": "v3.4.21", + "version_normalized": "3.4.21.0", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "d69930fc337d767607267d57c20a7403d0a822a4" + "reference": "c24ce3d18ccc9bb9d7e1d6ce9330fcc6061cafde" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/d69930fc337d767607267d57c20a7403d0a822a4", - "reference": "d69930fc337d767607267d57c20a7403d0a822a4", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/c24ce3d18ccc9bb9d7e1d6ce9330fcc6061cafde", + "reference": "c24ce3d18ccc9bb9d7e1d6ce9330fcc6061cafde", "shasum": "" }, "require": { "php": "^5.5.9|>=7.0.8", "symfony/polyfill-ctype": "~1.8" }, - "time": "2018-10-02T12:28:39+00:00", + "time": "2019-01-01T13:45:19+00:00", "type": "library", "extra": { "branch-alias": { @@ -4571,23 +4703,23 @@ }, { "name": "symfony/finder", - "version": "v3.4.18", - "version_normalized": "3.4.18.0", + "version": "v3.4.21", + "version_normalized": "3.4.21.0", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "54ba444dddc5bd5708a34bd095ea67c6eb54644d" + "reference": "3f2a2ab6315dd7682d4c16dcae1e7b95c8b8555e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/54ba444dddc5bd5708a34bd095ea67c6eb54644d", - "reference": "54ba444dddc5bd5708a34bd095ea67c6eb54644d", + "url": "https://api.github.com/repos/symfony/finder/zipball/3f2a2ab6315dd7682d4c16dcae1e7b95c8b8555e", + "reference": "3f2a2ab6315dd7682d4c16dcae1e7b95c8b8555e", "shasum": "" }, "require": { "php": "^5.5.9|>=7.0.8" }, - "time": "2018-10-03T08:46:40+00:00", + "time": "2019-01-01T13:45:19+00:00", "type": "library", "extra": { "branch-alias": { @@ -4622,17 +4754,17 @@ }, { "name": "symfony/http-foundation", - "version": "v3.4.18", - "version_normalized": "3.4.18.0", + "version": "v3.4.21", + "version_normalized": "3.4.21.0", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "5aea7a86ca3203dd7a257e765b4b9c9cfd01c6c0" + "reference": "2b97319e68816d2120eee7f13f4b76da12e04d03" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/5aea7a86ca3203dd7a257e765b4b9c9cfd01c6c0", - "reference": "5aea7a86ca3203dd7a257e765b4b9c9cfd01c6c0", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/2b97319e68816d2120eee7f13f4b76da12e04d03", + "reference": "2b97319e68816d2120eee7f13f4b76da12e04d03", "shasum": "" }, "require": { @@ -4643,7 +4775,7 @@ "require-dev": { "symfony/expression-language": "~2.8|~3.0|~4.0" }, - "time": "2018-10-31T08:57:11+00:00", + "time": "2019-01-05T08:05:37+00:00", "type": "library", "extra": { "branch-alias": { @@ -4678,17 +4810,17 @@ }, { "name": "symfony/http-kernel", - "version": "v3.4.18", - "version_normalized": "3.4.18.0", + "version": "v3.4.21", + "version_normalized": "3.4.21.0", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "4bf0be7c7fe63eff6a5eae2f21c83e77e31a56fb" + "reference": "60bd9d7444ca436e131c347d78ec039dd99a34b4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/4bf0be7c7fe63eff6a5eae2f21c83e77e31a56fb", - "reference": "4bf0be7c7fe63eff6a5eae2f21c83e77e31a56fb", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/60bd9d7444ca436e131c347d78ec039dd99a34b4", + "reference": "60bd9d7444ca436e131c347d78ec039dd99a34b4", "shasum": "" }, "require": { @@ -4734,7 +4866,7 @@ "symfony/finder": "", "symfony/var-dumper": "" }, - "time": "2018-11-03T10:03:02+00:00", + "time": "2019-01-06T15:53:59+00:00", "type": "library", "extra": { "branch-alias": { @@ -5069,23 +5201,23 @@ }, { "name": "symfony/process", - "version": "v3.4.18", - "version_normalized": "3.4.18.0", + "version": "v3.4.21", + "version_normalized": "3.4.21.0", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "35c2914a9f50519bd207164c353ae4d59182c2cb" + "reference": "0d41dd7d95ed179aed6a13393b0f4f97bfa2d25c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/35c2914a9f50519bd207164c353ae4d59182c2cb", - "reference": "35c2914a9f50519bd207164c353ae4d59182c2cb", + "url": "https://api.github.com/repos/symfony/process/zipball/0d41dd7d95ed179aed6a13393b0f4f97bfa2d25c", + "reference": "0d41dd7d95ed179aed6a13393b0f4f97bfa2d25c", "shasum": "" }, "require": { "php": "^5.5.9|>=7.0.8" }, - "time": "2018-10-14T17:33:21+00:00", + "time": "2019-01-02T21:24:08+00:00", "type": "library", "extra": { "branch-alias": { @@ -5183,17 +5315,17 @@ }, { "name": "symfony/routing", - "version": "v3.4.18", - "version_normalized": "3.4.18.0", + "version": "v3.4.21", + "version_normalized": "3.4.21.0", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "585f6e2d740393d546978769dd56e496a6233e0b" + "reference": "445d3629a26930158347a50d1a5f2456c49e0ae6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/585f6e2d740393d546978769dd56e496a6233e0b", - "reference": "585f6e2d740393d546978769dd56e496a6233e0b", + "url": "https://api.github.com/repos/symfony/routing/zipball/445d3629a26930158347a50d1a5f2456c49e0ae6", + "reference": "445d3629a26930158347a50d1a5f2456c49e0ae6", "shasum": "" }, "require": { @@ -5221,7 +5353,7 @@ "symfony/http-foundation": "For using a Symfony Request object", "symfony/yaml": "For using the YAML loader" }, - "time": "2018-10-02T12:28:39+00:00", + "time": "2019-01-01T13:45:19+00:00", "type": "library", "extra": { "branch-alias": { @@ -5262,17 +5394,17 @@ }, { "name": "symfony/serializer", - "version": "v3.4.18", - "version_normalized": "3.4.18.0", + "version": "v3.4.21", + "version_normalized": "3.4.21.0", "source": { "type": "git", "url": "https://github.com/symfony/serializer.git", - "reference": "8bc00ef47a428bfebc4641f29d158e7c56137fcb" + "reference": "3bb84f8a785bf30be3d4aef6f3c80f103acc54df" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/serializer/zipball/8bc00ef47a428bfebc4641f29d158e7c56137fcb", - "reference": "8bc00ef47a428bfebc4641f29d158e7c56137fcb", + "url": "https://api.github.com/repos/symfony/serializer/zipball/3bb84f8a785bf30be3d4aef6f3c80f103acc54df", + "reference": "3bb84f8a785bf30be3d4aef6f3c80f103acc54df", "shasum": "" }, "require": { @@ -5308,7 +5440,7 @@ "symfony/property-info": "To deserialize relations.", "symfony/yaml": "For using the default YAML mapping loader." }, - "time": "2018-10-02T12:28:39+00:00", + "time": "2019-01-01T13:45:19+00:00", "type": "library", "extra": { "branch-alias": { @@ -5343,17 +5475,17 @@ }, { "name": "symfony/translation", - "version": "v3.4.18", - "version_normalized": "3.4.18.0", + "version": "v3.4.21", + "version_normalized": "3.4.21.0", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "94bc3a79008e6640defedf5e14eb3b4f20048352" + "reference": "5f357063f4907cef47e5cf82fa3187fbfb700456" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/94bc3a79008e6640defedf5e14eb3b4f20048352", - "reference": "94bc3a79008e6640defedf5e14eb3b4f20048352", + "url": "https://api.github.com/repos/symfony/translation/zipball/5f357063f4907cef47e5cf82fa3187fbfb700456", + "reference": "5f357063f4907cef47e5cf82fa3187fbfb700456", "shasum": "" }, "require": { @@ -5378,7 +5510,7 @@ "symfony/config": "", "symfony/yaml": "" }, - "time": "2018-10-02T16:33:53+00:00", + "time": "2019-01-01T13:45:19+00:00", "type": "library", "extra": { "branch-alias": { @@ -5413,17 +5545,17 @@ }, { "name": "symfony/validator", - "version": "v3.4.18", - "version_normalized": "3.4.18.0", + "version": "v3.4.21", + "version_normalized": "3.4.21.0", "source": { "type": "git", "url": "https://github.com/symfony/validator.git", - "reference": "6ab5fee7c0763d90753f37fce6db9fdbca1b1a4c" + "reference": "cd3fba16d309347883b74bb0ee8cb4720a60554c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/validator/zipball/6ab5fee7c0763d90753f37fce6db9fdbca1b1a4c", - "reference": "6ab5fee7c0763d90753f37fce6db9fdbca1b1a4c", + "url": "https://api.github.com/repos/symfony/validator/zipball/cd3fba16d309347883b74bb0ee8cb4720a60554c", + "reference": "cd3fba16d309347883b74bb0ee8cb4720a60554c", "shasum": "" }, "require": { @@ -5465,7 +5597,7 @@ "symfony/property-access": "For accessing properties within comparison constraints", "symfony/yaml": "" }, - "time": "2018-10-14T18:32:13+00:00", + "time": "2019-01-06T14:07:11+00:00", "type": "library", "extra": { "branch-alias": { @@ -5500,17 +5632,17 @@ }, { "name": "symfony/var-dumper", - "version": "v4.1.7", - "version_normalized": "4.1.7.0", + "version": "v4.2.2", + "version_normalized": "4.2.2.0", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "60319b45653580b0cdacca499344577d87732f16" + "reference": "85bde661b178173d85c6f11ea9d03b61d1212bb2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/60319b45653580b0cdacca499344577d87732f16", - "reference": "60319b45653580b0cdacca499344577d87732f16", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/85bde661b178173d85c6f11ea9d03b61d1212bb2", + "reference": "85bde661b178173d85c6f11ea9d03b61d1212bb2", "shasum": "" }, "require": { @@ -5524,6 +5656,7 @@ }, "require-dev": { "ext-iconv": "*", + "symfony/console": "~3.4|~4.0", "symfony/process": "~3.4|~4.0", "twig/twig": "~1.34|~2.4" }, @@ -5532,14 +5665,14 @@ "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-10-02T16:36:10+00:00", + "time": "2019-01-03T09:07:35+00:00", "bin": [ "Resources/bin/var-dump-server" ], "type": "library", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "4.2-dev" } }, "installation-source": "dist", @@ -5577,17 +5710,17 @@ }, { "name": "symfony/yaml", - "version": "v3.4.18", - "version_normalized": "3.4.18.0", + "version": "v3.4.21", + "version_normalized": "3.4.21.0", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "640b6c27fed4066d64b64d5903a86043f4a4de7f" + "reference": "554a59a1ccbaac238a89b19c8e551a556fd0e2ea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/640b6c27fed4066d64b64d5903a86043f4a4de7f", - "reference": "640b6c27fed4066d64b64d5903a86043f4a4de7f", + "url": "https://api.github.com/repos/symfony/yaml/zipball/554a59a1ccbaac238a89b19c8e551a556fd0e2ea", + "reference": "554a59a1ccbaac238a89b19c8e551a556fd0e2ea", "shasum": "" }, "require": { @@ -5603,7 +5736,7 @@ "suggest": { "symfony/console": "For validating YAML files using the lint command" }, - "time": "2018-10-02T16:33:53+00:00", + "time": "2019-01-01T13:45:19+00:00", "type": "library", "extra": { "branch-alias": { @@ -5638,33 +5771,33 @@ }, { "name": "twig/twig", - "version": "v1.35.4", - "version_normalized": "1.35.4.0", + "version": "v1.37.1", + "version_normalized": "1.37.1.0", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "7e081e98378a1e78c29cc9eba4aefa5d78a05d2a" + "reference": "66be9366c76cbf23e82e7171d47cbfa54a057a62" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/7e081e98378a1e78c29cc9eba4aefa5d78a05d2a", - "reference": "7e081e98378a1e78c29cc9eba4aefa5d78a05d2a", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/66be9366c76cbf23e82e7171d47cbfa54a057a62", + "reference": "66be9366c76cbf23e82e7171d47cbfa54a057a62", "shasum": "" }, "require": { - "php": ">=5.3.3", + "php": ">=5.4.0", "symfony/polyfill-ctype": "^1.8" }, "require-dev": { "psr/container": "^1.0", "symfony/debug": "^2.7", - "symfony/phpunit-bridge": "^3.3" + "symfony/phpunit-bridge": "^3.4.19|^4.1.8" }, - "time": "2018-07-13T07:12:17+00:00", + "time": "2019-01-14T14:59:29+00:00", "type": "library", "extra": { "branch-alias": { - "dev-master": "1.35-dev" + "dev-master": "1.37-dev" } }, "installation-source": "dist", @@ -5705,18 +5838,60 @@ ] }, { - "name": "vlucas/phpdotenv", - "version": "v2.5.1", - "version_normalized": "2.5.1.0", + "name": "typo3/phar-stream-wrapper", + "version": "v2.0.1", + "version_normalized": "2.0.1.0", "source": { "type": "git", - "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "8abb4f9aa89ddea9d52112c65bbe8d0125e2fa8e" + "url": "https://github.com/TYPO3/phar-stream-wrapper.git", + "reference": "0469d9fefa0146ea4299d3b11cfbb76faa7045bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/8abb4f9aa89ddea9d52112c65bbe8d0125e2fa8e", - "reference": "8abb4f9aa89ddea9d52112c65bbe8d0125e2fa8e", + "url": "https://api.github.com/repos/TYPO3/phar-stream-wrapper/zipball/0469d9fefa0146ea4299d3b11cfbb76faa7045bf", + "reference": "0469d9fefa0146ea4299d3b11cfbb76faa7045bf", + "shasum": "" + }, + "require": { + "php": "^5.3.3|^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.36" + }, + "time": "2018-10-18T08:46:28+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "TYPO3\\PharStreamWrapper\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Interceptors for PHP's native phar:// stream handling", + "homepage": "https://typo3.org/", + "keywords": [ + "phar", + "php", + "security", + "stream-wrapper" + ] + }, + { + "name": "vlucas/phpdotenv", + "version": "v2.5.2", + "version_normalized": "2.5.2.0", + "source": { + "type": "git", + "url": "https://github.com/vlucas/phpdotenv.git", + "reference": "cfd5dc225767ca154853752abc93aeec040fcf36" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/cfd5dc225767ca154853752abc93aeec040fcf36", + "reference": "cfd5dc225767ca154853752abc93aeec040fcf36", "shasum": "" }, "require": { @@ -5725,7 +5900,7 @@ "require-dev": { "phpunit/phpunit": "^4.8.35 || ^5.0" }, - "time": "2018-07-29T20:33:41+00:00", + "time": "2018-10-30T17:29:25+00:00", "type": "library", "extra": { "branch-alias": { @@ -5797,27 +5972,28 @@ }, { "name": "webmozart/assert", - "version": "1.3.0", - "version_normalized": "1.3.0.0", + "version": "1.4.0", + "version_normalized": "1.4.0.0", "source": { "type": "git", "url": "https://github.com/webmozart/assert.git", - "reference": "0df1908962e7a3071564e857d86874dad1ef204a" + "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/0df1908962e7a3071564e857d86874dad1ef204a", - "reference": "0df1908962e7a3071564e857d86874dad1ef204a", + "url": "https://api.github.com/repos/webmozart/assert/zipball/83e253c8e0be5b0257b881e1827274667c5c17a9", + "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0" + "php": "^5.3.3 || ^7.0", + "symfony/polyfill-ctype": "^1.8" }, "require-dev": { "phpunit/phpunit": "^4.6", "sebastian/version": "^1.0.1" }, - "time": "2018-01-29T19:49:41+00:00", + "time": "2018-12-25T11:19:39+00:00", "type": "library", "extra": { "branch-alias": { diff --git a/vendor/consolidation/annotated-command/.scenarios.lock/install b/vendor/consolidation/annotated-command/.scenarios.lock/install new file mode 100755 index 000000000..16c69e107 --- /dev/null +++ b/vendor/consolidation/annotated-command/.scenarios.lock/install @@ -0,0 +1,57 @@ +#!/bin/bash + +SCENARIO=$1 +DEPENDENCIES=${2-install} + +# Convert the aliases 'highest', 'lowest' and 'lock' to +# the corresponding composer command to run. +case $DEPENDENCIES in + highest) + DEPENDENCIES=update + ;; + lowest) + DEPENDENCIES='update --prefer-lowest' + ;; + lock|default|"") + DEPENDENCIES=install + ;; +esac + +original_name=scenarios +recommended_name=".scenarios.lock" + +base="$original_name" +if [ -d "$recommended_name" ] ; then + base="$recommended_name" +fi + +# If scenario is not specified, install the lockfile at +# the root of the project. +dir="$base/${SCENARIO}" +if [ -z "$SCENARIO" ] || [ "$SCENARIO" == "default" ] ; then + SCENARIO=default + dir=. +fi + +# Test to make sure that the selected scenario exists. +if [ ! -d "$dir" ] ; then + echo "Requested scenario '${SCENARIO}' does not exist." + exit 1 +fi + +echo +echo "::" +echo ":: Switch to ${SCENARIO} scenario" +echo "::" +echo + +set -ex + +composer -n validate --working-dir=$dir --no-check-all --ansi +composer -n --working-dir=$dir ${DEPENDENCIES} --prefer-dist --no-scripts + +# If called from a CI context, print out some extra information about +# what we just installed. +if [[ -n "$CI" ]] ; then + composer -n --working-dir=$dir info +fi diff --git a/vendor/consolidation/annotated-command/.scenarios.lock/phpunit4/.gitignore b/vendor/consolidation/annotated-command/.scenarios.lock/phpunit4/.gitignore new file mode 100644 index 000000000..5657f6ea7 --- /dev/null +++ b/vendor/consolidation/annotated-command/.scenarios.lock/phpunit4/.gitignore @@ -0,0 +1 @@ +vendor \ No newline at end of file diff --git a/vendor/consolidation/annotated-command/.scenarios.lock/phpunit4/composer.json b/vendor/consolidation/annotated-command/.scenarios.lock/phpunit4/composer.json new file mode 100644 index 000000000..38e81b70e --- /dev/null +++ b/vendor/consolidation/annotated-command/.scenarios.lock/phpunit4/composer.json @@ -0,0 +1,61 @@ +{ + "name": "consolidation/annotated-command", + "description": "Initialize Symfony Console commands from annotated command class methods.", + "license": "MIT", + "authors": [ + { + "name": "Greg Anderson", + "email": "greg.1.anderson@greenknowe.org" + } + ], + "autoload": { + "psr-4": { + "Consolidation\\AnnotatedCommand\\": "../../src" + } + }, + "autoload-dev": { + "psr-4": { + "Consolidation\\TestUtils\\": "../../tests/src" + } + }, + "require": { + "php": ">=5.4.0", + "consolidation/output-formatters": "^3.4", + "psr/log": "^1", + "symfony/console": "^2.8|^3|^4", + "symfony/event-dispatcher": "^2.5|^3|^4", + "symfony/finder": "^2.5|^3|^4" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.36", + "g1a/composer-test-scenarios": "^3", + "squizlabs/php_codesniffer": "^2.7" + }, + "config": { + "platform": { + "php": "5.4.8" + }, + "optimize-autoloader": true, + "sort-packages": true, + "vendor-dir": "../../vendor" + }, + "scripts": { + "cs": "phpcs --standard=PSR2 -n src", + "cbf": "phpcbf --standard=PSR2 -n src", + "unit": "SHELL_INTERACTIVE=true phpunit --colors=always", + "lint": [ + "find src -name '*.php' -print0 | xargs -0 -n1 php -l", + "find tests/src -name '*.php' -print0 | xargs -0 -n1 php -l" + ], + "test": [ + "@lint", + "@unit", + "@cs" + ] + }, + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + } +} diff --git a/vendor/consolidation/log/scenarios/symfony4/composer.lock b/vendor/consolidation/annotated-command/.scenarios.lock/phpunit4/composer.lock similarity index 68% rename from vendor/consolidation/log/scenarios/symfony4/composer.lock rename to vendor/consolidation/annotated-command/.scenarios.lock/phpunit4/composer.lock index 4fc2c1715..77446fb75 100644 --- a/vendor/consolidation/log/scenarios/symfony4/composer.lock +++ b/vendor/consolidation/annotated-command/.scenarios.lock/phpunit4/composer.lock @@ -4,20 +4,135 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "cc3a640465fd576c9d5d265e1fb44364", + "content-hash": "723b5d626d913974b37f32f832bc72d9", "packages": [ { - "name": "psr/log", - "version": "1.0.2", + "name": "consolidation/output-formatters", + "version": "3.4.0", "source": { "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" + "url": "https://github.com/consolidation/output-formatters.git", + "reference": "a942680232094c4a5b21c0b7e54c20cce623ae19" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", + "url": "https://api.github.com/repos/consolidation/output-formatters/zipball/a942680232094c4a5b21c0b7e54c20cce623ae19", + "reference": "a942680232094c4a5b21c0b7e54c20cce623ae19", + "shasum": "" + }, + "require": { + "dflydev/dot-access-data": "^1.1.0", + "php": ">=5.4.0", + "symfony/console": "^2.8|^3|^4", + "symfony/finder": "^2.5|^3|^4" + }, + "require-dev": { + "g1a/composer-test-scenarios": "^2", + "phpunit/phpunit": "^5.7.27", + "satooshi/php-coveralls": "^2", + "squizlabs/php_codesniffer": "^2.7", + "symfony/console": "3.2.3", + "symfony/var-dumper": "^2.8|^3|^4", + "victorjonsson/markdowndocs": "^1.3" + }, + "suggest": { + "symfony/var-dumper": "For using the var_dump formatter" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Consolidation\\OutputFormatters\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Greg Anderson", + "email": "greg.1.anderson@greenknowe.org" + } + ], + "description": "Format text by applying transformations provided by plug-in formatters.", + "time": "2018-10-19T22:35:38+00:00" + }, + { + "name": "dflydev/dot-access-data", + "version": "v1.1.0", + "source": { + "type": "git", + "url": "https://github.com/dflydev/dflydev-dot-access-data.git", + "reference": "3fbd874921ab2c041e899d044585a2ab9795df8a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dflydev/dflydev-dot-access-data/zipball/3fbd874921ab2c041e899d044585a2ab9795df8a", + "reference": "3fbd874921ab2c041e899d044585a2ab9795df8a", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-0": { + "Dflydev\\DotAccessData": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Dragonfly Development Inc.", + "email": "info@dflydev.com", + "homepage": "http://dflydev.com" + }, + { + "name": "Beau Simensen", + "email": "beau@dflydev.com", + "homepage": "http://beausimensen.com" + }, + { + "name": "Carlos Frutos", + "email": "carlos@kiwing.it", + "homepage": "https://github.com/cfrutos" + } + ], + "description": "Given a deep data structure, access data by dot notation.", + "homepage": "https://github.com/dflydev/dflydev-dot-access-data", + "keywords": [ + "access", + "data", + "dot", + "notation" + ], + "time": "2017-01-20T21:14:22+00:00" + }, + { + "name": "psr/log", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", + "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", "shasum": "" }, "require": { @@ -51,38 +166,324 @@ "psr", "psr-3" ], - "time": "2016-10-10T12:19:37+00:00" + "time": "2018-11-20T15:27:04+00:00" + }, + { + "name": "symfony/console", + "version": "v2.8.47", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "48ed63767c4add573fb3e9e127d3426db27f78e8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/48ed63767c4add573fb3e9e127d3426db27f78e8", + "reference": "48ed63767c4add573fb3e9e127d3426db27f78e8", + "shasum": "" + }, + "require": { + "php": ">=5.3.9", + "symfony/debug": "^2.7.2|~3.0.0", + "symfony/polyfill-mbstring": "~1.0" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/event-dispatcher": "~2.1|~3.0.0", + "symfony/process": "~2.1|~3.0.0" + }, + "suggest": { + "psr/log-implementation": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/process": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Console Component", + "homepage": "https://symfony.com", + "time": "2018-10-30T14:26:34+00:00" + }, + { + "name": "symfony/debug", + "version": "v2.8.47", + "source": { + "type": "git", + "url": "https://github.com/symfony/debug.git", + "reference": "6a198c52b662fa825382f5e65c0c4a56bdaca98e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/debug/zipball/6a198c52b662fa825382f5e65c0c4a56bdaca98e", + "reference": "6a198c52b662fa825382f5e65c0c4a56bdaca98e", + "shasum": "" + }, + "require": { + "php": ">=5.3.9", + "psr/log": "~1.0" + }, + "conflict": { + "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" + }, + "require-dev": { + "symfony/class-loader": "~2.2|~3.0.0", + "symfony/http-kernel": "~2.3.24|~2.5.9|^2.6.2|~3.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Debug\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Debug Component", + "homepage": "https://symfony.com", + "time": "2018-10-30T16:24:01+00:00" + }, + { + "name": "symfony/event-dispatcher", + "version": "v2.8.47", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "76494bc38ff38d90d01913d23b5271acd4d78dd3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/76494bc38ff38d90d01913d23b5271acd4d78dd3", + "reference": "76494bc38ff38d90d01913d23b5271acd4d78dd3", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "^2.0.5|~3.0.0", + "symfony/dependency-injection": "~2.6|~3.0.0", + "symfony/expression-language": "~2.6|~3.0.0", + "symfony/stopwatch": "~2.3|~3.0.0" + }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\EventDispatcher\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony EventDispatcher Component", + "homepage": "https://symfony.com", + "time": "2018-10-20T23:16:31+00:00" + }, + { + "name": "symfony/finder", + "version": "v2.8.47", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "5ebb438d1aabe9dba93099dd06e0500f97817a6e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/5ebb438d1aabe9dba93099dd06e0500f97817a6e", + "reference": "5ebb438d1aabe9dba93099dd06e0500f97817a6e", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Finder\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Finder Component", + "homepage": "https://symfony.com", + "time": "2018-09-21T12:46:38+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.10.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "c79c051f5b3a46be09205c73b80b346e4153e494" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/c79c051f5b3a46be09205c73b80b346e4153e494", + "reference": "c79c051f5b3a46be09205c73b80b346e4153e494", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.9-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "time": "2018-09-21T13:07:52+00:00" } ], "packages-dev": [ { "name": "doctrine/instantiator", - "version": "1.1.0", + "version": "1.0.5", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda" + "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", - "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", + "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", "shasum": "" }, "require": { - "php": "^7.1" + "php": ">=5.3,<8.0-DEV" }, "require-dev": { "athletic/athletic": "~0.1.8", "ext-pdo": "*", "ext-phar": "*", - "phpunit/phpunit": "^6.2.3", - "squizlabs/php_codesniffer": "^3.0.2" + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "~2.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2.x-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { @@ -107,28 +508,47 @@ "constructor", "instantiate" ], - "time": "2017-07-22T11:58:36+00:00" + "time": "2015-06-14T21:17:01+00:00" }, { "name": "g1a/composer-test-scenarios", - "version": "1.0.3", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/g1a/composer-test-scenarios.git", - "reference": "240841a15f332750d5f0499371f880e9ea5b18cc" + "reference": "2a7156f1572898888ea50ad1d48a6b4d3f9fbf78" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/g1a/composer-test-scenarios/zipball/240841a15f332750d5f0499371f880e9ea5b18cc", - "reference": "240841a15f332750d5f0499371f880e9ea5b18cc", + "url": "https://api.github.com/repos/g1a/composer-test-scenarios/zipball/2a7156f1572898888ea50ad1d48a6b4d3f9fbf78", + "reference": "2a7156f1572898888ea50ad1d48a6b4d3f9fbf78", "shasum": "" }, + "require": { + "composer-plugin-api": "^1.0.0", + "php": ">=5.4" + }, + "require-dev": { + "composer/composer": "^1.7", + "php-coveralls/php-coveralls": "^1.0", + "phpunit/phpunit": "^4.8.36|^6", + "squizlabs/php_codesniffer": "^2.8" + }, "bin": [ - "scripts/create-scenario", - "scripts/dependency-licenses", - "scripts/install-scenario" + "scripts/dependency-licenses" ], - "type": "library", + "type": "composer-plugin", + "extra": { + "class": "ComposerTestScenarios\\Plugin", + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "ComposerTestScenarios\\": "src/" + } + }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" @@ -140,277 +560,41 @@ } ], "description": "Useful scripts for testing multiple sets of Composer dependencies.", - "time": "2018-03-07T21:36:05+00:00" + "time": "2018-11-22T05:10:20+00:00" }, { - "name": "guzzlehttp/guzzle", - "version": "6.3.3", + "name": "phpdocumentor/reflection-docblock", + "version": "2.0.5", "source": { "type": "git", - "url": "https://github.com/guzzle/guzzle.git", - "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba" + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "e6a969a640b00d8daa3c66518b0405fb41ae0c4b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/407b0cb880ace85c9b63c5f9551db498cb2d50ba", - "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/e6a969a640b00d8daa3c66518b0405fb41ae0c4b", + "reference": "e6a969a640b00d8daa3c66518b0405fb41ae0c4b", "shasum": "" }, "require": { - "guzzlehttp/promises": "^1.0", - "guzzlehttp/psr7": "^1.4", - "php": ">=5.5" - }, - "require-dev": { - "ext-curl": "*", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", - "psr/log": "^1.0" - }, - "suggest": { - "psr/log": "Required for using the Log middleware" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "6.3-dev" - } - }, - "autoload": { - "files": [ - "src/functions_include.php" - ], - "psr-4": { - "GuzzleHttp\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "Guzzle is a PHP HTTP client library", - "homepage": "http://guzzlephp.org/", - "keywords": [ - "client", - "curl", - "framework", - "http", - "http client", - "rest", - "web service" - ], - "time": "2018-04-22T15:46:56+00:00" - }, - { - "name": "guzzlehttp/promises", - "version": "v1.3.1", - "source": { - "type": "git", - "url": "https://github.com/guzzle/promises.git", - "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646", - "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646", - "shasum": "" - }, - "require": { - "php": ">=5.5.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, - "autoload": { - "psr-4": { - "GuzzleHttp\\Promise\\": "src/" - }, - "files": [ - "src/functions_include.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "Guzzle promises library", - "keywords": [ - "promise" - ], - "time": "2016-12-20T10:07:11+00:00" - }, - { - "name": "guzzlehttp/psr7", - "version": "1.4.2", - "source": { - "type": "git", - "url": "https://github.com/guzzle/psr7.git", - "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/f5b8a8512e2b58b0071a7280e39f14f72e05d87c", - "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c", - "shasum": "" - }, - "require": { - "php": ">=5.4.0", - "psr/http-message": "~1.0" - }, - "provide": { - "psr/http-message-implementation": "1.0" + "php": ">=5.3.3" }, "require-dev": { "phpunit/phpunit": "~4.0" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, - "autoload": { - "psr-4": { - "GuzzleHttp\\Psr7\\": "src/" - }, - "files": [ - "src/functions_include.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "Tobias Schultze", - "homepage": "https://github.com/Tobion" - } - ], - "description": "PSR-7 message implementation that also provides common utility methods", - "keywords": [ - "http", - "message", - "request", - "response", - "stream", - "uri", - "url" - ], - "time": "2017-03-20T17:10:46+00:00" - }, - { - "name": "phpdocumentor/reflection-common", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", - "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", - "shasum": "" - }, - "require": { - "php": ">=5.5" - }, - "require-dev": { - "phpunit/phpunit": "^4.6" + "suggest": { + "dflydev/markdown": "~1.0", + "erusev/parsedown": "~1.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" - } - ], - "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "FQSEN", - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" - ], - "time": "2017-09-11T18:02:19+00:00" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "4.3.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "94fd0001232e47129dd3504189fa1c7225010d08" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/94fd0001232e47129dd3504189fa1c7225010d08", - "reference": "94fd0001232e47129dd3504189fa1c7225010d08", - "shasum": "" - }, - "require": { - "php": "^7.0", - "phpdocumentor/reflection-common": "^1.0.0", - "phpdocumentor/type-resolver": "^0.4.0", - "webmozart/assert": "^1.0" - }, - "require-dev": { - "doctrine/instantiator": "~1.0.5", - "mockery/mockery": "^1.0", - "phpunit/phpunit": "^6.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": [ + "psr-0": { + "phpDocumentor": [ "src/" ] } @@ -422,71 +606,23 @@ "authors": [ { "name": "Mike van Riel", - "email": "me@mikevanriel.com" + "email": "mike.vanriel@naenius.com" } ], - "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2017-11-30T07:14:17+00:00" - }, - { - "name": "phpdocumentor/type-resolver", - "version": "0.4.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7", - "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7", - "shasum": "" - }, - "require": { - "php": "^5.5 || ^7.0", - "phpdocumentor/reflection-common": "^1.0" - }, - "require-dev": { - "mockery/mockery": "^0.9.4", - "phpunit/phpunit": "^5.2||^4.8.24" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "time": "2017-07-14T14:27:02+00:00" + "time": "2016-01-25T08:17:30+00:00" }, { "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": { @@ -498,12 +634,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": { @@ -536,7 +672,7 @@ "spy", "stub" ], - "time": "2018-04-18T13:57:24+00:00" + "time": "2018-08-05T17:53:17+00:00" }, { "name": "phpunit/php-code-coverage", @@ -914,140 +1050,6 @@ ], "time": "2015-10-02T06:51:40+00:00" }, - { - "name": "psr/http-message", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-message.git", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP messages", - "homepage": "https://github.com/php-fig/http-message", - "keywords": [ - "http", - "http-message", - "psr", - "psr-7", - "request", - "response" - ], - "time": "2016-08-06T14:39:51+00:00" - }, - { - "name": "satooshi/php-coveralls", - "version": "v2.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-coveralls/php-coveralls.git", - "reference": "3eaf7eb689cdf6b86801a3843940d974dc657068" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-coveralls/php-coveralls/zipball/3eaf7eb689cdf6b86801a3843940d974dc657068", - "reference": "3eaf7eb689cdf6b86801a3843940d974dc657068", - "shasum": "" - }, - "require": { - "ext-json": "*", - "ext-simplexml": "*", - "guzzlehttp/guzzle": "^6.0", - "php": "^5.5 || ^7.0", - "psr/log": "^1.0", - "symfony/config": "^2.1 || ^3.0 || ^4.0", - "symfony/console": "^2.1 || ^3.0 || ^4.0", - "symfony/stopwatch": "^2.0 || ^3.0 || ^4.0", - "symfony/yaml": "^2.0 || ^3.0 || ^4.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.4.3 || ^6.0" - }, - "suggest": { - "symfony/http-kernel": "Allows Symfony integration" - }, - "bin": [ - "bin/php-coveralls" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "psr-4": { - "PhpCoveralls\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Kitamura Satoshi", - "email": "with.no.parachute@gmail.com", - "homepage": "https://www.facebook.com/satooshi.jp", - "role": "Original creator" - }, - { - "name": "Takashi Matsuo", - "email": "tmatsuo@google.com" - }, - { - "name": "Google Inc" - }, - { - "name": "Dariusz Ruminski", - "email": "dariusz.ruminski@gmail.com", - "homepage": "https://github.com/keradus" - }, - { - "name": "Contributors", - "homepage": "https://github.com/php-coveralls/php-coveralls/graphs/contributors" - } - ], - "description": "PHP client library for Coveralls API", - "homepage": "https://github.com/php-coveralls/php-coveralls", - "keywords": [ - "ci", - "coverage", - "github", - "test" - ], - "abandoned": "php-coveralls/php-coveralls", - "time": "2017-12-08T14:28:16+00:00" - }, { "name": "sebastian/comparator", "version": "1.2.4", @@ -1422,16 +1424,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "2.9.1", + "version": "2.9.2", "source": { "type": "git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "dcbed1074f8244661eecddfc2a675430d8d33f62" + "reference": "2acf168de78487db620ab4bc524135a13cfe6745" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/dcbed1074f8244661eecddfc2a675430d8d33f62", - "reference": "dcbed1074f8244661eecddfc2a675430d8d33f62", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/2acf168de78487db620ab4bc524135a13cfe6745", + "reference": "2acf168de78487db620ab4bc524135a13cfe6745", "shasum": "" }, "require": { @@ -1496,210 +1498,32 @@ "phpcs", "standards" ], - "time": "2017-05-22T02:43:20+00:00" - }, - { - "name": "symfony/config", - "version": "v4.0.11", - "source": { - "type": "git", - "url": "https://github.com/symfony/config.git", - "reference": "aaef656e99c5396d6118970abd1ceb11fa74551d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/aaef656e99c5396d6118970abd1ceb11fa74551d", - "reference": "aaef656e99c5396d6118970abd1ceb11fa74551d", - "shasum": "" - }, - "require": { - "php": "^7.1.3", - "symfony/filesystem": "~3.4|~4.0", - "symfony/polyfill-ctype": "~1.8" - }, - "conflict": { - "symfony/finder": "<3.4" - }, - "require-dev": { - "symfony/dependency-injection": "~3.4|~4.0", - "symfony/event-dispatcher": "~3.4|~4.0", - "symfony/finder": "~3.4|~4.0", - "symfony/yaml": "~3.4|~4.0" - }, - "suggest": { - "symfony/yaml": "To use the yaml reference dumper" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Config\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Config Component", - "homepage": "https://symfony.com", - "time": "2018-05-16T09:05:32+00:00" - }, - { - "name": "symfony/console", - "version": "v4.0.11", - "source": { - "type": "git", - "url": "https://github.com/symfony/console.git", - "reference": "058f120b8e06ebcd7b211de5ffae07b2db00fbdd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/058f120b8e06ebcd7b211de5ffae07b2db00fbdd", - "reference": "058f120b8e06ebcd7b211de5ffae07b2db00fbdd", - "shasum": "" - }, - "require": { - "php": "^7.1.3", - "symfony/polyfill-mbstring": "~1.0" - }, - "conflict": { - "symfony/dependency-injection": "<3.4", - "symfony/process": "<3.3" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "~3.4|~4.0", - "symfony/dependency-injection": "~3.4|~4.0", - "symfony/event-dispatcher": "~3.4|~4.0", - "symfony/lock": "~3.4|~4.0", - "symfony/process": "~3.4|~4.0" - }, - "suggest": { - "psr/log-implementation": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/lock": "", - "symfony/process": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Console\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Console Component", - "homepage": "https://symfony.com", - "time": "2018-05-16T09:05:32+00:00" - }, - { - "name": "symfony/filesystem", - "version": "v4.0.11", - "source": { - "type": "git", - "url": "https://github.com/symfony/filesystem.git", - "reference": "7a69e728e9f0044958c2fd7d72bfe5e7bd1a4d04" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/7a69e728e9f0044958c2fd7d72bfe5e7bd1a4d04", - "reference": "7a69e728e9f0044958c2fd7d72bfe5e7bd1a4d04", - "shasum": "" - }, - "require": { - "php": "^7.1.3", - "symfony/polyfill-ctype": "~1.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Filesystem\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Filesystem Component", - "homepage": "https://symfony.com", - "time": "2018-05-16T09:05:32+00:00" + "time": "2018-11-07T22:31:41+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.8.0", + "version": "v1.10.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": { @@ -1732,147 +1556,30 @@ "polyfill", "portable" ], - "time": "2018-04-30T19:57:29+00:00" - }, - { - "name": "symfony/polyfill-mbstring", - "version": "v1.8.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "3296adf6a6454a050679cde90f95350ad604b171" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/3296adf6a6454a050679cde90f95350ad604b171", - "reference": "3296adf6a6454a050679cde90f95350ad604b171", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.8-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for the Mbstring extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" - ], - "time": "2018-04-26T10:06:28+00:00" - }, - { - "name": "symfony/stopwatch", - "version": "v4.0.11", - "source": { - "type": "git", - "url": "https://github.com/symfony/stopwatch.git", - "reference": "6795ffa2f8eebedac77f045aa62c0c10b2763042" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/6795ffa2f8eebedac77f045aa62c0c10b2763042", - "reference": "6795ffa2f8eebedac77f045aa62c0c10b2763042", - "shasum": "" - }, - "require": { - "php": "^7.1.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Component\\Stopwatch\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Stopwatch Component", - "homepage": "https://symfony.com", - "time": "2018-02-19T16:50:22+00:00" + "time": "2018-08-06T14:22:27+00:00" }, { "name": "symfony/yaml", - "version": "v3.4.11", + "version": "v2.8.47", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "c5010cc1692ce1fa328b1fb666961eb3d4a85bb0" + "reference": "0e16589861f192dbffb19b06683ce3ef58f7f99d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/c5010cc1692ce1fa328b1fb666961eb3d4a85bb0", - "reference": "c5010cc1692ce1fa328b1fb666961eb3d4a85bb0", + "url": "https://api.github.com/repos/symfony/yaml/zipball/0e16589861f192dbffb19b06683ce3ef58f7f99d", + "reference": "0e16589861f192dbffb19b06683ce3ef58f7f99d", "shasum": "" }, "require": { - "php": "^5.5.9|>=7.0.8", + "php": ">=5.3.9", "symfony/polyfill-ctype": "~1.8" }, - "conflict": { - "symfony/console": "<3.4" - }, - "require-dev": { - "symfony/console": "~3.4|~4.0" - }, - "suggest": { - "symfony/console": "For validating YAML files using the lint command" - }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.4-dev" + "dev-master": "2.8-dev" } }, "autoload": { @@ -1899,57 +1606,7 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2018-05-03T23:18:14+00:00" - }, - { - "name": "webmozart/assert", - "version": "1.3.0", - "source": { - "type": "git", - "url": "https://github.com/webmozart/assert.git", - "reference": "0df1908962e7a3071564e857d86874dad1ef204a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/0df1908962e7a3071564e857d86874dad1ef204a", - "reference": "0df1908962e7a3071564e857d86874dad1ef204a", - "shasum": "" - }, - "require": { - "php": "^5.3.3 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.6", - "sebastian/version": "^1.0.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3-dev" - } - }, - "autoload": { - "psr-4": { - "Webmozart\\Assert\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Assertions to validate method input/output with nice error messages.", - "keywords": [ - "assert", - "check", - "validate" - ], - "time": "2018-01-29T19:49:41+00:00" + "time": "2018-10-02T16:27:16+00:00" } ], "aliases": [], @@ -1958,7 +1615,10 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=5.5.0" + "php": ">=5.4.0" }, - "platform-dev": [] + "platform-dev": [], + "platform-overrides": { + "php": "5.4.8" + } } diff --git a/vendor/consolidation/annotated-command/.scenarios.lock/symfony2/.gitignore b/vendor/consolidation/annotated-command/.scenarios.lock/symfony2/.gitignore new file mode 100644 index 000000000..88e99d50d --- /dev/null +++ b/vendor/consolidation/annotated-command/.scenarios.lock/symfony2/.gitignore @@ -0,0 +1,2 @@ +vendor +composer.lock \ No newline at end of file diff --git a/vendor/consolidation/annotated-command/.scenarios.lock/symfony2/composer.json b/vendor/consolidation/annotated-command/.scenarios.lock/symfony2/composer.json new file mode 100644 index 000000000..c72199a79 --- /dev/null +++ b/vendor/consolidation/annotated-command/.scenarios.lock/symfony2/composer.json @@ -0,0 +1,61 @@ +{ + "name": "consolidation/annotated-command", + "description": "Initialize Symfony Console commands from annotated command class methods.", + "license": "MIT", + "authors": [ + { + "name": "Greg Anderson", + "email": "greg.1.anderson@greenknowe.org" + } + ], + "autoload": { + "psr-4": { + "Consolidation\\AnnotatedCommand\\": "../../src" + } + }, + "autoload-dev": { + "psr-4": { + "Consolidation\\TestUtils\\": "../../tests/src" + } + }, + "require": { + "symfony/console": "^2.8", + "php": ">=5.4.0", + "consolidation/output-formatters": "^3.4", + "psr/log": "^1", + "symfony/event-dispatcher": "^2.5|^3|^4", + "symfony/finder": "^2.5|^3|^4" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.36", + "g1a/composer-test-scenarios": "^3", + "squizlabs/php_codesniffer": "^2.7" + }, + "config": { + "platform": { + "php": "5.4.8" + }, + "optimize-autoloader": true, + "sort-packages": true, + "vendor-dir": "../../vendor" + }, + "scripts": { + "cs": "phpcs --standard=PSR2 -n src", + "cbf": "phpcbf --standard=PSR2 -n src", + "unit": "SHELL_INTERACTIVE=true phpunit --colors=always", + "lint": [ + "find src -name '*.php' -print0 | xargs -0 -n1 php -l", + "find tests/src -name '*.php' -print0 | xargs -0 -n1 php -l" + ], + "test": [ + "@lint", + "@unit", + "@cs" + ] + }, + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + } +} diff --git a/vendor/consolidation/annotated-command/.scenarios.lock/symfony4/.gitignore b/vendor/consolidation/annotated-command/.scenarios.lock/symfony4/.gitignore new file mode 100644 index 000000000..5657f6ea7 --- /dev/null +++ b/vendor/consolidation/annotated-command/.scenarios.lock/symfony4/.gitignore @@ -0,0 +1 @@ +vendor \ No newline at end of file diff --git a/vendor/consolidation/annotated-command/.scenarios.lock/symfony4/composer.json b/vendor/consolidation/annotated-command/.scenarios.lock/symfony4/composer.json new file mode 100644 index 000000000..781c918af --- /dev/null +++ b/vendor/consolidation/annotated-command/.scenarios.lock/symfony4/composer.json @@ -0,0 +1,62 @@ +{ + "name": "consolidation/annotated-command", + "description": "Initialize Symfony Console commands from annotated command class methods.", + "license": "MIT", + "authors": [ + { + "name": "Greg Anderson", + "email": "greg.1.anderson@greenknowe.org" + } + ], + "autoload": { + "psr-4": { + "Consolidation\\AnnotatedCommand\\": "../../src" + } + }, + "autoload-dev": { + "psr-4": { + "Consolidation\\TestUtils\\": "../../tests/src" + } + }, + "require": { + "symfony/console": "^4.0", + "php": ">=5.4.0", + "consolidation/output-formatters": "^3.4", + "psr/log": "^1", + "symfony/event-dispatcher": "^2.5|^3|^4", + "symfony/finder": "^2.5|^3|^4" + }, + "require-dev": { + "phpunit/phpunit": "^6", + "php-coveralls/php-coveralls": "^1", + "g1a/composer-test-scenarios": "^3", + "squizlabs/php_codesniffer": "^2.7" + }, + "config": { + "platform": { + "php": "7.1.3" + }, + "optimize-autoloader": true, + "sort-packages": true, + "vendor-dir": "../../vendor" + }, + "scripts": { + "cs": "phpcs --standard=PSR2 -n src", + "cbf": "phpcbf --standard=PSR2 -n src", + "unit": "SHELL_INTERACTIVE=true phpunit --colors=always", + "lint": [ + "find src -name '*.php' -print0 | xargs -0 -n1 php -l", + "find tests/src -name '*.php' -print0 | xargs -0 -n1 php -l" + ], + "test": [ + "@lint", + "@unit", + "@cs" + ] + }, + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + } +} diff --git a/vendor/consolidation/annotated-command/.scenarios.lock/symfony4/composer.lock b/vendor/consolidation/annotated-command/.scenarios.lock/symfony4/composer.lock new file mode 100644 index 000000000..6d4e53a6a --- /dev/null +++ b/vendor/consolidation/annotated-command/.scenarios.lock/symfony4/composer.lock @@ -0,0 +1,2448 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "a8431cdfea28a47d1862fb421ae77412", + "packages": [ + { + "name": "consolidation/output-formatters", + "version": "3.4.0", + "source": { + "type": "git", + "url": "https://github.com/consolidation/output-formatters.git", + "reference": "a942680232094c4a5b21c0b7e54c20cce623ae19" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/consolidation/output-formatters/zipball/a942680232094c4a5b21c0b7e54c20cce623ae19", + "reference": "a942680232094c4a5b21c0b7e54c20cce623ae19", + "shasum": "" + }, + "require": { + "dflydev/dot-access-data": "^1.1.0", + "php": ">=5.4.0", + "symfony/console": "^2.8|^3|^4", + "symfony/finder": "^2.5|^3|^4" + }, + "require-dev": { + "g1a/composer-test-scenarios": "^2", + "phpunit/phpunit": "^5.7.27", + "satooshi/php-coveralls": "^2", + "squizlabs/php_codesniffer": "^2.7", + "symfony/console": "3.2.3", + "symfony/var-dumper": "^2.8|^3|^4", + "victorjonsson/markdowndocs": "^1.3" + }, + "suggest": { + "symfony/var-dumper": "For using the var_dump formatter" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Consolidation\\OutputFormatters\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Greg Anderson", + "email": "greg.1.anderson@greenknowe.org" + } + ], + "description": "Format text by applying transformations provided by plug-in formatters.", + "time": "2018-10-19T22:35:38+00:00" + }, + { + "name": "dflydev/dot-access-data", + "version": "v1.1.0", + "source": { + "type": "git", + "url": "https://github.com/dflydev/dflydev-dot-access-data.git", + "reference": "3fbd874921ab2c041e899d044585a2ab9795df8a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dflydev/dflydev-dot-access-data/zipball/3fbd874921ab2c041e899d044585a2ab9795df8a", + "reference": "3fbd874921ab2c041e899d044585a2ab9795df8a", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-0": { + "Dflydev\\DotAccessData": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Dragonfly Development Inc.", + "email": "info@dflydev.com", + "homepage": "http://dflydev.com" + }, + { + "name": "Beau Simensen", + "email": "beau@dflydev.com", + "homepage": "http://beausimensen.com" + }, + { + "name": "Carlos Frutos", + "email": "carlos@kiwing.it", + "homepage": "https://github.com/cfrutos" + } + ], + "description": "Given a deep data structure, access data by dot notation.", + "homepage": "https://github.com/dflydev/dflydev-dot-access-data", + "keywords": [ + "access", + "data", + "dot", + "notation" + ], + "time": "2017-01-20T21:14:22+00:00" + }, + { + "name": "psr/log", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", + "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "time": "2018-11-20T15:27:04+00:00" + }, + { + "name": "symfony/console", + "version": "v4.1.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "432122af37d8cd52fba1b294b11976e0d20df595" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/432122af37d8cd52fba1b294b11976e0d20df595", + "reference": "432122af37d8cd52fba1b294b11976e0d20df595", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/dependency-injection": "<3.4", + "symfony/process": "<3.3" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~3.4|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/event-dispatcher": "~3.4|~4.0", + "symfony/lock": "~3.4|~4.0", + "symfony/process": "~3.4|~4.0" + }, + "suggest": { + "psr/log-implementation": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/lock": "", + "symfony/process": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.1-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Console Component", + "homepage": "https://symfony.com", + "time": "2018-10-31T09:30:44+00:00" + }, + { + "name": "symfony/event-dispatcher", + "version": "v4.1.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "552541dad078c85d9414b09c041ede488b456cd5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/552541dad078c85d9414b09c041ede488b456cd5", + "reference": "552541dad078c85d9414b09c041ede488b456cd5", + "shasum": "" + }, + "require": { + "php": "^7.1.3" + }, + "conflict": { + "symfony/dependency-injection": "<3.4" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~3.4|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/expression-language": "~3.4|~4.0", + "symfony/stopwatch": "~3.4|~4.0" + }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.1-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\EventDispatcher\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony EventDispatcher Component", + "homepage": "https://symfony.com", + "time": "2018-10-10T13:52:42+00:00" + }, + { + "name": "symfony/finder", + "version": "v4.1.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "1f17195b44543017a9c9b2d437c670627e96ad06" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/1f17195b44543017a9c9b2d437c670627e96ad06", + "reference": "1f17195b44543017a9c9b2d437c670627e96ad06", + "shasum": "" + }, + "require": { + "php": "^7.1.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.1-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Finder\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Finder Component", + "homepage": "https://symfony.com", + "time": "2018-10-03T08:47:56+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.10.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "c79c051f5b3a46be09205c73b80b346e4153e494" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/c79c051f5b3a46be09205c73b80b346e4153e494", + "reference": "c79c051f5b3a46be09205c73b80b346e4153e494", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.9-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "time": "2018-09-21T13:07:52+00:00" + } + ], + "packages-dev": [ + { + "name": "doctrine/instantiator", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", + "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "require-dev": { + "athletic/athletic": "~0.1.8", + "ext-pdo": "*", + "ext-phar": "*", + "phpunit/phpunit": "^6.2.3", + "squizlabs/php_codesniffer": "^3.0.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "http://ocramius.github.com/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://github.com/doctrine/instantiator", + "keywords": [ + "constructor", + "instantiate" + ], + "time": "2017-07-22T11:58:36+00:00" + }, + { + "name": "g1a/composer-test-scenarios", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/g1a/composer-test-scenarios.git", + "reference": "2a7156f1572898888ea50ad1d48a6b4d3f9fbf78" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/g1a/composer-test-scenarios/zipball/2a7156f1572898888ea50ad1d48a6b4d3f9fbf78", + "reference": "2a7156f1572898888ea50ad1d48a6b4d3f9fbf78", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.0.0", + "php": ">=5.4" + }, + "require-dev": { + "composer/composer": "^1.7", + "php-coveralls/php-coveralls": "^1.0", + "phpunit/phpunit": "^4.8.36|^6", + "squizlabs/php_codesniffer": "^2.8" + }, + "bin": [ + "scripts/dependency-licenses" + ], + "type": "composer-plugin", + "extra": { + "class": "ComposerTestScenarios\\Plugin", + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "ComposerTestScenarios\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Greg Anderson", + "email": "greg.1.anderson@greenknowe.org" + } + ], + "description": "Useful scripts for testing multiple sets of Composer dependencies.", + "time": "2018-11-22T05:10:20+00:00" + }, + { + "name": "guzzle/guzzle", + "version": "v3.8.1", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "4de0618a01b34aa1c8c33a3f13f396dcd3882eba" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/4de0618a01b34aa1c8c33a3f13f396dcd3882eba", + "reference": "4de0618a01b34aa1c8c33a3f13f396dcd3882eba", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "php": ">=5.3.3", + "symfony/event-dispatcher": ">=2.1" + }, + "replace": { + "guzzle/batch": "self.version", + "guzzle/cache": "self.version", + "guzzle/common": "self.version", + "guzzle/http": "self.version", + "guzzle/inflection": "self.version", + "guzzle/iterator": "self.version", + "guzzle/log": "self.version", + "guzzle/parser": "self.version", + "guzzle/plugin": "self.version", + "guzzle/plugin-async": "self.version", + "guzzle/plugin-backoff": "self.version", + "guzzle/plugin-cache": "self.version", + "guzzle/plugin-cookie": "self.version", + "guzzle/plugin-curlauth": "self.version", + "guzzle/plugin-error-response": "self.version", + "guzzle/plugin-history": "self.version", + "guzzle/plugin-log": "self.version", + "guzzle/plugin-md5": "self.version", + "guzzle/plugin-mock": "self.version", + "guzzle/plugin-oauth": "self.version", + "guzzle/service": "self.version", + "guzzle/stream": "self.version" + }, + "require-dev": { + "doctrine/cache": "*", + "monolog/monolog": "1.*", + "phpunit/phpunit": "3.7.*", + "psr/log": "1.0.*", + "symfony/class-loader": "*", + "zendframework/zend-cache": "<2.3", + "zendframework/zend-log": "<2.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.8-dev" + } + }, + "autoload": { + "psr-0": { + "Guzzle": "src/", + "Guzzle\\Tests": "tests/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Guzzle Community", + "homepage": "https://github.com/guzzle/guzzle/contributors" + } + ], + "description": "Guzzle is a PHP HTTP client library and framework for building RESTful web service clients", + "homepage": "http://guzzlephp.org/", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "rest", + "web service" + ], + "abandoned": "guzzlehttp/guzzle", + "time": "2014-01-28T22:29:15+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.8.1", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8", + "reference": "3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "replace": { + "myclabs/deep-copy": "self.version" + }, + "require-dev": { + "doctrine/collections": "^1.0", + "doctrine/common": "^2.6", + "phpunit/phpunit": "^7.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + }, + "files": [ + "src/DeepCopy/deep_copy.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "time": "2018-06-11T23:09:50+00:00" + }, + { + "name": "phar-io/manifest", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/2df402786ab5368a0169091f61a7c1e0eb6852d0", + "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-phar": "*", + "phar-io/version": "^1.0.1", + "php": "^5.6 || ^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "time": "2017-03-05T18:14:27+00:00" + }, + { + "name": "phar-io/version", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/a70c0ced4be299a63d32fa96d9281d03e94041df", + "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "time": "2017-03-05T17:38:23+00:00" + }, + { + "name": "php-coveralls/php-coveralls", + "version": "v1.1.0", + "source": { + "type": "git", + "url": "https://github.com/php-coveralls/php-coveralls.git", + "reference": "37f8f83fe22224eb9d9c6d593cdeb33eedd2a9ad" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-coveralls/php-coveralls/zipball/37f8f83fe22224eb9d9c6d593cdeb33eedd2a9ad", + "reference": "37f8f83fe22224eb9d9c6d593cdeb33eedd2a9ad", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-simplexml": "*", + "guzzle/guzzle": "^2.8 || ^3.0", + "php": "^5.3.3 || ^7.0", + "psr/log": "^1.0", + "symfony/config": "^2.1 || ^3.0 || ^4.0", + "symfony/console": "^2.1 || ^3.0 || ^4.0", + "symfony/stopwatch": "^2.0 || ^3.0 || ^4.0", + "symfony/yaml": "^2.0 || ^3.0 || ^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.4.3 || ^6.0" + }, + "suggest": { + "symfony/http-kernel": "Allows Symfony integration" + }, + "bin": [ + "bin/coveralls" + ], + "type": "library", + "autoload": { + "psr-4": { + "Satooshi\\": "src/Satooshi/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kitamura Satoshi", + "email": "with.no.parachute@gmail.com", + "homepage": "https://www.facebook.com/satooshi.jp" + } + ], + "description": "PHP client library for Coveralls API", + "homepage": "https://github.com/php-coveralls/php-coveralls", + "keywords": [ + "ci", + "coverage", + "github", + "test" + ], + "time": "2017-12-06T23:17:56+00:00" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", + "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", + "shasum": "" + }, + "require": { + "php": ">=5.5" + }, + "require-dev": { + "phpunit/phpunit": "^4.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "time": "2017-09-11T18:02:19+00:00" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "4.3.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "94fd0001232e47129dd3504189fa1c7225010d08" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/94fd0001232e47129dd3504189fa1c7225010d08", + "reference": "94fd0001232e47129dd3504189fa1c7225010d08", + "shasum": "" + }, + "require": { + "php": "^7.0", + "phpdocumentor/reflection-common": "^1.0.0", + "phpdocumentor/type-resolver": "^0.4.0", + "webmozart/assert": "^1.0" + }, + "require-dev": { + "doctrine/instantiator": "~1.0.5", + "mockery/mockery": "^1.0", + "phpunit/phpunit": "^6.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "time": "2017-11-30T07:14:17+00:00" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "0.4.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7", + "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7", + "shasum": "" + }, + "require": { + "php": "^5.5 || ^7.0", + "phpdocumentor/reflection-common": "^1.0" + }, + "require-dev": { + "mockery/mockery": "^0.9.4", + "phpunit/phpunit": "^5.2||^4.8.24" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "time": "2017-07-14T14:27:02+00:00" + }, + { + "name": "phpspec/prophecy", + "version": "1.8.0", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/4ba436b55987b4bf311cb7c6ba82aa528aac0a06", + "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": "^5.3|^7.0", + "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0", + "sebastian/comparator": "^1.1|^2.0|^3.0", + "sebastian/recursion-context": "^1.0|^2.0|^3.0" + }, + "require-dev": { + "phpspec/phpspec": "^2.5|^3.2", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.8.x-dev" + } + }, + "autoload": { + "psr-0": { + "Prophecy\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", + "keywords": [ + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" + ], + "time": "2018-08-05T17:53:17+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "5.3.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "c89677919c5dd6d3b3852f230a663118762218ac" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/c89677919c5dd6d3b3852f230a663118762218ac", + "reference": "c89677919c5dd6d3b3852f230a663118762218ac", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-xmlwriter": "*", + "php": "^7.0", + "phpunit/php-file-iterator": "^1.4.2", + "phpunit/php-text-template": "^1.2.1", + "phpunit/php-token-stream": "^2.0.1", + "sebastian/code-unit-reverse-lookup": "^1.0.1", + "sebastian/environment": "^3.0", + "sebastian/version": "^2.0.1", + "theseer/tokenizer": "^1.1" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "suggest": { + "ext-xdebug": "^2.5.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.3.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "time": "2018-04-06T15:36:58+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "1.4.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4", + "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "time": "2017-11-27T13:52:08+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "time": "2015-06-21T13:50:34+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "1.0.9", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", + "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "time": "2017-02-26T11:10:40+00:00" + }, + { + "name": "phpunit/php-token-stream", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-token-stream.git", + "reference": "791198a2c6254db10131eecfe8c06670700904db" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/791198a2c6254db10131eecfe8c06670700904db", + "reference": "791198a2c6254db10131eecfe8c06670700904db", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": "^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.2.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Wrapper around PHP's tokenizer extension.", + "homepage": "https://github.com/sebastianbergmann/php-token-stream/", + "keywords": [ + "tokenizer" + ], + "time": "2017-11-27T05:48:46+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "6.5.13", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "0973426fb012359b2f18d3bd1e90ef1172839693" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/0973426fb012359b2f18d3bd1e90ef1172839693", + "reference": "0973426fb012359b2f18d3bd1e90ef1172839693", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "myclabs/deep-copy": "^1.6.1", + "phar-io/manifest": "^1.0.1", + "phar-io/version": "^1.0", + "php": "^7.0", + "phpspec/prophecy": "^1.7", + "phpunit/php-code-coverage": "^5.3", + "phpunit/php-file-iterator": "^1.4.3", + "phpunit/php-text-template": "^1.2.1", + "phpunit/php-timer": "^1.0.9", + "phpunit/phpunit-mock-objects": "^5.0.9", + "sebastian/comparator": "^2.1", + "sebastian/diff": "^2.0", + "sebastian/environment": "^3.1", + "sebastian/exporter": "^3.1", + "sebastian/global-state": "^2.0", + "sebastian/object-enumerator": "^3.0.3", + "sebastian/resource-operations": "^1.0", + "sebastian/version": "^2.0.1" + }, + "conflict": { + "phpdocumentor/reflection-docblock": "3.0.2", + "phpunit/dbunit": "<3.0" + }, + "require-dev": { + "ext-pdo": "*" + }, + "suggest": { + "ext-xdebug": "*", + "phpunit/php-invoker": "^1.1" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.5.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "time": "2018-09-08T15:10:43+00:00" + }, + { + "name": "phpunit/phpunit-mock-objects", + "version": "5.0.10", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", + "reference": "cd1cf05c553ecfec36b170070573e540b67d3f1f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/cd1cf05c553ecfec36b170070573e540b67d3f1f", + "reference": "cd1cf05c553ecfec36b170070573e540b67d3f1f", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.5", + "php": "^7.0", + "phpunit/php-text-template": "^1.2.1", + "sebastian/exporter": "^3.1" + }, + "conflict": { + "phpunit/phpunit": "<6.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.5.11" + }, + "suggest": { + "ext-soap": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Mock Object library for PHPUnit", + "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", + "keywords": [ + "mock", + "xunit" + ], + "time": "2018-08-09T05:50:03+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", + "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7 || ^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "time": "2017-03-04T06:30:41+00:00" + }, + { + "name": "sebastian/comparator", + "version": "2.1.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/34369daee48eafb2651bea869b4b15d75ccc35f9", + "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9", + "shasum": "" + }, + "require": { + "php": "^7.0", + "sebastian/diff": "^2.0 || ^3.0", + "sebastian/exporter": "^3.1" + }, + "require-dev": { + "phpunit/phpunit": "^6.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "https://github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "time": "2018-02-01T13:46:46+00:00" + }, + { + "name": "sebastian/diff", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/347c1d8b49c5c3ee30c7040ea6fc446790e6bddd", + "reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd", + "shasum": "" + }, + "require": { + "php": "^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff" + ], + "time": "2017-08-03T08:09:46+00:00" + }, + { + "name": "sebastian/environment", + "version": "3.1.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/cd0871b3975fb7fc44d11314fd1ee20925fce4f5", + "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5", + "shasum": "" + }, + "require": { + "php": "^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "time": "2017-07-01T08:51:00+00:00" + }, + { + "name": "sebastian/exporter", + "version": "3.1.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "234199f4528de6d12aaa58b612e98f7d36adb937" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/234199f4528de6d12aaa58b612e98f7d36adb937", + "reference": "234199f4528de6d12aaa58b612e98f7d36adb937", + "shasum": "" + }, + "require": { + "php": "^7.0", + "sebastian/recursion-context": "^3.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "http://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "time": "2017-04-03T13:19:02+00:00" + }, + { + "name": "sebastian/global-state", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", + "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", + "shasum": "" + }, + "require": { + "php": "^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "time": "2017-04-27T15:39:26+00:00" + }, + { + "name": "sebastian/object-enumerator", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/7cfd9e65d11ffb5af41198476395774d4c8a84c5", + "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5", + "shasum": "" + }, + "require": { + "php": "^7.0", + "sebastian/object-reflector": "^1.1.1", + "sebastian/recursion-context": "^3.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "time": "2017-08-03T12:35:26+00:00" + }, + { + "name": "sebastian/object-reflector", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "773f97c67f28de00d397be301821b06708fca0be" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/773f97c67f28de00d397be301821b06708fca0be", + "reference": "773f97c67f28de00d397be301821b06708fca0be", + "shasum": "" + }, + "require": { + "php": "^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "time": "2017-03-29T09:07:27+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", + "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", + "shasum": "" + }, + "require": { + "php": "^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "time": "2017-03-03T06:23:57+00:00" + }, + { + "name": "sebastian/resource-operations", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", + "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", + "shasum": "" + }, + "require": { + "php": ">=5.6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "time": "2015-07-28T20:34:47+00:00" + }, + { + "name": "sebastian/version", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "time": "2016-10-03T07:35:21+00:00" + }, + { + "name": "squizlabs/php_codesniffer", + "version": "2.9.2", + "source": { + "type": "git", + "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", + "reference": "2acf168de78487db620ab4bc524135a13cfe6745" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/2acf168de78487db620ab4bc524135a13cfe6745", + "reference": "2acf168de78487db620ab4bc524135a13cfe6745", + "shasum": "" + }, + "require": { + "ext-simplexml": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=5.1.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "bin": [ + "scripts/phpcs", + "scripts/phpcbf" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "autoload": { + "classmap": [ + "CodeSniffer.php", + "CodeSniffer/CLI.php", + "CodeSniffer/Exception.php", + "CodeSniffer/File.php", + "CodeSniffer/Fixer.php", + "CodeSniffer/Report.php", + "CodeSniffer/Reporting.php", + "CodeSniffer/Sniff.php", + "CodeSniffer/Tokens.php", + "CodeSniffer/Reports/", + "CodeSniffer/Tokenizers/", + "CodeSniffer/DocGenerators/", + "CodeSniffer/Standards/AbstractPatternSniff.php", + "CodeSniffer/Standards/AbstractScopeSniff.php", + "CodeSniffer/Standards/AbstractVariableSniff.php", + "CodeSniffer/Standards/IncorrectPatternException.php", + "CodeSniffer/Standards/Generic/Sniffs/", + "CodeSniffer/Standards/MySource/Sniffs/", + "CodeSniffer/Standards/PEAR/Sniffs/", + "CodeSniffer/Standards/PSR1/Sniffs/", + "CodeSniffer/Standards/PSR2/Sniffs/", + "CodeSniffer/Standards/Squiz/Sniffs/", + "CodeSniffer/Standards/Zend/Sniffs/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Greg Sherwood", + "role": "lead" + } + ], + "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "homepage": "http://www.squizlabs.com/php-codesniffer", + "keywords": [ + "phpcs", + "standards" + ], + "time": "2018-11-07T22:31:41+00:00" + }, + { + "name": "symfony/config", + "version": "v4.1.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/config.git", + "reference": "991fec8bbe77367fc8b48ecbaa8a4bd6e905a238" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/config/zipball/991fec8bbe77367fc8b48ecbaa8a4bd6e905a238", + "reference": "991fec8bbe77367fc8b48ecbaa8a4bd6e905a238", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "symfony/filesystem": "~3.4|~4.0", + "symfony/polyfill-ctype": "~1.8" + }, + "conflict": { + "symfony/finder": "<3.4" + }, + "require-dev": { + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/event-dispatcher": "~3.4|~4.0", + "symfony/finder": "~3.4|~4.0", + "symfony/yaml": "~3.4|~4.0" + }, + "suggest": { + "symfony/yaml": "To use the yaml reference dumper" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.1-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Config\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Config Component", + "homepage": "https://symfony.com", + "time": "2018-10-31T09:09:42+00:00" + }, + { + "name": "symfony/filesystem", + "version": "v4.1.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "fd7bd6535beb1f0a0a9e3ee960666d0598546981" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/fd7bd6535beb1f0a0a9e3ee960666d0598546981", + "reference": "fd7bd6535beb1f0a0a9e3ee960666d0598546981", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "symfony/polyfill-ctype": "~1.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.1-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Filesystem Component", + "homepage": "https://symfony.com", + "time": "2018-10-30T13:18:25+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.10.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "e3d826245268269cd66f8326bd8bc066687b4a19" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e3d826245268269cd66f8326bd8bc066687b4a19", + "reference": "e3d826245268269cd66f8326bd8bc066687b4a19", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.9-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + }, + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "time": "2018-08-06T14:22:27+00:00" + }, + { + "name": "symfony/stopwatch", + "version": "v4.1.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/stopwatch.git", + "reference": "5bfc064125b73ff81229e19381ce1c34d3416f4b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/5bfc064125b73ff81229e19381ce1c34d3416f4b", + "reference": "5bfc064125b73ff81229e19381ce1c34d3416f4b", + "shasum": "" + }, + "require": { + "php": "^7.1.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.1-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Stopwatch\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Stopwatch Component", + "homepage": "https://symfony.com", + "time": "2018-10-02T12:40:59+00:00" + }, + { + "name": "symfony/yaml", + "version": "v4.1.7", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "367e689b2fdc19965be435337b50bc8adf2746c9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/367e689b2fdc19965be435337b50bc8adf2746c9", + "reference": "367e689b2fdc19965be435337b50bc8adf2746c9", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "symfony/polyfill-ctype": "~1.8" + }, + "conflict": { + "symfony/console": "<3.4" + }, + "require-dev": { + "symfony/console": "~3.4|~4.0" + }, + "suggest": { + "symfony/console": "For validating YAML files using the lint command" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.1-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Yaml\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Yaml Component", + "homepage": "https://symfony.com", + "time": "2018-10-02T16:36:10+00:00" + }, + { + "name": "theseer/tokenizer", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/cb2f008f3f05af2893a87208fe6a6c4985483f8b", + "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + } + ], + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "time": "2017-04-07T12:08:54+00:00" + }, + { + "name": "webmozart/assert", + "version": "1.3.0", + "source": { + "type": "git", + "url": "https://github.com/webmozart/assert.git", + "reference": "0df1908962e7a3071564e857d86874dad1ef204a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozart/assert/zipball/0df1908962e7a3071564e857d86874dad1ef204a", + "reference": "0df1908962e7a3071564e857d86874dad1ef204a", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.6", + "sebastian/version": "^1.0.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "time": "2018-01-29T19:49:41+00:00" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": ">=5.4.0" + }, + "platform-dev": [], + "platform-overrides": { + "php": "7.1.3" + } +} diff --git a/vendor/consolidation/annotated-command/CHANGELOG.md b/vendor/consolidation/annotated-command/CHANGELOG.md index 8b5a16a12..ae4ca9efe 100644 --- a/vendor/consolidation/annotated-command/CHANGELOG.md +++ b/vendor/consolidation/annotated-command/CHANGELOG.md @@ -1,5 +1,19 @@ # Change Log +### 2.11.0 + +- Make injection of InputInterface / OutputInterface general-purpose (#179) + +### 2.10.2 - 20 Dec 2018 + +- Fix commands that have a @param annotation for their InputInterface/OutputInterface params (#176) + +### 2.10.1 - 13 Dec 2018 + +- Add stdin handler convenience class +- Add setter to AnnotationData to suppliment existing array acces +- Update to Composer Test Scenarios 3 + ### 2.10.0 - 14 Nov 2018 - Add a new data type, CommandResult (#167) diff --git a/vendor/consolidation/annotated-command/LICENSE b/vendor/consolidation/annotated-command/LICENSE index 100c41fb5..878fb292c 100644 --- a/vendor/consolidation/annotated-command/LICENSE +++ b/vendor/consolidation/annotated-command/LICENSE @@ -11,12 +11,12 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI DEPENDENCY LICENSES: -Name Version License -consolidation/output-formatters 3.4.0 MIT -dflydev/dot-access-data v1.1.0 MIT -psr/log 1.0.2 MIT -symfony/console v3.4.17 MIT -symfony/debug v3.4.17 MIT -symfony/event-dispatcher v3.4.17 MIT -symfony/finder v3.4.17 MIT -symfony/polyfill-mbstring v1.9.0 MIT +Name Version License +consolidation/output-formatters 3.4.0 MIT +dflydev/dot-access-data v1.1.0 MIT +psr/log 1.1.0 MIT +symfony/console v2.8.47 MIT +symfony/debug v2.8.47 MIT +symfony/event-dispatcher v2.8.47 MIT +symfony/finder v2.8.47 MIT +symfony/polyfill-mbstring v1.10.0 MIT \ No newline at end of file diff --git a/vendor/consolidation/annotated-command/README.md b/vendor/consolidation/annotated-command/README.md index 817fc8918..efcba14b4 100644 --- a/vendor/consolidation/annotated-command/README.md +++ b/vendor/consolidation/annotated-command/README.md @@ -5,7 +5,7 @@ Initialize Symfony Console commands from annotated command class methods. [![Travis CI](https://travis-ci.org/consolidation/annotated-command.svg?branch=master)](https://travis-ci.org/consolidation/annotated-command) [![Windows CI](https://ci.appveyor.com/api/projects/status/c2c4lcf43ux4c30p?svg=true)](https://ci.appveyor.com/project/greg-1-anderson/annotated-command) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/consolidation/annotated-command/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/consolidation/annotated-command/?branch=master) -[![Coverage Status](https://coveralls.io/repos/github/consolidation/annotated-command/badge.svg?branch=master)](https://coveralls.io/github/consolidation/annotated-command?branch=master) +[![Coverage Status](https://coveralls.io/repos/github/consolidation/annotated-command/badge.svg?branch=master)](https://coveralls.io/github/consolidation/annotated-command?branch=master) [![License](https://poser.pugx.org/consolidation/annotated-command/license)](https://packagist.org/packages/consolidation/annotated-command) ## Component Status @@ -31,7 +31,7 @@ This library provides routines to produce the Symfony\Component\Console\Command\ This is a library intended to be used in some other project. Require from your composer.json file: ``` "require": { - "consolidation/annotated-command": "~2" + "consolidation/annotated-command": "^2" }, ``` @@ -43,12 +43,12 @@ The rest of the parameters are arguments. Parameters with a default value are op class MyCommandClass { /** - * This is the my:cat command + * This is the my:echo command * * This command will concatenate two parameters. If the --flip flag * is provided, then the result is the concatenation of two and one. * - * @command my:cat + * @command my:echo * @param integer $one The first parameter. * @param integer $two The other parameter. * @option arr An option that takes multiple values. @@ -57,7 +57,7 @@ class MyCommandClass * @usage bet alpha --flip * Concatenate "alpha" and "bet". */ - public function myCat($one, $two, $options = ['flip' => false]) + public function myEcho($one, $two, $options = ['flip' => false]) { if ($options['flip']) { return "{$two}{$one}"; @@ -65,7 +65,7 @@ class MyCommandClass return "{$one}{$two}"; } } -``` +``` ## Option Default Values The `$options` array must be an associative array whose key is the name of the option, and whose value is one of: @@ -103,6 +103,7 @@ The hook **target** specifies which command or commands the hook will be attache - The command's primary name (e.g. `my:command`) or the command's method name (e.g. myCommand) will attach the hook to only that command. - An annotation (e.g. `@foo`) will attach the hook to any command that is annotated with the given label. +- If the target is specified as `*`, then the hook will be attached to all commands. - If the target is omitted, then the hook will be attached to every command defined in the same class as the hook implementation. There are ten types of hooks in the command processing request flow: @@ -143,7 +144,7 @@ There are ten types of hooks in the command processing request flow: - @status - [Extract](#extract-hook) - @extract - + In addition to these, there are two more hooks available: - [On-event](#on-event-hook) @@ -201,6 +202,42 @@ public function initSomeCommand(InputInterface $input, AnnotationData $annotatio } ``` +You may alter the AnnotationData here by using simple array syntax. Below, we +add an additional display field label for a Property List. + +``` +use Consolidation\AnnotatedCommand\AnnotationData; +use Symfony\Component\Console\Input\InputInterface; + +/** + * @hook init some:command + */ +public function initSomeCommand(InputInterface $input, AnnotationData $annotationData) +{ + $annotationData['field-labels'] .= "\n" . "new_field: My new field"; +} +``` + +Alternately, you may use the `set()` or `append()` methods on the AnnotationData +class. + +``` +use Consolidation\AnnotatedCommand\AnnotationData; +use Symfony\Component\Console\Input\InputInterface; + +/** + * @hook init some:command + */ +public function initSomeCommand(InputInterface $input, AnnotationData $annotationData) +{ + // Add a line to the field labels. + $annotationData->append('field-labels', "\n" . "new_field: My new field"); + // Replace all field labels. + $annotationData->set('field-labels', "one_field: My only field"); + +} +``` + ### Interact Hook The interact hook ([InteractorInterface](src/Hooks/InteractorInterface.php)) runs prior to argument and option validation. Required arguments and options not supplied on the command line may be provided during this phase by prompting the user. Note that the interact hook is not called if the --no-interaction flag is supplied, whereas the command-event hook and the init hook are. @@ -407,8 +444,8 @@ class MyReplaceCommandHook { /** * @hook replace-command foo:bar - * - * Parameters must match original command method. + * + * Parameters must match original command method. */ public function myFooBarReplacement($value) { print "Hello $value!"; @@ -432,6 +469,46 @@ If you want to use annotations, but still want access to the Symfony Command, e. It is also possible to add InputInterface and/or OutputInterface parameters to any annotated method of a command file (the parameters must go before command arguments). +## Parameter Injection + +Just as this library will by default inject $input and/or $output at the head of the parameter list of any command function, it is also possible to add a handler to inject other objects as well. + +Given an implementation of SymfonyStyleInjector similar to the example below: +``` +use Consolidation\AnnotatedCommand\ParameterInjector + +class SymfonyStyleInjector implements ParameterInjector +{ + public function get(CommandData $commandData, $interfaceName) + { + return new MySymfonyStyle($commandData->input(), $commandData->output()); + } +} +``` +Then, an instance of 'MySymfonyStyle' will be provided to any command handler method that takes a SymfonyStyle parameter if the SymfonyStyleInjector is registered in your application's initialization code like so: +``` +$commandProcessor->parameterInjection()->register('Symfony\Component\Console\Style\SymfonyStyle', new SymfonyStyleInjector); +``` + +## Handling Standard Input + +Any Symfony command may use the provides StdinHandler to imlement commands that read from standard input. + +```php + /** + * @command example + * @option string $file + * @default $file - + */ + public function example(InputInterface $input) + { + $data = StdinHandler::selectStream($input, 'file')->contents(); + } +``` +This example will read all of the data available from the stdin stream into $data, or, alternately, will read the entire contents of the file specified via the `--file=/path` option. + +For more details, including examples of using the StdinHandle with a DI container, see the comments in [StdinHandler.php](src/Input/StdinHandler.php). + ## API Usage If you would like to use Annotated Commands to build a commandline tool, it is recommended that you use [Robo as a framework](http://robo.li/framework), as it will set up all of the various command classes for you. If you would like to integrate Annotated Commands into some other framework, see the sections below. @@ -504,7 +581,7 @@ Listeners can be used to construct command file instances as they are provided t ### Option Providers -An option provider is given an opportunity to add options to a command as it is being constructed. +An option provider is given an opportunity to add options to a command as it is being constructed. ``` public function AnnotatedCommandFactory::addAutomaticOptionProvider(AutomaticOptionsProviderInterface $listener); ``` @@ -516,7 +593,3 @@ CommandInfo alterers can adjust information about a command immediately before i ``` public function alterCommandInfo(CommandInfo $commandInfo, $commandFileInstance); ``` - -## Comparison to Existing Solutions - -The existing solutions used their own hand-rolled regex-based parsers to process the contents of the DocBlock comments. consolidation/annotated-command uses the [phpdocumentor/reflection-docblock](https://github.com/phpDocumentor/ReflectionDocBlock) project (which is itself a regex-based parser) to interpret DocBlock contents. diff --git a/vendor/consolidation/annotated-command/composer.json b/vendor/consolidation/annotated-command/composer.json index 923aefa1c..25baa6fcb 100644 --- a/vendor/consolidation/annotated-command/composer.json +++ b/vendor/consolidation/annotated-command/composer.json @@ -28,8 +28,8 @@ }, "require-dev": { "phpunit/phpunit": "^6", - "satooshi/php-coveralls": "^2", - "g1a/composer-test-scenarios": "^2", + "php-coveralls/php-coveralls": "^1", + "g1a/composer-test-scenarios": "^3", "squizlabs/php_codesniffer": "^2.7" }, "config": { @@ -51,16 +51,53 @@ "@lint", "@unit", "@cs" - ], - "scenario": "scenarios/install", - "post-update-cmd": [ - "create-scenario symfony4 'symfony/console:^4.0' --platform-php '7.1.3'", - "create-scenario symfony2 'symfony/console:^2.8' 'phpunit/phpunit:^4.8.36' --remove 'satooshi/php-coveralls' --platform-php '5.4' --no-lockfile", - "create-scenario phpunit4 'phpunit/phpunit:^4.8.36' --remove 'satooshi/php-coveralls' --platform-php '5.4'", - "dependency-licenses" ] }, "extra": { + "scenarios": { + "symfony4": { + "require": { + "symfony/console": "^4.0" + }, + "config": { + "platform": { + "php": "7.1.3" + } + } + }, + "symfony2": { + "require": { + "symfony/console": "^2.8" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.36" + }, + "remove": [ + "php-coveralls/php-coveralls" + ], + "config": { + "platform": { + "php": "5.4.8" + } + }, + "scenario-options": { + "create-lockfile": "false" + } + }, + "phpunit4": { + "require-dev": { + "phpunit/phpunit": "^4.8.36" + }, + "remove": [ + "php-coveralls/php-coveralls" + ], + "config": { + "platform": { + "php": "5.4.8" + } + } + } + }, "branch-alias": { "dev-master": "2.x-dev" } diff --git a/vendor/consolidation/annotated-command/composer.lock b/vendor/consolidation/annotated-command/composer.lock index af19e4bd8..ce2d5ad04 100644 --- a/vendor/consolidation/annotated-command/composer.lock +++ b/vendor/consolidation/annotated-command/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "6be8513127d28eadc852a80e0aa0c3d5", + "content-hash": "3c6b3e869447a986290d067cbf905c6f", "packages": [ { "name": "consolidation/output-formatters", @@ -123,16 +123,16 @@ }, { "name": "psr/log", - "version": "1.0.2", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" + "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", + "url": "https://api.github.com/repos/php-fig/log/zipball/6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", + "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", "shasum": "" }, "require": { @@ -166,20 +166,20 @@ "psr", "psr-3" ], - "time": "2016-10-10T12:19:37+00:00" + "time": "2018-11-20T15:27:04+00:00" }, { "name": "symfony/console", - "version": "v3.4.17", + "version": "v3.4.18", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "3b2b415d4c48fbefca7dc742aa0a0171bfae4e0b" + "reference": "1d228fb4602047d7b26a0554e0d3efd567da5803" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/3b2b415d4c48fbefca7dc742aa0a0171bfae4e0b", - "reference": "3b2b415d4c48fbefca7dc742aa0a0171bfae4e0b", + "url": "https://api.github.com/repos/symfony/console/zipball/1d228fb4602047d7b26a0554e0d3efd567da5803", + "reference": "1d228fb4602047d7b26a0554e0d3efd567da5803", "shasum": "" }, "require": { @@ -235,20 +235,20 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2018-10-02T16:33:53+00:00" + "time": "2018-10-30T16:50:50+00:00" }, { "name": "symfony/debug", - "version": "v3.4.17", + "version": "v3.4.18", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "0a612e9dfbd2ccce03eb174365f31ecdca930ff6" + "reference": "fe9793af008b651c5441bdeab21ede8172dab097" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/0a612e9dfbd2ccce03eb174365f31ecdca930ff6", - "reference": "0a612e9dfbd2ccce03eb174365f31ecdca930ff6", + "url": "https://api.github.com/repos/symfony/debug/zipball/fe9793af008b651c5441bdeab21ede8172dab097", + "reference": "fe9793af008b651c5441bdeab21ede8172dab097", "shasum": "" }, "require": { @@ -291,20 +291,20 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "time": "2018-10-02T16:33:53+00:00" + "time": "2018-10-31T09:06:03+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v3.4.17", + "version": "v3.4.18", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "b2e1f19280c09a42dc64c0b72b80fe44dd6e88fb" + "reference": "db9e829c8f34c3d35cf37fcd4cdb4293bc4a2f14" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/b2e1f19280c09a42dc64c0b72b80fe44dd6e88fb", - "reference": "b2e1f19280c09a42dc64c0b72b80fe44dd6e88fb", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/db9e829c8f34c3d35cf37fcd4cdb4293bc4a2f14", + "reference": "db9e829c8f34c3d35cf37fcd4cdb4293bc4a2f14", "shasum": "" }, "require": { @@ -354,11 +354,11 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2018-07-26T09:06:28+00:00" + "time": "2018-10-30T16:50:50+00:00" }, { "name": "symfony/finder", - "version": "v3.4.17", + "version": "v3.4.18", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", @@ -407,16 +407,16 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.9.0", + "version": "v1.10.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "d0cd638f4634c16d8df4508e847f14e9e43168b8" + "reference": "c79c051f5b3a46be09205c73b80b346e4153e494" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/d0cd638f4634c16d8df4508e847f14e9e43168b8", - "reference": "d0cd638f4634c16d8df4508e847f14e9e43168b8", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/c79c051f5b3a46be09205c73b80b346e4153e494", + "reference": "c79c051f5b3a46be09205c73b80b346e4153e494", "shasum": "" }, "require": { @@ -462,7 +462,7 @@ "portable", "shim" ], - "time": "2018-08-06T14:22:27+00:00" + "time": "2018-09-21T13:07:52+00:00" } ], "packages-dev": [ @@ -522,24 +522,43 @@ }, { "name": "g1a/composer-test-scenarios", - "version": "2.2.0", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/g1a/composer-test-scenarios.git", - "reference": "a166fd15191aceab89f30c097e694b7cf3db4880" + "reference": "2a7156f1572898888ea50ad1d48a6b4d3f9fbf78" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/g1a/composer-test-scenarios/zipball/a166fd15191aceab89f30c097e694b7cf3db4880", - "reference": "a166fd15191aceab89f30c097e694b7cf3db4880", + "url": "https://api.github.com/repos/g1a/composer-test-scenarios/zipball/2a7156f1572898888ea50ad1d48a6b4d3f9fbf78", + "reference": "2a7156f1572898888ea50ad1d48a6b4d3f9fbf78", "shasum": "" }, + "require": { + "composer-plugin-api": "^1.0.0", + "php": ">=5.4" + }, + "require-dev": { + "composer/composer": "^1.7", + "php-coveralls/php-coveralls": "^1.0", + "phpunit/phpunit": "^4.8.36|^6", + "squizlabs/php_codesniffer": "^2.8" + }, "bin": [ - "scripts/create-scenario", - "scripts/dependency-licenses", - "scripts/install-scenario" + "scripts/dependency-licenses" ], - "type": "library", + "type": "composer-plugin", + "extra": { + "class": "ComposerTestScenarios\\Plugin", + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "ComposerTestScenarios\\": "src/" + } + }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" @@ -551,47 +570,70 @@ } ], "description": "Useful scripts for testing multiple sets of Composer dependencies.", - "time": "2018-08-08T23:37:23+00:00" + "time": "2018-11-22T05:10:20+00:00" }, { - "name": "guzzlehttp/guzzle", - "version": "6.3.3", + "name": "guzzle/guzzle", + "version": "v3.8.1", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba" + "reference": "4de0618a01b34aa1c8c33a3f13f396dcd3882eba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/407b0cb880ace85c9b63c5f9551db498cb2d50ba", - "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/4de0618a01b34aa1c8c33a3f13f396dcd3882eba", + "reference": "4de0618a01b34aa1c8c33a3f13f396dcd3882eba", "shasum": "" }, "require": { - "guzzlehttp/promises": "^1.0", - "guzzlehttp/psr7": "^1.4", - "php": ">=5.5" + "ext-curl": "*", + "php": ">=5.3.3", + "symfony/event-dispatcher": ">=2.1" + }, + "replace": { + "guzzle/batch": "self.version", + "guzzle/cache": "self.version", + "guzzle/common": "self.version", + "guzzle/http": "self.version", + "guzzle/inflection": "self.version", + "guzzle/iterator": "self.version", + "guzzle/log": "self.version", + "guzzle/parser": "self.version", + "guzzle/plugin": "self.version", + "guzzle/plugin-async": "self.version", + "guzzle/plugin-backoff": "self.version", + "guzzle/plugin-cache": "self.version", + "guzzle/plugin-cookie": "self.version", + "guzzle/plugin-curlauth": "self.version", + "guzzle/plugin-error-response": "self.version", + "guzzle/plugin-history": "self.version", + "guzzle/plugin-log": "self.version", + "guzzle/plugin-md5": "self.version", + "guzzle/plugin-mock": "self.version", + "guzzle/plugin-oauth": "self.version", + "guzzle/service": "self.version", + "guzzle/stream": "self.version" }, "require-dev": { - "ext-curl": "*", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", - "psr/log": "^1.0" - }, - "suggest": { - "psr/log": "Required for using the Log middleware" + "doctrine/cache": "*", + "monolog/monolog": "1.*", + "phpunit/phpunit": "3.7.*", + "psr/log": "1.0.*", + "symfony/class-loader": "*", + "zendframework/zend-cache": "<2.3", + "zendframework/zend-log": "<2.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "6.3-dev" + "dev-master": "3.8-dev" } }, "autoload": { - "files": [ - "src/functions_include.php" - ], - "psr-4": { - "GuzzleHttp\\": "src/" + "psr-0": { + "Guzzle": "src/", + "Guzzle\\Tests": "tests/" } }, "notification-url": "https://packagist.org/downloads/", @@ -603,9 +645,13 @@ "name": "Michael Dowling", "email": "mtdowling@gmail.com", "homepage": "https://github.com/mtdowling" + }, + { + "name": "Guzzle Community", + "homepage": "https://github.com/guzzle/guzzle/contributors" } ], - "description": "Guzzle is a PHP HTTP client library", + "description": "Guzzle is a PHP HTTP client library and framework for building RESTful web service clients", "homepage": "http://guzzlephp.org/", "keywords": [ "client", @@ -616,123 +662,8 @@ "rest", "web service" ], - "time": "2018-04-22T15:46:56+00:00" - }, - { - "name": "guzzlehttp/promises", - "version": "v1.3.1", - "source": { - "type": "git", - "url": "https://github.com/guzzle/promises.git", - "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646", - "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646", - "shasum": "" - }, - "require": { - "php": ">=5.5.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, - "autoload": { - "psr-4": { - "GuzzleHttp\\Promise\\": "src/" - }, - "files": [ - "src/functions_include.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "Guzzle promises library", - "keywords": [ - "promise" - ], - "time": "2016-12-20T10:07:11+00:00" - }, - { - "name": "guzzlehttp/psr7", - "version": "1.4.2", - "source": { - "type": "git", - "url": "https://github.com/guzzle/psr7.git", - "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/f5b8a8512e2b58b0071a7280e39f14f72e05d87c", - "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c", - "shasum": "" - }, - "require": { - "php": ">=5.4.0", - "psr/http-message": "~1.0" - }, - "provide": { - "psr/http-message-implementation": "1.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, - "autoload": { - "psr-4": { - "GuzzleHttp\\Psr7\\": "src/" - }, - "files": [ - "src/functions_include.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "Tobias Schultze", - "homepage": "https://github.com/Tobion" - } - ], - "description": "PSR-7 message implementation that also provides common utility methods", - "keywords": [ - "http", - "message", - "request", - "response", - "stream", - "uri", - "url" - ], - "time": "2017-03-20T17:10:46+00:00" + "abandoned": "guzzlehttp/guzzle", + "time": "2014-01-28T22:29:15+00:00" }, { "name": "myclabs/deep-copy", @@ -881,6 +812,67 @@ "description": "Library for handling version information and constraints", "time": "2017-03-05T17:38:23+00:00" }, + { + "name": "php-coveralls/php-coveralls", + "version": "v1.1.0", + "source": { + "type": "git", + "url": "https://github.com/php-coveralls/php-coveralls.git", + "reference": "37f8f83fe22224eb9d9c6d593cdeb33eedd2a9ad" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-coveralls/php-coveralls/zipball/37f8f83fe22224eb9d9c6d593cdeb33eedd2a9ad", + "reference": "37f8f83fe22224eb9d9c6d593cdeb33eedd2a9ad", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-simplexml": "*", + "guzzle/guzzle": "^2.8 || ^3.0", + "php": "^5.3.3 || ^7.0", + "psr/log": "^1.0", + "symfony/config": "^2.1 || ^3.0 || ^4.0", + "symfony/console": "^2.1 || ^3.0 || ^4.0", + "symfony/stopwatch": "^2.0 || ^3.0 || ^4.0", + "symfony/yaml": "^2.0 || ^3.0 || ^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.4.3 || ^6.0" + }, + "suggest": { + "symfony/http-kernel": "Allows Symfony integration" + }, + "bin": [ + "bin/coveralls" + ], + "type": "library", + "autoload": { + "psr-4": { + "Satooshi\\": "src/Satooshi/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kitamura Satoshi", + "email": "with.no.parachute@gmail.com", + "homepage": "https://www.facebook.com/satooshi.jp" + } + ], + "description": "PHP client library for Coveralls API", + "homepage": "https://github.com/php-coveralls/php-coveralls", + "keywords": [ + "ci", + "coverage", + "github", + "test" + ], + "time": "2017-12-06T23:17:56+00:00" + }, { "name": "phpdocumentor/reflection-common", "version": "1.0.1", @@ -1488,140 +1480,6 @@ ], "time": "2018-08-09T05:50:03+00:00" }, - { - "name": "psr/http-message", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-message.git", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP messages", - "homepage": "https://github.com/php-fig/http-message", - "keywords": [ - "http", - "http-message", - "psr", - "psr-7", - "request", - "response" - ], - "time": "2016-08-06T14:39:51+00:00" - }, - { - "name": "satooshi/php-coveralls", - "version": "v2.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-coveralls/php-coveralls.git", - "reference": "3eaf7eb689cdf6b86801a3843940d974dc657068" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-coveralls/php-coveralls/zipball/3eaf7eb689cdf6b86801a3843940d974dc657068", - "reference": "3eaf7eb689cdf6b86801a3843940d974dc657068", - "shasum": "" - }, - "require": { - "ext-json": "*", - "ext-simplexml": "*", - "guzzlehttp/guzzle": "^6.0", - "php": "^5.5 || ^7.0", - "psr/log": "^1.0", - "symfony/config": "^2.1 || ^3.0 || ^4.0", - "symfony/console": "^2.1 || ^3.0 || ^4.0", - "symfony/stopwatch": "^2.0 || ^3.0 || ^4.0", - "symfony/yaml": "^2.0 || ^3.0 || ^4.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.4.3 || ^6.0" - }, - "suggest": { - "symfony/http-kernel": "Allows Symfony integration" - }, - "bin": [ - "bin/php-coveralls" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "psr-4": { - "PhpCoveralls\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Kitamura Satoshi", - "email": "with.no.parachute@gmail.com", - "homepage": "https://www.facebook.com/satooshi.jp", - "role": "Original creator" - }, - { - "name": "Takashi Matsuo", - "email": "tmatsuo@google.com" - }, - { - "name": "Google Inc" - }, - { - "name": "Dariusz Ruminski", - "email": "dariusz.ruminski@gmail.com", - "homepage": "https://github.com/keradus" - }, - { - "name": "Contributors", - "homepage": "https://github.com/php-coveralls/php-coveralls/graphs/contributors" - } - ], - "description": "PHP client library for Coveralls API", - "homepage": "https://github.com/php-coveralls/php-coveralls", - "keywords": [ - "ci", - "coverage", - "github", - "test" - ], - "abandoned": "php-coveralls/php-coveralls", - "time": "2017-12-08T14:28:16+00:00" - }, { "name": "sebastian/code-unit-reverse-lookup", "version": "1.0.1", @@ -2183,16 +2041,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "2.9.1", + "version": "2.9.2", "source": { "type": "git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "dcbed1074f8244661eecddfc2a675430d8d33f62" + "reference": "2acf168de78487db620ab4bc524135a13cfe6745" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/dcbed1074f8244661eecddfc2a675430d8d33f62", - "reference": "dcbed1074f8244661eecddfc2a675430d8d33f62", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/2acf168de78487db620ab4bc524135a13cfe6745", + "reference": "2acf168de78487db620ab4bc524135a13cfe6745", "shasum": "" }, "require": { @@ -2257,20 +2115,20 @@ "phpcs", "standards" ], - "time": "2017-05-22T02:43:20+00:00" + "time": "2018-11-07T22:31:41+00:00" }, { "name": "symfony/config", - "version": "v3.4.17", + "version": "v3.4.18", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "e5389132dc6320682de3643091121c048ff796b3" + "reference": "99b2fa8acc244e656cdf324ff419fbe6fd300a4d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/e5389132dc6320682de3643091121c048ff796b3", - "reference": "e5389132dc6320682de3643091121c048ff796b3", + "url": "https://api.github.com/repos/symfony/config/zipball/99b2fa8acc244e656cdf324ff419fbe6fd300a4d", + "reference": "99b2fa8acc244e656cdf324ff419fbe6fd300a4d", "shasum": "" }, "require": { @@ -2321,11 +2179,11 @@ ], "description": "Symfony Config Component", "homepage": "https://symfony.com", - "time": "2018-09-08T13:15:14+00:00" + "time": "2018-10-31T09:06:03+00:00" }, { "name": "symfony/filesystem", - "version": "v3.4.17", + "version": "v3.4.18", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", @@ -2375,7 +2233,7 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.9.0", + "version": "v1.10.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", @@ -2433,7 +2291,7 @@ }, { "name": "symfony/stopwatch", - "version": "v3.4.17", + "version": "v3.4.18", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", @@ -2482,7 +2340,7 @@ }, { "name": "symfony/yaml", - "version": "v3.4.17", + "version": "v3.4.18", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", diff --git a/vendor/consolidation/annotated-command/src/AnnotatedCommand.php b/vendor/consolidation/annotated-command/src/AnnotatedCommand.php index 41be53a96..40d26af5c 100644 --- a/vendor/consolidation/annotated-command/src/AnnotatedCommand.php +++ b/vendor/consolidation/annotated-command/src/AnnotatedCommand.php @@ -9,6 +9,7 @@ use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; +use Consolidation\AnnotatedCommand\Help\HelpDocumentBuilder; /** * AnnotatedCommands are created automatically by the @@ -32,9 +33,8 @@ class AnnotatedCommand extends Command implements HelpDocumentAlter protected $annotationData; protected $examples = []; protected $topics = []; - protected $usesInputInterface; - protected $usesOutputInterface; protected $returnType; + protected $injectedClasses = []; public function __construct($name = null) { @@ -153,118 +153,16 @@ class AnnotatedCommand extends Command implements HelpDocumentAlter public function helpAlter(\DomDocument $originalDom) { - $dom = new \DOMDocument('1.0', 'UTF-8'); - $dom->appendChild($commandXML = $dom->createElement('command')); - $commandXML->setAttribute('id', $this->getName()); - $commandXML->setAttribute('name', $this->getName()); - - // Get the original element and its top-level elements. - $originalCommandXML = $this->getSingleElementByTagName($dom, $originalDom, 'command'); - $originalUsagesXML = $this->getSingleElementByTagName($dom, $originalCommandXML, 'usages'); - $originalDescriptionXML = $this->getSingleElementByTagName($dom, $originalCommandXML, 'description'); - $originalHelpXML = $this->getSingleElementByTagName($dom, $originalCommandXML, 'help'); - $originalArgumentsXML = $this->getSingleElementByTagName($dom, $originalCommandXML, 'arguments'); - $originalOptionsXML = $this->getSingleElementByTagName($dom, $originalCommandXML, 'options'); - - // Keep only the first of the elements - $newUsagesXML = $dom->createElement('usages'); - $firstUsageXML = $this->getSingleElementByTagName($dom, $originalUsagesXML, 'usage'); - $newUsagesXML->appendChild($firstUsageXML); - - // Create our own elements - $newExamplesXML = $dom->createElement('examples'); - foreach ($this->examples as $usage => $description) { - $newExamplesXML->appendChild($exampleXML = $dom->createElement('example')); - $exampleXML->appendChild($usageXML = $dom->createElement('usage', $usage)); - $exampleXML->appendChild($descriptionXML = $dom->createElement('description', $description)); - } - - // Create our own elements - $newAliasesXML = $dom->createElement('aliases'); - foreach ($this->getAliases() as $alias) { - $newAliasesXML->appendChild($dom->createElement('alias', $alias)); - } - - // Create our own elements - $newTopicsXML = $dom->createElement('topics'); - foreach ($this->getTopics() as $topic) { - $newTopicsXML->appendChild($topicXML = $dom->createElement('topic', $topic)); - } - - // Place the different elements into the element in the desired order - $commandXML->appendChild($newUsagesXML); - $commandXML->appendChild($newExamplesXML); - $commandXML->appendChild($originalDescriptionXML); - $commandXML->appendChild($originalArgumentsXML); - $commandXML->appendChild($originalOptionsXML); - $commandXML->appendChild($originalHelpXML); - $commandXML->appendChild($newAliasesXML); - $commandXML->appendChild($newTopicsXML); - - return $dom; - } - - protected function getSingleElementByTagName($dom, $parent, $tagName) - { - // There should always be exactly one '' element. - $elements = $parent->getElementsByTagName($tagName); - $result = $elements->item(0); - - $result = $dom->importNode($result, true); - - return $result; + return HelpDocumentBuilder::alter($originalDom, $this); } protected function setCommandArguments($commandInfo) { - $this->setUsesInputInterface($commandInfo); - $this->setUsesOutputInterface($commandInfo); + $this->injectedClasses = $commandInfo->getInjectedClasses(); $this->setCommandArgumentsFromParameters($commandInfo); return $this; } - /** - * Check whether the first parameter is an InputInterface. - */ - protected function checkUsesInputInterface($params) - { - /** @var \ReflectionParameter $firstParam */ - $firstParam = reset($params); - return $firstParam && $firstParam->getClass() && $firstParam->getClass()->implementsInterface( - '\\Symfony\\Component\\Console\\Input\\InputInterface' - ); - } - - /** - * Determine whether this command wants to get its inputs - * via an InputInterface or via its command parameters - */ - protected function setUsesInputInterface($commandInfo) - { - $params = $commandInfo->getParameters(); - $this->usesInputInterface = $this->checkUsesInputInterface($params); - return $this; - } - - /** - * Determine whether this command wants to send its output directly - * to the provided OutputInterface, or whether it will returned - * structured output to be processed by the command processor. - */ - protected function setUsesOutputInterface($commandInfo) - { - $params = $commandInfo->getParameters(); - $index = $this->checkUsesInputInterface($params) ? 1 : 0; - $this->usesOutputInterface = - (count($params) > $index) && - $params[$index]->getClass() && - $params[$index]->getClass()->implementsInterface( - '\\Symfony\\Component\\Console\\Output\\OutputInterface' - ) - ; - return $this; - } - protected function setCommandArgumentsFromParameters($commandInfo) { $args = $commandInfo->arguments()->getValues(); @@ -437,10 +335,10 @@ class AnnotatedCommand extends Command implements HelpDocumentAlter $output ); - $commandData->setUseIOInterfaces( - $this->usesInputInterface, - $this->usesOutputInterface - ); + // Fetch any classes (e.g. InputInterface / OutputInterface) that + // this command's callback wants passed as a parameter and inject + // it into the command data. + $this->commandProcessor()->injectIntoCommandData($commandData, $this->injectedClasses); // Allow the commandData to cache the list of options with // special default values ('null' and 'true'), as these will diff --git a/vendor/consolidation/annotated-command/src/AnnotationData.php b/vendor/consolidation/annotated-command/src/AnnotationData.php index 0bcc8b29b..ad7523aac 100644 --- a/vendor/consolidation/annotated-command/src/AnnotationData.php +++ b/vendor/consolidation/annotated-command/src/AnnotationData.php @@ -24,4 +24,21 @@ class AnnotationData extends \ArrayObject { return array_keys($this->getArrayCopy()); } + + public function set($key, $value = '') + { + $this->offsetSet($key, $value); + return $this; + } + + public function append($key, $value = '') + { + $data = $this->offsetGet($key); + if (is_array($data)) { + $this->offsetSet($key, array_merge($data, $value)); + } elseif (is_scalar($data)) { + $this->offsetSet($key, $data . $value); + } + return $this; + } } diff --git a/vendor/consolidation/annotated-command/src/CommandData.php b/vendor/consolidation/annotated-command/src/CommandData.php index 4bdb620f5..ab142f01b 100644 --- a/vendor/consolidation/annotated-command/src/CommandData.php +++ b/vendor/consolidation/annotated-command/src/CommandData.php @@ -1,6 +1,7 @@ annotationData = $annotationData; $this->input = $input; $this->output = $output; - $this->usesInputInterface = false; - $this->usesOutputInterface = false; $this->includeOptionsInArgs = true; } /** - * For internal use only; indicates that the function to be called - * should be passed an InputInterface &/or an OutputInterface. - * @param booean $usesInputInterface - * @param boolean $usesOutputInterface - * @return self + * For internal use only; inject an instance to be passed back + * to the command callback as a parameter. */ - public function setUseIOInterfaces($usesInputInterface, $usesOutputInterface) + public function injectInstance($injectedInstance) { - $this->usesInputInterface = $usesInputInterface; - $this->usesOutputInterface = $usesOutputInterface; + array_unshift($this->injectedInstances, $injectedInstance); return $this; } + /** + * Provide a reference to the instances that will be added to the + * beginning of the parameter list when the command callback is invoked. + */ + public function injectedInstances() + { + return $this->injectedInstances; + } + /** * For backwards-compatibility mode only: disable addition of * options on the end of the arguments list. @@ -66,6 +68,16 @@ class CommandData return $this->annotationData; } + public function formatterOptions() + { + return $this->formatterOptions; + } + + public function setFormatterOptions($formatterOptions) + { + $this->formatterOptions = $formatterOptions; + } + public function input() { return $this->input; @@ -174,14 +186,6 @@ class CommandData array_shift($args); } - if ($this->usesOutputInterface) { - array_unshift($args, $this->output()); - } - - if ($this->usesInputInterface) { - array_unshift($args, $this->input()); - } - return $args; } diff --git a/vendor/consolidation/annotated-command/src/CommandProcessor.php b/vendor/consolidation/annotated-command/src/CommandProcessor.php index f57518aa6..1d1e92da2 100644 --- a/vendor/consolidation/annotated-command/src/CommandProcessor.php +++ b/vendor/consolidation/annotated-command/src/CommandProcessor.php @@ -31,16 +31,18 @@ class CommandProcessor implements LoggerAwareInterface { use LoggerAwareTrait; - /** var HookManager */ + /** @var HookManager */ protected $hookManager; - /** var FormatterManager */ + /** @var FormatterManager */ protected $formatterManager; - /** var callable */ - protected $displayErrorFunction; - /** var PrepareFormatterOptions[] */ + /** @var PrepareFormatterOptions[] */ protected $prepareOptionsList = []; - /** var boolean */ + /** @var boolean */ protected $passExceptions; + /** @var ResultWriter */ + protected $resultWriter; + /** @var ParameterInjection */ + protected $parameterInjection; public function __construct(HookManager $hookManager) { @@ -56,6 +58,32 @@ class CommandProcessor implements LoggerAwareInterface return $this->hookManager; } + public function resultWriter() + { + if (!$this->resultWriter) { + $this->setResultWriter(new ResultWriter()); + } + return $this->resultWriter; + } + + public function setResultWriter($resultWriter) + { + $this->resultWriter = $resultWriter; + } + + public function parameterInjection() + { + if (!$this->parameterInjection) { + $this->setParameterInjection(new ParameterInjection()); + } + return $this->parameterInjection; + } + + public function setParameterInjection($parameterInjection) + { + $this->parameterInjection = $parameterInjection; + } + public function addPrepareFormatter(PrepareFormatter $preparer) { $this->prepareOptionsList[] = $preparer; @@ -64,13 +92,13 @@ class CommandProcessor implements LoggerAwareInterface public function setFormatterManager(FormatterManager $formatterManager) { $this->formatterManager = $formatterManager; + $this->resultWriter()->setFormatterManager($formatterManager); return $this; } public function setDisplayErrorFunction(callable $fn) { - $this->displayErrorFunction = $fn; - return $this; + $this->resultWriter()->setDisplayErrorFunction($fn); } /** @@ -169,6 +197,9 @@ class CommandProcessor implements LoggerAwareInterface return $validated; } + // Once we have validated the optins, create the formatter options. + $this->createFormatterOptions($commandData); + $replaceDispatcher = new ReplaceCommandHookDispatcher($this->hookManager(), $names); if ($this->logger) { $replaceDispatcher->setLogger($this->logger); @@ -188,130 +219,6 @@ class CommandProcessor implements LoggerAwareInterface return $processDispatcher->process($result, $commandData); } - /** - * Handle the result output and status code calculation. - */ - public function handleResults(OutputInterface $output, $names, $result, CommandData $commandData) - { - $statusCodeDispatcher = new StatusDeterminerHookDispatcher($this->hookManager(), $names); - // A little messy, for backwards compatibility: if the result implements - // ExitCodeInterface, then use that as the exit code. If a status code - // dispatcher returns a non-zero result, then we will never print a - // result. - if ($result instanceof ExitCodeInterface) { - $status = $result->getExitCode(); - } else { - $status = $statusCodeDispatcher->determineStatusCode($result); - if (isset($status) && ($status != 0)) { - return $status; - } - } - // If the result is an integer and no separate status code was provided, then use the result as the status and do no output. - if (is_integer($result) && !isset($status)) { - return $result; - } - $status = $this->interpretStatusCode($status); - - // Get the structured output, the output stream and the formatter - $extractDispatcher = new ExtracterHookDispatcher($this->hookManager(), $names); - $structuredOutput = $extractDispatcher->extractOutput($result); - if (($status != 0) && is_string($structuredOutput)) { - $output = $this->chooseOutputStream($output, $status); - return $this->writeErrorMessage($output, $status, $structuredOutput, $result); - } - if ($this->dataCanBeFormatted($structuredOutput) && isset($this->formatterManager)) { - return $this->writeUsingFormatter($output, $structuredOutput, $commandData, $status); - } - return $this->writeCommandOutput($output, $structuredOutput, $status); - } - - protected function dataCanBeFormatted($structuredOutput) - { - if (!isset($this->formatterManager)) { - return false; - } - return - is_object($structuredOutput) || - is_array($structuredOutput); - } - - /** - * Run the main command callback - */ - protected function runCommandCallback($commandCallback, CommandData $commandData) - { - $result = false; - try { - $args = $commandData->getArgsAndOptions(); - $result = call_user_func_array($commandCallback, $args); - } catch (\Exception $e) { - $result = $this->commandErrorForException($e); - } - return $result; - } - - /** - * Determine the formatter that should be used to render - * output. - * - * If the user specified a format via the --format option, - * then always return that. Otherwise, return the default - * format, unless --pipe was specified, in which case - * return the default pipe format, format-pipe. - * - * n.b. --pipe is a handy option introduced in Drush 2 - * (or perhaps even Drush 1) that indicates that the command - * should select the output format that is most appropriate - * for use in scripts (e.g. to pipe to another command). - * - * @return string - */ - protected function getFormat(FormatterOptions $options) - { - // In Symfony Console, there is no way for us to differentiate - // between the user specifying '--format=table', and the user - // not specifying --format when the default value is 'table'. - // Therefore, we must make --field always override --format; it - // cannot become the default value for --format. - if ($options->get('field')) { - return 'string'; - } - $defaults = []; - if ($options->get('pipe')) { - return $options->get('pipe-format', [], 'tsv'); - } - return $options->getFormat($defaults); - } - - /** - * Determine whether we should use stdout or stderr. - */ - protected function chooseOutputStream(OutputInterface $output, $status) - { - // If the status code indicates an error, then print the - // result to stderr rather than stdout - if ($status && ($output instanceof ConsoleOutputInterface)) { - return $output->getErrorOutput(); - } - return $output; - } - - /** - * Call the formatter to output the provided data. - */ - protected function writeUsingFormatter(OutputInterface $output, $structuredOutput, CommandData $commandData, $status = 0) - { - $formatterOptions = $this->createFormatterOptions($commandData); - $format = $this->getFormat($formatterOptions); - $this->formatterManager->write( - $output, - $format, - $structuredOutput, - $formatterOptions - ); - return $status; - } - /** * Create a FormatterOptions object for use in writing the formatted output. * @param CommandData $commandData @@ -324,52 +231,38 @@ class CommandProcessor implements LoggerAwareInterface foreach ($this->prepareOptionsList as $preparer) { $preparer->prepare($commandData, $formatterOptions); } + $commandData->setFormatterOptions($formatterOptions); return $formatterOptions; } /** - * Description - * @param OutputInterface $output - * @param int $status - * @param string $structuredOutput - * @param mixed $originalResult - * @return type + * Handle the result output and status code calculation. */ - protected function writeErrorMessage($output, $status, $structuredOutput, $originalResult) + public function handleResults(OutputInterface $output, $names, $result, CommandData $commandData) { - if (isset($this->displayErrorFunction)) { - call_user_func($this->displayErrorFunction, $output, $structuredOutput, $status, $originalResult); - } else { - $this->writeCommandOutput($output, $structuredOutput); - } - return $status; + $statusCodeDispatcher = new StatusDeterminerHookDispatcher($this->hookManager(), $names); + $extractDispatcher = new ExtracterHookDispatcher($this->hookManager(), $names); + + return $this->resultWriter()->handle($output, $result, $commandData, $statusCodeDispatcher, $extractDispatcher); } /** - * If the result object is a string, then print it. + * Run the main command callback */ - protected function writeCommandOutput( - OutputInterface $output, - $structuredOutput, - $status = 0 - ) { - // If there is no formatter, we will print strings, - // but can do no more than that. - if (is_string($structuredOutput)) { - $output->writeln($structuredOutput); + protected function runCommandCallback($commandCallback, CommandData $commandData) + { + $result = false; + try { + $args = $this->parameterInjection()->args($commandData); + $result = call_user_func_array($commandCallback, $args); + } catch (\Exception $e) { + $result = $this->commandErrorForException($e); } - return $status; + return $result; } - /** - * If a status code was set, then return it; otherwise, - * presume success. - */ - protected function interpretStatusCode($status) + public function injectIntoCommandData($commandData, $injectedClasses) { - if (isset($status)) { - return $status; - } - return 0; + $this->parameterInjection()->injectIntoCommandData($commandData, $injectedClasses); } } diff --git a/vendor/consolidation/annotated-command/src/CommandResult.php b/vendor/consolidation/annotated-command/src/CommandResult.php index 01186dd68..6b1a3f80b 100644 --- a/vendor/consolidation/annotated-command/src/CommandResult.php +++ b/vendor/consolidation/annotated-command/src/CommandResult.php @@ -41,7 +41,7 @@ class CommandResult implements ExitCodeInterface, OutputDataInterface public static function exitCode($exitCode) { - return new self($null, $exitCode); + return new self(null, $exitCode); } public static function data($data) diff --git a/vendor/consolidation/annotated-command/src/Help/HelpDocumentBuilder.php b/vendor/consolidation/annotated-command/src/Help/HelpDocumentBuilder.php new file mode 100644 index 000000000..107167015 --- /dev/null +++ b/vendor/consolidation/annotated-command/src/Help/HelpDocumentBuilder.php @@ -0,0 +1,76 @@ +appendChild($commandXML = $dom->createElement('command')); + $commandXML->setAttribute('id', $command->getName()); + $commandXML->setAttribute('name', $command->getName()); + + // Get the original element and its top-level elements. + $originalCommandXML = static::getSingleElementByTagName($dom, $originalDom, 'command'); + $originalUsagesXML = static::getSingleElementByTagName($dom, $originalCommandXML, 'usages'); + $originalDescriptionXML = static::getSingleElementByTagName($dom, $originalCommandXML, 'description'); + $originalHelpXML = static::getSingleElementByTagName($dom, $originalCommandXML, 'help'); + $originalArgumentsXML = static::getSingleElementByTagName($dom, $originalCommandXML, 'arguments'); + $originalOptionsXML = static::getSingleElementByTagName($dom, $originalCommandXML, 'options'); + + // Keep only the first of the elements + $newUsagesXML = $dom->createElement('usages'); + $firstUsageXML = static::getSingleElementByTagName($dom, $originalUsagesXML, 'usage'); + $newUsagesXML->appendChild($firstUsageXML); + + // Create our own elements + $newExamplesXML = $dom->createElement('examples'); + foreach ($command->getExampleUsages() as $usage => $description) { + $newExamplesXML->appendChild($exampleXML = $dom->createElement('example')); + $exampleXML->appendChild($usageXML = $dom->createElement('usage', $usage)); + $exampleXML->appendChild($descriptionXML = $dom->createElement('description', $description)); + } + + // Create our own elements + $newAliasesXML = $dom->createElement('aliases'); + foreach ($command->getAliases() as $alias) { + $newAliasesXML->appendChild($dom->createElement('alias', $alias)); + } + + // Create our own elements + $newTopicsXML = $dom->createElement('topics'); + foreach ($command->getTopics() as $topic) { + $newTopicsXML->appendChild($topicXML = $dom->createElement('topic', $topic)); + } + + // Place the different elements into the element in the desired order + $commandXML->appendChild($newUsagesXML); + $commandXML->appendChild($newExamplesXML); + $commandXML->appendChild($originalDescriptionXML); + $commandXML->appendChild($originalArgumentsXML); + $commandXML->appendChild($originalOptionsXML); + $commandXML->appendChild($originalHelpXML); + $commandXML->appendChild($newAliasesXML); + $commandXML->appendChild($newTopicsXML); + + return $dom; + } + + + protected static function getSingleElementByTagName($dom, $parent, $tagName) + { + // There should always be exactly one '' element. + $elements = $parent->getElementsByTagName($tagName); + $result = $elements->item(0); + + $result = $dom->importNode($result, true); + + return $result; + } +} diff --git a/vendor/consolidation/annotated-command/src/Input/StdinAwareInterface.php b/vendor/consolidation/annotated-command/src/Input/StdinAwareInterface.php new file mode 100644 index 000000000..558798665 --- /dev/null +++ b/vendor/consolidation/annotated-command/src/Input/StdinAwareInterface.php @@ -0,0 +1,34 @@ +stdinHandler = $stdin; + } + + /** + * @inheritdoc + */ + public function stdin() + { + if (!$this->stdinHandler) { + $this->stdinHandler = new StdinHandler(); + } + return $this->stdinHandler; + } +} diff --git a/vendor/consolidation/annotated-command/src/Input/StdinHandler.php b/vendor/consolidation/annotated-command/src/Input/StdinHandler.php new file mode 100644 index 000000000..473458109 --- /dev/null +++ b/vendor/consolidation/annotated-command/src/Input/StdinHandler.php @@ -0,0 +1,247 @@ +stdin()->contents()); + * } + * } + * + * Command that reads from stdin or file via an option: + * + * /** + * * @command cat + * * @param string $file + * * @default $file - + * * / + * public function cat(InputInterface $input) + * { + * $data = $this->stdin()->select($input, 'file')->contents(); + * } + * + * Command that reads from stdin or file via an option: + * + * /** + * * @command cat + * * @option string $file + * * @default $file - + * * / + * public function cat(InputInterface $input) + * { + * $data = $this->stdin()->select($input, 'file')->contents(); + * } + * + * It is also possible to inject the selected stream into the input object, + * e.g. if you want the contents of the source file to be fed to any Question + * helper et. al. that the $input object is used with. + * + * /** + * * @command example + * * @option string $file + * * @default $file - + * * / + * public function example(InputInterface $input) + * { + * $this->stdin()->setStream($input, 'file'); + * } + * + * + * Inject an alternate source for standard input in tests. Presumes that + * the object under test gets a reference to the StdinHandler via dependency + * injection from the container. + * + * $container->get('stdinHandler')->redirect($pathToTestStdinFileFixture); + * + * You may also inject your stdin file fixture stream into the $input object + * as usual, and then use it with 'select()' or 'setStream()' as shown above. + * + * Finally, this class may also be used in absence of a dependency injection + * container by using the static 'selectStream()' method: + * + * /** + * * @command example + * * @option string $file + * * @default $file - + * * / + * public function example(InputInterface $input) + * { + * $data = StdinHandler::selectStream($input, 'file')->contents(); + * } + * + * To test a method that uses this technique, simply inject your stdin + * fixture into the $input object in your test: + * + * $input->setStream(fopen($pathToFixture, 'r')); + */ +class StdinHandler +{ + protected $path; + protected $stream; + + public static function selectStream(InputInterface $input, $optionOrArg) + { + $handler = new Self(); + + return $handler->setStream($input, $optionOrArg); + } + + /** + * hasPath returns 'true' if the stdin handler has a path to a file. + * + * @return bool + */ + public function hasPath() + { + // Once the stream has been opened, we mask the existence of the path. + return !$this->hasStream() && !empty($this->path); + } + + /** + * hasStream returns 'true' if the stdin handler has opened a stream. + * + * @return bool + */ + public function hasStream() + { + return !empty($this->stream); + } + + /** + * path returns the path to any file that was set as a redirection + * source, or `php://stdin` if none have been. + * + * @return string + */ + public function path() + { + return $this->path ?: 'php://stdin'; + } + + /** + * close closes the input stream if it was opened. + */ + public function close() + { + if ($this->hasStream()) { + fclose($this->stream); + $this->stream = null; + } + return $this; + } + + /** + * redirect specifies a path to a file that should serve as the + * source to read from. If the input path is '-' or empty, + * then output will be taken from php://stdin (or whichever source + * was provided via the 'redirect' method). + * + * @return $this + */ + public function redirect($path) + { + if ($this->pathProvided($path)) { + $this->path = $path; + } + + return $this; + } + + /** + * select chooses the source of the input stream based on whether or + * not the user provided the specified option or argument on the commandline. + * Stdin is selected if there is no user selection. + * + * @param InputInterface $input + * @param string $optionOrArg + * @return $this + */ + public function select(InputInterface $input, $optionOrArg) + { + $this->redirect($this->getOptionOrArg($input, $optionOrArg)); + if (!$this->hasPath() && ($input instanceof StreamableInputInterface)) { + $this->stream = $input->getStream(); + } + + return $this; + } + + /** + * getStream opens and returns the stdin stream (or redirect file). + */ + public function getStream() + { + if (!$this->hasStream()) { + $this->stream = fopen($this->path(), 'r'); + } + return $this->stream; + } + + /** + * setStream functions like 'select', and also sets up the $input + * object to read from the selected input stream e.g. when used + * with a question helper. + */ + public function setStream(InputInterface $input, $optionOrArg) + { + $this->select($input, $optionOrArg); + if ($input instanceof StreamableInputInterface) { + $stream = $this->getStream(); + $input->setStream($stream); + } + return $this; + } + + /** + * contents reads the entire contents of the standard input stream. + * + * @return string + */ + public function contents() + { + // Optimization: use file_get_contents if we have a path to a file + // and the stream has not been opened yet. + if (!$this->hasStream()) { + return file_get_contents($this->path()); + } + $stream = $this->getStream(); + stream_set_blocking($stream, false); // TODO: We did this in backend invoke. Necessary here? + $contents = stream_get_contents($stream); + $this->close(); + + return $contents; + } + + /** + * Returns 'true' if a path was specfied, and that path was not '-'. + */ + protected function pathProvided($path) + { + return !empty($path) && ($path != '-'); + } + + protected function getOptionOrArg(InputInterface $input, $optionOrArg) + { + if ($input->hasOption($optionOrArg)) { + return $input->getOption($optionOrArg); + } + return $input->getArgument($optionOrArg); + } +} diff --git a/vendor/consolidation/annotated-command/src/ParameterInjection.php b/vendor/consolidation/annotated-command/src/ParameterInjection.php new file mode 100644 index 000000000..630927c9d --- /dev/null +++ b/vendor/consolidation/annotated-command/src/ParameterInjection.php @@ -0,0 +1,57 @@ +register('Symfony\Component\Console\Input\InputInterface', $this); + $this->register('Symfony\Component\Console\Output\OutputInterface', $this); + } + + public function register($interfaceName, ParameterInjector $injector) + { + $this->injectors[$interfaceName] = $injector; + } + + public function args($commandData) + { + return array_merge( + $commandData->injectedInstances(), + $commandData->getArgsAndOptions() + ); + } + + public function injectIntoCommandData($commandData, $injectedClasses) + { + foreach ($injectedClasses as $injectedClass) { + $injectedInstance = $this->getInstanceToInject($commandData, $injectedClass); + $commandData->injectInstance($injectedInstance); + } + } + + protected function getInstanceToInject(CommandData $commandData, $interfaceName) + { + if (!isset($this->injectors[$interfaceName])) { + return null; + } + + return $this->injectors[$interfaceName]->get($commandData, $interfaceName); + } + + public function get(CommandData $commandData, $interfaceName) + { + switch ($interfaceName) { + case 'Symfony\Component\Console\Input\InputInterface': + return $commandData->input(); + case 'Symfony\Component\Console\Output\OutputInterface': + return $commandData->output(); + } + + return null; + } +} diff --git a/vendor/consolidation/annotated-command/src/ParameterInjector.php b/vendor/consolidation/annotated-command/src/ParameterInjector.php new file mode 100644 index 000000000..2f2346f62 --- /dev/null +++ b/vendor/consolidation/annotated-command/src/ParameterInjector.php @@ -0,0 +1,10 @@ +returnType; } + public function getInjectedClasses() + { + $this->parseDocBlock(); + return $this->injectedClasses; + } + public function setReturnType($returnType) { $this->returnType = $returnType; @@ -634,6 +645,11 @@ class CommandInfo if ($this->lastParameterIsOptionsArray()) { array_pop($params); } + while (!empty($params) && ($params[0]->getClass() != null)) { + $param = array_shift($params); + $injectedClass = $param->getClass()->getName(); + array_unshift($this->injectedClasses, $injectedClass); + } foreach ($params as $param) { $this->addParameterToResult($result, $param); } diff --git a/vendor/consolidation/annotated-command/src/Parser/Internal/BespokeDocBlockParser.php b/vendor/consolidation/annotated-command/src/Parser/Internal/BespokeDocBlockParser.php index b53545c62..964d411a8 100644 --- a/vendor/consolidation/annotated-command/src/Parser/Internal/BespokeDocBlockParser.php +++ b/vendor/consolidation/annotated-command/src/Parser/Internal/BespokeDocBlockParser.php @@ -20,7 +20,7 @@ class BespokeDocBlockParser 'command' => 'processCommandTag', 'name' => 'processCommandTag', 'arg' => 'processArgumentTag', - 'param' => 'processArgumentTag', + 'param' => 'processParamTag', 'return' => 'processReturnTag', 'option' => 'processOptionTag', 'default' => 'processDefaultTag', @@ -83,6 +83,31 @@ class BespokeDocBlockParser $this->commandInfo->setDescription($tag->getContent()); } + /** + * Store the data from a @param annotation in our argument descriptions. + */ + protected function processParamTag($tag) + { + if ($tag->hasTypeVariableAndDescription($matches)) { + if ($this->ignoredParamType($matches['type'])) { + return; + } + } + return $this->processArgumentTag($tag); + } + + protected function ignoredParamType($paramType) + { + // TODO: We should really only allow a couple of types here, + // e.g. 'string', 'array', 'bool'. Blacklist things we do not + // want for now to avoid breaking commands with weird types. + // Fix in the next major version. + // + // This works: + // return !in_array($paramType, ['string', 'array', 'integer', 'bool']); + return preg_match('#(InputInterface|OutputInterface)$#', $paramType); + } + /** * Store the data from a @arg annotation in our argument descriptions. */ diff --git a/vendor/consolidation/annotated-command/src/ResultWriter.php b/vendor/consolidation/annotated-command/src/ResultWriter.php new file mode 100644 index 000000000..a256384e8 --- /dev/null +++ b/vendor/consolidation/annotated-command/src/ResultWriter.php @@ -0,0 +1,210 @@ +formatterManager = $formatterManager; + return $this; + } + + /** + * Return the formatter manager + * @return FormatterManager + */ + public function formatterManager() + { + return $this->formatterManager; + } + + public function setDisplayErrorFunction(callable $fn) + { + $this->displayErrorFunction = $fn; + return $this; + } + + /** + * Handle the result output and status code calculation. + */ + public function handle(OutputInterface $output, $result, CommandData $commandData, $statusCodeDispatcher = null, $extractDispatcher = null) + { + // A little messy, for backwards compatibility: if the result implements + // ExitCodeInterface, then use that as the exit code. If a status code + // dispatcher returns a non-zero result, then we will never print a + // result. + $status = null; + if ($result instanceof ExitCodeInterface) { + $status = $result->getExitCode(); + } elseif (isset($statusCodeDispatcher)) { + $status = $statusCodeDispatcher->determineStatusCode($result); + if (isset($status) && ($status != 0)) { + return $status; + } + } + // If the result is an integer and no separate status code was provided, then use the result as the status and do no output. + if (is_integer($result) && !isset($status)) { + return $result; + } + $status = $this->interpretStatusCode($status); + + // Get the structured output, the output stream and the formatter + $structuredOutput = $result; + if (isset($extractDispatcher)) { + $structuredOutput = $extractDispatcher->extractOutput($result); + } + if (($status != 0) && is_string($structuredOutput)) { + $output = $this->chooseOutputStream($output, $status); + return $this->writeErrorMessage($output, $status, $structuredOutput, $result); + } + if ($this->dataCanBeFormatted($structuredOutput) && isset($this->formatterManager)) { + return $this->writeUsingFormatter($output, $structuredOutput, $commandData, $status); + } + return $this->writeCommandOutput($output, $structuredOutput, $status); + } + + protected function dataCanBeFormatted($structuredOutput) + { + if (!isset($this->formatterManager)) { + return false; + } + return + is_object($structuredOutput) || + is_array($structuredOutput); + } + + /** + * Determine the formatter that should be used to render + * output. + * + * If the user specified a format via the --format option, + * then always return that. Otherwise, return the default + * format, unless --pipe was specified, in which case + * return the default pipe format, format-pipe. + * + * n.b. --pipe is a handy option introduced in Drush 2 + * (or perhaps even Drush 1) that indicates that the command + * should select the output format that is most appropriate + * for use in scripts (e.g. to pipe to another command). + * + * @return string + */ + protected function getFormat(FormatterOptions $options) + { + // In Symfony Console, there is no way for us to differentiate + // between the user specifying '--format=table', and the user + // not specifying --format when the default value is 'table'. + // Therefore, we must make --field always override --format; it + // cannot become the default value for --format. + if ($options->get('field')) { + return 'string'; + } + $defaults = []; + if ($options->get('pipe')) { + return $options->get('pipe-format', [], 'tsv'); + } + return $options->getFormat($defaults); + } + + /** + * Determine whether we should use stdout or stderr. + */ + protected function chooseOutputStream(OutputInterface $output, $status) + { + // If the status code indicates an error, then print the + // result to stderr rather than stdout + if ($status && ($output instanceof ConsoleOutputInterface)) { + return $output->getErrorOutput(); + } + return $output; + } + + /** + * Call the formatter to output the provided data. + */ + protected function writeUsingFormatter(OutputInterface $output, $structuredOutput, CommandData $commandData, $status = 0) + { + $formatterOptions = $commandData->formatterOptions(); + $format = $this->getFormat($formatterOptions); + $this->formatterManager->write( + $output, + $format, + $structuredOutput, + $formatterOptions + ); + return $status; + } + + /** + * Description + * @param OutputInterface $output + * @param int $status + * @param string $structuredOutput + * @param mixed $originalResult + * @return type + */ + protected function writeErrorMessage($output, $status, $structuredOutput, $originalResult) + { + if (isset($this->displayErrorFunction)) { + call_user_func($this->displayErrorFunction, $output, $structuredOutput, $status, $originalResult); + } else { + $this->writeCommandOutput($output, $structuredOutput); + } + return $status; + } + + /** + * If the result object is a string, then print it. + */ + protected function writeCommandOutput( + OutputInterface $output, + $structuredOutput, + $status = 0 + ) { + // If there is no formatter, we will print strings, + // but can do no more than that. + if (is_string($structuredOutput)) { + $output->writeln($structuredOutput); + } + return $status; + } + + /** + * If a status code was set, then return it; otherwise, + * presume success. + */ + protected function interpretStatusCode($status) + { + if (isset($status)) { + return $status; + } + return 0; + } +} diff --git a/vendor/consolidation/log/.scenarios.lock/install b/vendor/consolidation/log/.scenarios.lock/install new file mode 100755 index 000000000..16c69e107 --- /dev/null +++ b/vendor/consolidation/log/.scenarios.lock/install @@ -0,0 +1,57 @@ +#!/bin/bash + +SCENARIO=$1 +DEPENDENCIES=${2-install} + +# Convert the aliases 'highest', 'lowest' and 'lock' to +# the corresponding composer command to run. +case $DEPENDENCIES in + highest) + DEPENDENCIES=update + ;; + lowest) + DEPENDENCIES='update --prefer-lowest' + ;; + lock|default|"") + DEPENDENCIES=install + ;; +esac + +original_name=scenarios +recommended_name=".scenarios.lock" + +base="$original_name" +if [ -d "$recommended_name" ] ; then + base="$recommended_name" +fi + +# If scenario is not specified, install the lockfile at +# the root of the project. +dir="$base/${SCENARIO}" +if [ -z "$SCENARIO" ] || [ "$SCENARIO" == "default" ] ; then + SCENARIO=default + dir=. +fi + +# Test to make sure that the selected scenario exists. +if [ ! -d "$dir" ] ; then + echo "Requested scenario '${SCENARIO}' does not exist." + exit 1 +fi + +echo +echo "::" +echo ":: Switch to ${SCENARIO} scenario" +echo "::" +echo + +set -ex + +composer -n validate --working-dir=$dir --no-check-all --ansi +composer -n --working-dir=$dir ${DEPENDENCIES} --prefer-dist --no-scripts + +# If called from a CI context, print out some extra information about +# what we just installed. +if [[ -n "$CI" ]] ; then + composer -n --working-dir=$dir info +fi diff --git a/vendor/consolidation/log/.scenarios.lock/phpunit4/.gitignore b/vendor/consolidation/log/.scenarios.lock/phpunit4/.gitignore new file mode 100644 index 000000000..5657f6ea7 --- /dev/null +++ b/vendor/consolidation/log/.scenarios.lock/phpunit4/.gitignore @@ -0,0 +1 @@ +vendor \ No newline at end of file diff --git a/vendor/consolidation/log/scenarios/symfony4/composer.json b/vendor/consolidation/log/.scenarios.lock/phpunit4/composer.json similarity index 62% rename from vendor/consolidation/log/scenarios/symfony4/composer.json rename to vendor/consolidation/log/.scenarios.lock/phpunit4/composer.json index 59b54c46f..36656fdbe 100644 --- a/vendor/consolidation/log/scenarios/symfony4/composer.json +++ b/vendor/consolidation/log/.scenarios.lock/phpunit4/composer.json @@ -8,26 +8,25 @@ "email": "greg.1.anderson@greenknowe.org" } ], - "autoload":{ - "psr-4":{ - "Consolidation\\Log\\": "src" + "autoload": { + "psr-4": { + "Consolidation\\Log\\": "../../src" } }, "autoload-dev": { "psr-4": { - "Consolidation\\TestUtils\\": "tests/src" + "Consolidation\\TestUtils\\": "../../tests/src" } }, "require": { - "php": ">=5.5.0", - "psr/log": "~1.0" + "php": ">=5.4.5", + "psr/log": "^1.0", + "symfony/console": "^2.8|^3|^4" }, "require-dev": { - "phpunit/phpunit": "4.*", - "g1a/composer-test-scenarios": "^1", - "satooshi/php-coveralls": "^2", - "squizlabs/php_codesniffer": "2.*", - "symfony/console": "^4.0" + "phpunit/phpunit": "^4.8.36", + "g1a/composer-test-scenarios": "^3", + "squizlabs/php_codesniffer": "^2" }, "minimum-stability": "stable", "scripts": { @@ -42,11 +41,6 @@ "@lint", "@unit", "@cs" - ], - "scenario": "scenarios/install", - "post-update-cmd": [ - "create-scenario symfony4 'symfony/console:^4.0'", - "create-scenario symfony2 'symfony/console:^2.8' --platform-php '5.5' --no-lockfile" ] }, "extra": { @@ -56,8 +50,10 @@ }, "config": { "platform": { - + "php": "5.4.8" }, + "optimize-autoloader": true, + "sort-packages": true, "vendor-dir": "../../vendor" } } diff --git a/vendor/consolidation/log/.scenarios.lock/phpunit4/composer.lock b/vendor/consolidation/log/.scenarios.lock/phpunit4/composer.lock new file mode 100644 index 000000000..906c62553 --- /dev/null +++ b/vendor/consolidation/log/.scenarios.lock/phpunit4/composer.lock @@ -0,0 +1,1400 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "97e24b2269f52d961357d35073057c1d", + "packages": [ + { + "name": "psr/log", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", + "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "time": "2018-11-20T15:27:04+00:00" + }, + { + "name": "symfony/console", + "version": "v2.8.49", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "cbcf4b5e233af15cd2bbd50dee1ccc9b7927dc12" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/cbcf4b5e233af15cd2bbd50dee1ccc9b7927dc12", + "reference": "cbcf4b5e233af15cd2bbd50dee1ccc9b7927dc12", + "shasum": "" + }, + "require": { + "php": ">=5.3.9", + "symfony/debug": "^2.7.2|~3.0.0", + "symfony/polyfill-mbstring": "~1.0" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/event-dispatcher": "~2.1|~3.0.0", + "symfony/process": "~2.1|~3.0.0" + }, + "suggest": { + "psr/log-implementation": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/process": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Console Component", + "homepage": "https://symfony.com", + "time": "2018-11-20T15:55:20+00:00" + }, + { + "name": "symfony/debug", + "version": "v2.8.49", + "source": { + "type": "git", + "url": "https://github.com/symfony/debug.git", + "reference": "74251c8d50dd3be7c4ce0c7b862497cdc641a5d0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/debug/zipball/74251c8d50dd3be7c4ce0c7b862497cdc641a5d0", + "reference": "74251c8d50dd3be7c4ce0c7b862497cdc641a5d0", + "shasum": "" + }, + "require": { + "php": ">=5.3.9", + "psr/log": "~1.0" + }, + "conflict": { + "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" + }, + "require-dev": { + "symfony/class-loader": "~2.2|~3.0.0", + "symfony/http-kernel": "~2.3.24|~2.5.9|^2.6.2|~3.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Debug\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Debug Component", + "homepage": "https://symfony.com", + "time": "2018-11-11T11:18:13+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.10.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "c79c051f5b3a46be09205c73b80b346e4153e494" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/c79c051f5b3a46be09205c73b80b346e4153e494", + "reference": "c79c051f5b3a46be09205c73b80b346e4153e494", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.9-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "time": "2018-09-21T13:07:52+00:00" + } + ], + "packages-dev": [ + { + "name": "doctrine/instantiator", + "version": "1.0.5", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", + "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", + "shasum": "" + }, + "require": { + "php": ">=5.3,<8.0-DEV" + }, + "require-dev": { + "athletic/athletic": "~0.1.8", + "ext-pdo": "*", + "ext-phar": "*", + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "~2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "http://ocramius.github.com/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://github.com/doctrine/instantiator", + "keywords": [ + "constructor", + "instantiate" + ], + "time": "2015-06-14T21:17:01+00:00" + }, + { + "name": "g1a/composer-test-scenarios", + "version": "3.0.1", + "source": { + "type": "git", + "url": "https://github.com/g1a/composer-test-scenarios.git", + "reference": "224531e20d13a07942a989a70759f726cd2df9a1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/g1a/composer-test-scenarios/zipball/224531e20d13a07942a989a70759f726cd2df9a1", + "reference": "224531e20d13a07942a989a70759f726cd2df9a1", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.0.0", + "php": ">=5.4" + }, + "require-dev": { + "composer/composer": "^1.7", + "php-coveralls/php-coveralls": "^1.0", + "phpunit/phpunit": "^4.8.36|^6", + "squizlabs/php_codesniffer": "^2.8" + }, + "bin": [ + "scripts/dependency-licenses" + ], + "type": "composer-plugin", + "extra": { + "class": "ComposerTestScenarios\\Plugin", + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "ComposerTestScenarios\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Greg Anderson", + "email": "greg.1.anderson@greenknowe.org" + } + ], + "description": "Useful scripts for testing multiple sets of Composer dependencies.", + "time": "2018-11-27T05:58:39+00:00" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "2.0.5", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "e6a969a640b00d8daa3c66518b0405fb41ae0c4b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/e6a969a640b00d8daa3c66518b0405fb41ae0c4b", + "reference": "e6a969a640b00d8daa3c66518b0405fb41ae0c4b", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "suggest": { + "dflydev/markdown": "~1.0", + "erusev/parsedown": "~1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "phpDocumentor": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "mike.vanriel@naenius.com" + } + ], + "time": "2016-01-25T08:17:30+00:00" + }, + { + "name": "phpspec/prophecy", + "version": "1.8.0", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/4ba436b55987b4bf311cb7c6ba82aa528aac0a06", + "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": "^5.3|^7.0", + "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0", + "sebastian/comparator": "^1.1|^2.0|^3.0", + "sebastian/recursion-context": "^1.0|^2.0|^3.0" + }, + "require-dev": { + "phpspec/phpspec": "^2.5|^3.2", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.8.x-dev" + } + }, + "autoload": { + "psr-0": { + "Prophecy\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", + "keywords": [ + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" + ], + "time": "2018-08-05T17:53:17+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "2.2.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979", + "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "phpunit/php-file-iterator": "~1.3", + "phpunit/php-text-template": "~1.2", + "phpunit/php-token-stream": "~1.3", + "sebastian/environment": "^1.3.2", + "sebastian/version": "~1.0" + }, + "require-dev": { + "ext-xdebug": ">=2.1.4", + "phpunit/phpunit": "~4" + }, + "suggest": { + "ext-dom": "*", + "ext-xdebug": ">=2.2.1", + "ext-xmlwriter": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "time": "2015-10-06T15:47:00+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "1.4.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4", + "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "time": "2017-11-27T13:52:08+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "time": "2015-06-21T13:50:34+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "1.0.9", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", + "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "time": "2017-02-26T11:10:40+00:00" + }, + { + "name": "phpunit/php-token-stream", + "version": "1.4.12", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-token-stream.git", + "reference": "1ce90ba27c42e4e44e6d8458241466380b51fa16" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/1ce90ba27c42e4e44e6d8458241466380b51fa16", + "reference": "1ce90ba27c42e4e44e6d8458241466380b51fa16", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Wrapper around PHP's tokenizer extension.", + "homepage": "https://github.com/sebastianbergmann/php-token-stream/", + "keywords": [ + "tokenizer" + ], + "time": "2017-12-04T08:55:13+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "4.8.36", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "46023de9a91eec7dfb06cc56cb4e260017298517" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/46023de9a91eec7dfb06cc56cb4e260017298517", + "reference": "46023de9a91eec7dfb06cc56cb4e260017298517", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-json": "*", + "ext-pcre": "*", + "ext-reflection": "*", + "ext-spl": "*", + "php": ">=5.3.3", + "phpspec/prophecy": "^1.3.1", + "phpunit/php-code-coverage": "~2.1", + "phpunit/php-file-iterator": "~1.4", + "phpunit/php-text-template": "~1.2", + "phpunit/php-timer": "^1.0.6", + "phpunit/phpunit-mock-objects": "~2.3", + "sebastian/comparator": "~1.2.2", + "sebastian/diff": "~1.2", + "sebastian/environment": "~1.3", + "sebastian/exporter": "~1.2", + "sebastian/global-state": "~1.0", + "sebastian/version": "~1.0", + "symfony/yaml": "~2.1|~3.0" + }, + "suggest": { + "phpunit/php-invoker": "~1.1" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.8.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "time": "2017-06-21T08:07:12+00:00" + }, + { + "name": "phpunit/phpunit-mock-objects", + "version": "2.3.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", + "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983", + "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": ">=5.3.3", + "phpunit/php-text-template": "~1.2", + "sebastian/exporter": "~1.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "suggest": { + "ext-soap": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Mock Object library for PHPUnit", + "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", + "keywords": [ + "mock", + "xunit" + ], + "time": "2015-10-02T06:51:40+00:00" + }, + { + "name": "sebastian/comparator", + "version": "1.2.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", + "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/diff": "~1.2", + "sebastian/exporter": "~1.2 || ~2.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "http://www.github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "time": "2017-01-29T09:50:25+00:00" + }, + { + "name": "sebastian/diff", + "version": "1.4.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7f066a26a962dbe58ddea9f72a4e82874a3975a4", + "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff" + ], + "time": "2017-05-22T07:24:03+00:00" + }, + { + "name": "sebastian/environment", + "version": "1.3.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/be2c607e43ce4c89ecd60e75c6a85c126e754aea", + "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8 || ^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "time": "2016-08-18T05:49:44+00:00" + }, + { + "name": "sebastian/exporter", + "version": "1.2.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4", + "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/recursion-context": "~1.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "http://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "time": "2016-06-17T09:04:28+00:00" + }, + { + "name": "sebastian/global-state", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "time": "2015-10-12T03:26:01+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "1.0.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/b19cc3298482a335a95f3016d2f8a6950f0fbcd7", + "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "time": "2016-10-03T07:41:43+00:00" + }, + { + "name": "sebastian/version", + "version": "1.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", + "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", + "shasum": "" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "time": "2015-06-21T13:59:46+00:00" + }, + { + "name": "squizlabs/php_codesniffer", + "version": "2.9.2", + "source": { + "type": "git", + "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", + "reference": "2acf168de78487db620ab4bc524135a13cfe6745" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/2acf168de78487db620ab4bc524135a13cfe6745", + "reference": "2acf168de78487db620ab4bc524135a13cfe6745", + "shasum": "" + }, + "require": { + "ext-simplexml": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=5.1.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "bin": [ + "scripts/phpcs", + "scripts/phpcbf" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "autoload": { + "classmap": [ + "CodeSniffer.php", + "CodeSniffer/CLI.php", + "CodeSniffer/Exception.php", + "CodeSniffer/File.php", + "CodeSniffer/Fixer.php", + "CodeSniffer/Report.php", + "CodeSniffer/Reporting.php", + "CodeSniffer/Sniff.php", + "CodeSniffer/Tokens.php", + "CodeSniffer/Reports/", + "CodeSniffer/Tokenizers/", + "CodeSniffer/DocGenerators/", + "CodeSniffer/Standards/AbstractPatternSniff.php", + "CodeSniffer/Standards/AbstractScopeSniff.php", + "CodeSniffer/Standards/AbstractVariableSniff.php", + "CodeSniffer/Standards/IncorrectPatternException.php", + "CodeSniffer/Standards/Generic/Sniffs/", + "CodeSniffer/Standards/MySource/Sniffs/", + "CodeSniffer/Standards/PEAR/Sniffs/", + "CodeSniffer/Standards/PSR1/Sniffs/", + "CodeSniffer/Standards/PSR2/Sniffs/", + "CodeSniffer/Standards/Squiz/Sniffs/", + "CodeSniffer/Standards/Zend/Sniffs/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Greg Sherwood", + "role": "lead" + } + ], + "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "homepage": "http://www.squizlabs.com/php-codesniffer", + "keywords": [ + "phpcs", + "standards" + ], + "time": "2018-11-07T22:31:41+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.10.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "e3d826245268269cd66f8326bd8bc066687b4a19" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e3d826245268269cd66f8326bd8bc066687b4a19", + "reference": "e3d826245268269cd66f8326bd8bc066687b4a19", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.9-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + }, + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "time": "2018-08-06T14:22:27+00:00" + }, + { + "name": "symfony/yaml", + "version": "v2.8.49", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "02c1859112aa779d9ab394ae4f3381911d84052b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/02c1859112aa779d9ab394ae4f3381911d84052b", + "reference": "02c1859112aa779d9ab394ae4f3381911d84052b", + "shasum": "" + }, + "require": { + "php": ">=5.3.9", + "symfony/polyfill-ctype": "~1.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Yaml\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Yaml Component", + "homepage": "https://symfony.com", + "time": "2018-11-11T11:18:13+00:00" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": ">=5.4.5" + }, + "platform-dev": [], + "platform-overrides": { + "php": "5.4.8" + } +} diff --git a/vendor/consolidation/log/.scenarios.lock/symfony2/.gitignore b/vendor/consolidation/log/.scenarios.lock/symfony2/.gitignore new file mode 100644 index 000000000..5657f6ea7 --- /dev/null +++ b/vendor/consolidation/log/.scenarios.lock/symfony2/.gitignore @@ -0,0 +1 @@ +vendor \ No newline at end of file diff --git a/vendor/consolidation/log/scenarios/symfony2/composer.json b/vendor/consolidation/log/.scenarios.lock/symfony2/composer.json similarity index 61% rename from vendor/consolidation/log/scenarios/symfony2/composer.json rename to vendor/consolidation/log/.scenarios.lock/symfony2/composer.json index a432c2beb..798de23b6 100644 --- a/vendor/consolidation/log/scenarios/symfony2/composer.json +++ b/vendor/consolidation/log/.scenarios.lock/symfony2/composer.json @@ -8,26 +8,25 @@ "email": "greg.1.anderson@greenknowe.org" } ], - "autoload":{ - "psr-4":{ - "Consolidation\\Log\\": "src" + "autoload": { + "psr-4": { + "Consolidation\\Log\\": "../../src" } }, "autoload-dev": { "psr-4": { - "Consolidation\\TestUtils\\": "tests/src" + "Consolidation\\TestUtils\\": "../../tests/src" } }, "require": { - "php": ">=5.5.0", - "psr/log": "~1.0" + "symfony/console": "^2.8", + "php": ">=5.4.5", + "psr/log": "^1.0" }, "require-dev": { - "phpunit/phpunit": "4.*", - "g1a/composer-test-scenarios": "^1", - "satooshi/php-coveralls": "^2", - "squizlabs/php_codesniffer": "2.*", - "symfony/console": "^2.8" + "phpunit/phpunit": "^4.8.36", + "g1a/composer-test-scenarios": "^3", + "squizlabs/php_codesniffer": "^2" }, "minimum-stability": "stable", "scripts": { @@ -42,11 +41,6 @@ "@lint", "@unit", "@cs" - ], - "scenario": "scenarios/install", - "post-update-cmd": [ - "create-scenario symfony4 'symfony/console:^4.0'", - "create-scenario symfony2 'symfony/console:^2.8' --platform-php '5.5' --no-lockfile" ] }, "extra": { @@ -56,8 +50,10 @@ }, "config": { "platform": { - "php": "5.5" + "php": "5.4.8" }, + "optimize-autoloader": true, + "sort-packages": true, "vendor-dir": "../../vendor" } } diff --git a/vendor/consolidation/log/.scenarios.lock/symfony2/composer.lock b/vendor/consolidation/log/.scenarios.lock/symfony2/composer.lock new file mode 100644 index 000000000..2880c8434 --- /dev/null +++ b/vendor/consolidation/log/.scenarios.lock/symfony2/composer.lock @@ -0,0 +1,1400 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "37f310dc1c6bdc40e1048349aef71467", + "packages": [ + { + "name": "psr/log", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", + "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "time": "2018-11-20T15:27:04+00:00" + }, + { + "name": "symfony/console", + "version": "v2.8.49", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "cbcf4b5e233af15cd2bbd50dee1ccc9b7927dc12" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/cbcf4b5e233af15cd2bbd50dee1ccc9b7927dc12", + "reference": "cbcf4b5e233af15cd2bbd50dee1ccc9b7927dc12", + "shasum": "" + }, + "require": { + "php": ">=5.3.9", + "symfony/debug": "^2.7.2|~3.0.0", + "symfony/polyfill-mbstring": "~1.0" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/event-dispatcher": "~2.1|~3.0.0", + "symfony/process": "~2.1|~3.0.0" + }, + "suggest": { + "psr/log-implementation": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/process": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Console Component", + "homepage": "https://symfony.com", + "time": "2018-11-20T15:55:20+00:00" + }, + { + "name": "symfony/debug", + "version": "v2.8.49", + "source": { + "type": "git", + "url": "https://github.com/symfony/debug.git", + "reference": "74251c8d50dd3be7c4ce0c7b862497cdc641a5d0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/debug/zipball/74251c8d50dd3be7c4ce0c7b862497cdc641a5d0", + "reference": "74251c8d50dd3be7c4ce0c7b862497cdc641a5d0", + "shasum": "" + }, + "require": { + "php": ">=5.3.9", + "psr/log": "~1.0" + }, + "conflict": { + "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" + }, + "require-dev": { + "symfony/class-loader": "~2.2|~3.0.0", + "symfony/http-kernel": "~2.3.24|~2.5.9|^2.6.2|~3.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Debug\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Debug Component", + "homepage": "https://symfony.com", + "time": "2018-11-11T11:18:13+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.10.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "c79c051f5b3a46be09205c73b80b346e4153e494" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/c79c051f5b3a46be09205c73b80b346e4153e494", + "reference": "c79c051f5b3a46be09205c73b80b346e4153e494", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.9-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "time": "2018-09-21T13:07:52+00:00" + } + ], + "packages-dev": [ + { + "name": "doctrine/instantiator", + "version": "1.0.5", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", + "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", + "shasum": "" + }, + "require": { + "php": ">=5.3,<8.0-DEV" + }, + "require-dev": { + "athletic/athletic": "~0.1.8", + "ext-pdo": "*", + "ext-phar": "*", + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "~2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "http://ocramius.github.com/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://github.com/doctrine/instantiator", + "keywords": [ + "constructor", + "instantiate" + ], + "time": "2015-06-14T21:17:01+00:00" + }, + { + "name": "g1a/composer-test-scenarios", + "version": "3.0.1", + "source": { + "type": "git", + "url": "https://github.com/g1a/composer-test-scenarios.git", + "reference": "224531e20d13a07942a989a70759f726cd2df9a1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/g1a/composer-test-scenarios/zipball/224531e20d13a07942a989a70759f726cd2df9a1", + "reference": "224531e20d13a07942a989a70759f726cd2df9a1", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.0.0", + "php": ">=5.4" + }, + "require-dev": { + "composer/composer": "^1.7", + "php-coveralls/php-coveralls": "^1.0", + "phpunit/phpunit": "^4.8.36|^6", + "squizlabs/php_codesniffer": "^2.8" + }, + "bin": [ + "scripts/dependency-licenses" + ], + "type": "composer-plugin", + "extra": { + "class": "ComposerTestScenarios\\Plugin", + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "ComposerTestScenarios\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Greg Anderson", + "email": "greg.1.anderson@greenknowe.org" + } + ], + "description": "Useful scripts for testing multiple sets of Composer dependencies.", + "time": "2018-11-27T05:58:39+00:00" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "2.0.5", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "e6a969a640b00d8daa3c66518b0405fb41ae0c4b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/e6a969a640b00d8daa3c66518b0405fb41ae0c4b", + "reference": "e6a969a640b00d8daa3c66518b0405fb41ae0c4b", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "suggest": { + "dflydev/markdown": "~1.0", + "erusev/parsedown": "~1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "phpDocumentor": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "mike.vanriel@naenius.com" + } + ], + "time": "2016-01-25T08:17:30+00:00" + }, + { + "name": "phpspec/prophecy", + "version": "1.8.0", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/4ba436b55987b4bf311cb7c6ba82aa528aac0a06", + "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": "^5.3|^7.0", + "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0", + "sebastian/comparator": "^1.1|^2.0|^3.0", + "sebastian/recursion-context": "^1.0|^2.0|^3.0" + }, + "require-dev": { + "phpspec/phpspec": "^2.5|^3.2", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.8.x-dev" + } + }, + "autoload": { + "psr-0": { + "Prophecy\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", + "keywords": [ + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" + ], + "time": "2018-08-05T17:53:17+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "2.2.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979", + "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "phpunit/php-file-iterator": "~1.3", + "phpunit/php-text-template": "~1.2", + "phpunit/php-token-stream": "~1.3", + "sebastian/environment": "^1.3.2", + "sebastian/version": "~1.0" + }, + "require-dev": { + "ext-xdebug": ">=2.1.4", + "phpunit/phpunit": "~4" + }, + "suggest": { + "ext-dom": "*", + "ext-xdebug": ">=2.2.1", + "ext-xmlwriter": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "time": "2015-10-06T15:47:00+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "1.4.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4", + "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "time": "2017-11-27T13:52:08+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "time": "2015-06-21T13:50:34+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "1.0.9", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", + "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "time": "2017-02-26T11:10:40+00:00" + }, + { + "name": "phpunit/php-token-stream", + "version": "1.4.12", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-token-stream.git", + "reference": "1ce90ba27c42e4e44e6d8458241466380b51fa16" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/1ce90ba27c42e4e44e6d8458241466380b51fa16", + "reference": "1ce90ba27c42e4e44e6d8458241466380b51fa16", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Wrapper around PHP's tokenizer extension.", + "homepage": "https://github.com/sebastianbergmann/php-token-stream/", + "keywords": [ + "tokenizer" + ], + "time": "2017-12-04T08:55:13+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "4.8.36", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "46023de9a91eec7dfb06cc56cb4e260017298517" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/46023de9a91eec7dfb06cc56cb4e260017298517", + "reference": "46023de9a91eec7dfb06cc56cb4e260017298517", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-json": "*", + "ext-pcre": "*", + "ext-reflection": "*", + "ext-spl": "*", + "php": ">=5.3.3", + "phpspec/prophecy": "^1.3.1", + "phpunit/php-code-coverage": "~2.1", + "phpunit/php-file-iterator": "~1.4", + "phpunit/php-text-template": "~1.2", + "phpunit/php-timer": "^1.0.6", + "phpunit/phpunit-mock-objects": "~2.3", + "sebastian/comparator": "~1.2.2", + "sebastian/diff": "~1.2", + "sebastian/environment": "~1.3", + "sebastian/exporter": "~1.2", + "sebastian/global-state": "~1.0", + "sebastian/version": "~1.0", + "symfony/yaml": "~2.1|~3.0" + }, + "suggest": { + "phpunit/php-invoker": "~1.1" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.8.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "time": "2017-06-21T08:07:12+00:00" + }, + { + "name": "phpunit/phpunit-mock-objects", + "version": "2.3.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", + "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983", + "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": ">=5.3.3", + "phpunit/php-text-template": "~1.2", + "sebastian/exporter": "~1.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "suggest": { + "ext-soap": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Mock Object library for PHPUnit", + "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", + "keywords": [ + "mock", + "xunit" + ], + "time": "2015-10-02T06:51:40+00:00" + }, + { + "name": "sebastian/comparator", + "version": "1.2.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", + "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/diff": "~1.2", + "sebastian/exporter": "~1.2 || ~2.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "http://www.github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "time": "2017-01-29T09:50:25+00:00" + }, + { + "name": "sebastian/diff", + "version": "1.4.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7f066a26a962dbe58ddea9f72a4e82874a3975a4", + "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff" + ], + "time": "2017-05-22T07:24:03+00:00" + }, + { + "name": "sebastian/environment", + "version": "1.3.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/be2c607e43ce4c89ecd60e75c6a85c126e754aea", + "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8 || ^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "time": "2016-08-18T05:49:44+00:00" + }, + { + "name": "sebastian/exporter", + "version": "1.2.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4", + "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/recursion-context": "~1.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "http://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "time": "2016-06-17T09:04:28+00:00" + }, + { + "name": "sebastian/global-state", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "time": "2015-10-12T03:26:01+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "1.0.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/b19cc3298482a335a95f3016d2f8a6950f0fbcd7", + "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "time": "2016-10-03T07:41:43+00:00" + }, + { + "name": "sebastian/version", + "version": "1.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", + "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", + "shasum": "" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "time": "2015-06-21T13:59:46+00:00" + }, + { + "name": "squizlabs/php_codesniffer", + "version": "2.9.2", + "source": { + "type": "git", + "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", + "reference": "2acf168de78487db620ab4bc524135a13cfe6745" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/2acf168de78487db620ab4bc524135a13cfe6745", + "reference": "2acf168de78487db620ab4bc524135a13cfe6745", + "shasum": "" + }, + "require": { + "ext-simplexml": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=5.1.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "bin": [ + "scripts/phpcs", + "scripts/phpcbf" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "autoload": { + "classmap": [ + "CodeSniffer.php", + "CodeSniffer/CLI.php", + "CodeSniffer/Exception.php", + "CodeSniffer/File.php", + "CodeSniffer/Fixer.php", + "CodeSniffer/Report.php", + "CodeSniffer/Reporting.php", + "CodeSniffer/Sniff.php", + "CodeSniffer/Tokens.php", + "CodeSniffer/Reports/", + "CodeSniffer/Tokenizers/", + "CodeSniffer/DocGenerators/", + "CodeSniffer/Standards/AbstractPatternSniff.php", + "CodeSniffer/Standards/AbstractScopeSniff.php", + "CodeSniffer/Standards/AbstractVariableSniff.php", + "CodeSniffer/Standards/IncorrectPatternException.php", + "CodeSniffer/Standards/Generic/Sniffs/", + "CodeSniffer/Standards/MySource/Sniffs/", + "CodeSniffer/Standards/PEAR/Sniffs/", + "CodeSniffer/Standards/PSR1/Sniffs/", + "CodeSniffer/Standards/PSR2/Sniffs/", + "CodeSniffer/Standards/Squiz/Sniffs/", + "CodeSniffer/Standards/Zend/Sniffs/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Greg Sherwood", + "role": "lead" + } + ], + "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "homepage": "http://www.squizlabs.com/php-codesniffer", + "keywords": [ + "phpcs", + "standards" + ], + "time": "2018-11-07T22:31:41+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.10.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "e3d826245268269cd66f8326bd8bc066687b4a19" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e3d826245268269cd66f8326bd8bc066687b4a19", + "reference": "e3d826245268269cd66f8326bd8bc066687b4a19", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.9-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + }, + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "time": "2018-08-06T14:22:27+00:00" + }, + { + "name": "symfony/yaml", + "version": "v2.8.49", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "02c1859112aa779d9ab394ae4f3381911d84052b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/02c1859112aa779d9ab394ae4f3381911d84052b", + "reference": "02c1859112aa779d9ab394ae4f3381911d84052b", + "shasum": "" + }, + "require": { + "php": ">=5.3.9", + "symfony/polyfill-ctype": "~1.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Yaml\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Yaml Component", + "homepage": "https://symfony.com", + "time": "2018-11-11T11:18:13+00:00" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": ">=5.4.5" + }, + "platform-dev": [], + "platform-overrides": { + "php": "5.4.8" + } +} diff --git a/vendor/consolidation/log/scenarios/symfony2/src b/vendor/consolidation/log/.scenarios.lock/symfony2/src similarity index 100% rename from vendor/consolidation/log/scenarios/symfony2/src rename to vendor/consolidation/log/.scenarios.lock/symfony2/src diff --git a/vendor/consolidation/log/scenarios/symfony2/tests b/vendor/consolidation/log/.scenarios.lock/symfony2/tests similarity index 100% rename from vendor/consolidation/log/scenarios/symfony2/tests rename to vendor/consolidation/log/.scenarios.lock/symfony2/tests diff --git a/vendor/consolidation/log/.scenarios.lock/symfony4/.gitignore b/vendor/consolidation/log/.scenarios.lock/symfony4/.gitignore new file mode 100644 index 000000000..5657f6ea7 --- /dev/null +++ b/vendor/consolidation/log/.scenarios.lock/symfony4/.gitignore @@ -0,0 +1 @@ +vendor \ No newline at end of file diff --git a/vendor/consolidation/log/.scenarios.lock/symfony4/composer.json b/vendor/consolidation/log/.scenarios.lock/symfony4/composer.json new file mode 100644 index 000000000..aaa666985 --- /dev/null +++ b/vendor/consolidation/log/.scenarios.lock/symfony4/composer.json @@ -0,0 +1,60 @@ +{ + "name": "consolidation/log", + "description": "Improved Psr-3 / Psr\\Log logger based on Symfony Console components.", + "license": "MIT", + "authors": [ + { + "name": "Greg Anderson", + "email": "greg.1.anderson@greenknowe.org" + } + ], + "autoload": { + "psr-4": { + "Consolidation\\Log\\": "../../src" + } + }, + "autoload-dev": { + "psr-4": { + "Consolidation\\TestUtils\\": "../../tests/src" + } + }, + "require": { + "symfony/console": "^4.0", + "php": ">=5.4.5", + "psr/log": "^1.0" + }, + "require-dev": { + "phpunit/phpunit": "^6", + "g1a/composer-test-scenarios": "^3", + "php-coveralls/php-coveralls": "^1", + "squizlabs/php_codesniffer": "^2" + }, + "minimum-stability": "stable", + "scripts": { + "cs": "phpcs -n --standard=PSR2 src", + "cbf": "phpcbf -n --standard=PSR2 src", + "unit": "phpunit", + "lint": [ + "find src -name '*.php' -print0 | xargs -0 -n1 php -l", + "find tests/src -name '*.php' -print0 | xargs -0 -n1 php -l" + ], + "test": [ + "@lint", + "@unit", + "@cs" + ] + }, + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "config": { + "platform": { + "php": "7.1.3" + }, + "optimize-autoloader": true, + "sort-packages": true, + "vendor-dir": "../../vendor" + } +} diff --git a/vendor/consolidation/log/.scenarios.lock/symfony4/composer.lock b/vendor/consolidation/log/.scenarios.lock/symfony4/composer.lock new file mode 100644 index 000000000..76d663254 --- /dev/null +++ b/vendor/consolidation/log/.scenarios.lock/symfony4/composer.lock @@ -0,0 +1,2355 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "5643ded858bacea7c5860071008675f9", + "packages": [ + { + "name": "psr/log", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", + "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "time": "2018-11-20T15:27:04+00:00" + }, + { + "name": "symfony/console", + "version": "v4.2.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "4dff24e5d01e713818805c1862d2e3f901ee7dd0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/4dff24e5d01e713818805c1862d2e3f901ee7dd0", + "reference": "4dff24e5d01e713818805c1862d2e3f901ee7dd0", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "symfony/contracts": "^1.0", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/dependency-injection": "<3.4", + "symfony/process": "<3.3" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~3.4|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/event-dispatcher": "~3.4|~4.0", + "symfony/lock": "~3.4|~4.0", + "symfony/process": "~3.4|~4.0" + }, + "suggest": { + "psr/log-implementation": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/lock": "", + "symfony/process": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Console Component", + "homepage": "https://symfony.com", + "time": "2018-11-27T07:40:44+00:00" + }, + { + "name": "symfony/contracts", + "version": "v1.0.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/contracts.git", + "reference": "1aa7ab2429c3d594dd70689604b5cf7421254cdf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/contracts/zipball/1aa7ab2429c3d594dd70689604b5cf7421254cdf", + "reference": "1aa7ab2429c3d594dd70689604b5cf7421254cdf", + "shasum": "" + }, + "require": { + "php": "^7.1.3" + }, + "require-dev": { + "psr/cache": "^1.0", + "psr/container": "^1.0" + }, + "suggest": { + "psr/cache": "When using the Cache contracts", + "psr/container": "When using the Service contracts", + "symfony/cache-contracts-implementation": "", + "symfony/service-contracts-implementation": "", + "symfony/translation-contracts-implementation": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\": "" + }, + "exclude-from-classmap": [ + "**/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A set of abstractions extracted out of the Symfony components", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "time": "2018-12-05T08:06:11+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.10.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "c79c051f5b3a46be09205c73b80b346e4153e494" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/c79c051f5b3a46be09205c73b80b346e4153e494", + "reference": "c79c051f5b3a46be09205c73b80b346e4153e494", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.9-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "time": "2018-09-21T13:07:52+00:00" + } + ], + "packages-dev": [ + { + "name": "doctrine/instantiator", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", + "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "require-dev": { + "athletic/athletic": "~0.1.8", + "ext-pdo": "*", + "ext-phar": "*", + "phpunit/phpunit": "^6.2.3", + "squizlabs/php_codesniffer": "^3.0.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "http://ocramius.github.com/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://github.com/doctrine/instantiator", + "keywords": [ + "constructor", + "instantiate" + ], + "time": "2017-07-22T11:58:36+00:00" + }, + { + "name": "g1a/composer-test-scenarios", + "version": "3.0.1", + "source": { + "type": "git", + "url": "https://github.com/g1a/composer-test-scenarios.git", + "reference": "224531e20d13a07942a989a70759f726cd2df9a1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/g1a/composer-test-scenarios/zipball/224531e20d13a07942a989a70759f726cd2df9a1", + "reference": "224531e20d13a07942a989a70759f726cd2df9a1", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.0.0", + "php": ">=5.4" + }, + "require-dev": { + "composer/composer": "^1.7", + "php-coveralls/php-coveralls": "^1.0", + "phpunit/phpunit": "^4.8.36|^6", + "squizlabs/php_codesniffer": "^2.8" + }, + "bin": [ + "scripts/dependency-licenses" + ], + "type": "composer-plugin", + "extra": { + "class": "ComposerTestScenarios\\Plugin", + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "ComposerTestScenarios\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Greg Anderson", + "email": "greg.1.anderson@greenknowe.org" + } + ], + "description": "Useful scripts for testing multiple sets of Composer dependencies.", + "time": "2018-11-27T05:58:39+00:00" + }, + { + "name": "guzzle/guzzle", + "version": "v3.9.3", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle3.git", + "reference": "0645b70d953bc1c067bbc8d5bc53194706b628d9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle3/zipball/0645b70d953bc1c067bbc8d5bc53194706b628d9", + "reference": "0645b70d953bc1c067bbc8d5bc53194706b628d9", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "php": ">=5.3.3", + "symfony/event-dispatcher": "~2.1" + }, + "replace": { + "guzzle/batch": "self.version", + "guzzle/cache": "self.version", + "guzzle/common": "self.version", + "guzzle/http": "self.version", + "guzzle/inflection": "self.version", + "guzzle/iterator": "self.version", + "guzzle/log": "self.version", + "guzzle/parser": "self.version", + "guzzle/plugin": "self.version", + "guzzle/plugin-async": "self.version", + "guzzle/plugin-backoff": "self.version", + "guzzle/plugin-cache": "self.version", + "guzzle/plugin-cookie": "self.version", + "guzzle/plugin-curlauth": "self.version", + "guzzle/plugin-error-response": "self.version", + "guzzle/plugin-history": "self.version", + "guzzle/plugin-log": "self.version", + "guzzle/plugin-md5": "self.version", + "guzzle/plugin-mock": "self.version", + "guzzle/plugin-oauth": "self.version", + "guzzle/service": "self.version", + "guzzle/stream": "self.version" + }, + "require-dev": { + "doctrine/cache": "~1.3", + "monolog/monolog": "~1.0", + "phpunit/phpunit": "3.7.*", + "psr/log": "~1.0", + "symfony/class-loader": "~2.1", + "zendframework/zend-cache": "2.*,<2.3", + "zendframework/zend-log": "2.*,<2.3" + }, + "suggest": { + "guzzlehttp/guzzle": "Guzzle 5 has moved to a new package name. The package you have installed, Guzzle 3, is deprecated." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.9-dev" + } + }, + "autoload": { + "psr-0": { + "Guzzle": "src/", + "Guzzle\\Tests": "tests/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Guzzle Community", + "homepage": "https://github.com/guzzle/guzzle/contributors" + } + ], + "description": "PHP HTTP client. This library is deprecated in favor of https://packagist.org/packages/guzzlehttp/guzzle", + "homepage": "http://guzzlephp.org/", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "rest", + "web service" + ], + "abandoned": "guzzlehttp/guzzle", + "time": "2015-03-18T18:23:50+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.8.1", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8", + "reference": "3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "replace": { + "myclabs/deep-copy": "self.version" + }, + "require-dev": { + "doctrine/collections": "^1.0", + "doctrine/common": "^2.6", + "phpunit/phpunit": "^7.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + }, + "files": [ + "src/DeepCopy/deep_copy.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "time": "2018-06-11T23:09:50+00:00" + }, + { + "name": "phar-io/manifest", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/2df402786ab5368a0169091f61a7c1e0eb6852d0", + "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-phar": "*", + "phar-io/version": "^1.0.1", + "php": "^5.6 || ^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "time": "2017-03-05T18:14:27+00:00" + }, + { + "name": "phar-io/version", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/a70c0ced4be299a63d32fa96d9281d03e94041df", + "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "time": "2017-03-05T17:38:23+00:00" + }, + { + "name": "php-coveralls/php-coveralls", + "version": "v1.1.0", + "source": { + "type": "git", + "url": "https://github.com/php-coveralls/php-coveralls.git", + "reference": "37f8f83fe22224eb9d9c6d593cdeb33eedd2a9ad" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-coveralls/php-coveralls/zipball/37f8f83fe22224eb9d9c6d593cdeb33eedd2a9ad", + "reference": "37f8f83fe22224eb9d9c6d593cdeb33eedd2a9ad", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-simplexml": "*", + "guzzle/guzzle": "^2.8 || ^3.0", + "php": "^5.3.3 || ^7.0", + "psr/log": "^1.0", + "symfony/config": "^2.1 || ^3.0 || ^4.0", + "symfony/console": "^2.1 || ^3.0 || ^4.0", + "symfony/stopwatch": "^2.0 || ^3.0 || ^4.0", + "symfony/yaml": "^2.0 || ^3.0 || ^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.4.3 || ^6.0" + }, + "suggest": { + "symfony/http-kernel": "Allows Symfony integration" + }, + "bin": [ + "bin/coveralls" + ], + "type": "library", + "autoload": { + "psr-4": { + "Satooshi\\": "src/Satooshi/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kitamura Satoshi", + "email": "with.no.parachute@gmail.com", + "homepage": "https://www.facebook.com/satooshi.jp" + } + ], + "description": "PHP client library for Coveralls API", + "homepage": "https://github.com/php-coveralls/php-coveralls", + "keywords": [ + "ci", + "coverage", + "github", + "test" + ], + "time": "2017-12-06T23:17:56+00:00" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", + "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", + "shasum": "" + }, + "require": { + "php": ">=5.5" + }, + "require-dev": { + "phpunit/phpunit": "^4.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "time": "2017-09-11T18:02:19+00:00" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "4.3.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "94fd0001232e47129dd3504189fa1c7225010d08" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/94fd0001232e47129dd3504189fa1c7225010d08", + "reference": "94fd0001232e47129dd3504189fa1c7225010d08", + "shasum": "" + }, + "require": { + "php": "^7.0", + "phpdocumentor/reflection-common": "^1.0.0", + "phpdocumentor/type-resolver": "^0.4.0", + "webmozart/assert": "^1.0" + }, + "require-dev": { + "doctrine/instantiator": "~1.0.5", + "mockery/mockery": "^1.0", + "phpunit/phpunit": "^6.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "time": "2017-11-30T07:14:17+00:00" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "0.4.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7", + "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7", + "shasum": "" + }, + "require": { + "php": "^5.5 || ^7.0", + "phpdocumentor/reflection-common": "^1.0" + }, + "require-dev": { + "mockery/mockery": "^0.9.4", + "phpunit/phpunit": "^5.2||^4.8.24" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "time": "2017-07-14T14:27:02+00:00" + }, + { + "name": "phpspec/prophecy", + "version": "1.8.0", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/4ba436b55987b4bf311cb7c6ba82aa528aac0a06", + "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": "^5.3|^7.0", + "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0", + "sebastian/comparator": "^1.1|^2.0|^3.0", + "sebastian/recursion-context": "^1.0|^2.0|^3.0" + }, + "require-dev": { + "phpspec/phpspec": "^2.5|^3.2", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.8.x-dev" + } + }, + "autoload": { + "psr-0": { + "Prophecy\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", + "keywords": [ + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" + ], + "time": "2018-08-05T17:53:17+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "5.3.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "c89677919c5dd6d3b3852f230a663118762218ac" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/c89677919c5dd6d3b3852f230a663118762218ac", + "reference": "c89677919c5dd6d3b3852f230a663118762218ac", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-xmlwriter": "*", + "php": "^7.0", + "phpunit/php-file-iterator": "^1.4.2", + "phpunit/php-text-template": "^1.2.1", + "phpunit/php-token-stream": "^2.0.1", + "sebastian/code-unit-reverse-lookup": "^1.0.1", + "sebastian/environment": "^3.0", + "sebastian/version": "^2.0.1", + "theseer/tokenizer": "^1.1" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "suggest": { + "ext-xdebug": "^2.5.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.3.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "time": "2018-04-06T15:36:58+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "1.4.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4", + "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "time": "2017-11-27T13:52:08+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "time": "2015-06-21T13:50:34+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "1.0.9", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", + "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "time": "2017-02-26T11:10:40+00:00" + }, + { + "name": "phpunit/php-token-stream", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-token-stream.git", + "reference": "791198a2c6254db10131eecfe8c06670700904db" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/791198a2c6254db10131eecfe8c06670700904db", + "reference": "791198a2c6254db10131eecfe8c06670700904db", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": "^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.2.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Wrapper around PHP's tokenizer extension.", + "homepage": "https://github.com/sebastianbergmann/php-token-stream/", + "keywords": [ + "tokenizer" + ], + "time": "2017-11-27T05:48:46+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "6.5.13", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "0973426fb012359b2f18d3bd1e90ef1172839693" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/0973426fb012359b2f18d3bd1e90ef1172839693", + "reference": "0973426fb012359b2f18d3bd1e90ef1172839693", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "myclabs/deep-copy": "^1.6.1", + "phar-io/manifest": "^1.0.1", + "phar-io/version": "^1.0", + "php": "^7.0", + "phpspec/prophecy": "^1.7", + "phpunit/php-code-coverage": "^5.3", + "phpunit/php-file-iterator": "^1.4.3", + "phpunit/php-text-template": "^1.2.1", + "phpunit/php-timer": "^1.0.9", + "phpunit/phpunit-mock-objects": "^5.0.9", + "sebastian/comparator": "^2.1", + "sebastian/diff": "^2.0", + "sebastian/environment": "^3.1", + "sebastian/exporter": "^3.1", + "sebastian/global-state": "^2.0", + "sebastian/object-enumerator": "^3.0.3", + "sebastian/resource-operations": "^1.0", + "sebastian/version": "^2.0.1" + }, + "conflict": { + "phpdocumentor/reflection-docblock": "3.0.2", + "phpunit/dbunit": "<3.0" + }, + "require-dev": { + "ext-pdo": "*" + }, + "suggest": { + "ext-xdebug": "*", + "phpunit/php-invoker": "^1.1" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.5.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "time": "2018-09-08T15:10:43+00:00" + }, + { + "name": "phpunit/phpunit-mock-objects", + "version": "5.0.10", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", + "reference": "cd1cf05c553ecfec36b170070573e540b67d3f1f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/cd1cf05c553ecfec36b170070573e540b67d3f1f", + "reference": "cd1cf05c553ecfec36b170070573e540b67d3f1f", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.5", + "php": "^7.0", + "phpunit/php-text-template": "^1.2.1", + "sebastian/exporter": "^3.1" + }, + "conflict": { + "phpunit/phpunit": "<6.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.5.11" + }, + "suggest": { + "ext-soap": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Mock Object library for PHPUnit", + "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", + "keywords": [ + "mock", + "xunit" + ], + "time": "2018-08-09T05:50:03+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", + "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7 || ^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "time": "2017-03-04T06:30:41+00:00" + }, + { + "name": "sebastian/comparator", + "version": "2.1.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/34369daee48eafb2651bea869b4b15d75ccc35f9", + "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9", + "shasum": "" + }, + "require": { + "php": "^7.0", + "sebastian/diff": "^2.0 || ^3.0", + "sebastian/exporter": "^3.1" + }, + "require-dev": { + "phpunit/phpunit": "^6.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "https://github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "time": "2018-02-01T13:46:46+00:00" + }, + { + "name": "sebastian/diff", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/347c1d8b49c5c3ee30c7040ea6fc446790e6bddd", + "reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd", + "shasum": "" + }, + "require": { + "php": "^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff" + ], + "time": "2017-08-03T08:09:46+00:00" + }, + { + "name": "sebastian/environment", + "version": "3.1.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/cd0871b3975fb7fc44d11314fd1ee20925fce4f5", + "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5", + "shasum": "" + }, + "require": { + "php": "^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "time": "2017-07-01T08:51:00+00:00" + }, + { + "name": "sebastian/exporter", + "version": "3.1.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "234199f4528de6d12aaa58b612e98f7d36adb937" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/234199f4528de6d12aaa58b612e98f7d36adb937", + "reference": "234199f4528de6d12aaa58b612e98f7d36adb937", + "shasum": "" + }, + "require": { + "php": "^7.0", + "sebastian/recursion-context": "^3.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "http://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "time": "2017-04-03T13:19:02+00:00" + }, + { + "name": "sebastian/global-state", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", + "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", + "shasum": "" + }, + "require": { + "php": "^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "time": "2017-04-27T15:39:26+00:00" + }, + { + "name": "sebastian/object-enumerator", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/7cfd9e65d11ffb5af41198476395774d4c8a84c5", + "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5", + "shasum": "" + }, + "require": { + "php": "^7.0", + "sebastian/object-reflector": "^1.1.1", + "sebastian/recursion-context": "^3.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "time": "2017-08-03T12:35:26+00:00" + }, + { + "name": "sebastian/object-reflector", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "773f97c67f28de00d397be301821b06708fca0be" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/773f97c67f28de00d397be301821b06708fca0be", + "reference": "773f97c67f28de00d397be301821b06708fca0be", + "shasum": "" + }, + "require": { + "php": "^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "time": "2017-03-29T09:07:27+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", + "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", + "shasum": "" + }, + "require": { + "php": "^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "time": "2017-03-03T06:23:57+00:00" + }, + { + "name": "sebastian/resource-operations", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", + "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", + "shasum": "" + }, + "require": { + "php": ">=5.6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "time": "2015-07-28T20:34:47+00:00" + }, + { + "name": "sebastian/version", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "time": "2016-10-03T07:35:21+00:00" + }, + { + "name": "squizlabs/php_codesniffer", + "version": "2.9.2", + "source": { + "type": "git", + "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", + "reference": "2acf168de78487db620ab4bc524135a13cfe6745" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/2acf168de78487db620ab4bc524135a13cfe6745", + "reference": "2acf168de78487db620ab4bc524135a13cfe6745", + "shasum": "" + }, + "require": { + "ext-simplexml": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=5.1.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "bin": [ + "scripts/phpcs", + "scripts/phpcbf" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "autoload": { + "classmap": [ + "CodeSniffer.php", + "CodeSniffer/CLI.php", + "CodeSniffer/Exception.php", + "CodeSniffer/File.php", + "CodeSniffer/Fixer.php", + "CodeSniffer/Report.php", + "CodeSniffer/Reporting.php", + "CodeSniffer/Sniff.php", + "CodeSniffer/Tokens.php", + "CodeSniffer/Reports/", + "CodeSniffer/Tokenizers/", + "CodeSniffer/DocGenerators/", + "CodeSniffer/Standards/AbstractPatternSniff.php", + "CodeSniffer/Standards/AbstractScopeSniff.php", + "CodeSniffer/Standards/AbstractVariableSniff.php", + "CodeSniffer/Standards/IncorrectPatternException.php", + "CodeSniffer/Standards/Generic/Sniffs/", + "CodeSniffer/Standards/MySource/Sniffs/", + "CodeSniffer/Standards/PEAR/Sniffs/", + "CodeSniffer/Standards/PSR1/Sniffs/", + "CodeSniffer/Standards/PSR2/Sniffs/", + "CodeSniffer/Standards/Squiz/Sniffs/", + "CodeSniffer/Standards/Zend/Sniffs/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Greg Sherwood", + "role": "lead" + } + ], + "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "homepage": "http://www.squizlabs.com/php-codesniffer", + "keywords": [ + "phpcs", + "standards" + ], + "time": "2018-11-07T22:31:41+00:00" + }, + { + "name": "symfony/config", + "version": "v4.2.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/config.git", + "reference": "005d9a083d03f588677d15391a716b1ac9b887c0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/config/zipball/005d9a083d03f588677d15391a716b1ac9b887c0", + "reference": "005d9a083d03f588677d15391a716b1ac9b887c0", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "symfony/filesystem": "~3.4|~4.0", + "symfony/polyfill-ctype": "~1.8" + }, + "conflict": { + "symfony/finder": "<3.4" + }, + "require-dev": { + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/event-dispatcher": "~3.4|~4.0", + "symfony/finder": "~3.4|~4.0", + "symfony/yaml": "~3.4|~4.0" + }, + "suggest": { + "symfony/yaml": "To use the yaml reference dumper" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Config\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Config Component", + "homepage": "https://symfony.com", + "time": "2018-11-30T22:21:14+00:00" + }, + { + "name": "symfony/event-dispatcher", + "version": "v2.8.49", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "a77e974a5fecb4398833b0709210e3d5e334ffb0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/a77e974a5fecb4398833b0709210e3d5e334ffb0", + "reference": "a77e974a5fecb4398833b0709210e3d5e334ffb0", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "^2.0.5|~3.0.0", + "symfony/dependency-injection": "~2.6|~3.0.0", + "symfony/expression-language": "~2.6|~3.0.0", + "symfony/stopwatch": "~2.3|~3.0.0" + }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\EventDispatcher\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony EventDispatcher Component", + "homepage": "https://symfony.com", + "time": "2018-11-21T14:20:20+00:00" + }, + { + "name": "symfony/filesystem", + "version": "v4.2.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "2f4c8b999b3b7cadb2a69390b01af70886753710" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/2f4c8b999b3b7cadb2a69390b01af70886753710", + "reference": "2f4c8b999b3b7cadb2a69390b01af70886753710", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "symfony/polyfill-ctype": "~1.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Filesystem Component", + "homepage": "https://symfony.com", + "time": "2018-11-11T19:52:12+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.10.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "e3d826245268269cd66f8326bd8bc066687b4a19" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e3d826245268269cd66f8326bd8bc066687b4a19", + "reference": "e3d826245268269cd66f8326bd8bc066687b4a19", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.9-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + }, + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "time": "2018-08-06T14:22:27+00:00" + }, + { + "name": "symfony/stopwatch", + "version": "v4.2.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/stopwatch.git", + "reference": "ec076716412274e51f8a7ea675d9515e5c311123" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/ec076716412274e51f8a7ea675d9515e5c311123", + "reference": "ec076716412274e51f8a7ea675d9515e5c311123", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "symfony/contracts": "^1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Stopwatch\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Stopwatch Component", + "homepage": "https://symfony.com", + "time": "2018-11-11T19:52:12+00:00" + }, + { + "name": "symfony/yaml", + "version": "v4.2.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "c41175c801e3edfda90f32e292619d10c27103d7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/c41175c801e3edfda90f32e292619d10c27103d7", + "reference": "c41175c801e3edfda90f32e292619d10c27103d7", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "symfony/polyfill-ctype": "~1.8" + }, + "conflict": { + "symfony/console": "<3.4" + }, + "require-dev": { + "symfony/console": "~3.4|~4.0" + }, + "suggest": { + "symfony/console": "For validating YAML files using the lint command" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Yaml\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Yaml Component", + "homepage": "https://symfony.com", + "time": "2018-11-11T19:52:12+00:00" + }, + { + "name": "theseer/tokenizer", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/cb2f008f3f05af2893a87208fe6a6c4985483f8b", + "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + } + ], + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "time": "2017-04-07T12:08:54+00:00" + }, + { + "name": "webmozart/assert", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://github.com/webmozart/assert.git", + "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozart/assert/zipball/83e253c8e0be5b0257b881e1827274667c5c17a9", + "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0", + "symfony/polyfill-ctype": "^1.8" + }, + "require-dev": { + "phpunit/phpunit": "^4.6", + "sebastian/version": "^1.0.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "time": "2018-12-25T11:19:39+00:00" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": ">=5.4.5" + }, + "platform-dev": [], + "platform-overrides": { + "php": "7.1.3" + } +} diff --git a/vendor/consolidation/log/scenarios/symfony4/src b/vendor/consolidation/log/.scenarios.lock/symfony4/src similarity index 100% rename from vendor/consolidation/log/scenarios/symfony4/src rename to vendor/consolidation/log/.scenarios.lock/symfony4/src diff --git a/vendor/consolidation/log/scenarios/symfony4/tests b/vendor/consolidation/log/.scenarios.lock/symfony4/tests similarity index 100% rename from vendor/consolidation/log/scenarios/symfony4/tests rename to vendor/consolidation/log/.scenarios.lock/symfony4/tests diff --git a/vendor/consolidation/log/.travis.yml b/vendor/consolidation/log/.travis.yml index 8184b261d..1459fa5dc 100644 --- a/vendor/consolidation/log/.travis.yml +++ b/vendor/consolidation/log/.travis.yml @@ -9,15 +9,18 @@ branches: matrix: include: - php: 7.2 - env: 'SCENARIO=symfony4 HIGHEST_LOWEST="update"' + env: 'SCENARIO=symfony4 DEPENDENCIES=highest' - php: 7.1 env: 'SCENARIO=symfony4' - - php: 7.0.11 - env: 'HIGHEST_LOWEST="update"' - - php: 7.0.11 + - php: 7.0 + env: 'DEPENDENCIES=highest' + - php: 7.0 - php: 5.6 + env: 'SCENARIO=phpunit4' - php: 5.5 - env: 'SCENARIO=symfony2 HIGHEST_LOWEST="update --prefer-lowest' + env: 'SCENARIO=phpunit4' + - php: 5.4 + env: 'SCENARIO=symfony2 DEPENDENCIES=lowest' sudo: false @@ -27,10 +30,10 @@ cache: - $HOME/.composer/cache install: - - 'composer scenario "${SCENARIO}" "${HIGHEST_LOWEST-install}"' + - '.scenarios.lock/install "${SCENARIO}" "${DEPENDENCIES}"' script: - composer test after_success: - - travis_retry php vendor/bin/coveralls -v + - 'travis_retry php vendor/bin/php-coveralls -v' diff --git a/vendor/consolidation/log/CHANGELOG.md b/vendor/consolidation/log/CHANGELOG.md new file mode 100644 index 000000000..f247ace87 --- /dev/null +++ b/vendor/consolidation/log/CHANGELOG.md @@ -0,0 +1,35 @@ +# Change Log + +### 1.1.1: 2019-1-1 + +- Allow logger manager to manage a global style for loggers (#12) + +### 1.1.0: 2018-12-29 + +- Add a logger manager (#11) +- Update to Composer Test Scenarios 3 (#10) + +### 1.0.6: 2018-05-25 + +- Use g1a/composer-test-scenarios (#9) + +### 1.0.5: 2017-11-28 + +- Test Symfony version 2, 3 and 4 with different versions of php. (#5) + +### 1.0.4: 2017-11-18 + +- Support for Symfony 4 by Tobias Nyholm (#4) + +### 1.0.3: 2016-03-23 + +- Split up the log() method a bit. +- Run code sniffer prior to running tests to ensure PSR-2 compliance. + +### 1.0.2: 2016-03-22 + +- Remove unused components accidentally left in composer.json. + +### 1.0.1: 2016-03-19 + +- Add a license file. diff --git a/vendor/consolidation/log/LICENSE b/vendor/consolidation/log/LICENSE index 2078bd881..dfcef0282 100644 --- a/vendor/consolidation/log/LICENSE +++ b/vendor/consolidation/log/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2016 Consolidation Org Developers +Copyright (c) 2016-2018 Consolidation Org Developers Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: @@ -6,3 +6,11 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +DEPENDENCY LICENSES: + +Name Version License +psr/log 1.1.0 MIT +symfony/console v2.8.49 MIT +symfony/debug v2.8.49 MIT +symfony/polyfill-mbstring v1.10.0 MIT \ No newline at end of file diff --git a/vendor/consolidation/log/README.md b/vendor/consolidation/log/README.md index 996b657a0..ecc8cf349 100644 --- a/vendor/consolidation/log/README.md +++ b/vendor/consolidation/log/README.md @@ -2,7 +2,7 @@ Improved [PSR-3](http://www.php-fig.org/psr/psr-3/) [Psr\Log](https://github.com/php-fig/log) logger based on Symfony Console components. -[![Travis CI](https://travis-ci.org/consolidation-org/log.svg?branch=master)](https://travis-ci.org/consolidation-org/log) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/consolidation-org/log/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/consolidation-org/log/?branch=master) [![Coverage Status](https://coveralls.io/repos/github/consolidation-org/log/badge.svg?branch=master)](https://coveralls.io/github/consolidation-org/log?branch=master) [![License](https://poser.pugx.org/consolidation/log/license)](https://packagist.org/packages/consolidation/log) +[![Travis CI](https://travis-ci.org/consolidation/log.svg?branch=master)](https://travis-ci.org/consolidation/log) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/consolidation/log/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/consolidation/log/?branch=master) [![Coverage Status](https://coveralls.io/repos/github/consolidation/log/badge.svg?branch=master)](https://coveralls.io/github/consolidation/log?branch=master) [![License](https://poser.pugx.org/consolidation/log/license)](https://packagist.org/packages/consolidation/log) ## Component Status @@ -10,7 +10,7 @@ In use in [Robo](https://github.com/Codegyre/Robo). ## Motivation -Consolidation\Log provides a Psr-3 compatible logger that provides styled log output to the standard error (stderr) stream. By default, styling is provided by the SymfonyStyle class from the Symfony Console component; however, alternative stylers may be provided if desired. +Consolidation\Log provides a PSR-3 compatible logger that provides styled log output to the standard error (stderr) stream. By default, styling is provided by the SymfonyStyle class from the Symfony Console component; however, alternative stylers may be provided if desired. ## Usage ``` @@ -18,10 +18,17 @@ $logger = new \Consolidation\Log\Logger($output); $logger->setLogOutputStyler(new LogOutputStyler()); // optional $logger->warning('The file {name} does not exist.', ['name' => $filename]); ``` -String interpolation -- that is, the substitution of replacements, such as `{name}` in the example above, is not required by Psr-3, and is not implemented by default in the Psr\Log project. However, it is recommended by PRS-3, and is often done, e.g. in the Symfony Console logger. +String interpolation -- that is, the substitution of replacements, such as `{name}` in the example above, is not required by PSR-3, and is not implemented by default in the Psr\Log project. However, it is recommended by PRS-3, and is often done, e.g. in the Symfony Console logger. Consolidation\Log supports string interpolation. +A logger manager can be used to delegate all log messages to one or more loggers. +``` +$logger = new \Consolidation\Log\LoggerManager(); +$logger->add('default', new \Consolidation\Log\Logger($output)); +``` +This is useful if, for example, you need to inject a logger into application objects early (e.g. into a dependency injection container), but the output object to log to will not be available until later. + ## Comparison to Existing Solutions Many Symfony Console compoenents use SymfonyStyle to format their output messages. This helper class has methods named things like `success` and `warning`, making it seem like a natural choice for reporting status. diff --git a/vendor/consolidation/log/composer.json b/vendor/consolidation/log/composer.json index c7cfaef40..708e6d97b 100644 --- a/vendor/consolidation/log/composer.json +++ b/vendor/consolidation/log/composer.json @@ -19,15 +19,15 @@ } }, "require": { - "php": ">=5.5.0", - "psr/log": "~1.0", + "php": ">=5.4.5", + "psr/log": "^1.0", "symfony/console": "^2.8|^3|^4" }, "require-dev": { - "phpunit/phpunit": "4.*", - "g1a/composer-test-scenarios": "^1", - "satooshi/php-coveralls": "^2", - "squizlabs/php_codesniffer": "2.*" + "phpunit/phpunit": "^6", + "g1a/composer-test-scenarios": "^3", + "php-coveralls/php-coveralls": "^1", + "squizlabs/php_codesniffer": "^2" }, "minimum-stability": "stable", "scripts": { @@ -42,21 +42,59 @@ "@lint", "@unit", "@cs" - ], - "scenario": "scenarios/install", - "post-update-cmd": [ - "create-scenario symfony4 'symfony/console:^4.0'", - "create-scenario symfony2 'symfony/console:^2.8' --platform-php '5.5' --no-lockfile" ] }, "extra": { + "scenarios": { + "symfony4": { + "require": { + "symfony/console": "^4.0" + }, + "config": { + "platform": { + "php": "7.1.3" + } + } + }, + "symfony2": { + "require": { + "symfony/console": "^2.8" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.36" + }, + "remove": [ + "php-coveralls/php-coveralls" + ], + "config": { + "platform": { + "php": "5.4.8" + } + } + }, + "phpunit4": { + "require-dev": { + "phpunit/phpunit": "^4.8.36" + }, + "remove": [ + "php-coveralls/php-coveralls" + ], + "config": { + "platform": { + "php": "5.4.8" + } + } + } + }, "branch-alias": { "dev-master": "1.x-dev" } }, "config": { + "optimize-autoloader": true, + "sort-packages": true, "platform": { - "php": "5.6" + "php": "7.0.8" } } } diff --git a/vendor/consolidation/log/composer.lock b/vendor/consolidation/log/composer.lock index 6122e9db9..45b0a32d9 100644 --- a/vendor/consolidation/log/composer.lock +++ b/vendor/consolidation/log/composer.lock @@ -4,20 +4,20 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "853c56045ad6495cf7aa37fe766580ef", + "content-hash": "c49e4b63e4960c38c6bf13a0929eff93", "packages": [ { "name": "psr/log", - "version": "1.0.2", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" + "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", + "url": "https://api.github.com/repos/php-fig/log/zipball/6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", + "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", "shasum": "" }, "require": { @@ -51,20 +51,20 @@ "psr", "psr-3" ], - "time": "2016-10-10T12:19:37+00:00" + "time": "2018-11-20T15:27:04+00:00" }, { "name": "symfony/console", - "version": "v3.4.11", + "version": "v3.4.20", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "36f83f642443c46f3cf751d4d2ee5d047d757a27" + "reference": "8f80fc39bbc3b7c47ee54ba7aa2653521ace94bb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/36f83f642443c46f3cf751d4d2ee5d047d757a27", - "reference": "36f83f642443c46f3cf751d4d2ee5d047d757a27", + "url": "https://api.github.com/repos/symfony/console/zipball/8f80fc39bbc3b7c47ee54ba7aa2653521ace94bb", + "reference": "8f80fc39bbc3b7c47ee54ba7aa2653521ace94bb", "shasum": "" }, "require": { @@ -120,20 +120,20 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2018-05-16T08:49:21+00:00" + "time": "2018-11-26T12:48:07+00:00" }, { "name": "symfony/debug", - "version": "v3.4.11", + "version": "v3.4.20", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "b28fd73fefbac341f673f5efd707d539d6a19f68" + "reference": "a2233f555ddf55e5600f386fba7781cea1cb82d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/b28fd73fefbac341f673f5efd707d539d6a19f68", - "reference": "b28fd73fefbac341f673f5efd707d539d6a19f68", + "url": "https://api.github.com/repos/symfony/debug/zipball/a2233f555ddf55e5600f386fba7781cea1cb82d3", + "reference": "a2233f555ddf55e5600f386fba7781cea1cb82d3", "shasum": "" }, "require": { @@ -176,20 +176,20 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "time": "2018-05-16T14:03:39+00:00" + "time": "2018-11-27T12:43:10+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.8.0", + "version": "v1.10.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "3296adf6a6454a050679cde90f95350ad604b171" + "reference": "c79c051f5b3a46be09205c73b80b346e4153e494" }, "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/c79c051f5b3a46be09205c73b80b346e4153e494", + "reference": "c79c051f5b3a46be09205c73b80b346e4153e494", "shasum": "" }, "require": { @@ -201,7 +201,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.8-dev" + "dev-master": "1.9-dev" } }, "autoload": { @@ -235,7 +235,7 @@ "portable", "shim" ], - "time": "2018-04-26T10:06:28+00:00" + "time": "2018-09-21T13:07:52+00:00" } ], "packages-dev": [ @@ -295,24 +295,43 @@ }, { "name": "g1a/composer-test-scenarios", - "version": "1.0.3", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/g1a/composer-test-scenarios.git", - "reference": "240841a15f332750d5f0499371f880e9ea5b18cc" + "reference": "224531e20d13a07942a989a70759f726cd2df9a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/g1a/composer-test-scenarios/zipball/240841a15f332750d5f0499371f880e9ea5b18cc", - "reference": "240841a15f332750d5f0499371f880e9ea5b18cc", + "url": "https://api.github.com/repos/g1a/composer-test-scenarios/zipball/224531e20d13a07942a989a70759f726cd2df9a1", + "reference": "224531e20d13a07942a989a70759f726cd2df9a1", "shasum": "" }, + "require": { + "composer-plugin-api": "^1.0.0", + "php": ">=5.4" + }, + "require-dev": { + "composer/composer": "^1.7", + "php-coveralls/php-coveralls": "^1.0", + "phpunit/phpunit": "^4.8.36|^6", + "squizlabs/php_codesniffer": "^2.8" + }, "bin": [ - "scripts/create-scenario", - "scripts/dependency-licenses", - "scripts/install-scenario" + "scripts/dependency-licenses" ], - "type": "library", + "type": "composer-plugin", + "extra": { + "class": "ComposerTestScenarios\\Plugin", + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "ComposerTestScenarios\\": "src/" + } + }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" @@ -324,47 +343,73 @@ } ], "description": "Useful scripts for testing multiple sets of Composer dependencies.", - "time": "2018-03-07T21:36:05+00:00" + "time": "2018-11-27T05:58:39+00:00" }, { - "name": "guzzlehttp/guzzle", - "version": "6.3.3", + "name": "guzzle/guzzle", + "version": "v3.9.3", "source": { "type": "git", - "url": "https://github.com/guzzle/guzzle.git", - "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba" + "url": "https://github.com/guzzle/guzzle3.git", + "reference": "0645b70d953bc1c067bbc8d5bc53194706b628d9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/407b0cb880ace85c9b63c5f9551db498cb2d50ba", - "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba", + "url": "https://api.github.com/repos/guzzle/guzzle3/zipball/0645b70d953bc1c067bbc8d5bc53194706b628d9", + "reference": "0645b70d953bc1c067bbc8d5bc53194706b628d9", "shasum": "" }, "require": { - "guzzlehttp/promises": "^1.0", - "guzzlehttp/psr7": "^1.4", - "php": ">=5.5" + "ext-curl": "*", + "php": ">=5.3.3", + "symfony/event-dispatcher": "~2.1" + }, + "replace": { + "guzzle/batch": "self.version", + "guzzle/cache": "self.version", + "guzzle/common": "self.version", + "guzzle/http": "self.version", + "guzzle/inflection": "self.version", + "guzzle/iterator": "self.version", + "guzzle/log": "self.version", + "guzzle/parser": "self.version", + "guzzle/plugin": "self.version", + "guzzle/plugin-async": "self.version", + "guzzle/plugin-backoff": "self.version", + "guzzle/plugin-cache": "self.version", + "guzzle/plugin-cookie": "self.version", + "guzzle/plugin-curlauth": "self.version", + "guzzle/plugin-error-response": "self.version", + "guzzle/plugin-history": "self.version", + "guzzle/plugin-log": "self.version", + "guzzle/plugin-md5": "self.version", + "guzzle/plugin-mock": "self.version", + "guzzle/plugin-oauth": "self.version", + "guzzle/service": "self.version", + "guzzle/stream": "self.version" }, "require-dev": { - "ext-curl": "*", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", - "psr/log": "^1.0" + "doctrine/cache": "~1.3", + "monolog/monolog": "~1.0", + "phpunit/phpunit": "3.7.*", + "psr/log": "~1.0", + "symfony/class-loader": "~2.1", + "zendframework/zend-cache": "2.*,<2.3", + "zendframework/zend-log": "2.*,<2.3" }, "suggest": { - "psr/log": "Required for using the Log middleware" + "guzzlehttp/guzzle": "Guzzle 5 has moved to a new package name. The package you have installed, Guzzle 3, is deprecated." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "6.3-dev" + "dev-master": "3.9-dev" } }, "autoload": { - "files": [ - "src/functions_include.php" - ], - "psr-4": { - "GuzzleHttp\\": "src/" + "psr-0": { + "Guzzle": "src/", + "Guzzle\\Tests": "tests/" } }, "notification-url": "https://packagist.org/downloads/", @@ -376,9 +421,13 @@ "name": "Michael Dowling", "email": "mtdowling@gmail.com", "homepage": "https://github.com/mtdowling" + }, + { + "name": "Guzzle Community", + "homepage": "https://github.com/guzzle/guzzle/contributors" } ], - "description": "Guzzle is a PHP HTTP client library", + "description": "PHP HTTP client. This library is deprecated in favor of https://packagist.org/packages/guzzlehttp/guzzle", "homepage": "http://guzzlephp.org/", "keywords": [ "client", @@ -389,123 +438,216 @@ "rest", "web service" ], - "time": "2018-04-22T15:46:56+00:00" + "abandoned": "guzzlehttp/guzzle", + "time": "2015-03-18T18:23:50+00:00" }, { - "name": "guzzlehttp/promises", - "version": "v1.3.1", + "name": "myclabs/deep-copy", + "version": "1.7.0", "source": { "type": "git", - "url": "https://github.com/guzzle/promises.git", - "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646" + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646", - "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e", + "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e", "shasum": "" }, "require": { - "php": ">=5.5.0" + "php": "^5.6 || ^7.0" }, "require-dev": { - "phpunit/phpunit": "^4.0" + "doctrine/collections": "^1.0", + "doctrine/common": "^2.6", + "phpunit/phpunit": "^4.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + }, + "files": [ + "src/DeepCopy/deep_copy.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "time": "2017-10-19T19:58:43+00:00" + }, + { + "name": "phar-io/manifest", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/2df402786ab5368a0169091f61a7c1e0eb6852d0", + "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-phar": "*", + "phar-io/version": "^1.0.1", + "php": "^5.6 || ^7.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { - "psr-4": { - "GuzzleHttp\\Promise\\": "src/" - }, - "files": [ - "src/functions_include.php" + "classmap": [ + "src/" ] }, "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "time": "2017-03-05T18:14:27+00:00" + }, + { + "name": "phar-io/version", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/a70c0ced4be299a63d32fa96d9281d03e94041df", + "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "time": "2017-03-05T17:38:23+00:00" + }, + { + "name": "php-coveralls/php-coveralls", + "version": "v1.1.0", + "source": { + "type": "git", + "url": "https://github.com/php-coveralls/php-coveralls.git", + "reference": "37f8f83fe22224eb9d9c6d593cdeb33eedd2a9ad" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-coveralls/php-coveralls/zipball/37f8f83fe22224eb9d9c6d593cdeb33eedd2a9ad", + "reference": "37f8f83fe22224eb9d9c6d593cdeb33eedd2a9ad", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-simplexml": "*", + "guzzle/guzzle": "^2.8 || ^3.0", + "php": "^5.3.3 || ^7.0", + "psr/log": "^1.0", + "symfony/config": "^2.1 || ^3.0 || ^4.0", + "symfony/console": "^2.1 || ^3.0 || ^4.0", + "symfony/stopwatch": "^2.0 || ^3.0 || ^4.0", + "symfony/yaml": "^2.0 || ^3.0 || ^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.4.3 || ^6.0" + }, + "suggest": { + "symfony/http-kernel": "Allows Symfony integration" + }, + "bin": [ + "bin/coveralls" + ], + "type": "library", + "autoload": { + "psr-4": { + "Satooshi\\": "src/Satooshi/" + } + }, + "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" + "name": "Kitamura Satoshi", + "email": "with.no.parachute@gmail.com", + "homepage": "https://www.facebook.com/satooshi.jp" } ], - "description": "Guzzle promises library", + "description": "PHP client library for Coveralls API", + "homepage": "https://github.com/php-coveralls/php-coveralls", "keywords": [ - "promise" + "ci", + "coverage", + "github", + "test" ], - "time": "2016-12-20T10:07:11+00:00" - }, - { - "name": "guzzlehttp/psr7", - "version": "1.4.2", - "source": { - "type": "git", - "url": "https://github.com/guzzle/psr7.git", - "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/f5b8a8512e2b58b0071a7280e39f14f72e05d87c", - "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c", - "shasum": "" - }, - "require": { - "php": ">=5.4.0", - "psr/http-message": "~1.0" - }, - "provide": { - "psr/http-message-implementation": "1.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, - "autoload": { - "psr-4": { - "GuzzleHttp\\Psr7\\": "src/" - }, - "files": [ - "src/functions_include.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "Tobias Schultze", - "homepage": "https://github.com/Tobion" - } - ], - "description": "PSR-7 message implementation that also provides common utility methods", - "keywords": [ - "http", - "message", - "request", - "response", - "stream", - "uri", - "url" - ], - "time": "2017-03-20T17:10:46+00:00" + "time": "2017-12-06T23:17:56+00:00" }, { "name": "phpdocumentor/reflection-common", @@ -563,29 +705,35 @@ }, { "name": "phpdocumentor/reflection-docblock", - "version": "3.3.2", + "version": "4.3.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "bf329f6c1aadea3299f08ee804682b7c45b326a2" + "reference": "94fd0001232e47129dd3504189fa1c7225010d08" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/bf329f6c1aadea3299f08ee804682b7c45b326a2", - "reference": "bf329f6c1aadea3299f08ee804682b7c45b326a2", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/94fd0001232e47129dd3504189fa1c7225010d08", + "reference": "94fd0001232e47129dd3504189fa1c7225010d08", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0", + "php": "^7.0", "phpdocumentor/reflection-common": "^1.0.0", "phpdocumentor/type-resolver": "^0.4.0", "webmozart/assert": "^1.0" }, "require-dev": { - "mockery/mockery": "^0.9.4", - "phpunit/phpunit": "^4.4" + "doctrine/instantiator": "~1.0.5", + "mockery/mockery": "^1.0", + "phpunit/phpunit": "^6.4" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.x-dev" + } + }, "autoload": { "psr-4": { "phpDocumentor\\Reflection\\": [ @@ -604,7 +752,7 @@ } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2017-11-10T14:09:06+00:00" + "time": "2017-11-30T07:14:17+00:00" }, { "name": "phpdocumentor/type-resolver", @@ -655,16 +803,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": { @@ -676,12 +824,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": { @@ -714,43 +862,44 @@ "spy", "stub" ], - "time": "2018-04-18T13:57:24+00:00" + "time": "2018-08-05T17:53:17+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "2.2.4", + "version": "5.3.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979" + "reference": "c89677919c5dd6d3b3852f230a663118762218ac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979", - "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/c89677919c5dd6d3b3852f230a663118762218ac", + "reference": "c89677919c5dd6d3b3852f230a663118762218ac", "shasum": "" }, "require": { - "php": ">=5.3.3", - "phpunit/php-file-iterator": "~1.3", - "phpunit/php-text-template": "~1.2", - "phpunit/php-token-stream": "~1.3", - "sebastian/environment": "^1.3.2", - "sebastian/version": "~1.0" + "ext-dom": "*", + "ext-xmlwriter": "*", + "php": "^7.0", + "phpunit/php-file-iterator": "^1.4.2", + "phpunit/php-text-template": "^1.2.1", + "phpunit/php-token-stream": "^2.0.1", + "sebastian/code-unit-reverse-lookup": "^1.0.1", + "sebastian/environment": "^3.0", + "sebastian/version": "^2.0.1", + "theseer/tokenizer": "^1.1" }, "require-dev": { - "ext-xdebug": ">=2.1.4", - "phpunit/phpunit": "~4" + "phpunit/phpunit": "^6.0" }, "suggest": { - "ext-dom": "*", - "ext-xdebug": ">=2.2.1", - "ext-xmlwriter": "*" + "ext-xdebug": "^2.5.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.2.x-dev" + "dev-master": "5.3.x-dev" } }, "autoload": { @@ -765,7 +914,7 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", + "email": "sebastian@phpunit.de", "role": "lead" } ], @@ -776,7 +925,7 @@ "testing", "xunit" ], - "time": "2015-10-06T15:47:00+00:00" + "time": "2018-04-06T15:36:58+00:00" }, { "name": "phpunit/php-file-iterator", @@ -917,29 +1066,29 @@ }, { "name": "phpunit/php-token-stream", - "version": "1.4.12", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "1ce90ba27c42e4e44e6d8458241466380b51fa16" + "reference": "791198a2c6254db10131eecfe8c06670700904db" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/1ce90ba27c42e4e44e6d8458241466380b51fa16", - "reference": "1ce90ba27c42e4e44e6d8458241466380b51fa16", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/791198a2c6254db10131eecfe8c06670700904db", + "reference": "791198a2c6254db10131eecfe8c06670700904db", "shasum": "" }, "require": { "ext-tokenizer": "*", - "php": ">=5.3.3" + "php": "^7.0" }, "require-dev": { - "phpunit/phpunit": "~4.2" + "phpunit/phpunit": "^6.2.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -962,45 +1111,57 @@ "keywords": [ "tokenizer" ], - "time": "2017-12-04T08:55:13+00:00" + "time": "2017-11-27T05:48:46+00:00" }, { "name": "phpunit/phpunit", - "version": "4.8.36", + "version": "6.5.13", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "46023de9a91eec7dfb06cc56cb4e260017298517" + "reference": "0973426fb012359b2f18d3bd1e90ef1172839693" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/46023de9a91eec7dfb06cc56cb4e260017298517", - "reference": "46023de9a91eec7dfb06cc56cb4e260017298517", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/0973426fb012359b2f18d3bd1e90ef1172839693", + "reference": "0973426fb012359b2f18d3bd1e90ef1172839693", "shasum": "" }, "require": { "ext-dom": "*", "ext-json": "*", - "ext-pcre": "*", - "ext-reflection": "*", - "ext-spl": "*", - "php": ">=5.3.3", - "phpspec/prophecy": "^1.3.1", - "phpunit/php-code-coverage": "~2.1", - "phpunit/php-file-iterator": "~1.4", - "phpunit/php-text-template": "~1.2", - "phpunit/php-timer": "^1.0.6", - "phpunit/phpunit-mock-objects": "~2.3", - "sebastian/comparator": "~1.2.2", - "sebastian/diff": "~1.2", - "sebastian/environment": "~1.3", - "sebastian/exporter": "~1.2", - "sebastian/global-state": "~1.0", - "sebastian/version": "~1.0", - "symfony/yaml": "~2.1|~3.0" + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "myclabs/deep-copy": "^1.6.1", + "phar-io/manifest": "^1.0.1", + "phar-io/version": "^1.0", + "php": "^7.0", + "phpspec/prophecy": "^1.7", + "phpunit/php-code-coverage": "^5.3", + "phpunit/php-file-iterator": "^1.4.3", + "phpunit/php-text-template": "^1.2.1", + "phpunit/php-timer": "^1.0.9", + "phpunit/phpunit-mock-objects": "^5.0.9", + "sebastian/comparator": "^2.1", + "sebastian/diff": "^2.0", + "sebastian/environment": "^3.1", + "sebastian/exporter": "^3.1", + "sebastian/global-state": "^2.0", + "sebastian/object-enumerator": "^3.0.3", + "sebastian/resource-operations": "^1.0", + "sebastian/version": "^2.0.1" + }, + "conflict": { + "phpdocumentor/reflection-docblock": "3.0.2", + "phpunit/dbunit": "<3.0" + }, + "require-dev": { + "ext-pdo": "*" }, "suggest": { - "phpunit/php-invoker": "~1.1" + "ext-xdebug": "*", + "phpunit/php-invoker": "^1.1" }, "bin": [ "phpunit" @@ -1008,7 +1169,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.8.x-dev" + "dev-master": "6.5.x-dev" } }, "autoload": { @@ -1034,30 +1195,33 @@ "testing", "xunit" ], - "time": "2017-06-21T08:07:12+00:00" + "time": "2018-09-08T15:10:43+00:00" }, { "name": "phpunit/phpunit-mock-objects", - "version": "2.3.8", + "version": "5.0.10", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983" + "reference": "cd1cf05c553ecfec36b170070573e540b67d3f1f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983", - "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/cd1cf05c553ecfec36b170070573e540b67d3f1f", + "reference": "cd1cf05c553ecfec36b170070573e540b67d3f1f", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.0.2", - "php": ">=5.3.3", - "phpunit/php-text-template": "~1.2", - "sebastian/exporter": "~1.2" + "doctrine/instantiator": "^1.0.5", + "php": "^7.0", + "phpunit/php-text-template": "^1.2.1", + "sebastian/exporter": "^3.1" + }, + "conflict": { + "phpunit/phpunit": "<6.0" }, "require-dev": { - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^6.5.11" }, "suggest": { "ext-soap": "*" @@ -1065,7 +1229,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.3.x-dev" + "dev-master": "5.0.x-dev" } }, "autoload": { @@ -1080,7 +1244,7 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", + "email": "sebastian@phpunit.de", "role": "lead" } ], @@ -1090,24 +1254,27 @@ "mock", "xunit" ], - "time": "2015-10-02T06:51:40+00:00" + "time": "2018-08-09T05:50:03+00:00" }, { - "name": "psr/http-message", + "name": "sebastian/code-unit-reverse-lookup", "version": "1.0.1", "source": { "type": "git", - "url": "https://github.com/php-fig/http-message.git", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", + "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7 || ^6.0" }, "type": "library", "extra": { @@ -1116,142 +1283,50 @@ } }, "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" } ], - "description": "Common interface for HTTP messages", - "homepage": "https://github.com/php-fig/http-message", - "keywords": [ - "http", - "http-message", - "psr", - "psr-7", - "request", - "response" - ], - "time": "2016-08-06T14:39:51+00:00" - }, - { - "name": "satooshi/php-coveralls", - "version": "v2.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-coveralls/php-coveralls.git", - "reference": "3eaf7eb689cdf6b86801a3843940d974dc657068" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-coveralls/php-coveralls/zipball/3eaf7eb689cdf6b86801a3843940d974dc657068", - "reference": "3eaf7eb689cdf6b86801a3843940d974dc657068", - "shasum": "" - }, - "require": { - "ext-json": "*", - "ext-simplexml": "*", - "guzzlehttp/guzzle": "^6.0", - "php": "^5.5 || ^7.0", - "psr/log": "^1.0", - "symfony/config": "^2.1 || ^3.0 || ^4.0", - "symfony/console": "^2.1 || ^3.0 || ^4.0", - "symfony/stopwatch": "^2.0 || ^3.0 || ^4.0", - "symfony/yaml": "^2.0 || ^3.0 || ^4.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.4.3 || ^6.0" - }, - "suggest": { - "symfony/http-kernel": "Allows Symfony integration" - }, - "bin": [ - "bin/php-coveralls" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "psr-4": { - "PhpCoveralls\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Kitamura Satoshi", - "email": "with.no.parachute@gmail.com", - "homepage": "https://www.facebook.com/satooshi.jp", - "role": "Original creator" - }, - { - "name": "Takashi Matsuo", - "email": "tmatsuo@google.com" - }, - { - "name": "Google Inc" - }, - { - "name": "Dariusz Ruminski", - "email": "dariusz.ruminski@gmail.com", - "homepage": "https://github.com/keradus" - }, - { - "name": "Contributors", - "homepage": "https://github.com/php-coveralls/php-coveralls/graphs/contributors" - } - ], - "description": "PHP client library for Coveralls API", - "homepage": "https://github.com/php-coveralls/php-coveralls", - "keywords": [ - "ci", - "coverage", - "github", - "test" - ], - "abandoned": "php-coveralls/php-coveralls", - "time": "2017-12-08T14:28:16+00:00" + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "time": "2017-03-04T06:30:41+00:00" }, { "name": "sebastian/comparator", - "version": "1.2.4", + "version": "2.1.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be" + "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", - "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/34369daee48eafb2651bea869b4b15d75ccc35f9", + "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9", "shasum": "" }, "require": { - "php": ">=5.3.3", - "sebastian/diff": "~1.2", - "sebastian/exporter": "~1.2 || ~2.0" + "php": "^7.0", + "sebastian/diff": "^2.0 || ^3.0", + "sebastian/exporter": "^3.1" }, "require-dev": { - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^6.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2.x-dev" + "dev-master": "2.1.x-dev" } }, "autoload": { @@ -1282,38 +1357,38 @@ } ], "description": "Provides the functionality to compare PHP values for equality", - "homepage": "http://www.github.com/sebastianbergmann/comparator", + "homepage": "https://github.com/sebastianbergmann/comparator", "keywords": [ "comparator", "compare", "equality" ], - "time": "2017-01-29T09:50:25+00:00" + "time": "2018-02-01T13:46:46+00:00" }, { "name": "sebastian/diff", - "version": "1.4.3", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4" + "reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7f066a26a962dbe58ddea9f72a4e82874a3975a4", - "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/347c1d8b49c5c3ee30c7040ea6fc446790e6bddd", + "reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0" + "php": "^7.0" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + "phpunit/phpunit": "^6.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -1340,32 +1415,32 @@ "keywords": [ "diff" ], - "time": "2017-05-22T07:24:03+00:00" + "time": "2017-08-03T08:09:46+00:00" }, { "name": "sebastian/environment", - "version": "1.3.8", + "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea" + "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/be2c607e43ce4c89ecd60e75c6a85c126e754aea", - "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/cd0871b3975fb7fc44d11314fd1ee20925fce4f5", + "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0" + "php": "^7.0" }, "require-dev": { - "phpunit/phpunit": "^4.8 || ^5.0" + "phpunit/phpunit": "^6.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3.x-dev" + "dev-master": "3.1.x-dev" } }, "autoload": { @@ -1390,34 +1465,34 @@ "environment", "hhvm" ], - "time": "2016-08-18T05:49:44+00:00" + "time": "2017-07-01T08:51:00+00:00" }, { "name": "sebastian/exporter", - "version": "1.2.2", + "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4" + "reference": "234199f4528de6d12aaa58b612e98f7d36adb937" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4", - "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/234199f4528de6d12aaa58b612e98f7d36adb937", + "reference": "234199f4528de6d12aaa58b612e98f7d36adb937", "shasum": "" }, "require": { - "php": ">=5.3.3", - "sebastian/recursion-context": "~1.0" + "php": "^7.0", + "sebastian/recursion-context": "^3.0" }, "require-dev": { "ext-mbstring": "*", - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3.x-dev" + "dev-master": "3.1.x-dev" } }, "autoload": { @@ -1457,27 +1532,27 @@ "export", "exporter" ], - "time": "2016-06-17T09:04:28+00:00" + "time": "2017-04-03T13:19:02+00:00" }, { "name": "sebastian/global-state", - "version": "1.1.1", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" + "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", - "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", + "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^7.0" }, "require-dev": { - "phpunit/phpunit": "~4.2" + "phpunit/phpunit": "^6.0" }, "suggest": { "ext-uopz": "*" @@ -1485,7 +1560,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -1508,32 +1583,124 @@ "keywords": [ "global state" ], - "time": "2015-10-12T03:26:01+00:00" + "time": "2017-04-27T15:39:26+00:00" }, { - "name": "sebastian/recursion-context", - "version": "1.0.5", + "name": "sebastian/object-enumerator", + "version": "3.0.3", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7" + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/b19cc3298482a335a95f3016d2f8a6950f0fbcd7", - "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/7cfd9e65d11ffb5af41198476395774d4c8a84c5", + "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^7.0", + "sebastian/object-reflector": "^1.1.1", + "sebastian/recursion-context": "^3.0" }, "require-dev": { - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "^6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "3.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "time": "2017-08-03T12:35:26+00:00" + }, + { + "name": "sebastian/object-reflector", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "773f97c67f28de00d397be301821b06708fca0be" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/773f97c67f28de00d397be301821b06708fca0be", + "reference": "773f97c67f28de00d397be301821b06708fca0be", + "shasum": "" + }, + "require": { + "php": "^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "time": "2017-03-29T09:07:27+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", + "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", + "shasum": "" + }, + "require": { + "php": "^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" } }, "autoload": { @@ -1561,23 +1728,73 @@ ], "description": "Provides functionality to recursively process PHP variables", "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2016-10-03T07:41:43+00:00" + "time": "2017-03-03T06:23:57+00:00" }, { - "name": "sebastian/version", - "version": "1.0.6", + "name": "sebastian/resource-operations", + "version": "1.0.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", + "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", "shasum": "" }, + "require": { + "php": ">=5.6.0" + }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "time": "2015-07-28T20:34:47+00:00" + }, + { + "name": "sebastian/version", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, "autoload": { "classmap": [ "src/" @@ -1596,20 +1813,20 @@ ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", - "time": "2015-06-21T13:59:46+00:00" + "time": "2016-10-03T07:35:21+00:00" }, { "name": "squizlabs/php_codesniffer", - "version": "2.9.1", + "version": "2.9.2", "source": { "type": "git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "dcbed1074f8244661eecddfc2a675430d8d33f62" + "reference": "2acf168de78487db620ab4bc524135a13cfe6745" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/dcbed1074f8244661eecddfc2a675430d8d33f62", - "reference": "dcbed1074f8244661eecddfc2a675430d8d33f62", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/2acf168de78487db620ab4bc524135a13cfe6745", + "reference": "2acf168de78487db620ab4bc524135a13cfe6745", "shasum": "" }, "require": { @@ -1674,20 +1891,20 @@ "phpcs", "standards" ], - "time": "2017-05-22T02:43:20+00:00" + "time": "2018-11-07T22:31:41+00:00" }, { "name": "symfony/config", - "version": "v3.4.11", + "version": "v3.4.20", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "73e055cf2e6467715f187724a0347ea32079967c" + "reference": "8a660daeb65dedbe0b099529f65e61866c055081" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/73e055cf2e6467715f187724a0347ea32079967c", - "reference": "73e055cf2e6467715f187724a0347ea32079967c", + "url": "https://api.github.com/repos/symfony/config/zipball/8a660daeb65dedbe0b099529f65e61866c055081", + "reference": "8a660daeb65dedbe0b099529f65e61866c055081", "shasum": "" }, "require": { @@ -1738,20 +1955,80 @@ ], "description": "Symfony Config Component", "homepage": "https://symfony.com", - "time": "2018-05-14T16:49:53+00:00" + "time": "2018-11-26T10:17:44+00:00" }, { - "name": "symfony/filesystem", - "version": "v3.4.11", + "name": "symfony/event-dispatcher", + "version": "v2.8.49", "source": { "type": "git", - "url": "https://github.com/symfony/filesystem.git", - "reference": "8e03ca3fa52a0f56b87506f38cf7bd3f9442b3a0" + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "a77e974a5fecb4398833b0709210e3d5e334ffb0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/8e03ca3fa52a0f56b87506f38cf7bd3f9442b3a0", - "reference": "8e03ca3fa52a0f56b87506f38cf7bd3f9442b3a0", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/a77e974a5fecb4398833b0709210e3d5e334ffb0", + "reference": "a77e974a5fecb4398833b0709210e3d5e334ffb0", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "^2.0.5|~3.0.0", + "symfony/dependency-injection": "~2.6|~3.0.0", + "symfony/expression-language": "~2.6|~3.0.0", + "symfony/stopwatch": "~2.3|~3.0.0" + }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\EventDispatcher\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony EventDispatcher Component", + "homepage": "https://symfony.com", + "time": "2018-11-21T14:20:20+00:00" + }, + { + "name": "symfony/filesystem", + "version": "v3.4.20", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "b49b1ca166bd109900e6a1683d9bb1115727ef2d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/b49b1ca166bd109900e6a1683d9bb1115727ef2d", + "reference": "b49b1ca166bd109900e6a1683d9bb1115727ef2d", "shasum": "" }, "require": { @@ -1788,29 +2065,32 @@ ], "description": "Symfony Filesystem Component", "homepage": "https://symfony.com", - "time": "2018-05-16T08:49:21+00:00" + "time": "2018-11-11T19:48:54+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.8.0", + "version": "v1.10.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": { @@ -1843,20 +2123,20 @@ "polyfill", "portable" ], - "time": "2018-04-30T19:57:29+00:00" + "time": "2018-08-06T14:22:27+00:00" }, { "name": "symfony/stopwatch", - "version": "v3.4.11", + "version": "v3.4.20", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "eb17cfa072cab26537ac37e9c4ece6c0361369af" + "reference": "0f43969ab2718de55c1c1158dce046668079788d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/eb17cfa072cab26537ac37e9c4ece6c0361369af", - "reference": "eb17cfa072cab26537ac37e9c4ece6c0361369af", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/0f43969ab2718de55c1c1158dce046668079788d", + "reference": "0f43969ab2718de55c1c1158dce046668079788d", "shasum": "" }, "require": { @@ -1892,20 +2172,20 @@ ], "description": "Symfony Stopwatch Component", "homepage": "https://symfony.com", - "time": "2018-02-17T14:55:25+00:00" + "time": "2018-11-11T19:48:54+00:00" }, { "name": "symfony/yaml", - "version": "v3.4.11", + "version": "v3.4.20", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "c5010cc1692ce1fa328b1fb666961eb3d4a85bb0" + "reference": "291e13d808bec481eab83f301f7bff3e699ef603" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/c5010cc1692ce1fa328b1fb666961eb3d4a85bb0", - "reference": "c5010cc1692ce1fa328b1fb666961eb3d4a85bb0", + "url": "https://api.github.com/repos/symfony/yaml/zipball/291e13d808bec481eab83f301f7bff3e699ef603", + "reference": "291e13d808bec481eab83f301f7bff3e699ef603", "shasum": "" }, "require": { @@ -1951,24 +2231,65 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2018-05-03T23:18:14+00:00" + "time": "2018-11-11T19:48:54+00:00" }, { - "name": "webmozart/assert", - "version": "1.3.0", + "name": "theseer/tokenizer", + "version": "1.1.0", "source": { "type": "git", - "url": "https://github.com/webmozart/assert.git", - "reference": "0df1908962e7a3071564e857d86874dad1ef204a" + "url": "https://github.com/theseer/tokenizer.git", + "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/0df1908962e7a3071564e857d86874dad1ef204a", - "reference": "0df1908962e7a3071564e857d86874dad1ef204a", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/cb2f008f3f05af2893a87208fe6a6c4985483f8b", + "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0" + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + } + ], + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "time": "2017-04-07T12:08:54+00:00" + }, + { + "name": "webmozart/assert", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://github.com/webmozart/assert.git", + "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozart/assert/zipball/83e253c8e0be5b0257b881e1827274667c5c17a9", + "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0", + "symfony/polyfill-ctype": "^1.8" }, "require-dev": { "phpunit/phpunit": "^4.6", @@ -2001,7 +2322,7 @@ "check", "validate" ], - "time": "2018-01-29T19:49:41+00:00" + "time": "2018-12-25T11:19:39+00:00" } ], "aliases": [], @@ -2010,10 +2331,10 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=5.5.0" + "php": ">=5.4.5" }, "platform-dev": [], "platform-overrides": { - "php": "5.6" + "php": "7.0.8" } } diff --git a/vendor/consolidation/log/phpunit.xml.dist b/vendor/consolidation/log/phpunit.xml.dist index 73f3e76a6..2820535a6 100644 --- a/vendor/consolidation/log/phpunit.xml.dist +++ b/vendor/consolidation/log/phpunit.xml.dist @@ -1,7 +1,7 @@ - tests + tests diff --git a/vendor/consolidation/log/scenarios/install b/vendor/consolidation/log/scenarios/install deleted file mode 100755 index e921ec0cb..000000000 --- a/vendor/consolidation/log/scenarios/install +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -SCENARIO=$1 -ACTION=${2-install} - -dir=scenarios/${SCENARIO} -if [ -z "$SCENARIO" ] ; then - SCENARIO=default - dir=. -fi - - -if [ ! -d "$dir" ] ; then - echo "Requested scenario '${SCENARIO}' does not exist." - exit 1 -fi - -echo -echo "::" -echo ":: Switch to ${SCENARIO} scenario" -echo "::" -echo - -set -ex - -composer -n validate --working-dir=$dir --no-check-all --ansi -composer -n --working-dir=$dir ${ACTION} --prefer-dist --no-scripts -composer -n --working-dir=$dir info diff --git a/vendor/consolidation/log/scenarios/symfony4/.gitignore b/vendor/consolidation/log/scenarios/symfony4/.gitignore deleted file mode 100644 index 22d0d82f8..000000000 --- a/vendor/consolidation/log/scenarios/symfony4/.gitignore +++ /dev/null @@ -1 +0,0 @@ -vendor diff --git a/vendor/consolidation/log/src/Logger.php b/vendor/consolidation/log/src/Logger.php index 4f11d4787..9d3cf5aff 100644 --- a/vendor/consolidation/log/src/Logger.php +++ b/vendor/consolidation/log/src/Logger.php @@ -22,7 +22,7 @@ use Symfony\Component\Console\Input\StringInput; * * @author Greg Anderson */ -class Logger extends AbstractLogger // extends ConsoleLogger +class Logger extends AbstractLogger implements StylableLoggerInterface // extends ConsoleLogger { /** * @var OutputInterface diff --git a/vendor/consolidation/log/src/LoggerManager.php b/vendor/consolidation/log/src/LoggerManager.php new file mode 100644 index 000000000..920206430 --- /dev/null +++ b/vendor/consolidation/log/src/LoggerManager.php @@ -0,0 +1,121 @@ + + */ +class LoggerManager extends AbstractLogger implements StylableLoggerInterface +{ + /** @var LoggerInterface[] */ + protected $loggers = []; + /** @var LoggerInterface */ + protected $fallbackLogger = null; + /** @var LogOutputStylerInterface */ + protected $outputStyler; + /** @var array */ + protected $formatFunctionMap = []; + + /** + * reset removes all loggers from the manager. + */ + public function reset() + { + $this->loggers = []; + return $this; + } + + /** + * setLogOutputStyler will remember a style that + * should be applied to every stylable logger + * added to this manager. + */ + public function setLogOutputStyler(LogOutputStylerInterface $outputStyler, array $formatFunctionMap = array()) + { + $this->outputStyler = $outputStyler; + $this->formatFunctionMap = $this->formatFunctionMap; + } + + /** + * add adds a named logger to the manager, + * replacing any logger of the same name. + * + * @param string $name Name of logger to add + * @param LoggerInterface $logger Logger to send messages to + */ + public function add($name, LoggerInterface $logger) + { + // If this manager has been given a log style, + // and the logger being added accepts a log + // style, then copy our style to the logger + // being added. + if ($this->outputStyler && $logger instanceof StylableLoggerInterface) { + $logger->setLogOutputStyler($this->outputStyler, $this->formatFunctionMap); + } + $this->loggers[$name] = $logger; + return $this; + } + + /** + * remove a named logger from the manager. + * + * @param string $name Name of the logger to remove. + */ + public function remove($name) + { + unset($this->loggers[$name]); + return $this; + } + + /** + * fallbackLogger provides a logger that will + * be used only in instances where someone logs + * to the logger manager at a time when there + * are no other loggers registered. If there is + * no fallback logger, then the log messages + * are simply dropped. + * + * @param LoggerInterface $logger Logger to use as the fallback logger + */ + public function fallbackLogger(LoggerInterface $logger) + { + $this->fallbackLogger = $logger; + return $this; + } + + /** + * {@inheritdoc} + */ + public function log($level, $message, array $context = array()) + { + foreach ($this->getLoggers() as $logger) { + $logger->log($level, $message, $context); + } + } + + /** + * Return either the list of registered loggers, + * or a single-element list containing only the + * fallback logger. + */ + protected function getLoggers() + { + if (!empty($this->loggers)) { + return $this->loggers; + } + if (isset($this->fallbackLogger)) { + return [ $this->fallbackLogger ]; + } + return []; + } +} diff --git a/vendor/consolidation/log/src/StylableLoggerInterface.php b/vendor/consolidation/log/src/StylableLoggerInterface.php new file mode 100644 index 000000000..9b872846d --- /dev/null +++ b/vendor/consolidation/log/src/StylableLoggerInterface.php @@ -0,0 +1,16 @@ + + */ +interface StylableLoggerInterface +{ + public function setLogOutputStyler(LogOutputStylerInterface $outputStyler, array $formatFunctionMap = array()); +} diff --git a/vendor/consolidation/log/tests/testLogMethods.php b/vendor/consolidation/log/tests/LogMethodTests.php similarity index 95% rename from vendor/consolidation/log/tests/testLogMethods.php rename to vendor/consolidation/log/tests/LogMethodTests.php index 5c7e19f04..40df315b9 100644 --- a/vendor/consolidation/log/tests/testLogMethods.php +++ b/vendor/consolidation/log/tests/LogMethodTests.php @@ -3,8 +3,9 @@ namespace Consolidation\Log; use Symfony\Component\Console\Output\BufferedOutput; use Symfony\Component\Console\Output\OutputInterface; +use PHPUnit\Framework\TestCase; -class LogMethodTests extends \PHPUnit_Framework_TestCase +class LogMethodTests extends TestCase { protected $output; protected $logger; diff --git a/vendor/consolidation/log/tests/LoggerManagerTests.php b/vendor/consolidation/log/tests/LoggerManagerTests.php new file mode 100644 index 000000000..fa2efabfe --- /dev/null +++ b/vendor/consolidation/log/tests/LoggerManagerTests.php @@ -0,0 +1,69 @@ +setVerbosity(OutputInterface::VERBOSITY_DEBUG); + $fallbackLogger = new Logger($fallbackOutput); + $fallbackLogger->notice('This is the fallback logger'); + + $primaryOutput = new BufferedOutput(); + $primaryOutput->setVerbosity(OutputInterface::VERBOSITY_DEBUG); + $primaryLogger = new Logger($primaryOutput); + $primaryLogger->notice('This is the primary logger'); + + $replacementOutput = new BufferedOutput(); + $replacementOutput->setVerbosity(OutputInterface::VERBOSITY_DEBUG); + $replacementLogger = new Logger($replacementOutput); + $replacementLogger->notice('This is the replacement logger'); + + $logger = new LoggerManager(); + + $logger->notice('Uninitialized logger.'); + $logger->fallbackLogger($fallbackLogger); + $logger->notice('Logger with fallback.'); + $logger->add('default', $primaryLogger); + $logger->notice('Primary logger'); + $logger->add('default', $replacementLogger); + $logger->notice('Replaced logger'); + $logger->reset(); + $logger->notice('Reset loggers'); + + $fallbackActual = rtrim($fallbackOutput->fetch()); + $primaryActual = rtrim($primaryOutput->fetch()); + $replacementActual = rtrim($replacementOutput->fetch()); + + $actual = "Fallback:\n====\n$fallbackActual\nPrimary:\n====\n$primaryActual\nReplacement:\n====\n$replacementActual"; + + $actual = preg_replace('# *$#ms', '', $actual); + $actual = preg_replace('#^ *$\n#ms', '', $actual); + + $expected = <<< __EOT__ +Fallback: +==== + ! [NOTE] This is the fallback logger + ! [NOTE] Logger with fallback. + ! [NOTE] Reset loggers +Primary: +==== + ! [NOTE] This is the primary logger + ! [NOTE] Primary logger +Replacement: +==== + ! [NOTE] This is the replacement logger + ! [NOTE] Replaced logger +__EOT__; + + $this->assertEquals($expected, $actual); + } +} diff --git a/vendor/consolidation/log/tests/testLoggerVerbosityAndStyles.php b/vendor/consolidation/log/tests/LoggerVerbosityAndStyleTests.php similarity index 98% rename from vendor/consolidation/log/tests/testLoggerVerbosityAndStyles.php rename to vendor/consolidation/log/tests/LoggerVerbosityAndStyleTests.php index 5b17fcfff..1a96c2a89 100644 --- a/vendor/consolidation/log/tests/testLoggerVerbosityAndStyles.php +++ b/vendor/consolidation/log/tests/LoggerVerbosityAndStyleTests.php @@ -4,10 +4,11 @@ namespace Consolidation\Log; use Psr\Log\LogLevel; use Symfony\Component\Console\Output\BufferedOutput; use Symfony\Component\Console\Output\OutputInterface; +use PHPUnit\Framework\TestCase; use Consolidation\TestUtils\TestDataPermuter; -class LoggerVerbosityAndStyleTests extends \PHPUnit_Framework_TestCase +class LoggerVerbosityAndStyleTests extends TestCase { protected $output; protected $logger; diff --git a/vendor/consolidation/robo/.scenarios.lock/symfony2/composer.json b/vendor/consolidation/robo/.scenarios.lock/symfony2/composer.json index fc999844c..98c5121a0 100644 --- a/vendor/consolidation/robo/.scenarios.lock/symfony2/composer.json +++ b/vendor/consolidation/robo/.scenarios.lock/symfony2/composer.json @@ -28,7 +28,7 @@ "league/container": "^2.2", "consolidation/log": "~1", "consolidation/config": "^1.0.10", - "consolidation/annotated-command": "^2.8.2", + "consolidation/annotated-command": "^2.10.2", "consolidation/output-formatters": "^3.1.13", "consolidation/self-update": "^1", "grasmash/yaml-expander": "^1.3", @@ -77,7 +77,7 @@ }, "extra": { "branch-alias": { - "dev-master": "1.x-dev" + "dev-master": "2.x-dev" } }, "suggest": { diff --git a/vendor/consolidation/robo/.scenarios.lock/symfony4/composer.json b/vendor/consolidation/robo/.scenarios.lock/symfony4/composer.json index 2e128b86d..f8cd08bbb 100644 --- a/vendor/consolidation/robo/.scenarios.lock/symfony4/composer.json +++ b/vendor/consolidation/robo/.scenarios.lock/symfony4/composer.json @@ -28,7 +28,7 @@ "league/container": "^2.2", "consolidation/log": "~1", "consolidation/config": "^1.0.10", - "consolidation/annotated-command": "^2.8.2", + "consolidation/annotated-command": "^2.10.2", "consolidation/output-formatters": "^3.1.13", "consolidation/self-update": "^1", "grasmash/yaml-expander": "^1.3", @@ -78,7 +78,7 @@ }, "extra": { "branch-alias": { - "dev-master": "1.x-dev" + "dev-master": "2.x-dev" } }, "suggest": { diff --git a/vendor/consolidation/robo/.scenarios.lock/symfony4/composer.lock b/vendor/consolidation/robo/.scenarios.lock/symfony4/composer.lock index 034d18d6f..91ed61949 100644 --- a/vendor/consolidation/robo/.scenarios.lock/symfony4/composer.lock +++ b/vendor/consolidation/robo/.scenarios.lock/symfony4/composer.lock @@ -4,20 +4,20 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "7dc7608acabca5feeb8dc77bfe4e8584", + "content-hash": "1a9adc60403e6c6b6117a465e9afca9f", "packages": [ { "name": "consolidation/annotated-command", - "version": "2.10.0", + "version": "2.11.0", "source": { "type": "git", "url": "https://github.com/consolidation/annotated-command.git", - "reference": "8e7d1a05230dc1159c751809e98b74f2b7f71873" + "reference": "edea407f57104ed518cc3c3b47d5b84403ee267a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/consolidation/annotated-command/zipball/8e7d1a05230dc1159c751809e98b74f2b7f71873", - "reference": "8e7d1a05230dc1159c751809e98b74f2b7f71873", + "url": "https://api.github.com/repos/consolidation/annotated-command/zipball/edea407f57104ed518cc3c3b47d5b84403ee267a", + "reference": "edea407f57104ed518cc3c3b47d5b84403ee267a", "shasum": "" }, "require": { @@ -29,13 +29,57 @@ "symfony/finder": "^2.5|^3|^4" }, "require-dev": { - "g1a/composer-test-scenarios": "^2", + "g1a/composer-test-scenarios": "^3", + "php-coveralls/php-coveralls": "^1", "phpunit/phpunit": "^6", - "satooshi/php-coveralls": "^2", "squizlabs/php_codesniffer": "^2.7" }, "type": "library", "extra": { + "scenarios": { + "symfony4": { + "require": { + "symfony/console": "^4.0" + }, + "config": { + "platform": { + "php": "7.1.3" + } + } + }, + "symfony2": { + "require": { + "symfony/console": "^2.8" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.36" + }, + "remove": [ + "php-coveralls/php-coveralls" + ], + "config": { + "platform": { + "php": "5.4.8" + } + }, + "scenario-options": { + "create-lockfile": "false" + } + }, + "phpunit4": { + "require-dev": { + "phpunit/phpunit": "^4.8.36" + }, + "remove": [ + "php-coveralls/php-coveralls" + ], + "config": { + "platform": { + "php": "5.4.8" + } + } + } + }, "branch-alias": { "dev-master": "2.x-dev" } @@ -56,7 +100,7 @@ } ], "description": "Initialize Symfony Console commands from annotated command class methods.", - "time": "2018-11-15T01:46:18+00:00" + "time": "2018-12-29T04:43:17+00:00" }, { "name": "consolidation/config", @@ -114,31 +158,72 @@ }, { "name": "consolidation/log", - "version": "1.0.6", + "version": "1.1.1", "source": { "type": "git", "url": "https://github.com/consolidation/log.git", - "reference": "dfd8189a771fe047bf3cd669111b2de5f1c79395" + "reference": "b2e887325ee90abc96b0a8b7b474cd9e7c896e3a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/consolidation/log/zipball/dfd8189a771fe047bf3cd669111b2de5f1c79395", - "reference": "dfd8189a771fe047bf3cd669111b2de5f1c79395", + "url": "https://api.github.com/repos/consolidation/log/zipball/b2e887325ee90abc96b0a8b7b474cd9e7c896e3a", + "reference": "b2e887325ee90abc96b0a8b7b474cd9e7c896e3a", "shasum": "" }, "require": { - "php": ">=5.5.0", - "psr/log": "~1.0", + "php": ">=5.4.5", + "psr/log": "^1.0", "symfony/console": "^2.8|^3|^4" }, "require-dev": { - "g1a/composer-test-scenarios": "^1", - "phpunit/phpunit": "4.*", - "satooshi/php-coveralls": "^2", - "squizlabs/php_codesniffer": "2.*" + "g1a/composer-test-scenarios": "^3", + "php-coveralls/php-coveralls": "^1", + "phpunit/phpunit": "^6", + "squizlabs/php_codesniffer": "^2" }, "type": "library", "extra": { + "scenarios": { + "symfony4": { + "require": { + "symfony/console": "^4.0" + }, + "config": { + "platform": { + "php": "7.1.3" + } + } + }, + "symfony2": { + "require": { + "symfony/console": "^2.8" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.36" + }, + "remove": [ + "php-coveralls/php-coveralls" + ], + "config": { + "platform": { + "php": "5.4.8" + } + } + }, + "phpunit4": { + "require-dev": { + "phpunit/phpunit": "^4.8.36" + }, + "remove": [ + "php-coveralls/php-coveralls" + ], + "config": { + "platform": { + "php": "5.4.8" + } + } + } + }, "branch-alias": { "dev-master": "1.x-dev" } @@ -159,7 +244,7 @@ } ], "description": "Improved Psr-3 / Psr\\Log logger based on Symfony Console components.", - "time": "2018-05-25T18:14:39+00:00" + "time": "2019-01-01T17:30:51+00:00" }, { "name": "consolidation/output-formatters", @@ -615,20 +700,21 @@ }, { "name": "symfony/console", - "version": "v4.1.7", + "version": "v4.2.1", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "432122af37d8cd52fba1b294b11976e0d20df595" + "reference": "4dff24e5d01e713818805c1862d2e3f901ee7dd0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/432122af37d8cd52fba1b294b11976e0d20df595", - "reference": "432122af37d8cd52fba1b294b11976e0d20df595", + "url": "https://api.github.com/repos/symfony/console/zipball/4dff24e5d01e713818805c1862d2e3f901ee7dd0", + "reference": "4dff24e5d01e713818805c1862d2e3f901ee7dd0", "shasum": "" }, "require": { "php": "^7.1.3", + "symfony/contracts": "^1.0", "symfony/polyfill-mbstring": "~1.0" }, "conflict": { @@ -652,7 +738,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "4.2-dev" } }, "autoload": { @@ -679,25 +765,94 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2018-10-31T09:30:44+00:00" + "time": "2018-11-27T07:40:44+00:00" }, { - "name": "symfony/event-dispatcher", - "version": "v4.1.7", + "name": "symfony/contracts", + "version": "v1.0.2", "source": { "type": "git", - "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "552541dad078c85d9414b09c041ede488b456cd5" + "url": "https://github.com/symfony/contracts.git", + "reference": "1aa7ab2429c3d594dd70689604b5cf7421254cdf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/552541dad078c85d9414b09c041ede488b456cd5", - "reference": "552541dad078c85d9414b09c041ede488b456cd5", + "url": "https://api.github.com/repos/symfony/contracts/zipball/1aa7ab2429c3d594dd70689604b5cf7421254cdf", + "reference": "1aa7ab2429c3d594dd70689604b5cf7421254cdf", "shasum": "" }, "require": { "php": "^7.1.3" }, + "require-dev": { + "psr/cache": "^1.0", + "psr/container": "^1.0" + }, + "suggest": { + "psr/cache": "When using the Cache contracts", + "psr/container": "When using the Service contracts", + "symfony/cache-contracts-implementation": "", + "symfony/service-contracts-implementation": "", + "symfony/translation-contracts-implementation": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\": "" + }, + "exclude-from-classmap": [ + "**/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A set of abstractions extracted out of the Symfony components", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "time": "2018-12-05T08:06:11+00:00" + }, + { + "name": "symfony/event-dispatcher", + "version": "v4.2.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "921f49c3158a276d27c0d770a5a347a3b718b328" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/921f49c3158a276d27c0d770a5a347a3b718b328", + "reference": "921f49c3158a276d27c0d770a5a347a3b718b328", + "shasum": "" + }, + "require": { + "php": "^7.1.3", + "symfony/contracts": "^1.0" + }, "conflict": { "symfony/dependency-injection": "<3.4" }, @@ -715,7 +870,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "4.2-dev" } }, "autoload": { @@ -742,20 +897,20 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2018-10-10T13:52:42+00:00" + "time": "2018-12-01T08:52:38+00:00" }, { "name": "symfony/filesystem", - "version": "v4.1.7", + "version": "v4.2.1", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "fd7bd6535beb1f0a0a9e3ee960666d0598546981" + "reference": "2f4c8b999b3b7cadb2a69390b01af70886753710" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/fd7bd6535beb1f0a0a9e3ee960666d0598546981", - "reference": "fd7bd6535beb1f0a0a9e3ee960666d0598546981", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/2f4c8b999b3b7cadb2a69390b01af70886753710", + "reference": "2f4c8b999b3b7cadb2a69390b01af70886753710", "shasum": "" }, "require": { @@ -765,7 +920,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "4.2-dev" } }, "autoload": { @@ -792,20 +947,20 @@ ], "description": "Symfony Filesystem Component", "homepage": "https://symfony.com", - "time": "2018-10-30T13:18:25+00:00" + "time": "2018-11-11T19:52:12+00:00" }, { "name": "symfony/finder", - "version": "v3.4.18", + "version": "v3.4.20", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "54ba444dddc5bd5708a34bd095ea67c6eb54644d" + "reference": "6cf2be5cbd0e87aa35c01f80ae0bf40b6798e442" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/54ba444dddc5bd5708a34bd095ea67c6eb54644d", - "reference": "54ba444dddc5bd5708a34bd095ea67c6eb54644d", + "url": "https://api.github.com/repos/symfony/finder/zipball/6cf2be5cbd0e87aa35c01f80ae0bf40b6798e442", + "reference": "6cf2be5cbd0e87aa35c01f80ae0bf40b6798e442", "shasum": "" }, "require": { @@ -841,7 +996,7 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2018-10-03T08:46:40+00:00" + "time": "2018-11-11T19:48:54+00:00" }, { "name": "symfony/polyfill-ctype", @@ -962,16 +1117,16 @@ }, { "name": "symfony/process", - "version": "v4.1.7", + "version": "v4.2.1", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "3e83acef94d979b1de946599ef86b3a352abcdc9" + "reference": "2b341009ccec76837a7f46f59641b431e4d4c2b0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/3e83acef94d979b1de946599ef86b3a352abcdc9", - "reference": "3e83acef94d979b1de946599ef86b3a352abcdc9", + "url": "https://api.github.com/repos/symfony/process/zipball/2b341009ccec76837a7f46f59641b431e4d4c2b0", + "reference": "2b341009ccec76837a7f46f59641b431e4d4c2b0", "shasum": "" }, "require": { @@ -980,7 +1135,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "4.2-dev" } }, "autoload": { @@ -1007,20 +1162,20 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2018-10-14T20:48:13+00:00" + "time": "2018-11-20T16:22:05+00:00" }, { "name": "symfony/yaml", - "version": "v4.1.7", + "version": "v4.2.1", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "367e689b2fdc19965be435337b50bc8adf2746c9" + "reference": "c41175c801e3edfda90f32e292619d10c27103d7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/367e689b2fdc19965be435337b50bc8adf2746c9", - "reference": "367e689b2fdc19965be435337b50bc8adf2746c9", + "url": "https://api.github.com/repos/symfony/yaml/zipball/c41175c801e3edfda90f32e292619d10c27103d7", + "reference": "c41175c801e3edfda90f32e292619d10c27103d7", "shasum": "" }, "require": { @@ -1039,7 +1194,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "4.2-dev" } }, "autoload": { @@ -1066,7 +1221,7 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2018-10-02T16:36:10+00:00" + "time": "2018-11-11T19:52:12+00:00" } ], "packages-dev": [ @@ -1174,16 +1329,16 @@ }, { "name": "codeception/base", - "version": "2.5.1", + "version": "2.5.2", "source": { "type": "git", "url": "https://github.com/Codeception/base.git", - "reference": "ec6b7bd4d78c1adba3dbd5c3c52fc683e8aef6de" + "reference": "50aaf8bc032823018aed8d14114843b4a2c52a48" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeception/base/zipball/ec6b7bd4d78c1adba3dbd5c3c52fc683e8aef6de", - "reference": "ec6b7bd4d78c1adba3dbd5c3c52fc683e8aef6de", + "url": "https://api.github.com/repos/Codeception/base/zipball/50aaf8bc032823018aed8d14114843b4a2c52a48", + "reference": "50aaf8bc032823018aed8d14114843b4a2c52a48", "shasum": "" }, "require": { @@ -1260,25 +1415,25 @@ "functional testing", "unit testing" ], - "time": "2018-10-29T21:37:15+00:00" + "time": "2019-01-01T21:20:37+00:00" }, { "name": "codeception/phpunit-wrapper", - "version": "6.0.12", + "version": "6.0.13", "source": { "type": "git", "url": "https://github.com/Codeception/phpunit-wrapper.git", - "reference": "de922c760dfddf8a33c4a066efcd0cd93576d957" + "reference": "d25db254173582bc27aa8c37cb04ce2481675bcd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeception/phpunit-wrapper/zipball/de922c760dfddf8a33c4a066efcd0cd93576d957", - "reference": "de922c760dfddf8a33c4a066efcd0cd93576d957", + "url": "https://api.github.com/repos/Codeception/phpunit-wrapper/zipball/d25db254173582bc27aa8c37cb04ce2481675bcd", + "reference": "d25db254173582bc27aa8c37cb04ce2481675bcd", "shasum": "" }, "require": { "phpunit/php-code-coverage": ">=4.0.4 <6.0", - "phpunit/phpunit": ">=5.7.27 <7.0", + "phpunit/phpunit": ">=5.7.27 <6.5.13", "sebastian/comparator": ">=1.2.4 <3.0", "sebastian/diff": ">=1.4 <4.0" }, @@ -1306,7 +1461,7 @@ } ], "description": "PHPUnit classes used by Codeception", - "time": "2018-09-12T20:19:47+00:00" + "time": "2019-01-01T15:39:52+00:00" }, { "name": "codeception/stub", @@ -1552,16 +1707,16 @@ }, { "name": "g1a/composer-test-scenarios", - "version": "3.0.0", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/g1a/composer-test-scenarios.git", - "reference": "2a7156f1572898888ea50ad1d48a6b4d3f9fbf78" + "reference": "224531e20d13a07942a989a70759f726cd2df9a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/g1a/composer-test-scenarios/zipball/2a7156f1572898888ea50ad1d48a6b4d3f9fbf78", - "reference": "2a7156f1572898888ea50ad1d48a6b4d3f9fbf78", + "url": "https://api.github.com/repos/g1a/composer-test-scenarios/zipball/224531e20d13a07942a989a70759f726cd2df9a1", + "reference": "224531e20d13a07942a989a70759f726cd2df9a1", "shasum": "" }, "require": { @@ -1600,7 +1755,7 @@ } ], "description": "Useful scripts for testing multiple sets of Composer dependencies.", - "time": "2018-11-22T05:10:20+00:00" + "time": "2018-11-27T05:58:39+00:00" }, { "name": "goaop/framework", @@ -1811,32 +1966,33 @@ }, { "name": "guzzlehttp/psr7", - "version": "1.4.2", + "version": "1.5.2", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c" + "reference": "9f83dded91781a01c63574e387eaa769be769115" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/f5b8a8512e2b58b0071a7280e39f14f72e05d87c", - "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/9f83dded91781a01c63574e387eaa769be769115", + "reference": "9f83dded91781a01c63574e387eaa769be769115", "shasum": "" }, "require": { "php": ">=5.4.0", - "psr/http-message": "~1.0" + "psr/http-message": "~1.0", + "ralouphie/getallheaders": "^2.0.5" }, "provide": { "psr/http-message-implementation": "1.0" }, "require-dev": { - "phpunit/phpunit": "~4.0" + "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "1.5-dev" } }, "autoload": { @@ -1866,13 +2022,14 @@ "keywords": [ "http", "message", + "psr-7", "request", "response", "stream", "uri", "url" ], - "time": "2017-03-20T17:10:46+00:00" + "time": "2018-12-04T20:46:45+00:00" }, { "name": "jakubledl/dissect", @@ -2124,16 +2281,16 @@ }, { "name": "pear/archive_tar", - "version": "1.4.3", + "version": "1.4.4", "source": { "type": "git", "url": "https://github.com/pear/Archive_Tar.git", - "reference": "43455c960da70e655c6bdf8ea2bc8cc1a6034afb" + "reference": "b005152d4ed8f23bcc93637611fa94f39ef5b904" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pear/Archive_Tar/zipball/43455c960da70e655c6bdf8ea2bc8cc1a6034afb", - "reference": "43455c960da70e655c6bdf8ea2bc8cc1a6034afb", + "url": "https://api.github.com/repos/pear/Archive_Tar/zipball/b005152d4ed8f23bcc93637611fa94f39ef5b904", + "reference": "b005152d4ed8f23bcc93637611fa94f39ef5b904", "shasum": "" }, "require": { @@ -2144,8 +2301,8 @@ "phpunit/phpunit": "*" }, "suggest": { - "ext-bz2": "bz2 compression support.", - "ext-xz": "lzma2 compression support.", + "ext-bz2": "Bz2 compression support.", + "ext-xz": "Lzma2 compression support.", "ext-zlib": "Gzip compression support." }, "type": "library", @@ -2180,13 +2337,13 @@ "email": "mrook@php.net" } ], - "description": "Tar file management class", + "description": "Tar file management class with compression support (gzip, bzip2, lzma2)", "homepage": "https://github.com/pear/Archive_Tar", "keywords": [ "archive", "tar" ], - "time": "2017-06-11T17:28:11+00:00" + "time": "2018-12-20T20:47:24+00:00" }, { "name": "pear/console_getopt", @@ -2237,20 +2394,20 @@ }, { "name": "pear/pear-core-minimal", - "version": "v1.10.6", + "version": "v1.10.7", "source": { "type": "git", "url": "https://github.com/pear/pear-core-minimal.git", - "reference": "052868b244d31f822796e7e9981f62557eb256d4" + "reference": "19a3e0fcd50492c4357372f623f55f1b144346da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pear/pear-core-minimal/zipball/052868b244d31f822796e7e9981f62557eb256d4", - "reference": "052868b244d31f822796e7e9981f62557eb256d4", + "url": "https://api.github.com/repos/pear/pear-core-minimal/zipball/19a3e0fcd50492c4357372f623f55f1b144346da", + "reference": "19a3e0fcd50492c4357372f623f55f1b144346da", "shasum": "" }, "require": { - "pear/console_getopt": "~1.3", + "pear/console_getopt": "~1.4", "pear/pear_exception": "~1.0" }, "replace": { @@ -2277,7 +2434,7 @@ } ], "description": "Minimal set of PEAR core files to be used as composer dependency", - "time": "2018-08-22T19:28:09+00:00" + "time": "2018-12-05T20:03:52+00:00" }, { "name": "pear/pear_exception", @@ -3050,6 +3207,46 @@ ], "time": "2016-08-06T14:39:51+00:00" }, + { + "name": "ralouphie/getallheaders", + "version": "2.0.5", + "source": { + "type": "git", + "url": "https://github.com/ralouphie/getallheaders.git", + "reference": "5601c8a83fbba7ef674a7369456d12f1e0d0eafa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/5601c8a83fbba7ef674a7369456d12f1e0d0eafa", + "reference": "5601c8a83fbba7ef674a7369456d12f1e0d0eafa", + "shasum": "" + }, + "require": { + "php": ">=5.3" + }, + "require-dev": { + "phpunit/phpunit": "~3.7.0", + "satooshi/php-coveralls": ">=1.0" + }, + "type": "library", + "autoload": { + "files": [ + "src/getallheaders.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" + } + ], + "description": "A polyfill for getallheaders.", + "time": "2016-02-11T07:05:27+00:00" + }, { "name": "sebastian/code-unit-reverse-lookup", "version": "1.0.1", @@ -3643,16 +3840,16 @@ }, { "name": "symfony/browser-kit", - "version": "v4.1.7", + "version": "v4.2.1", "source": { "type": "git", "url": "https://github.com/symfony/browser-kit.git", - "reference": "c55fe9257003b2d95c0211b3f6941e8dfd26dffd" + "reference": "db7e59fec9c82d45e745eb500e6ede2d96f4a6e9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/browser-kit/zipball/c55fe9257003b2d95c0211b3f6941e8dfd26dffd", - "reference": "c55fe9257003b2d95c0211b3f6941e8dfd26dffd", + "url": "https://api.github.com/repos/symfony/browser-kit/zipball/db7e59fec9c82d45e745eb500e6ede2d96f4a6e9", + "reference": "db7e59fec9c82d45e745eb500e6ede2d96f4a6e9", "shasum": "" }, "require": { @@ -3669,7 +3866,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "4.2-dev" } }, "autoload": { @@ -3696,20 +3893,20 @@ ], "description": "Symfony BrowserKit Component", "homepage": "https://symfony.com", - "time": "2018-07-26T09:10:45+00:00" + "time": "2018-11-26T11:49:31+00:00" }, { "name": "symfony/config", - "version": "v4.1.7", + "version": "v4.2.1", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "991fec8bbe77367fc8b48ecbaa8a4bd6e905a238" + "reference": "005d9a083d03f588677d15391a716b1ac9b887c0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/991fec8bbe77367fc8b48ecbaa8a4bd6e905a238", - "reference": "991fec8bbe77367fc8b48ecbaa8a4bd6e905a238", + "url": "https://api.github.com/repos/symfony/config/zipball/005d9a083d03f588677d15391a716b1ac9b887c0", + "reference": "005d9a083d03f588677d15391a716b1ac9b887c0", "shasum": "" }, "require": { @@ -3732,7 +3929,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "4.2-dev" } }, "autoload": { @@ -3759,20 +3956,20 @@ ], "description": "Symfony Config Component", "homepage": "https://symfony.com", - "time": "2018-10-31T09:09:42+00:00" + "time": "2018-11-30T22:21:14+00:00" }, { "name": "symfony/css-selector", - "version": "v4.1.7", + "version": "v4.2.1", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "d67de79a70a27d93c92c47f37ece958bf8de4d8a" + "reference": "aa9fa526ba1b2ec087ffdfb32753803d999fcfcd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/d67de79a70a27d93c92c47f37ece958bf8de4d8a", - "reference": "d67de79a70a27d93c92c47f37ece958bf8de4d8a", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/aa9fa526ba1b2ec087ffdfb32753803d999fcfcd", + "reference": "aa9fa526ba1b2ec087ffdfb32753803d999fcfcd", "shasum": "" }, "require": { @@ -3781,7 +3978,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "4.2-dev" } }, "autoload": { @@ -3812,20 +4009,20 @@ ], "description": "Symfony CssSelector Component", "homepage": "https://symfony.com", - "time": "2018-10-02T16:36:10+00:00" + "time": "2018-11-11T19:52:12+00:00" }, { "name": "symfony/dom-crawler", - "version": "v4.1.7", + "version": "v4.2.1", "source": { "type": "git", "url": "https://github.com/symfony/dom-crawler.git", - "reference": "80e60271bb288de2a2259662cff125cff4f93f95" + "reference": "7438a32108fdd555295f443605d6de2cce473159" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/80e60271bb288de2a2259662cff125cff4f93f95", - "reference": "80e60271bb288de2a2259662cff125cff4f93f95", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/7438a32108fdd555295f443605d6de2cce473159", + "reference": "7438a32108fdd555295f443605d6de2cce473159", "shasum": "" }, "require": { @@ -3842,7 +4039,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "4.2-dev" } }, "autoload": { @@ -3869,29 +4066,30 @@ ], "description": "Symfony DomCrawler Component", "homepage": "https://symfony.com", - "time": "2018-10-02T12:40:59+00:00" + "time": "2018-11-26T10:55:26+00:00" }, { "name": "symfony/stopwatch", - "version": "v4.1.7", + "version": "v4.2.1", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "5bfc064125b73ff81229e19381ce1c34d3416f4b" + "reference": "ec076716412274e51f8a7ea675d9515e5c311123" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/5bfc064125b73ff81229e19381ce1c34d3416f4b", - "reference": "5bfc064125b73ff81229e19381ce1c34d3416f4b", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/ec076716412274e51f8a7ea675d9515e5c311123", + "reference": "ec076716412274e51f8a7ea675d9515e5c311123", "shasum": "" }, "require": { - "php": "^7.1.3" + "php": "^7.1.3", + "symfony/contracts": "^1.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "4.2-dev" } }, "autoload": { @@ -3918,24 +4116,25 @@ ], "description": "Symfony Stopwatch Component", "homepage": "https://symfony.com", - "time": "2018-10-02T12:40:59+00:00" + "time": "2018-11-11T19:52:12+00:00" }, { "name": "webmozart/assert", - "version": "1.3.0", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/webmozart/assert.git", - "reference": "0df1908962e7a3071564e857d86874dad1ef204a" + "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/0df1908962e7a3071564e857d86874dad1ef204a", - "reference": "0df1908962e7a3071564e857d86874dad1ef204a", + "url": "https://api.github.com/repos/webmozart/assert/zipball/83e253c8e0be5b0257b881e1827274667c5c17a9", + "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0" + "php": "^5.3.3 || ^7.0", + "symfony/polyfill-ctype": "^1.8" }, "require-dev": { "phpunit/phpunit": "^4.6", @@ -3968,7 +4167,7 @@ "check", "validate" ], - "time": "2018-01-29T19:49:41+00:00" + "time": "2018-12-25T11:19:39+00:00" } ], "aliases": [], diff --git a/vendor/consolidation/robo/CHANGELOG.md b/vendor/consolidation/robo/CHANGELOG.md index f70729849..3f0693647 100644 --- a/vendor/consolidation/robo/CHANGELOG.md +++ b/vendor/consolidation/robo/CHANGELOG.md @@ -1,5 +1,20 @@ # Changelog +### 1.4.0 - 1.4.3 1/2/2019 + +* BUGFIX: Back out 1.3.5, which contained breaking changes. Create a 1.x branch for continuation of compatible versions, and move breaking code to 2.x development (on master branch). + +### 1.3.4 12/20/2018 + +* Allow for aborting completions or rollbacks by James Sansbury (#815) +* BUGFIX: Allow commands to declare '@param InputInterface' to satisfy code style checks + +### 1.3.3 12/13/2018 + +* Add StdinHandler to the standard Robo DI container (#814) +* BUGFIX: Add test to ensure rollback order is in reverse by James Sansbury (#812) +* BUGFIX: Fix the main Robo script entrypoint to work as a phar. (#811) + ### 1.3.2 11/21/2018 * Update to Composer Test Scenarios 3 (#803) diff --git a/vendor/consolidation/robo/LICENSE b/vendor/consolidation/robo/LICENSE index f83bb5d3c..0938cc28e 100644 --- a/vendor/consolidation/robo/LICENSE +++ b/vendor/consolidation/robo/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2014-2018 Codegyre Developers Team, Consolidation Team +Copyright (c) 2014-2019 Codegyre Developers Team, Consolidation Team Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in @@ -22,9 +22,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. DEPENDENCY LICENSES: Name Version License -consolidation/annotated-command 2.10.0 MIT +consolidation/annotated-command 2.11.0 MIT consolidation/config 1.1.1 MIT -consolidation/log 1.0.6 MIT +consolidation/log 1.1.1 MIT consolidation/output-formatters 3.4.0 MIT consolidation/self-update 1.1.5 MIT container-interop/container-interop 1.2.0 MIT @@ -34,11 +34,11 @@ grasmash/yaml-expander 1.4.0 MIT league/container 2.4.1 MIT psr/container 1.0.0 MIT psr/log 1.1.0 MIT -symfony/console v4.1.7 MIT -symfony/event-dispatcher v4.1.7 MIT -symfony/filesystem v4.1.7 MIT -symfony/finder v3.4.18 MIT +symfony/console v4.2.1 MIT +symfony/event-dispatcher v4.2.1 MIT +symfony/filesystem v4.2.1 MIT +symfony/finder v3.4.20 MIT symfony/polyfill-ctype v1.10.0 MIT symfony/polyfill-mbstring v1.10.0 MIT -symfony/process v4.1.7 MIT -symfony/yaml v4.1.7 MIT \ No newline at end of file +symfony/process v4.2.1 MIT +symfony/yaml v4.2.1 MIT \ No newline at end of file diff --git a/vendor/consolidation/robo/README.md b/vendor/consolidation/robo/README.md index 797b43ae7..73a8feb22 100644 --- a/vendor/consolidation/robo/README.md +++ b/vendor/consolidation/robo/README.md @@ -1,8 +1,10 @@ # RoboTask +_This is the 1.x (stable) branch of the Robo task runner. Development for Robo 2.x (future) is happening on the [master](https://github.com/consolidation/Robo/tree/master) branch._ + **Modern and simple PHP task runner** inspired by Gulp and Rake aimed to automate common tasks: -[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/consolidation-org/Robo?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) +[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/consolidation/Robo?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Latest Stable Version](https://poser.pugx.org/consolidation/robo/v/stable.png)](https://packagist.org/packages/consolidation/robo) [![Latest Unstable Version](https://poser.pugx.org/consolidation/robo/v/unstable.png)](https://packagist.org/packages/consolidation/robo) [![Total Downloads](https://poser.pugx.org/consolidation/robo/downloads.png)](https://packagist.org/packages/consolidation/robo) @@ -56,7 +58,7 @@ All protected methods in traits that start with `task` prefix are tasks and can ## Examples -The best way to learn Robo by example is to take a look into [its own RoboFile](https://github.com/consolidation-org/Robo/blob/master/RoboFile.php) +The best way to learn Robo by example is to take a look into [its own RoboFile](https://github.com/consolidation/Robo/blob/master/RoboFile.php) or [RoboFile of Codeception project](https://github.com/Codeception/Codeception/blob/2.4/RoboFile.php). There are also some basic example commands in examples/RoboFile.php. Here are some snippets from them: diff --git a/vendor/consolidation/robo/RoboFile.php b/vendor/consolidation/robo/RoboFile.php index 1e3fd57b5..4536f5159 100644 --- a/vendor/consolidation/robo/RoboFile.php +++ b/vendor/consolidation/robo/RoboFile.php @@ -101,7 +101,7 @@ class RoboFile extends \Robo\Tasks $this->taskGitStack() ->tag($version) - ->push('origin master --tags') + ->push('origin 1.x --tags') ->run(); if ($stable) { @@ -320,7 +320,7 @@ class RoboFile extends \Robo\Tasks return $this->collectionBuilder() ->taskGitStack() ->checkout('site') - ->merge('master') + ->merge('1.x') ->completion($this->taskGitStack()->checkout($current_branch)) ->taskFilesystemStack() ->copy('CHANGELOG.md', 'docs/changelog.md') @@ -467,7 +467,7 @@ class RoboFile extends \Robo\Tasks ->add('robotheme/robo.phar') ->commit('Update robo.phar to ' . \Robo\Robo::VERSION) ->push('origin site') - ->checkout('master') + ->checkout('1.x') ->run(); } } diff --git a/vendor/consolidation/robo/composer.json b/vendor/consolidation/robo/composer.json index 209fd2c89..08bfe7765 100644 --- a/vendor/consolidation/robo/composer.json +++ b/vendor/consolidation/robo/composer.json @@ -25,7 +25,7 @@ "league/container": "^2.2", "consolidation/log": "~1", "consolidation/config": "^1.0.10", - "consolidation/annotated-command": "^2.8.2", + "consolidation/annotated-command": "^2.10.2", "consolidation/output-formatters": "^3.1.13", "consolidation/self-update": "^1", "grasmash/yaml-expander": "^1.3", @@ -103,7 +103,7 @@ } }, "branch-alias": { - "dev-master": "1.x-dev" + "dev-master": "2.x-dev" } }, "suggest": { diff --git a/vendor/consolidation/robo/composer.lock b/vendor/consolidation/robo/composer.lock index 4fdaa5824..b871490bd 100644 --- a/vendor/consolidation/robo/composer.lock +++ b/vendor/consolidation/robo/composer.lock @@ -4,20 +4,20 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "07b63861fb5a551c082ad59662288f07", + "content-hash": "9c5c482a5c2448a1c439a441f3da2529", "packages": [ { "name": "consolidation/annotated-command", - "version": "2.10.0", + "version": "2.11.0", "source": { "type": "git", "url": "https://github.com/consolidation/annotated-command.git", - "reference": "8e7d1a05230dc1159c751809e98b74f2b7f71873" + "reference": "edea407f57104ed518cc3c3b47d5b84403ee267a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/consolidation/annotated-command/zipball/8e7d1a05230dc1159c751809e98b74f2b7f71873", - "reference": "8e7d1a05230dc1159c751809e98b74f2b7f71873", + "url": "https://api.github.com/repos/consolidation/annotated-command/zipball/edea407f57104ed518cc3c3b47d5b84403ee267a", + "reference": "edea407f57104ed518cc3c3b47d5b84403ee267a", "shasum": "" }, "require": { @@ -29,13 +29,57 @@ "symfony/finder": "^2.5|^3|^4" }, "require-dev": { - "g1a/composer-test-scenarios": "^2", + "g1a/composer-test-scenarios": "^3", + "php-coveralls/php-coveralls": "^1", "phpunit/phpunit": "^6", - "satooshi/php-coveralls": "^2", "squizlabs/php_codesniffer": "^2.7" }, "type": "library", "extra": { + "scenarios": { + "symfony4": { + "require": { + "symfony/console": "^4.0" + }, + "config": { + "platform": { + "php": "7.1.3" + } + } + }, + "symfony2": { + "require": { + "symfony/console": "^2.8" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.36" + }, + "remove": [ + "php-coveralls/php-coveralls" + ], + "config": { + "platform": { + "php": "5.4.8" + } + }, + "scenario-options": { + "create-lockfile": "false" + } + }, + "phpunit4": { + "require-dev": { + "phpunit/phpunit": "^4.8.36" + }, + "remove": [ + "php-coveralls/php-coveralls" + ], + "config": { + "platform": { + "php": "5.4.8" + } + } + } + }, "branch-alias": { "dev-master": "2.x-dev" } @@ -56,7 +100,7 @@ } ], "description": "Initialize Symfony Console commands from annotated command class methods.", - "time": "2018-11-15T01:46:18+00:00" + "time": "2018-12-29T04:43:17+00:00" }, { "name": "consolidation/config", @@ -114,31 +158,72 @@ }, { "name": "consolidation/log", - "version": "1.0.6", + "version": "1.1.1", "source": { "type": "git", "url": "https://github.com/consolidation/log.git", - "reference": "dfd8189a771fe047bf3cd669111b2de5f1c79395" + "reference": "b2e887325ee90abc96b0a8b7b474cd9e7c896e3a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/consolidation/log/zipball/dfd8189a771fe047bf3cd669111b2de5f1c79395", - "reference": "dfd8189a771fe047bf3cd669111b2de5f1c79395", + "url": "https://api.github.com/repos/consolidation/log/zipball/b2e887325ee90abc96b0a8b7b474cd9e7c896e3a", + "reference": "b2e887325ee90abc96b0a8b7b474cd9e7c896e3a", "shasum": "" }, "require": { - "php": ">=5.5.0", - "psr/log": "~1.0", + "php": ">=5.4.5", + "psr/log": "^1.0", "symfony/console": "^2.8|^3|^4" }, "require-dev": { - "g1a/composer-test-scenarios": "^1", - "phpunit/phpunit": "4.*", - "satooshi/php-coveralls": "^2", - "squizlabs/php_codesniffer": "2.*" + "g1a/composer-test-scenarios": "^3", + "php-coveralls/php-coveralls": "^1", + "phpunit/phpunit": "^6", + "squizlabs/php_codesniffer": "^2" }, "type": "library", "extra": { + "scenarios": { + "symfony4": { + "require": { + "symfony/console": "^4.0" + }, + "config": { + "platform": { + "php": "7.1.3" + } + } + }, + "symfony2": { + "require": { + "symfony/console": "^2.8" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.36" + }, + "remove": [ + "php-coveralls/php-coveralls" + ], + "config": { + "platform": { + "php": "5.4.8" + } + } + }, + "phpunit4": { + "require-dev": { + "phpunit/phpunit": "^4.8.36" + }, + "remove": [ + "php-coveralls/php-coveralls" + ], + "config": { + "platform": { + "php": "5.4.8" + } + } + } + }, "branch-alias": { "dev-master": "1.x-dev" } @@ -159,7 +244,7 @@ } ], "description": "Improved Psr-3 / Psr\\Log logger based on Symfony Console components.", - "time": "2018-05-25T18:14:39+00:00" + "time": "2019-01-01T17:30:51+00:00" }, { "name": "consolidation/output-formatters", @@ -615,16 +700,16 @@ }, { "name": "symfony/console", - "version": "v3.4.18", + "version": "v3.4.20", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "1d228fb4602047d7b26a0554e0d3efd567da5803" + "reference": "8f80fc39bbc3b7c47ee54ba7aa2653521ace94bb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/1d228fb4602047d7b26a0554e0d3efd567da5803", - "reference": "1d228fb4602047d7b26a0554e0d3efd567da5803", + "url": "https://api.github.com/repos/symfony/console/zipball/8f80fc39bbc3b7c47ee54ba7aa2653521ace94bb", + "reference": "8f80fc39bbc3b7c47ee54ba7aa2653521ace94bb", "shasum": "" }, "require": { @@ -680,20 +765,20 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2018-10-30T16:50:50+00:00" + "time": "2018-11-26T12:48:07+00:00" }, { "name": "symfony/debug", - "version": "v3.4.18", + "version": "v3.4.20", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "fe9793af008b651c5441bdeab21ede8172dab097" + "reference": "a2233f555ddf55e5600f386fba7781cea1cb82d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/fe9793af008b651c5441bdeab21ede8172dab097", - "reference": "fe9793af008b651c5441bdeab21ede8172dab097", + "url": "https://api.github.com/repos/symfony/debug/zipball/a2233f555ddf55e5600f386fba7781cea1cb82d3", + "reference": "a2233f555ddf55e5600f386fba7781cea1cb82d3", "shasum": "" }, "require": { @@ -736,20 +821,20 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "time": "2018-10-31T09:06:03+00:00" + "time": "2018-11-27T12:43:10+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v3.4.18", + "version": "v3.4.20", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "db9e829c8f34c3d35cf37fcd4cdb4293bc4a2f14" + "reference": "cc35e84adbb15c26ae6868e1efbf705a917be6b5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/db9e829c8f34c3d35cf37fcd4cdb4293bc4a2f14", - "reference": "db9e829c8f34c3d35cf37fcd4cdb4293bc4a2f14", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/cc35e84adbb15c26ae6868e1efbf705a917be6b5", + "reference": "cc35e84adbb15c26ae6868e1efbf705a917be6b5", "shasum": "" }, "require": { @@ -799,20 +884,20 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2018-10-30T16:50:50+00:00" + "time": "2018-11-30T18:07:24+00:00" }, { "name": "symfony/filesystem", - "version": "v3.4.18", + "version": "v3.4.20", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "d69930fc337d767607267d57c20a7403d0a822a4" + "reference": "b49b1ca166bd109900e6a1683d9bb1115727ef2d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/d69930fc337d767607267d57c20a7403d0a822a4", - "reference": "d69930fc337d767607267d57c20a7403d0a822a4", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/b49b1ca166bd109900e6a1683d9bb1115727ef2d", + "reference": "b49b1ca166bd109900e6a1683d9bb1115727ef2d", "shasum": "" }, "require": { @@ -849,20 +934,20 @@ ], "description": "Symfony Filesystem Component", "homepage": "https://symfony.com", - "time": "2018-10-02T12:28:39+00:00" + "time": "2018-11-11T19:48:54+00:00" }, { "name": "symfony/finder", - "version": "v3.4.18", + "version": "v3.4.20", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "54ba444dddc5bd5708a34bd095ea67c6eb54644d" + "reference": "6cf2be5cbd0e87aa35c01f80ae0bf40b6798e442" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/54ba444dddc5bd5708a34bd095ea67c6eb54644d", - "reference": "54ba444dddc5bd5708a34bd095ea67c6eb54644d", + "url": "https://api.github.com/repos/symfony/finder/zipball/6cf2be5cbd0e87aa35c01f80ae0bf40b6798e442", + "reference": "6cf2be5cbd0e87aa35c01f80ae0bf40b6798e442", "shasum": "" }, "require": { @@ -898,7 +983,7 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2018-10-03T08:46:40+00:00" + "time": "2018-11-11T19:48:54+00:00" }, { "name": "symfony/polyfill-ctype", @@ -1019,16 +1104,16 @@ }, { "name": "symfony/process", - "version": "v3.4.18", + "version": "v3.4.20", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "35c2914a9f50519bd207164c353ae4d59182c2cb" + "reference": "abb46b909dd6ba0b50e10d4c10ffe6ee96dd70f2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/35c2914a9f50519bd207164c353ae4d59182c2cb", - "reference": "35c2914a9f50519bd207164c353ae4d59182c2cb", + "url": "https://api.github.com/repos/symfony/process/zipball/abb46b909dd6ba0b50e10d4c10ffe6ee96dd70f2", + "reference": "abb46b909dd6ba0b50e10d4c10ffe6ee96dd70f2", "shasum": "" }, "require": { @@ -1064,20 +1149,20 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2018-10-14T17:33:21+00:00" + "time": "2018-11-20T16:10:26+00:00" }, { "name": "symfony/yaml", - "version": "v3.4.18", + "version": "v3.4.20", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "640b6c27fed4066d64b64d5903a86043f4a4de7f" + "reference": "291e13d808bec481eab83f301f7bff3e699ef603" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/640b6c27fed4066d64b64d5903a86043f4a4de7f", - "reference": "640b6c27fed4066d64b64d5903a86043f4a4de7f", + "url": "https://api.github.com/repos/symfony/yaml/zipball/291e13d808bec481eab83f301f7bff3e699ef603", + "reference": "291e13d808bec481eab83f301f7bff3e699ef603", "shasum": "" }, "require": { @@ -1123,7 +1208,7 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2018-10-02T16:33:53+00:00" + "time": "2018-11-11T19:48:54+00:00" } ], "packages-dev": [ @@ -1231,16 +1316,16 @@ }, { "name": "codeception/base", - "version": "2.5.1", + "version": "2.5.2", "source": { "type": "git", "url": "https://github.com/Codeception/base.git", - "reference": "ec6b7bd4d78c1adba3dbd5c3c52fc683e8aef6de" + "reference": "50aaf8bc032823018aed8d14114843b4a2c52a48" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeception/base/zipball/ec6b7bd4d78c1adba3dbd5c3c52fc683e8aef6de", - "reference": "ec6b7bd4d78c1adba3dbd5c3c52fc683e8aef6de", + "url": "https://api.github.com/repos/Codeception/base/zipball/50aaf8bc032823018aed8d14114843b4a2c52a48", + "reference": "50aaf8bc032823018aed8d14114843b4a2c52a48", "shasum": "" }, "require": { @@ -1317,25 +1402,25 @@ "functional testing", "unit testing" ], - "time": "2018-10-29T21:37:15+00:00" + "time": "2019-01-01T21:20:37+00:00" }, { "name": "codeception/phpunit-wrapper", - "version": "6.0.12", + "version": "6.0.13", "source": { "type": "git", "url": "https://github.com/Codeception/phpunit-wrapper.git", - "reference": "de922c760dfddf8a33c4a066efcd0cd93576d957" + "reference": "d25db254173582bc27aa8c37cb04ce2481675bcd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Codeception/phpunit-wrapper/zipball/de922c760dfddf8a33c4a066efcd0cd93576d957", - "reference": "de922c760dfddf8a33c4a066efcd0cd93576d957", + "url": "https://api.github.com/repos/Codeception/phpunit-wrapper/zipball/d25db254173582bc27aa8c37cb04ce2481675bcd", + "reference": "d25db254173582bc27aa8c37cb04ce2481675bcd", "shasum": "" }, "require": { "phpunit/php-code-coverage": ">=4.0.4 <6.0", - "phpunit/phpunit": ">=5.7.27 <7.0", + "phpunit/phpunit": ">=5.7.27 <6.5.13", "sebastian/comparator": ">=1.2.4 <3.0", "sebastian/diff": ">=1.4 <4.0" }, @@ -1363,7 +1448,7 @@ } ], "description": "PHPUnit classes used by Codeception", - "time": "2018-09-12T20:19:47+00:00" + "time": "2019-01-01T15:39:52+00:00" }, { "name": "codeception/stub", @@ -1609,16 +1694,16 @@ }, { "name": "g1a/composer-test-scenarios", - "version": "3.0.0", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/g1a/composer-test-scenarios.git", - "reference": "2a7156f1572898888ea50ad1d48a6b4d3f9fbf78" + "reference": "224531e20d13a07942a989a70759f726cd2df9a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/g1a/composer-test-scenarios/zipball/2a7156f1572898888ea50ad1d48a6b4d3f9fbf78", - "reference": "2a7156f1572898888ea50ad1d48a6b4d3f9fbf78", + "url": "https://api.github.com/repos/g1a/composer-test-scenarios/zipball/224531e20d13a07942a989a70759f726cd2df9a1", + "reference": "224531e20d13a07942a989a70759f726cd2df9a1", "shasum": "" }, "require": { @@ -1657,7 +1742,7 @@ } ], "description": "Useful scripts for testing multiple sets of Composer dependencies.", - "time": "2018-11-22T05:10:20+00:00" + "time": "2018-11-27T05:58:39+00:00" }, { "name": "goaop/framework", @@ -1868,32 +1953,33 @@ }, { "name": "guzzlehttp/psr7", - "version": "1.4.2", + "version": "1.5.2", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c" + "reference": "9f83dded91781a01c63574e387eaa769be769115" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/f5b8a8512e2b58b0071a7280e39f14f72e05d87c", - "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/9f83dded91781a01c63574e387eaa769be769115", + "reference": "9f83dded91781a01c63574e387eaa769be769115", "shasum": "" }, "require": { "php": ">=5.4.0", - "psr/http-message": "~1.0" + "psr/http-message": "~1.0", + "ralouphie/getallheaders": "^2.0.5" }, "provide": { "psr/http-message-implementation": "1.0" }, "require-dev": { - "phpunit/phpunit": "~4.0" + "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "1.5-dev" } }, "autoload": { @@ -1923,13 +2009,14 @@ "keywords": [ "http", "message", + "psr-7", "request", "response", "stream", "uri", "url" ], - "time": "2017-03-20T17:10:46+00:00" + "time": "2018-12-04T20:46:45+00:00" }, { "name": "jakubledl/dissect", @@ -2178,16 +2265,16 @@ }, { "name": "pear/archive_tar", - "version": "1.4.3", + "version": "1.4.4", "source": { "type": "git", "url": "https://github.com/pear/Archive_Tar.git", - "reference": "43455c960da70e655c6bdf8ea2bc8cc1a6034afb" + "reference": "b005152d4ed8f23bcc93637611fa94f39ef5b904" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pear/Archive_Tar/zipball/43455c960da70e655c6bdf8ea2bc8cc1a6034afb", - "reference": "43455c960da70e655c6bdf8ea2bc8cc1a6034afb", + "url": "https://api.github.com/repos/pear/Archive_Tar/zipball/b005152d4ed8f23bcc93637611fa94f39ef5b904", + "reference": "b005152d4ed8f23bcc93637611fa94f39ef5b904", "shasum": "" }, "require": { @@ -2198,8 +2285,8 @@ "phpunit/phpunit": "*" }, "suggest": { - "ext-bz2": "bz2 compression support.", - "ext-xz": "lzma2 compression support.", + "ext-bz2": "Bz2 compression support.", + "ext-xz": "Lzma2 compression support.", "ext-zlib": "Gzip compression support." }, "type": "library", @@ -2234,13 +2321,13 @@ "email": "mrook@php.net" } ], - "description": "Tar file management class", + "description": "Tar file management class with compression support (gzip, bzip2, lzma2)", "homepage": "https://github.com/pear/Archive_Tar", "keywords": [ "archive", "tar" ], - "time": "2017-06-11T17:28:11+00:00" + "time": "2018-12-20T20:47:24+00:00" }, { "name": "pear/console_getopt", @@ -2291,20 +2378,20 @@ }, { "name": "pear/pear-core-minimal", - "version": "v1.10.6", + "version": "v1.10.7", "source": { "type": "git", "url": "https://github.com/pear/pear-core-minimal.git", - "reference": "052868b244d31f822796e7e9981f62557eb256d4" + "reference": "19a3e0fcd50492c4357372f623f55f1b144346da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pear/pear-core-minimal/zipball/052868b244d31f822796e7e9981f62557eb256d4", - "reference": "052868b244d31f822796e7e9981f62557eb256d4", + "url": "https://api.github.com/repos/pear/pear-core-minimal/zipball/19a3e0fcd50492c4357372f623f55f1b144346da", + "reference": "19a3e0fcd50492c4357372f623f55f1b144346da", "shasum": "" }, "require": { - "pear/console_getopt": "~1.3", + "pear/console_getopt": "~1.4", "pear/pear_exception": "~1.0" }, "replace": { @@ -2331,7 +2418,7 @@ } ], "description": "Minimal set of PEAR core files to be used as composer dependency", - "time": "2018-08-22T19:28:09+00:00" + "time": "2018-12-05T20:03:52+00:00" }, { "name": "pear/pear_exception", @@ -3098,6 +3185,46 @@ ], "time": "2016-08-06T14:39:51+00:00" }, + { + "name": "ralouphie/getallheaders", + "version": "2.0.5", + "source": { + "type": "git", + "url": "https://github.com/ralouphie/getallheaders.git", + "reference": "5601c8a83fbba7ef674a7369456d12f1e0d0eafa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/5601c8a83fbba7ef674a7369456d12f1e0d0eafa", + "reference": "5601c8a83fbba7ef674a7369456d12f1e0d0eafa", + "shasum": "" + }, + "require": { + "php": ">=5.3" + }, + "require-dev": { + "phpunit/phpunit": "~3.7.0", + "satooshi/php-coveralls": ">=1.0" + }, + "type": "library", + "autoload": { + "files": [ + "src/getallheaders.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" + } + ], + "description": "A polyfill for getallheaders.", + "time": "2016-02-11T07:05:27+00:00" + }, { "name": "sebastian/code-unit-reverse-lookup", "version": "1.0.1", @@ -3691,16 +3818,16 @@ }, { "name": "symfony/browser-kit", - "version": "v3.4.18", + "version": "v3.4.20", "source": { "type": "git", "url": "https://github.com/symfony/browser-kit.git", - "reference": "f6668d1a6182d5a8dec65a1c863a4c1d963816c0" + "reference": "49465af22d94c8d427c51facbf8137eb285b9726" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/browser-kit/zipball/f6668d1a6182d5a8dec65a1c863a4c1d963816c0", - "reference": "f6668d1a6182d5a8dec65a1c863a4c1d963816c0", + "url": "https://api.github.com/repos/symfony/browser-kit/zipball/49465af22d94c8d427c51facbf8137eb285b9726", + "reference": "49465af22d94c8d427c51facbf8137eb285b9726", "shasum": "" }, "require": { @@ -3744,20 +3871,20 @@ ], "description": "Symfony BrowserKit Component", "homepage": "https://symfony.com", - "time": "2018-07-26T09:06:28+00:00" + "time": "2018-11-26T10:17:44+00:00" }, { "name": "symfony/config", - "version": "v3.4.18", + "version": "v3.4.20", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "99b2fa8acc244e656cdf324ff419fbe6fd300a4d" + "reference": "8a660daeb65dedbe0b099529f65e61866c055081" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/99b2fa8acc244e656cdf324ff419fbe6fd300a4d", - "reference": "99b2fa8acc244e656cdf324ff419fbe6fd300a4d", + "url": "https://api.github.com/repos/symfony/config/zipball/8a660daeb65dedbe0b099529f65e61866c055081", + "reference": "8a660daeb65dedbe0b099529f65e61866c055081", "shasum": "" }, "require": { @@ -3808,20 +3935,20 @@ ], "description": "Symfony Config Component", "homepage": "https://symfony.com", - "time": "2018-10-31T09:06:03+00:00" + "time": "2018-11-26T10:17:44+00:00" }, { "name": "symfony/css-selector", - "version": "v3.4.18", + "version": "v3.4.20", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "3503415d4aafabc31cd08c3a4ebac7f43fde8feb" + "reference": "345b9a48595d1ab9630db791dbc3e721bf0233e8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/3503415d4aafabc31cd08c3a4ebac7f43fde8feb", - "reference": "3503415d4aafabc31cd08c3a4ebac7f43fde8feb", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/345b9a48595d1ab9630db791dbc3e721bf0233e8", + "reference": "345b9a48595d1ab9630db791dbc3e721bf0233e8", "shasum": "" }, "require": { @@ -3861,20 +3988,20 @@ ], "description": "Symfony CssSelector Component", "homepage": "https://symfony.com", - "time": "2018-10-02T16:33:53+00:00" + "time": "2018-11-11T19:48:54+00:00" }, { "name": "symfony/dom-crawler", - "version": "v3.4.18", + "version": "v3.4.20", "source": { "type": "git", "url": "https://github.com/symfony/dom-crawler.git", - "reference": "c705bee03ade5b47c087807dd9ffaaec8dda2722" + "reference": "b6e94248eb4f8602a5825301b0bea1eb8cc82cfa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/c705bee03ade5b47c087807dd9ffaaec8dda2722", - "reference": "c705bee03ade5b47c087807dd9ffaaec8dda2722", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/b6e94248eb4f8602a5825301b0bea1eb8cc82cfa", + "reference": "b6e94248eb4f8602a5825301b0bea1eb8cc82cfa", "shasum": "" }, "require": { @@ -3918,20 +4045,20 @@ ], "description": "Symfony DomCrawler Component", "homepage": "https://symfony.com", - "time": "2018-10-02T12:28:39+00:00" + "time": "2018-11-26T10:17:44+00:00" }, { "name": "symfony/stopwatch", - "version": "v3.4.18", + "version": "v3.4.20", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "05e52a39de52ba690aebaed462b2bc8a9649f0a4" + "reference": "0f43969ab2718de55c1c1158dce046668079788d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/05e52a39de52ba690aebaed462b2bc8a9649f0a4", - "reference": "05e52a39de52ba690aebaed462b2bc8a9649f0a4", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/0f43969ab2718de55c1c1158dce046668079788d", + "reference": "0f43969ab2718de55c1c1158dce046668079788d", "shasum": "" }, "require": { @@ -3967,24 +4094,25 @@ ], "description": "Symfony Stopwatch Component", "homepage": "https://symfony.com", - "time": "2018-10-02T12:28:39+00:00" + "time": "2018-11-11T19:48:54+00:00" }, { "name": "webmozart/assert", - "version": "1.3.0", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/webmozart/assert.git", - "reference": "0df1908962e7a3071564e857d86874dad1ef204a" + "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/0df1908962e7a3071564e857d86874dad1ef204a", - "reference": "0df1908962e7a3071564e857d86874dad1ef204a", + "url": "https://api.github.com/repos/webmozart/assert/zipball/83e253c8e0be5b0257b881e1827274667c5c17a9", + "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0" + "php": "^5.3.3 || ^7.0", + "symfony/polyfill-ctype": "^1.8" }, "require-dev": { "phpunit/phpunit": "^4.6", @@ -4017,7 +4145,7 @@ "check", "validate" ], - "time": "2018-01-29T19:49:41+00:00" + "time": "2018-12-25T11:19:39+00:00" } ], "aliases": [], diff --git a/vendor/consolidation/robo/robo b/vendor/consolidation/robo/robo index 082f883af..b6707d27f 100755 --- a/vendor/consolidation/robo/robo +++ b/vendor/consolidation/robo/robo @@ -1,21 +1,41 @@ #!/usr/bin/env php 500000); + +// Non-phar autoloader paths +$candidates = [ + __DIR__.'/vendor/autoload.php', + __DIR__.'/../../autoload.php', +]; + +// Use our phar alias path +if ($isPhar) { + array_unshift($candidates, 'phar://robo.phar/vendor/autoload.php'); +} + +$autoloaderPath = false; +foreach ($candidates as $candidate) { + if (file_exists($candidate)) { + $autoloaderPath = $candidate; + break; } } +if (!$autoloaderPath) { + die("Could not find autoloader. Run 'composer install'."); +} $classLoader = require $autoloaderPath; $configFilePath = getenv('ROBO_CONFIG') ?: getenv('HOME') . '/.robo/robo.yml'; $runner = new \Robo\Runner(); diff --git a/vendor/consolidation/robo/src/Collection/Collection.php b/vendor/consolidation/robo/src/Collection/Collection.php index 607435a48..e3e34796b 100644 --- a/vendor/consolidation/robo/src/Collection/Collection.php +++ b/vendor/consolidation/robo/src/Collection/Collection.php @@ -1,6 +1,7 @@ getMessage(); $data = $result->getData(); $data['exitcode'] = $result->getExitCode(); + } catch (AbortTasksException $abortTasksException) { + throw $abortTasksException; } catch (\Exception $e) { $message = $e->getMessage(); } @@ -419,7 +422,7 @@ class Collection extends BaseTask implements CollectionInterface, CommandInterfa return $this->parentCollection->registerRollback($rollbackTask); } if ($rollbackTask) { - $this->rollbackStack[] = $rollbackTask; + array_unshift($this->rollbackStack, $rollbackTask); } } @@ -735,6 +738,10 @@ class Collection extends BaseTask implements CollectionInterface, CommandInterfa /** * Run all of the tasks in a provided list, ignoring failures. + * + * You may force a failure by throwing a ForcedException in your rollback or + * completion task or callback. + * * This is used to roll back or complete. * * @param TaskInterface[] $taskList @@ -744,6 +751,12 @@ class Collection extends BaseTask implements CollectionInterface, CommandInterfa foreach ($taskList as $task) { try { $this->runSubtask($task); + } catch (AbortTasksException $abortTasksException) { + // If there's a forced exception, end the loop of tasks. + if ($message = $abortTasksException->getMessage()) { + $this->logger()->notice($message); + } + break; } catch (\Exception $e) { // Ignore rollback failures. } diff --git a/vendor/consolidation/robo/src/Exception/AbortTasksException.php b/vendor/consolidation/robo/src/Exception/AbortTasksException.php new file mode 100644 index 000000000..120451f0a --- /dev/null +++ b/vendor/consolidation/robo/src/Exception/AbortTasksException.php @@ -0,0 +1,13 @@ +share('stdinHandler', \Consolidation\AnnotatedCommand\Input\StdinHandler::class); $container->share('commandFactory', \Consolidation\AnnotatedCommand\AnnotatedCommandFactory::class) ->withMethodCall('setCommandProcessor', ['commandProcessor']); $container->share('relativeNamespaceDiscovery', \Robo\ClassDiscovery\RelativeNamespaceDiscovery::class) @@ -307,6 +308,8 @@ class Robo ->invokeMethod('setHookManager', ['hookManager']); $container->inflector(\Robo\Contract\VerbosityThresholdInterface::class) ->invokeMethod('setOutputAdapter', ['outputAdapter']); + $container->inflector(\Consolidation\AnnotatedCommand\Input\StdinAwareInterface::class) + ->invokeMethod('setStdinHandler', ['stdinHandler']); } /** diff --git a/vendor/guzzlehttp/psr7/.editorconfig b/vendor/guzzlehttp/psr7/.editorconfig new file mode 100644 index 000000000..677e36e29 --- /dev/null +++ b/vendor/guzzlehttp/psr7/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_size = 4 +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true diff --git a/vendor/guzzlehttp/psr7/CHANGELOG.md b/vendor/guzzlehttp/psr7/CHANGELOG.md index 5c252b3a2..27b65f095 100644 --- a/vendor/guzzlehttp/psr7/CHANGELOG.md +++ b/vendor/guzzlehttp/psr7/CHANGELOG.md @@ -1,32 +1,82 @@ -# CHANGELOG +# Change Log -## 1.4.2 - 2017-03-20 -* Reverted BC break to `Uri::resolve` and `Uri::removeDotSegments` by removing +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). + + +## [Unreleased] + + +## [1.5.2] - 2018-12-04 + +### Fixed + +- Check body size when getting the message summary + + +## [1.5.1] - 2018-12-04 + +### Fixed + +- Get the summary of a body only if it is readable + + +## [1.5.0] - 2018-12-03 + +### Added + +- Response first-line to response string exception (fixes #145) +- A test for #129 behavior +- `get_message_body_summary` function in order to get the message summary +- `3gp` and `mkv` mime types + +### Changed + +- Clarify exception message when stream is detached + +### Deprecated + +- Deprecated parsing folded header lines as per RFC 7230 + +### Fixed + +- Fix `AppendStream::detach` to not close streams +- `InflateStream` preserves `isSeekable` attribute of the underlying stream +- `ServerRequest::getUriFromGlobals` to support URLs in query parameters + + +Several other fixes and improvements. + + +## [1.4.2] - 2017-03-20 + +### Fixed + +- Reverted BC break to `Uri::resolve` and `Uri::removeDotSegments` by removing calls to `trigger_error` when deprecated methods are invoked. -## 1.4.1 - 2017-02-27 -* Reverted BC break by reintroducing behavior to automagically fix a URI with a +## [1.4.1] - 2017-02-27 + +### Added + +- Rriggering of silenced deprecation warnings. + +### Fixed + +- Reverted BC break by reintroducing behavior to automagically fix a URI with a relative path and an authority by adding a leading slash to the path. It's only deprecated now. -* Added triggering of silenced deprecation warnings. -## 1.4.0 - 2017-02-21 -* Fix `Stream::read` when length parameter <= 0. -* `copy_to_stream` reads bytes in chunks instead of `maxLen` into memory. -* Fix `ServerRequest::getUriFromGlobals` when `Host` header contains port. -* Ensure `ServerRequest::getUriFromGlobals` returns a URI in absolute form. -* Allow `parse_response` to parse a response without delimiting space and reason. -* Ensure each URI modification results in a valid URI according to PSR-7 discussions. - Invalid modifications will throw an exception instead of returning a wrong URI or - doing some magic. - - `(new Uri)->withPath('foo')->withHost('example.com')` will throw an exception - because the path of a URI with an authority must start with a slash "/" or be empty - - `(new Uri())->withScheme('http')` will return `'http://localhost'` -* Fix compatibility of URIs with `file` scheme and empty host. -* Added common URI utility methods based on RFC 3986 (see documentation in the readme): +## [1.4.0] - 2017-02-21 + +### Added + +- Added common URI utility methods based on RFC 3986 (see documentation in the readme): - `Uri::isDefaultPort` - `Uri::isAbsolute` - `Uri::isNetworkPathReference` @@ -37,69 +87,117 @@ - `UriNormalizer::normalize` - `UriNormalizer::isEquivalent` - `UriResolver::relativize` -* Deprecated `Uri::resolve` in favor of `UriResolver::resolve` -* Deprecated `Uri::removeDotSegments` in favor of `UriResolver::removeDotSegments` -## 1.3.1 - 2016-06-25 +### Changed -* Fix `Uri::__toString` for network path references, e.g. `//example.org`. -* Fix missing lowercase normalization for host. -* Fix handling of URI components in case they are `'0'` in a lot of places, +- Ensure `ServerRequest::getUriFromGlobals` returns a URI in absolute form. +- Allow `parse_response` to parse a response without delimiting space and reason. +- Ensure each URI modification results in a valid URI according to PSR-7 discussions. + Invalid modifications will throw an exception instead of returning a wrong URI or + doing some magic. + - `(new Uri)->withPath('foo')->withHost('example.com')` will throw an exception + because the path of a URI with an authority must start with a slash "/" or be empty + - `(new Uri())->withScheme('http')` will return `'http://localhost'` + +### Deprecated + +- `Uri::resolve` in favor of `UriResolver::resolve` +- `Uri::removeDotSegments` in favor of `UriResolver::removeDotSegments` + +### Fixed + +- `Stream::read` when length parameter <= 0. +- `copy_to_stream` reads bytes in chunks instead of `maxLen` into memory. +- `ServerRequest::getUriFromGlobals` when `Host` header contains port. +- Compatibility of URIs with `file` scheme and empty host. + + +## [1.3.1] - 2016-06-25 + +### Fixed + +- `Uri::__toString` for network path references, e.g. `//example.org`. +- Missing lowercase normalization for host. +- Handling of URI components in case they are `'0'` in a lot of places, e.g. as a user info password. -* Fix `Uri::withAddedHeader` to correctly merge headers with different case. -* Fix trimming of header values in `Uri::withAddedHeader`. Header values may +- `Uri::withAddedHeader` to correctly merge headers with different case. +- Trimming of header values in `Uri::withAddedHeader`. Header values may be surrounded by whitespace which should be ignored according to RFC 7230 Section 3.2.4. This does not apply to header names. -* Fix `Uri::withAddedHeader` with an array of header values. -* Fix `Uri::resolve` when base path has no slash and handling of fragment. -* Fix handling of encoding in `Uri::with(out)QueryValue` so one can pass the +- `Uri::withAddedHeader` with an array of header values. +- `Uri::resolve` when base path has no slash and handling of fragment. +- Handling of encoding in `Uri::with(out)QueryValue` so one can pass the key/value both in encoded as well as decoded form to those methods. This is consistent with withPath, withQuery etc. -* Fix `ServerRequest::withoutAttribute` when attribute value is null. +- `ServerRequest::withoutAttribute` when attribute value is null. -## 1.3.0 - 2016-04-13 -* Added remaining interfaces needed for full PSR7 compatibility +## [1.3.0] - 2016-04-13 + +### Added + +- Remaining interfaces needed for full PSR7 compatibility (ServerRequestInterface, UploadedFileInterface, etc.). -* Added support for stream_for from scalars. -* Can now extend Uri. -* Fixed a bug in validating request methods by making it more permissive. +- Support for stream_for from scalars. -## 1.2.3 - 2016-02-18 +### Changed -* Fixed support in `GuzzleHttp\Psr7\CachingStream` for seeking forward on remote +- Can now extend Uri. + +### Fixed +- A bug in validating request methods by making it more permissive. + + +## [1.2.3] - 2016-02-18 + +### Fixed + +- Support in `GuzzleHttp\Psr7\CachingStream` for seeking forward on remote streams, which can sometimes return fewer bytes than requested with `fread`. -* Fixed handling of gzipped responses with FNAME headers. +- Handling of gzipped responses with FNAME headers. -## 1.2.2 - 2016-01-22 -* Added support for URIs without any authority. -* Added support for HTTP 451 'Unavailable For Legal Reasons.' -* Added support for using '0' as a filename. -* Added support for including non-standard ports in Host headers. +## [1.2.2] - 2016-01-22 -## 1.2.1 - 2015-11-02 +### Added -* Now supporting negative offsets when seeking to SEEK_END. +- Support for URIs without any authority. +- Support for HTTP 451 'Unavailable For Legal Reasons.' +- Support for using '0' as a filename. +- Support for including non-standard ports in Host headers. -## 1.2.0 - 2015-08-15 -* Body as `"0"` is now properly added to a response. -* Now allowing forward seeking in CachingStream. -* Now properly parsing HTTP requests that contain proxy targets in +## [1.2.1] - 2015-11-02 + +### Changes + +- Now supporting negative offsets when seeking to SEEK_END. + + +## [1.2.0] - 2015-08-15 + +### Changed + +- Body as `"0"` is now properly added to a response. +- Now allowing forward seeking in CachingStream. +- Now properly parsing HTTP requests that contain proxy targets in `parse_request`. -* functions.php is now conditionally required. -* user-info is no longer dropped when resolving URIs. +- functions.php is now conditionally required. +- user-info is no longer dropped when resolving URIs. -## 1.1.0 - 2015-06-24 -* URIs can now be relative. -* `multipart/form-data` headers are now overridden case-insensitively. -* URI paths no longer encode the following characters because they are allowed +## [1.1.0] - 2015-06-24 + +### Changed + +- URIs can now be relative. +- `multipart/form-data` headers are now overridden case-insensitively. +- URI paths no longer encode the following characters because they are allowed in URIs: "(", ")", "*", "!", "'" -* A port is no longer added to a URI when the scheme is missing and no port is +- A port is no longer added to a URI when the scheme is missing and no port is present. + ## 1.0.0 - 2015-05-19 Initial release. @@ -108,3 +206,20 @@ Currently unsupported: - `Psr\Http\Message\ServerRequestInterface` - `Psr\Http\Message\UploadedFileInterface` + + + +[Unreleased]: https://github.com/guzzle/psr7/compare/1.5.2...HEAD +[1.5.2]: https://github.com/guzzle/psr7/compare/1.5.1...1.5.2 +[1.5.1]: https://github.com/guzzle/psr7/compare/1.5.0...1.5.1 +[1.5.0]: https://github.com/guzzle/psr7/compare/1.4.2...1.5.0 +[1.4.2]: https://github.com/guzzle/psr7/compare/1.4.1...1.4.2 +[1.4.1]: https://github.com/guzzle/psr7/compare/1.4.0...1.4.1 +[1.4.0]: https://github.com/guzzle/psr7/compare/1.3.1...1.4.0 +[1.3.1]: https://github.com/guzzle/psr7/compare/1.3.0...1.3.1 +[1.3.0]: https://github.com/guzzle/psr7/compare/1.2.3...1.3.0 +[1.2.3]: https://github.com/guzzle/psr7/compare/1.2.2...1.2.3 +[1.2.2]: https://github.com/guzzle/psr7/compare/1.2.1...1.2.2 +[1.2.1]: https://github.com/guzzle/psr7/compare/1.2.0...1.2.1 +[1.2.0]: https://github.com/guzzle/psr7/compare/1.1.0...1.2.0 +[1.1.0]: https://github.com/guzzle/psr7/compare/1.0.0...1.1.0 diff --git a/vendor/guzzlehttp/psr7/README.md b/vendor/guzzlehttp/psr7/README.md index 16499358e..c60a6a38d 100644 --- a/vendor/guzzlehttp/psr7/README.md +++ b/vendor/guzzlehttp/psr7/README.md @@ -372,7 +372,7 @@ This method accepts the following `$resource` types: $stream = GuzzleHttp\Psr7\stream_for('foo'); $stream = GuzzleHttp\Psr7\stream_for(fopen('/path/to/file', 'r')); -$generator function ($bytes) { +$generator = function ($bytes) { for ($i = 0; $i < $bytes; $i++) { yield ' '; } @@ -606,6 +606,12 @@ Creates a new URI with a specific query string value. Any existing query string provided key are removed and replaced with the given key value pair. A value of null will set the query string key without a value, e.g. "key" instead of "key=value". +### `GuzzleHttp\Psr7\Uri::withQueryValues` + +`public static function withQueryValues(UriInterface $uri, array $keyValueArray): UriInterface` + +Creates a new URI with multiple query string values. It has the same behavior as `withQueryValue()` but for an +associative array of key => value. ### `GuzzleHttp\Psr7\Uri::withoutQueryValue` diff --git a/vendor/guzzlehttp/psr7/composer.json b/vendor/guzzlehttp/psr7/composer.json index b1c5a90ba..2add153ec 100644 --- a/vendor/guzzlehttp/psr7/composer.json +++ b/vendor/guzzlehttp/psr7/composer.json @@ -2,7 +2,7 @@ "name": "guzzlehttp/psr7", "type": "library", "description": "PSR-7 message implementation that also provides common utility methods", - "keywords": ["request", "response", "message", "stream", "http", "uri", "url"], + "keywords": ["request", "response", "message", "stream", "http", "uri", "url", "psr-7"], "license": "MIT", "authors": [ { @@ -17,10 +17,11 @@ ], "require": { "php": ">=5.4.0", - "psr/http-message": "~1.0" + "psr/http-message": "~1.0", + "ralouphie/getallheaders": "^2.0.5" }, "require-dev": { - "phpunit/phpunit": "~4.0" + "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8" }, "provide": { "psr/http-message-implementation": "1.0" @@ -31,9 +32,14 @@ }, "files": ["src/functions_include.php"] }, + "autoload-dev": { + "psr-4": { + "GuzzleHttp\\Tests\\Psr7\\": "tests/" + } + }, "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "1.5-dev" } } } diff --git a/vendor/guzzlehttp/psr7/src/AppendStream.php b/vendor/guzzlehttp/psr7/src/AppendStream.php index 23039fd79..472a0d61b 100644 --- a/vendor/guzzlehttp/psr7/src/AppendStream.php +++ b/vendor/guzzlehttp/psr7/src/AppendStream.php @@ -16,7 +16,6 @@ class AppendStream implements StreamInterface private $seekable = true; private $current = 0; private $pos = 0; - private $detached = false; /** * @param StreamInterface[] $streams Streams to decorate. Each stream must @@ -73,6 +72,7 @@ class AppendStream implements StreamInterface public function close() { $this->pos = $this->current = 0; + $this->seekable = true; foreach ($this->streams as $stream) { $stream->close(); @@ -82,14 +82,22 @@ class AppendStream implements StreamInterface } /** - * Detaches each attached stream + * Detaches each attached stream. + * + * Returns null as it's not clear which underlying stream resource to return. * * {@inheritdoc} */ public function detach() { - $this->close(); - $this->detached = true; + $this->pos = $this->current = 0; + $this->seekable = true; + + foreach ($this->streams as $stream) { + $stream->detach(); + } + + $this->streams = []; } public function tell() diff --git a/vendor/guzzlehttp/psr7/src/FnStream.php b/vendor/guzzlehttp/psr7/src/FnStream.php index cc9b4453f..73daea6f3 100644 --- a/vendor/guzzlehttp/psr7/src/FnStream.php +++ b/vendor/guzzlehttp/psr7/src/FnStream.php @@ -52,6 +52,15 @@ class FnStream implements StreamInterface } } + /** + * An unserialize would allow the __destruct to run when the unserialized value goes out of scope. + * @throws \LogicException + */ + public function __wakeup() + { + throw new \LogicException('FnStream should never be unserialized'); + } + /** * Adds custom functionality to an underlying stream by intercepting * specific method calls. diff --git a/vendor/guzzlehttp/psr7/src/InflateStream.php b/vendor/guzzlehttp/psr7/src/InflateStream.php index 0051d3fec..5e4f6028c 100644 --- a/vendor/guzzlehttp/psr7/src/InflateStream.php +++ b/vendor/guzzlehttp/psr7/src/InflateStream.php @@ -27,7 +27,7 @@ class InflateStream implements StreamInterface $stream = new LimitStream($stream, -1, 10 + $filenameHeaderLength); $resource = StreamWrapper::getResource($stream); stream_filter_append($resource, 'zlib.inflate', STREAM_FILTER_READ); - $this->stream = new Stream($resource); + $this->stream = $stream->isSeekable() ? new Stream($resource) : new NoSeekStream(new Stream($resource)); } /** diff --git a/vendor/guzzlehttp/psr7/src/Request.php b/vendor/guzzlehttp/psr7/src/Request.php index 08285484d..000664240 100644 --- a/vendor/guzzlehttp/psr7/src/Request.php +++ b/vendor/guzzlehttp/psr7/src/Request.php @@ -45,7 +45,7 @@ class Request implements RequestInterface $this->setHeaders($headers); $this->protocol = $version; - if (!$this->hasHeader('Host')) { + if (!isset($this->headerNames['host'])) { $this->updateHostFromUri(); } @@ -110,7 +110,7 @@ class Request implements RequestInterface $new = clone $this; $new->uri = $uri; - if (!$preserveHost) { + if (!$preserveHost || !isset($this->headerNames['host'])) { $new->updateHostFromUri(); } diff --git a/vendor/guzzlehttp/psr7/src/Response.php b/vendor/guzzlehttp/psr7/src/Response.php index 2830c6c9e..6e72c06b8 100644 --- a/vendor/guzzlehttp/psr7/src/Response.php +++ b/vendor/guzzlehttp/psr7/src/Response.php @@ -93,6 +93,10 @@ class Response implements ResponseInterface $version = '1.1', $reason = null ) { + if (filter_var($status, FILTER_VALIDATE_INT) === false) { + throw new \InvalidArgumentException('Status code must be an integer value.'); + } + $this->statusCode = (int) $status; if ($body !== '' && $body !== null) { diff --git a/vendor/guzzlehttp/psr7/src/Rfc7230.php b/vendor/guzzlehttp/psr7/src/Rfc7230.php new file mode 100644 index 000000000..505e4742b --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/Rfc7230.php @@ -0,0 +1,18 @@ +@,;:\\\"/[\]?={}\x01-\x20\x7F]++):[ \t]*+((?:[ \t]*+[\x21-\x7E\x80-\xFF]++)*+)[ \t]*+\r?\n)m"; + const HEADER_FOLD_REGEX = "(\r?\n[ \t]++)"; +} diff --git a/vendor/guzzlehttp/psr7/src/ServerRequest.php b/vendor/guzzlehttp/psr7/src/ServerRequest.php index 575aab848..99f453a51 100644 --- a/vendor/guzzlehttp/psr7/src/ServerRequest.php +++ b/vendor/guzzlehttp/psr7/src/ServerRequest.php @@ -166,7 +166,7 @@ class ServerRequest extends Request implements ServerRequestInterface public static function fromGlobals() { $method = isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : 'GET'; - $headers = function_exists('getallheaders') ? getallheaders() : []; + $headers = getallheaders(); $uri = self::getUriFromGlobals(); $body = new LazyOpenStream('php://input', 'r+'); $protocol = isset($_SERVER['SERVER_PROTOCOL']) ? str_replace('HTTP/', '', $_SERVER['SERVER_PROTOCOL']) : '1.1'; @@ -180,23 +180,41 @@ class ServerRequest extends Request implements ServerRequestInterface ->withUploadedFiles(self::normalizeFiles($_FILES)); } + private static function extractHostAndPortFromAuthority($authority) + { + $uri = 'http://'.$authority; + $parts = parse_url($uri); + if (false === $parts) { + return [null, null]; + } + + $host = isset($parts['host']) ? $parts['host'] : null; + $port = isset($parts['port']) ? $parts['port'] : null; + + return [$host, $port]; + } + /** * Get a Uri populated with values from $_SERVER. * * @return UriInterface */ - public static function getUriFromGlobals() { + public static function getUriFromGlobals() + { $uri = new Uri(''); $uri = $uri->withScheme(!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' ? 'https' : 'http'); $hasPort = false; if (isset($_SERVER['HTTP_HOST'])) { - $hostHeaderParts = explode(':', $_SERVER['HTTP_HOST']); - $uri = $uri->withHost($hostHeaderParts[0]); - if (isset($hostHeaderParts[1])) { + list($host, $port) = self::extractHostAndPortFromAuthority($_SERVER['HTTP_HOST']); + if ($host !== null) { + $uri = $uri->withHost($host); + } + + if ($port !== null) { $hasPort = true; - $uri = $uri->withPort($hostHeaderParts[1]); + $uri = $uri->withPort($port); } } elseif (isset($_SERVER['SERVER_NAME'])) { $uri = $uri->withHost($_SERVER['SERVER_NAME']); @@ -210,7 +228,7 @@ class ServerRequest extends Request implements ServerRequestInterface $hasQuery = false; if (isset($_SERVER['REQUEST_URI'])) { - $requestUriParts = explode('?', $_SERVER['REQUEST_URI']); + $requestUriParts = explode('?', $_SERVER['REQUEST_URI'], 2); $uri = $uri->withPath($requestUriParts[0]); if (isset($requestUriParts[1])) { $hasQuery = true; diff --git a/vendor/guzzlehttp/psr7/src/Stream.php b/vendor/guzzlehttp/psr7/src/Stream.php index e33662879..111795eb0 100644 --- a/vendor/guzzlehttp/psr7/src/Stream.php +++ b/vendor/guzzlehttp/psr7/src/Stream.php @@ -24,11 +24,11 @@ class Stream implements StreamInterface 'r' => true, 'w+' => true, 'r+' => true, 'x+' => true, 'c+' => true, 'rb' => true, 'w+b' => true, 'r+b' => true, 'x+b' => true, 'c+b' => true, 'rt' => true, 'w+t' => true, 'r+t' => true, - 'x+t' => true, 'c+t' => true, 'a+' => true + 'x+t' => true, 'c+t' => true, 'a+' => true, 'rb+' => true, ], 'write' => [ 'w' => true, 'w+' => true, 'rw' => true, 'r+' => true, 'x+' => true, - 'c+' => true, 'wb' => true, 'w+b' => true, 'r+b' => true, + 'c+' => true, 'wb' => true, 'w+b' => true, 'r+b' => true, 'rb+' => true, 'x+b' => true, 'c+b' => true, 'w+t' => true, 'r+t' => true, 'x+t' => true, 'c+t' => true, 'a' => true, 'a+' => true ] @@ -70,15 +70,6 @@ class Stream implements StreamInterface $this->uri = $this->getMetadata('uri'); } - public function __get($name) - { - if ($name == 'stream') { - throw new \RuntimeException('The stream is detached'); - } - - throw new \BadMethodCallException('No value for ' . $name); - } - /** * Closes the stream when the destructed */ @@ -99,6 +90,10 @@ class Stream implements StreamInterface public function getContents() { + if (!isset($this->stream)) { + throw new \RuntimeException('Stream is detached'); + } + $contents = stream_get_contents($this->stream); if ($contents === false) { @@ -173,11 +168,19 @@ class Stream implements StreamInterface public function eof() { - return !$this->stream || feof($this->stream); + if (!isset($this->stream)) { + throw new \RuntimeException('Stream is detached'); + } + + return feof($this->stream); } public function tell() { + if (!isset($this->stream)) { + throw new \RuntimeException('Stream is detached'); + } + $result = ftell($this->stream); if ($result === false) { @@ -194,9 +197,13 @@ class Stream implements StreamInterface public function seek($offset, $whence = SEEK_SET) { + if (!isset($this->stream)) { + throw new \RuntimeException('Stream is detached'); + } if (!$this->seekable) { throw new \RuntimeException('Stream is not seekable'); - } elseif (fseek($this->stream, $offset, $whence) === -1) { + } + if (fseek($this->stream, $offset, $whence) === -1) { throw new \RuntimeException('Unable to seek to stream position ' . $offset . ' with whence ' . var_export($whence, true)); } @@ -204,6 +211,9 @@ class Stream implements StreamInterface public function read($length) { + if (!isset($this->stream)) { + throw new \RuntimeException('Stream is detached'); + } if (!$this->readable) { throw new \RuntimeException('Cannot read from non-readable stream'); } @@ -225,6 +235,9 @@ class Stream implements StreamInterface public function write($string) { + if (!isset($this->stream)) { + throw new \RuntimeException('Stream is detached'); + } if (!$this->writable) { throw new \RuntimeException('Cannot write to a non-writable stream'); } diff --git a/vendor/guzzlehttp/psr7/src/StreamWrapper.php b/vendor/guzzlehttp/psr7/src/StreamWrapper.php index cf7b2232e..0f3a2856a 100644 --- a/vendor/guzzlehttp/psr7/src/StreamWrapper.php +++ b/vendor/guzzlehttp/psr7/src/StreamWrapper.php @@ -38,9 +38,21 @@ class StreamWrapper . 'writable, or both.'); } - return fopen('guzzle://stream', $mode, null, stream_context_create([ + return fopen('guzzle://stream', $mode, null, self::createStreamContext($stream)); + } + + /** + * Creates a stream context that can be used to open a stream as a php stream resource. + * + * @param StreamInterface $stream + * + * @return resource + */ + public static function createStreamContext(StreamInterface $stream) + { + return stream_context_create([ 'guzzle' => ['stream' => $stream] - ])); + ]); } /** @@ -94,12 +106,21 @@ class StreamWrapper return true; } + public function stream_cast($cast_as) + { + $stream = clone($this->stream); + + return $stream->detach(); + } + public function stream_stat() { static $modeMap = [ 'r' => 33060, + 'rb' => 33060, 'r+' => 33206, - 'w' => 33188 + 'w' => 33188, + 'wb' => 33188 ]; return [ @@ -118,4 +139,23 @@ class StreamWrapper 'blocks' => 0 ]; } + + public function url_stat($path, $flags) + { + return [ + 'dev' => 0, + 'ino' => 0, + 'mode' => 0, + 'nlink' => 0, + 'uid' => 0, + 'gid' => 0, + 'rdev' => 0, + 'size' => 0, + 'atime' => 0, + 'mtime' => 0, + 'ctime' => 0, + 'blksize' => 0, + 'blocks' => 0 + ]; + } } diff --git a/vendor/guzzlehttp/psr7/src/Uri.php b/vendor/guzzlehttp/psr7/src/Uri.php index f46c1db9e..36219568c 100644 --- a/vendor/guzzlehttp/psr7/src/Uri.php +++ b/vendor/guzzlehttp/psr7/src/Uri.php @@ -301,15 +301,7 @@ class Uri implements UriInterface */ public static function withoutQueryValue(UriInterface $uri, $key) { - $current = $uri->getQuery(); - if ($current === '') { - return $uri; - } - - $decodedKey = rawurldecode($key); - $result = array_filter(explode('&', $current), function ($part) use ($decodedKey) { - return rawurldecode(explode('=', $part)[0]) !== $decodedKey; - }); + $result = self::getFilteredQueryString($uri, [$key]); return $uri->withQuery(implode('&', $result)); } @@ -331,26 +323,29 @@ class Uri implements UriInterface */ public static function withQueryValue(UriInterface $uri, $key, $value) { - $current = $uri->getQuery(); + $result = self::getFilteredQueryString($uri, [$key]); - if ($current === '') { - $result = []; - } else { - $decodedKey = rawurldecode($key); - $result = array_filter(explode('&', $current), function ($part) use ($decodedKey) { - return rawurldecode(explode('=', $part)[0]) !== $decodedKey; - }); - } + $result[] = self::generateQueryString($key, $value); - // Query string separators ("=", "&") within the key or value need to be encoded - // (while preventing double-encoding) before setting the query string. All other - // chars that need percent-encoding will be encoded by withQuery(). - $key = strtr($key, self::$replaceQuery); + return $uri->withQuery(implode('&', $result)); + } - if ($value !== null) { - $result[] = $key . '=' . strtr($value, self::$replaceQuery); - } else { - $result[] = $key; + /** + * Creates a new URI with multiple specific query string values. + * + * It has the same behavior as withQueryValue() but for an associative array of key => value. + * + * @param UriInterface $uri URI to use as a base. + * @param array $keyValueArray Associative array of key and values + * + * @return UriInterface + */ + public static function withQueryValues(UriInterface $uri, array $keyValueArray) + { + $result = self::getFilteredQueryString($uri, array_keys($keyValueArray)); + + foreach ($keyValueArray as $key => $value) { + $result[] = self::generateQueryString($key, $value); } return $uri->withQuery(implode('&', $result)); @@ -620,6 +615,47 @@ class Uri implements UriInterface return $port; } + /** + * @param UriInterface $uri + * @param array $keys + * + * @return array + */ + private static function getFilteredQueryString(UriInterface $uri, array $keys) + { + $current = $uri->getQuery(); + + if ($current === '') { + return []; + } + + $decodedKeys = array_map('rawurldecode', $keys); + + return array_filter(explode('&', $current), function ($part) use ($decodedKeys) { + return !in_array(rawurldecode(explode('=', $part)[0]), $decodedKeys, true); + }); + } + + /** + * @param string $key + * @param string|null $value + * + * @return string + */ + private static function generateQueryString($key, $value) + { + // Query string separators ("=", "&") within the key or value need to be encoded + // (while preventing double-encoding) before setting the query string. All other + // chars that need percent-encoding will be encoded by withQuery(). + $queryString = strtr($key, self::$replaceQuery); + + if ($value !== null) { + $queryString .= '=' . strtr($value, self::$replaceQuery); + } + + return $queryString; + } + private function removeDefaultPort() { if ($this->port !== null && self::isDefaultPort($this)) { diff --git a/vendor/guzzlehttp/psr7/src/functions.php b/vendor/guzzlehttp/psr7/src/functions.php index e40348d6a..957bfb42a 100644 --- a/vendor/guzzlehttp/psr7/src/functions.php +++ b/vendor/guzzlehttp/psr7/src/functions.php @@ -69,10 +69,10 @@ function uri_for($uri) * - metadata: Array of custom metadata. * - size: Size of the stream. * - * @param resource|string|null|int|float|bool|StreamInterface|callable $resource Entity body data - * @param array $options Additional options + * @param resource|string|null|int|float|bool|StreamInterface|callable|\Iterator $resource Entity body data + * @param array $options Additional options * - * @return Stream + * @return StreamInterface * @throws \InvalidArgumentException if the $resource arg is not valid. */ function stream_for($resource = '', array $options = []) @@ -238,7 +238,7 @@ function modify_request(RequestInterface $request, array $changes) } if ($request instanceof ServerRequestInterface) { - return new ServerRequest( + return (new ServerRequest( isset($changes['method']) ? $changes['method'] : $request->getMethod(), $uri, $headers, @@ -247,7 +247,11 @@ function modify_request(RequestInterface $request, array $changes) ? $changes['version'] : $request->getProtocolVersion(), $request->getServerParams() - ); + )) + ->withParsedBody($request->getParsedBody()) + ->withQueryParams($request->getQueryParams()) + ->withCookieParams($request->getCookieParams()) + ->withUploadedFiles($request->getUploadedFiles()); } return new Request( @@ -431,7 +435,7 @@ function hash( * @param StreamInterface $stream Stream to read from * @param int $maxLength Maximum buffer length * - * @return string|bool + * @return string */ function readline(StreamInterface $stream, $maxLength = null) { @@ -495,7 +499,7 @@ function parse_response($message) // between status-code and reason-phrase is required. But browsers accept // responses without space and reason as well. if (!preg_match('/^HTTP\/.* [0-9]{3}( .*|$)/', $data['start-line'])) { - throw new \InvalidArgumentException('Invalid response string'); + throw new \InvalidArgumentException('Invalid response string: ' . $data['start-line']); } $parts = explode(' ', $data['start-line'], 3); @@ -516,8 +520,8 @@ function parse_response($message) * PHP style arrays into an associative array (e.g., foo[a]=1&foo[b]=2 will * be parsed into ['foo[a]' => '1', 'foo[b]' => '2']). * - * @param string $str Query string to parse - * @param bool|string $urlEncoding How the query string is encoded + * @param string $str Query string to parse + * @param int|bool $urlEncoding How the query string is encoded * * @return array */ @@ -533,9 +537,9 @@ function parse_query($str, $urlEncoding = true) $decoder = function ($value) { return rawurldecode(str_replace('+', ' ', $value)); }; - } elseif ($urlEncoding == PHP_QUERY_RFC3986) { + } elseif ($urlEncoding === PHP_QUERY_RFC3986) { $decoder = 'rawurldecode'; - } elseif ($urlEncoding == PHP_QUERY_RFC1738) { + } elseif ($urlEncoding === PHP_QUERY_RFC1738) { $decoder = 'urldecode'; } else { $decoder = function ($str) { return $str; }; @@ -633,6 +637,7 @@ function mimetype_from_filename($filename) function mimetype_from_extension($extension) { static $mimetypes = [ + '3gp' => 'video/3gpp', '7z' => 'application/x-7z-compressed', 'aac' => 'audio/x-aac', 'ai' => 'application/postscript', @@ -680,6 +685,7 @@ function mimetype_from_extension($extension) 'mid' => 'audio/midi', 'midi' => 'audio/midi', 'mov' => 'video/quicktime', + 'mkv' => 'video/x-matroska', 'mp3' => 'audio/mpeg', 'mp4' => 'video/mp4', 'mp4a' => 'audio/mp4', @@ -758,29 +764,53 @@ function _parse_message($message) throw new \InvalidArgumentException('Invalid message'); } - // Iterate over each line in the message, accounting for line endings - $lines = preg_split('/(\\r?\\n)/', $message, -1, PREG_SPLIT_DELIM_CAPTURE); - $result = ['start-line' => array_shift($lines), 'headers' => [], 'body' => '']; - array_shift($lines); + $message = ltrim($message, "\r\n"); - for ($i = 0, $totalLines = count($lines); $i < $totalLines; $i += 2) { - $line = $lines[$i]; - // If two line breaks were encountered, then this is the end of body - if (empty($line)) { - if ($i < $totalLines - 1) { - $result['body'] = implode('', array_slice($lines, $i + 2)); - } - break; - } - if (strpos($line, ':')) { - $parts = explode(':', $line, 2); - $key = trim($parts[0]); - $value = isset($parts[1]) ? trim($parts[1]) : ''; - $result['headers'][$key][] = $value; - } + $messageParts = preg_split("/\r?\n\r?\n/", $message, 2); + + if ($messageParts === false || count($messageParts) !== 2) { + throw new \InvalidArgumentException('Invalid message: Missing header delimiter'); } - return $result; + list($rawHeaders, $body) = $messageParts; + $rawHeaders .= "\r\n"; // Put back the delimiter we split previously + $headerParts = preg_split("/\r?\n/", $rawHeaders, 2); + + if ($headerParts === false || count($headerParts) !== 2) { + throw new \InvalidArgumentException('Invalid message: Missing status line'); + } + + list($startLine, $rawHeaders) = $headerParts; + + if (preg_match("/(?:^HTTP\/|^[A-Z]+ \S+ HTTP\/)(\d+(?:\.\d+)?)/i", $startLine, $matches) && $matches[1] === '1.0') { + // Header folding is deprecated for HTTP/1.1, but allowed in HTTP/1.0 + $rawHeaders = preg_replace(Rfc7230::HEADER_FOLD_REGEX, ' ', $rawHeaders); + } + + /** @var array[] $headerLines */ + $count = preg_match_all(Rfc7230::HEADER_REGEX, $rawHeaders, $headerLines, PREG_SET_ORDER); + + // If these aren't the same, then one line didn't match and there's an invalid header. + if ($count !== substr_count($rawHeaders, "\n")) { + // Folding is deprecated, see https://tools.ietf.org/html/rfc7230#section-3.2.4 + if (preg_match(Rfc7230::HEADER_FOLD_REGEX, $rawHeaders)) { + throw new \InvalidArgumentException('Invalid header syntax: Obsolete line folding'); + } + + throw new \InvalidArgumentException('Invalid header syntax'); + } + + $headers = []; + + foreach ($headerLines as $headerLine) { + $headers[$headerLine[1]][] = $headerLine[2]; + } + + return [ + 'start-line' => $startLine, + 'headers' => $headers, + 'body' => $body, + ]; } /** @@ -809,6 +839,46 @@ function _parse_request_uri($path, array $headers) return $scheme . '://' . $host . '/' . ltrim($path, '/'); } +/** + * Get a short summary of the message body + * + * Will return `null` if the response is not printable. + * + * @param MessageInterface $message The message to get the body summary + * @param int $truncateAt The maximum allowed size of the summary + * + * @return null|string + */ +function get_message_body_summary(MessageInterface $message, $truncateAt = 120) +{ + $body = $message->getBody(); + + if (!$body->isSeekable() || !$body->isReadable()) { + return null; + } + + $size = $body->getSize(); + + if ($size === 0) { + return null; + } + + $summary = $body->read($truncateAt); + $body->rewind(); + + if ($size > $truncateAt) { + $summary .= ' (truncated...)'; + } + + // Matches any printable character, including unicode characters: + // letters, marks, numbers, punctuation, spacing, and separators. + if (preg_match('/[^\pL\pM\pN\pP\pS\pZ\n\r\t]/', $summary)) { + return null; + } + + return $summary; +} + /** @internal */ function _caseless_remove($keys, array $data) { diff --git a/vendor/masterminds/html5/.gitignore b/vendor/masterminds/html5/.gitignore index f9ead4a8f..1fa9e5861 100644 --- a/vendor/masterminds/html5/.gitignore +++ b/vendor/masterminds/html5/.gitignore @@ -1,4 +1,5 @@ vendor/ scratch.php composer.lock -build/ \ No newline at end of file +build/ +.php_cs.cache diff --git a/vendor/masterminds/html5/.php_cs.dist b/vendor/masterminds/html5/.php_cs.dist new file mode 100644 index 000000000..d5e49183d --- /dev/null +++ b/vendor/masterminds/html5/.php_cs.dist @@ -0,0 +1,14 @@ +in(__DIR__) +; + +return PhpCsFixer\Config::create() + ->setRules(array( + '@Symfony' => true, + 'concat_space' => array('spacing' => 'one'), + 'phpdoc_annotation_without_dot' => false, + )) + ->setFinder($finder) +; diff --git a/vendor/masterminds/html5/.travis.yml b/vendor/masterminds/html5/.travis.yml index 10336df65..f10bcf3f4 100644 --- a/vendor/masterminds/html5/.travis.yml +++ b/vendor/masterminds/html5/.travis.yml @@ -1,39 +1,42 @@ language: php - +dist: trusty sudo: false -php: - - 5.4 - - 5.5 - - 5.6 - - 7.0 - - 7.1 - - hhvm - matrix: - include: - - php: 5.3 - dist: precise - fast_finish: true - -dist: trusty + include: + - php: 5.3 + dist: precise + env: COMPOSER_FLAGS="--prefer-lowest" + - php: 5.4 + - php: 5.5 + - php: 5.6 + env: SCRUTINIZER=1 + - php: 7.0 + env: COMPOSER_FLAGS="--prefer-lowest" + - php: 7.1 + env: CS_FIXER=1 + - php: 7.2 + env: BENCHMARK=1 + - php: hhvm + fast_finish: true cache: directories: - $HOME/.composer/cache -notifications: - irc: "irc.freenode.net#masterminds" - before_script: - composer self-update - - composer install + - composer update $COMPOSER_FLAGS --prefer-dist script: + - stty cols 120 + - if [ "$CS_FIXER" == 1 ]; then wget https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.13.1/php-cs-fixer.phar && php php-cs-fixer.phar fix --dry-run --diff; fi - mkdir -p build/logs - ./vendor/bin/phpunit --coverage-clover=coverage.xml after_script: - - bash -c 'if [ "$TRAVIS_PHP_VERSION" == "5.6" ] ; then wget https://scrutinizer-ci.com/ocular.phar; fi;' - - bash -c 'if [ "$TRAVIS_PHP_VERSION" == "5.6" ] ; then php ocular.phar code-coverage:upload --format=php-clover coverage.xml; fi;' - - php test/benchmark/run.php 10 + - if [ "$SCRUTINIZER" == 1 ]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover coverage.xml; fi + - if [ "$BENCHMARK" == 1 ]; then php test/benchmark/run.php 10; fi + +notifications: + irc: "irc.freenode.net#masterminds" diff --git a/vendor/masterminds/html5/README.md b/vendor/masterminds/html5/README.md index 8d8996676..ef2473700 100644 --- a/vendor/masterminds/html5/README.md +++ b/vendor/masterminds/html5/README.md @@ -2,7 +2,7 @@ HTML5 is a standards-compliant HTML5 parser and writer written entirely in PHP. It is stable and used in many production websites, and has -well over [one million downloads](https://packagist.org/packages/masterminds/html5). +well over [five million downloads](https://packagist.org/packages/masterminds/html5). HTML5 provides the following features. @@ -24,21 +24,21 @@ HTML5 provides the following features. Install HTML5-PHP using [composer](http://getcomposer.org/). -To install, add `masterminds/html5` to your `composer.json` file: +By adding the `masterminds/html5` dependency to your `composer.json` file: ```json { "require" : { - "masterminds/html5": "2.*" + "masterminds/html5": "^2.0" }, } ``` -(You may substitute `2.*` for a more specific release tag, of -course.) +By invoking require command via composer executable: -From there, use the `composer install` or `composer update` commands to -install. +```bash +composer require masterminds/html5 +``` ## Basic Usage diff --git a/vendor/masterminds/html5/RELEASE.md b/vendor/masterminds/html5/RELEASE.md index 9a8ad3286..503536c28 100644 --- a/vendor/masterminds/html5/RELEASE.md +++ b/vendor/masterminds/html5/RELEASE.md @@ -1,5 +1,13 @@ # Release Notes +2.5.0 (2018-12-27) + +- #162, #161, #155, #154, #153, #151: big performance improvements +- #156: fixed typos +- #160: adopt and enforce code style +- #159: remove deprecated php unit base test case +- #150: backport changes from old master branch + 2.4.0 (2018-11-17) - #148: Improve performance by moving sequence matching diff --git a/vendor/masterminds/html5/bin/entities.php b/vendor/masterminds/html5/bin/entities.php index 0fbd6eca0..56323a341 100644 --- a/vendor/masterminds/html5/bin/entities.php +++ b/vendor/masterminds/html5/bin/entities.php @@ -11,16 +11,16 @@ $json = json_decode($payload); $table = array(); foreach ($json as $name => $obj) { - $sname = substr($name, 1, -1); - $table[$sname] = $obj->characters; + $sname = substr($name, 1, -1); + $table[$sname] = $obj->characters; } -print ' @@ -28,6 +27,6 @@ HERE; $html5 = new HTML5(); $dom = $html5->loadHTML($html); -print "Converting to HTML 5\n"; +echo "Converting to HTML 5\n"; -$html5->save($dom, fopen("php://stdin", 'w')); +$html5->save($dom, fopen('php://stdin', 'w')); diff --git a/vendor/masterminds/html5/sami.php b/vendor/masterminds/html5/sami.php index d0dd80b54..e776cc1c2 100644 --- a/vendor/masterminds/html5/sami.php +++ b/vendor/masterminds/html5/sami.php @@ -2,9 +2,9 @@ use Sami\Sami; -return new Sami(__DIR__ . '/src' , array( - 'title' => 'HTML5-PHP API', - 'build_dir' => __DIR__.'/build/apidoc', - 'cache_dir' => __DIR__.'/build/sami-cache', +return new Sami(__DIR__ . '/src', array( + 'title' => 'HTML5-PHP API', + 'build_dir' => __DIR__ . '/build/apidoc', + 'cache_dir' => __DIR__ . '/build/sami-cache', 'default_opened_level' => 1, -)); \ No newline at end of file +)); diff --git a/vendor/masterminds/html5/src/HTML5.php b/vendor/masterminds/html5/src/HTML5.php index a3db74c3a..3d7eee934 100644 --- a/vendor/masterminds/html5/src/HTML5.php +++ b/vendor/masterminds/html5/src/HTML5.php @@ -1,9 +1,7 @@ false + private $defaultOptions = array( + // Whether the serializer should aggressively encode all characters as entities. + 'encode_entities' => false, + + // Prevents the parser from automatically assigning the HTML5 namespace to the DOM document. + 'disable_html_ns' => false, ); protected $errors = array(); - public function __construct(array $options = array()) + public function __construct(array $defaultOptions = array()) { - $this->options = array_merge($this->options, $options); + $this->defaultOptions = array_merge($this->defaultOptions, $defaultOptions); } /** - * Get the default options. + * Get the current default options. * - * @return array The default options. + * @return array */ public function getOptions() { - return $this->options; + return $this->defaultOptions; } /** @@ -55,14 +54,13 @@ class HTML5 * * The rules governing parsing are set out in the HTML 5 spec. * - * @param string|resource $file - * The path to the file to parse. If this is a resource, it is - * assumed to be an open stream whose pointer is set to the first - * byte of input. - * @param array $options - * Configuration options when parsing the HTML + * @param string|resource $file The path to the file to parse. If this is a resource, it is + * assumed to be an open stream whose pointer is set to the first + * byte of input. + * @param array $options Configuration options when parsing the HTML. + * * @return \DOMDocument A DOM document. These object type is defined by the libxml - * library, and should have been included with your version of PHP. + * library, and should have been included with your version of PHP. */ public function load($file, array $options = array()) { @@ -80,12 +78,11 @@ class HTML5 * Take a string of HTML 5 (or earlier) and parse it into a * DOMDocument. * - * @param string $string - * A html5 document as a string. - * @param array $options - * Configuration options when parsing the HTML + * @param string $string A html5 document as a string. + * @param array $options Configuration options when parsing the HTML. + * * @return \DOMDocument A DOM document. DOM is part of libxml, which is included with - * almost all distribtions of PHP. + * almost all distribtions of PHP. */ public function loadHTML($string, array $options = array()) { @@ -98,15 +95,13 @@ class HTML5 * This is here to provide backwards compatibility with the * PHP DOM implementation. It simply calls load(). * - * @param string $file - * The path to the file to parse. If this is a resource, it is - * assumed to be an open stream whose pointer is set to the first - * byte of input. - * @param array $options - * Configuration options when parsing the HTML + * @param string $file The path to the file to parse. If this is a resource, it is + * assumed to be an open stream whose pointer is set to the first + * byte of input. + * @param array $options Configuration options when parsing the HTML. * * @return \DOMDocument A DOM document. These object type is defined by the libxml - * library, and should have been included with your version of PHP. + * library, and should have been included with your version of PHP. */ public function loadHTMLFile($file, array $options = array()) { @@ -116,11 +111,11 @@ class HTML5 /** * Parse a HTML fragment from a string. * - * @param string $string The HTML5 fragment as a string. - * @param array $options Configuration options when parsing the HTML + * @param string $string the HTML5 fragment as a string + * @param array $options Configuration options when parsing the HTML * * @return \DOMDocumentFragment A DOM fragment. The DOM is part of libxml, which is included with - * almost all distributions of PHP. + * almost all distributions of PHP. */ public function loadHTMLFragment($string, array $options = array()) { @@ -128,7 +123,7 @@ class HTML5 } /** - * Return all errors encountered into parsing phase + * Return all errors encountered into parsing phase. * * @return array */ @@ -138,7 +133,7 @@ class HTML5 } /** - * Return true it some errors were encountered into parsing phase + * Return true it some errors were encountered into parsing phase. * * @return bool */ @@ -148,23 +143,20 @@ class HTML5 } /** - * Parse an input stream. - * - * Lower-level loading function. This requires an input stream instead - * of a string, file, or resource. + * Parse an input string. * * @param string $input - * @param array $options + * @param array $options * * @return \DOMDocument */ public function parse($input, array $options = array()) { $this->errors = array(); - $options = array_merge($this->getOptions(), $options); + $options = array_merge($this->defaultOptions, $options); $events = new DOMTreeBuilder(false, $options); $scanner = new Scanner($input); - $parser = new Tokenizer($scanner, $events, !empty($options['xmlNamespaces']) ? Tokenizer::CONFORMANT_XML: Tokenizer::CONFORMANT_HTML); + $parser = new Tokenizer($scanner, $events, !empty($options['xmlNamespaces']) ? Tokenizer::CONFORMANT_XML : Tokenizer::CONFORMANT_HTML); $parser->parse(); $this->errors = $events->getErrors(); @@ -178,17 +170,17 @@ class HTML5 * Lower-level loading function. This requires an input stream instead * of a string, file, or resource. * - * @param string $input The input data to parse in the form of a string. - * @param array $options An array of options + * @param string $input The input data to parse in the form of a string. + * @param array $options An array of options. * * @return \DOMDocumentFragment */ public function parseFragment($input, array $options = array()) { - $options = array_merge($this->getOptions(), $options); + $options = array_merge($this->defaultOptions, $options); $events = new DOMTreeBuilder(true, $options); $scanner = new Scanner($input); - $parser = new Tokenizer($scanner, $events, !empty($options['xmlNamespaces']) ? Tokenizer::CONFORMANT_XML: Tokenizer::CONFORMANT_HTML); + $parser = new Tokenizer($scanner, $events, !empty($options['xmlNamespaces']) ? Tokenizer::CONFORMANT_XML : Tokenizer::CONFORMANT_HTML); $parser->parse(); $this->errors = $events->getErrors(); @@ -199,15 +191,12 @@ class HTML5 /** * Save a DOM into a given file as HTML5. * - * @param mixed $dom - * The DOM to be serialized. - * @param string $file - * The filename to be written. - * @param array $options - * Configuration options when serializing the DOM. These include: - * - encode_entities: Text written to the output is escaped by default and not all - * entities are encoded. If this is set to true all entities will be encoded. - * Defaults to false. + * @param mixed $dom The DOM to be serialized. + * @param string|resource $file The filename to be written or resource to write to. + * @param array $options Configuration options when serializing the DOM. These include: + * - encode_entities: Text written to the output is escaped by default and not all + * entities are encoded. If this is set to true all entities will be encoded. + * Defaults to false. */ public function save($dom, $file, $options = array()) { @@ -216,9 +205,9 @@ class HTML5 $stream = $file; $close = false; } else { - $stream = fopen($file, 'w'); + $stream = fopen($file, 'wb'); } - $options = array_merge($this->getOptions(), $options); + $options = array_merge($this->defaultOptions, $options); $rules = new OutputRules($stream, $options); $trav = new Traverser($dom, $stream, $rules, $options); @@ -232,21 +221,19 @@ class HTML5 /** * Convert a DOM into an HTML5 string. * - * @param mixed $dom - * The DOM to be serialized. - * @param array $options - * Configuration options when serializing the DOM. These include: - * - encode_entities: Text written to the output is escaped by default and not all - * entities are encoded. If this is set to true all entities will be encoded. - * Defaults to false. + * @param mixed $dom The DOM to be serialized. + * @param array $options Configuration options when serializing the DOM. These include: + * - encode_entities: Text written to the output is escaped by default and not all + * entities are encoded. If this is set to true all entities will be encoded. + * Defaults to false. * * @return string A HTML5 documented generated from the DOM. */ public function saveHTML($dom, $options = array()) { - $stream = fopen('php://temp', 'w'); - $this->save($dom, $stream, array_merge($this->getOptions(), $options)); + $stream = fopen('php://temp', 'wb'); + $this->save($dom, $stream, array_merge($this->defaultOptions, $options)); - return stream_get_contents($stream, - 1, 0); + return stream_get_contents($stream, -1, 0); } } diff --git a/vendor/masterminds/html5/src/HTML5/Elements.php b/vendor/masterminds/html5/src/HTML5/Elements.php index b45de897c..8fe798789 100644 --- a/vendor/masterminds/html5/src/HTML5/Elements.php +++ b/vendor/masterminds/html5/src/HTML5/Elements.php @@ -2,6 +2,7 @@ /** * Provide general element functions. */ + namespace Masterminds\HTML5; /** @@ -17,7 +18,6 @@ namespace Masterminds\HTML5; */ class Elements { - /** * Indicates an element is described in the specification. */ @@ -77,116 +77,116 @@ class Elements * @var array */ public static $html5 = array( - "a" => 1, - "abbr" => 1, - "address" => 65, // NORMAL | BLOCK_TAG - "area" => 9, // NORMAL | VOID_TAG - "article" => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG - "aside" => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG - "audio" => 1, // NORMAL - "b" => 1, - "base" => 9, // NORMAL | VOID_TAG - "bdi" => 1, - "bdo" => 1, - "blockquote" => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG - "body" => 1, - "br" => 9, // NORMAL | VOID_TAG - "button" => 1, - "canvas" => 65, // NORMAL | BLOCK_TAG - "caption" => 1, - "cite" => 1, - "code" => 1, - "col" => 9, // NORMAL | VOID_TAG - "colgroup" => 1, - "command" => 9, // NORMAL | VOID_TAG + 'a' => 1, + 'abbr' => 1, + 'address' => 65, // NORMAL | BLOCK_TAG + 'area' => 9, // NORMAL | VOID_TAG + 'article' => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG + 'aside' => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG + 'audio' => 1, // NORMAL + 'b' => 1, + 'base' => 9, // NORMAL | VOID_TAG + 'bdi' => 1, + 'bdo' => 1, + 'blockquote' => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG + 'body' => 1, + 'br' => 9, // NORMAL | VOID_TAG + 'button' => 1, + 'canvas' => 65, // NORMAL | BLOCK_TAG + 'caption' => 1, + 'cite' => 1, + 'code' => 1, + 'col' => 9, // NORMAL | VOID_TAG + 'colgroup' => 1, + 'command' => 9, // NORMAL | VOID_TAG // "data" => 1, // This is highly experimental and only part of the whatwg spec (not w3c). See https://developer.mozilla.org/en-US/docs/HTML/Element/data - "datalist" => 1, - "dd" => 65, // NORMAL | BLOCK_TAG - "del" => 1, - "details" => 17, // NORMAL | AUTOCLOSE_P, - "dfn" => 1, - "dialog" => 17, // NORMAL | AUTOCLOSE_P, - "div" => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG - "dl" => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG - "dt" => 1, - "em" => 1, - "embed" => 9, // NORMAL | VOID_TAG - "fieldset" => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG - "figcaption" => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG - "figure" => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG - "footer" => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG - "form" => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG - "h1" => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG - "h2" => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG - "h3" => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG - "h4" => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG - "h5" => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG - "h6" => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG - "head" => 1, - "header" => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG - "hgroup" => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG - "hr" => 73, // NORMAL | VOID_TAG - "html" => 1, - "i" => 1, - "iframe" => 3, // NORMAL | TEXT_RAW - "img" => 9, // NORMAL | VOID_TAG - "input" => 9, // NORMAL | VOID_TAG - "kbd" => 1, - "ins" => 1, - "keygen" => 9, // NORMAL | VOID_TAG - "label" => 1, - "legend" => 1, - "li" => 1, - "link" => 9, // NORMAL | VOID_TAG - "map" => 1, - "mark" => 1, - "menu" => 17, // NORMAL | AUTOCLOSE_P, - "meta" => 9, // NORMAL | VOID_TAG - "meter" => 1, - "nav" => 17, // NORMAL | AUTOCLOSE_P, - "noscript" => 65, // NORMAL | BLOCK_TAG - "object" => 1, - "ol" => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG - "optgroup" => 1, - "option" => 1, - "output" => 65, // NORMAL | BLOCK_TAG - "p" => 209, // NORMAL | AUTOCLOSE_P | BLOCK_TAG | BLOCK_ONLY_INLINE - "param" => 9, // NORMAL | VOID_TAG - "pre" => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG - "progress" => 1, - "q" => 1, - "rp" => 1, - "rt" => 1, - "ruby" => 1, - "s" => 1, - "samp" => 1, - "script" => 3, // NORMAL | TEXT_RAW - "section" => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG - "select" => 1, - "small" => 1, - "source" => 9, // NORMAL | VOID_TAG - "span" => 1, - "strong" => 1, - "style" => 3, // NORMAL | TEXT_RAW - "sub" => 1, - "summary" => 17, // NORMAL | AUTOCLOSE_P, - "sup" => 1, - "table" => 65, // NORMAL | BLOCK_TAG - "tbody" => 1, - "td" => 1, - "textarea" => 5, // NORMAL | TEXT_RCDATA - "tfoot" => 65, // NORMAL | BLOCK_TAG - "th" => 1, - "thead" => 1, - "time" => 1, - "title" => 5, // NORMAL | TEXT_RCDATA - "tr" => 1, - "track" => 9, // NORMAL | VOID_TAG - "u" => 1, - "ul" => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG - "var" => 1, - "video" => 65, // NORMAL | BLOCK_TAG - "wbr" => 9, // NORMAL | VOID_TAG + 'datalist' => 1, + 'dd' => 65, // NORMAL | BLOCK_TAG + 'del' => 1, + 'details' => 17, // NORMAL | AUTOCLOSE_P, + 'dfn' => 1, + 'dialog' => 17, // NORMAL | AUTOCLOSE_P, + 'div' => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG + 'dl' => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG + 'dt' => 1, + 'em' => 1, + 'embed' => 9, // NORMAL | VOID_TAG + 'fieldset' => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG + 'figcaption' => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG + 'figure' => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG + 'footer' => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG + 'form' => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG + 'h1' => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG + 'h2' => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG + 'h3' => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG + 'h4' => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG + 'h5' => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG + 'h6' => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG + 'head' => 1, + 'header' => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG + 'hgroup' => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG + 'hr' => 73, // NORMAL | VOID_TAG + 'html' => 1, + 'i' => 1, + 'iframe' => 3, // NORMAL | TEXT_RAW + 'img' => 9, // NORMAL | VOID_TAG + 'input' => 9, // NORMAL | VOID_TAG + 'kbd' => 1, + 'ins' => 1, + 'keygen' => 9, // NORMAL | VOID_TAG + 'label' => 1, + 'legend' => 1, + 'li' => 1, + 'link' => 9, // NORMAL | VOID_TAG + 'map' => 1, + 'mark' => 1, + 'menu' => 17, // NORMAL | AUTOCLOSE_P, + 'meta' => 9, // NORMAL | VOID_TAG + 'meter' => 1, + 'nav' => 17, // NORMAL | AUTOCLOSE_P, + 'noscript' => 65, // NORMAL | BLOCK_TAG + 'object' => 1, + 'ol' => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG + 'optgroup' => 1, + 'option' => 1, + 'output' => 65, // NORMAL | BLOCK_TAG + 'p' => 209, // NORMAL | AUTOCLOSE_P | BLOCK_TAG | BLOCK_ONLY_INLINE + 'param' => 9, // NORMAL | VOID_TAG + 'pre' => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG + 'progress' => 1, + 'q' => 1, + 'rp' => 1, + 'rt' => 1, + 'ruby' => 1, + 's' => 1, + 'samp' => 1, + 'script' => 3, // NORMAL | TEXT_RAW + 'section' => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG + 'select' => 1, + 'small' => 1, + 'source' => 9, // NORMAL | VOID_TAG + 'span' => 1, + 'strong' => 1, + 'style' => 3, // NORMAL | TEXT_RAW + 'sub' => 1, + 'summary' => 17, // NORMAL | AUTOCLOSE_P, + 'sup' => 1, + 'table' => 65, // NORMAL | BLOCK_TAG + 'tbody' => 1, + 'td' => 1, + 'textarea' => 5, // NORMAL | TEXT_RCDATA + 'tfoot' => 65, // NORMAL | BLOCK_TAG + 'th' => 1, + 'thead' => 1, + 'time' => 1, + 'title' => 5, // NORMAL | TEXT_RCDATA + 'tr' => 1, + 'track' => 9, // NORMAL | VOID_TAG + 'u' => 1, + 'ul' => 81, // NORMAL | AUTOCLOSE_P | BLOCK_TAG + 'var' => 1, + 'video' => 65, // NORMAL | BLOCK_TAG + 'wbr' => 9, // NORMAL | VOID_TAG // Legacy? 'basefont' => 8, // VOID_TAG @@ -202,7 +202,7 @@ class Elements 'marquee' => 0, 'isindex' => 8, // VOID_TAG 'xmp' => 20, // AUTOCLOSE_P | VOID_TAG | RAW_TEXT - 'noembed' => 2 // RAW_TEXT + 'noembed' => 2, // RAW_TEXT ); /** @@ -215,45 +215,45 @@ class Elements * @var array */ public static $mathml = array( - "maction" => 1, - "maligngroup" => 1, - "malignmark" => 1, - "math" => 1, - "menclose" => 1, - "merror" => 1, - "mfenced" => 1, - "mfrac" => 1, - "mglyph" => 1, - "mi" => 1, - "mlabeledtr" => 1, - "mlongdiv" => 1, - "mmultiscripts" => 1, - "mn" => 1, - "mo" => 1, - "mover" => 1, - "mpadded" => 1, - "mphantom" => 1, - "mroot" => 1, - "mrow" => 1, - "ms" => 1, - "mscarries" => 1, - "mscarry" => 1, - "msgroup" => 1, - "msline" => 1, - "mspace" => 1, - "msqrt" => 1, - "msrow" => 1, - "mstack" => 1, - "mstyle" => 1, - "msub" => 1, - "msup" => 1, - "msubsup" => 1, - "mtable" => 1, - "mtd" => 1, - "mtext" => 1, - "mtr" => 1, - "munder" => 1, - "munderover" => 1 + 'maction' => 1, + 'maligngroup' => 1, + 'malignmark' => 1, + 'math' => 1, + 'menclose' => 1, + 'merror' => 1, + 'mfenced' => 1, + 'mfrac' => 1, + 'mglyph' => 1, + 'mi' => 1, + 'mlabeledtr' => 1, + 'mlongdiv' => 1, + 'mmultiscripts' => 1, + 'mn' => 1, + 'mo' => 1, + 'mover' => 1, + 'mpadded' => 1, + 'mphantom' => 1, + 'mroot' => 1, + 'mrow' => 1, + 'ms' => 1, + 'mscarries' => 1, + 'mscarry' => 1, + 'msgroup' => 1, + 'msline' => 1, + 'mspace' => 1, + 'msqrt' => 1, + 'msrow' => 1, + 'mstack' => 1, + 'mstyle' => 1, + 'msub' => 1, + 'msup' => 1, + 'msubsup' => 1, + 'mtable' => 1, + 'mtd' => 1, + 'mtext' => 1, + 'mtr' => 1, + 'munder' => 1, + 'munderover' => 1, ); /** @@ -269,90 +269,90 @@ class Elements * @var array */ public static $svg = array( - "a" => 1, - "altGlyph" => 1, - "altGlyphDef" => 1, - "altGlyphItem" => 1, - "animate" => 1, - "animateColor" => 1, - "animateMotion" => 1, - "animateTransform" => 1, - "circle" => 1, - "clipPath" => 1, - "color-profile" => 1, - "cursor" => 1, - "defs" => 1, - "desc" => 1, - "ellipse" => 1, - "feBlend" => 1, - "feColorMatrix" => 1, - "feComponentTransfer" => 1, - "feComposite" => 1, - "feConvolveMatrix" => 1, - "feDiffuseLighting" => 1, - "feDisplacementMap" => 1, - "feDistantLight" => 1, - "feFlood" => 1, - "feFuncA" => 1, - "feFuncB" => 1, - "feFuncG" => 1, - "feFuncR" => 1, - "feGaussianBlur" => 1, - "feImage" => 1, - "feMerge" => 1, - "feMergeNode" => 1, - "feMorphology" => 1, - "feOffset" => 1, - "fePointLight" => 1, - "feSpecularLighting" => 1, - "feSpotLight" => 1, - "feTile" => 1, - "feTurbulence" => 1, - "filter" => 1, - "font" => 1, - "font-face" => 1, - "font-face-format" => 1, - "font-face-name" => 1, - "font-face-src" => 1, - "font-face-uri" => 1, - "foreignObject" => 1, - "g" => 1, - "glyph" => 1, - "glyphRef" => 1, - "hkern" => 1, - "image" => 1, - "line" => 1, - "linearGradient" => 1, - "marker" => 1, - "mask" => 1, - "metadata" => 1, - "missing-glyph" => 1, - "mpath" => 1, - "path" => 1, - "pattern" => 1, - "polygon" => 1, - "polyline" => 1, - "radialGradient" => 1, - "rect" => 1, - "script" => 3, // NORMAL | RAW_TEXT - "set" => 1, - "stop" => 1, - "style" => 3, // NORMAL | RAW_TEXT - "svg" => 1, - "switch" => 1, - "symbol" => 1, - "text" => 1, - "textPath" => 1, - "title" => 1, - "tref" => 1, - "tspan" => 1, - "use" => 1, - "view" => 1, - "vkern" => 1 + 'a' => 1, + 'altGlyph' => 1, + 'altGlyphDef' => 1, + 'altGlyphItem' => 1, + 'animate' => 1, + 'animateColor' => 1, + 'animateMotion' => 1, + 'animateTransform' => 1, + 'circle' => 1, + 'clipPath' => 1, + 'color-profile' => 1, + 'cursor' => 1, + 'defs' => 1, + 'desc' => 1, + 'ellipse' => 1, + 'feBlend' => 1, + 'feColorMatrix' => 1, + 'feComponentTransfer' => 1, + 'feComposite' => 1, + 'feConvolveMatrix' => 1, + 'feDiffuseLighting' => 1, + 'feDisplacementMap' => 1, + 'feDistantLight' => 1, + 'feFlood' => 1, + 'feFuncA' => 1, + 'feFuncB' => 1, + 'feFuncG' => 1, + 'feFuncR' => 1, + 'feGaussianBlur' => 1, + 'feImage' => 1, + 'feMerge' => 1, + 'feMergeNode' => 1, + 'feMorphology' => 1, + 'feOffset' => 1, + 'fePointLight' => 1, + 'feSpecularLighting' => 1, + 'feSpotLight' => 1, + 'feTile' => 1, + 'feTurbulence' => 1, + 'filter' => 1, + 'font' => 1, + 'font-face' => 1, + 'font-face-format' => 1, + 'font-face-name' => 1, + 'font-face-src' => 1, + 'font-face-uri' => 1, + 'foreignObject' => 1, + 'g' => 1, + 'glyph' => 1, + 'glyphRef' => 1, + 'hkern' => 1, + 'image' => 1, + 'line' => 1, + 'linearGradient' => 1, + 'marker' => 1, + 'mask' => 1, + 'metadata' => 1, + 'missing-glyph' => 1, + 'mpath' => 1, + 'path' => 1, + 'pattern' => 1, + 'polygon' => 1, + 'polyline' => 1, + 'radialGradient' => 1, + 'rect' => 1, + 'script' => 3, // NORMAL | RAW_TEXT + 'set' => 1, + 'stop' => 1, + 'style' => 3, // NORMAL | RAW_TEXT + 'svg' => 1, + 'switch' => 1, + 'symbol' => 1, + 'text' => 1, + 'textPath' => 1, + 'title' => 1, + 'tref' => 1, + 'tspan' => 1, + 'use' => 1, + 'view' => 1, + 'vkern' => 1, ); /** - * Some attributes in SVG are case sensetitive. + * Some attributes in SVG are case sensitive. * * This map contains key/value pairs with the key as the lowercase attribute * name and the value with the correct casing. @@ -419,11 +419,11 @@ class Elements 'viewtarget' => 'viewTarget', 'xchannelselector' => 'xChannelSelector', 'ychannelselector' => 'yChannelSelector', - 'zoomandpan' => 'zoomAndPan' + 'zoomandpan' => 'zoomAndPan', ); /** - * Some SVG elements are case sensetitive. + * Some SVG elements are case sensitive. * This map contains these. * * The map contains key/value store of the name is lowercase as the keys and @@ -465,7 +465,7 @@ class Elements 'glyphref' => 'glyphRef', 'lineargradient' => 'linearGradient', 'radialgradient' => 'radialGradient', - 'textpath' => 'textPath' + 'textpath' => 'textPath', ); /** @@ -477,32 +477,26 @@ class Elements * * Elements::isA('script', Elements::TEXT_RCDATA); // Returns false. * - * @param string $name - * The element name. - * @param int $mask - * One of the constants on this class. - * @return boolean true if the element matches the mask, false otherwise. + * @param string $name The element name. + * @param int $mask One of the constants on this class. + * + * @return bool true if the element matches the mask, false otherwise. */ public static function isA($name, $mask) { - if (! static::isElement($name)) { - return false; - } - - return (static::element($name) & $mask) == $mask; + return (static::element($name) & $mask) === $mask; } /** * Test if an element is a valid html5 element. * - * @param string $name - * The name of the element. + * @param string $name The name of the element. * - * @return bool True if a html5 element and false otherwise. + * @return bool true if a html5 element and false otherwise. */ public static function isHtml5Element($name) { - // html5 element names are case insensetitive. Forcing lowercase for the check. + // html5 element names are case insensitive. Forcing lowercase for the check. // Do we need this check or will all data passed here already be lowercase? return isset(static::$html5[strtolower($name)]); } @@ -510,41 +504,37 @@ class Elements /** * Test if an element name is a valid MathML presentation element. * - * @param string $name - * The name of the element. + * @param string $name The name of the element. * - * @return bool True if a MathML name and false otherwise. + * @return bool true if a MathML name and false otherwise. */ public static function isMathMLElement($name) { - // MathML is case-sensetitive unlike html5 elements. + // MathML is case-sensitive unlike html5 elements. return isset(static::$mathml[$name]); } /** * Test if an element is a valid SVG element. * - * @param string $name - * The name of the element. + * @param string $name The name of the element. * - * @return boolean True if a SVG element and false otherise. + * @return bool true if a SVG element and false otherise. */ public static function isSvgElement($name) { - // SVG is case-sensetitive unlike html5 elements. + // SVG is case-sensitive unlike html5 elements. return isset(static::$svg[$name]); } /** * Is an element name valid in an html5 document. - * * This includes html5 elements along with other allowed embedded content * such as svg and mathml. * - * @param string $name - * The name of the element. + * @param string $name The name of the element. * - * @return bool True if valid and false otherwise. + * @return bool true if valid and false otherwise. */ public static function isElement($name) { @@ -554,10 +544,9 @@ class Elements /** * Get the element mask for the given element name. * - * @param string $name - * The name of the element. + * @param string $name The name of the element. * - * @return int|bool The element mask or false if element does not exist. + * @return int the element mask. */ public static function element($name) { @@ -571,16 +560,15 @@ class Elements return static::$mathml[$name]; } - return false; + return 0; } /** * Normalize a SVG element name to its proper case and form. * - * @param string $name - * The name of the element. + * @param string $name The name of the element. * - * @return string The normalized form of the element name. + * @return string the normalized form of the element name. */ public static function normalizeSvgElement($name) { @@ -595,8 +583,7 @@ class Elements /** * Normalize a SVG attribute name to its proper case and form. * - * @param string $name - * The name of the attribute. + * @param string $name The name of the attribute. * * @return string The normalized form of the attribute name. */ @@ -612,11 +599,9 @@ class Elements /** * Normalize a MathML attribute name to its proper case and form. - * * Note, all MathML element names are lowercase. * - * @param string $name - * The name of the attribute. + * @param string $name The name of the attribute. * * @return string The normalized form of the attribute name. */ @@ -625,7 +610,7 @@ class Elements $name = strtolower($name); // Only one attribute has a mixed case form for MathML. - if ($name == 'definitionurl') { + if ('definitionurl' === $name) { $name = 'definitionURL'; } diff --git a/vendor/masterminds/html5/src/HTML5/Entities.php b/vendor/masterminds/html5/src/HTML5/Entities.php index 2e605d652..0e7227dc1 100644 --- a/vendor/masterminds/html5/src/HTML5/Entities.php +++ b/vendor/masterminds/html5/src/HTML5/Entities.php @@ -1,4 +1,5 @@ 'Á', 'Aacut' => 'Á', @@ -2231,6 +2231,6 @@ class Entities 'Zscr' => '𝒵', 'zscr' => '𝓏', 'zwj' => '‍', - 'zwnj' => '‌' + 'zwnj' => '‌', ); } diff --git a/vendor/masterminds/html5/src/HTML5/Exception.php b/vendor/masterminds/html5/src/HTML5/Exception.php index 8f33126bd..64e97e6ff 100644 --- a/vendor/masterminds/html5/src/HTML5/Exception.php +++ b/vendor/masterminds/html5/src/HTML5/Exception.php @@ -1,4 +1,5 @@ self::NAMESPACE_HTML, 'svg' => self::NAMESPACE_SVG, - 'math' => self::NAMESPACE_MATHML + 'math' => self::NAMESPACE_MATHML, ); /** @@ -63,7 +65,7 @@ class DOMTreeBuilder implements EventHandler protected $implicitNamespaces = array( 'xml' => self::NAMESPACE_XML, 'xmlns' => self::NAMESPACE_XMLNS, - 'xlink' => self::NAMESPACE_XLINK + 'xlink' => self::NAMESPACE_XLINK, ); /** @@ -146,15 +148,15 @@ class DOMTreeBuilder implements EventHandler protected $insertMode = 0; /** - * Track if we are in an element that allows only inline child nodes + * Track if we are in an element that allows only inline child nodes. + * * @var string|null */ protected $onlyInline; /** * Quirks mode is enabled by default. - * Any document that is missing the - * DT will be considered to be in quirks mode. + * Any document that is missing the DT will be considered to be in quirks mode. */ protected $quirks = true; @@ -175,24 +177,23 @@ class DOMTreeBuilder implements EventHandler // $this->doc = \DOMImplementation::createDocument(NULL, 'html', $dt); $this->doc = $impl->createDocument(null, null, $dt); } + $this->errors = array(); $this->current = $this->doc; // ->documentElement; // Create a rules engine for tags. - $this->rules = new TreeBuildingRules($this->doc); + $this->rules = new TreeBuildingRules(); $implicitNS = array(); if (isset($this->options[self::OPT_IMPLICIT_NS])) { $implicitNS = $this->options[self::OPT_IMPLICIT_NS]; - } elseif (isset($this->options["implicitNamespaces"])) { - $implicitNS = $this->options["implicitNamespaces"]; + } elseif (isset($this->options['implicitNamespaces'])) { + $implicitNS = $this->options['implicitNamespaces']; } // Fill $nsStack with the defalut HTML5 namespaces, plus the "implicitNamespaces" array taken form $options - array_unshift($this->nsStack, $implicitNS + array( - '' => self::NAMESPACE_HTML - ) + $this->implicitNamespaces); + array_unshift($this->nsStack, $implicitNS + array('' => self::NAMESPACE_HTML) + $this->implicitNamespaces); if ($isFragment) { $this->insertMode = static::IM_IN_BODY; @@ -229,8 +230,10 @@ class DOMTreeBuilder implements EventHandler * * This is used for handling Processor Instructions as they are * inserted. If omitted, PI's are inserted directly into the DOM tree. + * + * @param InstructionProcessor $proc */ - public function setInstructionProcessor(\Masterminds\HTML5\InstructionProcessor $proc) + public function setInstructionProcessor(InstructionProcessor $proc) { $this->processor = $proc; } @@ -242,7 +245,7 @@ class DOMTreeBuilder implements EventHandler $this->quirks = $quirks; if ($this->insertMode > static::IM_INITIAL) { - $this->parseError("Illegal placement of DOCTYPE tag. Ignoring: " . $name); + $this->parseError('Illegal placement of DOCTYPE tag. Ignoring: ' . $name); return; } @@ -256,27 +259,32 @@ class DOMTreeBuilder implements EventHandler * @todo - XMLNS namespace handling (we need to parse, even if it's not valid) * - XLink, MathML and SVG namespace handling * - Omission rules: 8.1.2.4 Optional tags + * + * @param string $name + * @param array $attributes + * @param bool $selfClosing + * + * @return int */ public function startTag($name, $attributes = array(), $selfClosing = false) { - // fprintf(STDOUT, $name); $lname = $this->normalizeTagName($name); // Make sure we have an html element. - if (! $this->doc->documentElement && $name !== 'html' && ! $this->frag) { + if (!$this->doc->documentElement && 'html' !== $name && !$this->frag) { $this->startTag('html'); } // Set quirks mode if we're at IM_INITIAL with no doctype. - if ($this->insertMode == static::IM_INITIAL) { + if ($this->insertMode === static::IM_INITIAL) { $this->quirks = true; - $this->parseError("No DOCTYPE specified."); + $this->parseError('No DOCTYPE specified.'); } // SPECIAL TAG HANDLING: // Spec says do this, and "don't ask." // find the spec where this is defined... looks problematic - if ($name == 'image' && !($this->insertMode === static::IM_IN_SVG || $this->insertMode === static::IM_IN_MATHML)) { + if ('image' === $name && !($this->insertMode === static::IM_IN_SVG || $this->insertMode === static::IM_IN_MATHML)) { $name = 'img'; } @@ -292,7 +300,7 @@ class DOMTreeBuilder implements EventHandler break; case 'head': if ($this->insertMode > static::IM_BEFORE_HEAD) { - $this->parseError("Unexpected head tag outside of head context."); + $this->parseError('Unexpected head tag outside of head context.'); } else { $this->insertMode = static::IM_IN_HEAD; } @@ -307,14 +315,14 @@ class DOMTreeBuilder implements EventHandler $this->insertMode = static::IM_IN_MATHML; break; case 'noscript': - if ($this->insertMode == static::IM_IN_HEAD) { + if ($this->insertMode === static::IM_IN_HEAD) { $this->insertMode = static::IM_IN_HEAD_NOSCRIPT; } break; } // Special case handling for SVG. - if ($this->insertMode == static::IM_IN_SVG) { + if ($this->insertMode === static::IM_IN_SVG) { $lname = Elements::normalizeSvgElement($lname); } @@ -322,62 +330,58 @@ class DOMTreeBuilder implements EventHandler // when we found a tag thats appears inside $nsRoots, we have to switch the defalut namespace if (isset($this->nsRoots[$lname]) && $this->nsStack[0][''] !== $this->nsRoots[$lname]) { array_unshift($this->nsStack, array( - '' => $this->nsRoots[$lname] + '' => $this->nsRoots[$lname], ) + $this->nsStack[0]); - $pushes ++; + ++$pushes; } $needsWorkaround = false; - if (isset($this->options["xmlNamespaces"]) && $this->options["xmlNamespaces"]) { + if (isset($this->options['xmlNamespaces']) && $this->options['xmlNamespaces']) { // when xmlNamespaces is true a and we found a 'xmlns' or 'xmlns:*' attribute, we should add a new item to the $nsStack foreach ($attributes as $aName => $aVal) { - if ($aName === 'xmlns') { + if ('xmlns' === $aName) { $needsWorkaround = $aVal; array_unshift($this->nsStack, array( - '' => $aVal + '' => $aVal, ) + $this->nsStack[0]); - $pushes ++; - } elseif ((($pos = strpos($aName, ':')) ? substr($aName, 0, $pos) : '') === 'xmlns') { + ++$pushes; + } elseif ('xmlns' === (($pos = strpos($aName, ':')) ? substr($aName, 0, $pos) : '')) { array_unshift($this->nsStack, array( - substr($aName, $pos + 1) => $aVal + substr($aName, $pos + 1) => $aVal, ) + $this->nsStack[0]); - $pushes ++; + ++$pushes; } } } if ($this->onlyInline && Elements::isA($lname, Elements::BLOCK_TAG)) { - $this->autoclose($this->onlyInline); - $this->onlyInline = null; + $this->autoclose($this->onlyInline); + $this->onlyInline = null; } try { $prefix = ($pos = strpos($lname, ':')) ? substr($lname, 0, $pos) : ''; - - if ($needsWorkaround!==false) { - - $xml = "<$lname xmlns=\"$needsWorkaround\" ".(strlen($prefix) && isset($this->nsStack[0][$prefix])?("xmlns:$prefix=\"".$this->nsStack[0][$prefix]."\""):"")."/>"; + if (false !== $needsWorkaround) { + $xml = "<$lname xmlns=\"$needsWorkaround\" " . (strlen($prefix) && isset($this->nsStack[0][$prefix]) ? ("xmlns:$prefix=\"" . $this->nsStack[0][$prefix] . '"') : '') . '/>'; $frag = new \DOMDocument('1.0', 'UTF-8'); $frag->loadXML($xml); $ele = $this->doc->importNode($frag->documentElement, true); - } else { - if (!isset($this->nsStack[0][$prefix]) || ($prefix === "" && isset($this->options[self::OPT_DISABLE_HTML_NS]) && $this->options[self::OPT_DISABLE_HTML_NS])) { + if (!isset($this->nsStack[0][$prefix]) || ('' === $prefix && isset($this->options[self::OPT_DISABLE_HTML_NS]) && $this->options[self::OPT_DISABLE_HTML_NS])) { $ele = $this->doc->createElement($lname); } else { $ele = $this->doc->createElementNS($this->nsStack[0][$prefix], $lname); } } - } catch (\DOMException $e) { $this->parseError("Illegal tag name: <$lname>. Replaced with ."); $ele = $this->doc->createElement('invalid'); } if (Elements::isA($lname, Elements::BLOCK_ONLY_INLINE)) { - $this->onlyInline = $lname; + $this->onlyInline = $lname; } // When we add some namespacess, we have to track them. Later, when "endElement" is invoked, we have to remove them. @@ -396,23 +400,23 @@ class DOMTreeBuilder implements EventHandler foreach ($attributes as $aName => $aVal) { // xmlns attributes can't be set - if ($aName === 'xmlns') { + if ('xmlns' === $aName) { continue; } - if ($this->insertMode == static::IM_IN_SVG) { + if ($this->insertMode === static::IM_IN_SVG) { $aName = Elements::normalizeSvgAttribute($aName); - } elseif ($this->insertMode == static::IM_IN_MATHML) { + } elseif ($this->insertMode === static::IM_IN_MATHML) { $aName = Elements::normalizeMathMlAttribute($aName); } try { $prefix = ($pos = strpos($aName, ':')) ? substr($aName, 0, $pos) : false; - if ($prefix==='xmlns') { - $ele->setAttributeNs(self::NAMESPACE_XMLNS, $aName, $aVal); - } elseif ($prefix!==false && isset($this->nsStack[0][$prefix])) { - $ele->setAttributeNs($this->nsStack[0][$prefix], $aName, $aVal); + if ('xmlns' === $prefix) { + $ele->setAttributeNS(self::NAMESPACE_XMLNS, $aName, $aVal); + } elseif (false !== $prefix && isset($this->nsStack[0][$prefix])) { + $ele->setAttributeNS($this->nsStack[0][$prefix], $aName, $aVal); } else { $ele->setAttribute($aName, $aVal); } @@ -422,19 +426,19 @@ class DOMTreeBuilder implements EventHandler } // This is necessary on a non-DTD schema, like HTML5. - if ($aName == 'id') { + if ('id' === $aName) { $ele->setIdAttribute('id', true); } } - // Some elements have special processing rules. Handle those separately. - if ($this->rules->hasRules($name) && $this->frag !== $this->current) { + if ($this->frag !== $this->current && $this->rules->hasRules($name)) { + // Some elements have special processing rules. Handle those separately. $this->current = $this->rules->evaluate($ele, $this->current); - } // Otherwise, it's a standard element. - else { + } else { + // Otherwise, it's a standard element. $this->current->appendChild($ele); - if (! Elements::isA($name, Elements::VOID_TAG)) { + if (!Elements::isA($name, Elements::VOID_TAG)) { $this->current = $ele; } @@ -448,7 +452,7 @@ class DOMTreeBuilder implements EventHandler // This is sort of a last-ditch attempt to correct for cases where no head/body // elements are provided. - if ($this->insertMode <= static::IM_BEFORE_HEAD && $name != 'head' && $name != 'html') { + if ($this->insertMode <= static::IM_BEFORE_HEAD && 'head' !== $name && 'html' !== $name) { $this->insertMode = static::IM_IN_BODY; } @@ -456,7 +460,7 @@ class DOMTreeBuilder implements EventHandler // but we have to remove the namespaces pushed to $nsStack. if ($pushes > 0 && Elements::isA($name, Elements::VOID_TAG)) { // remove the namespaced definded by current node - for ($i = 0; $i < $pushes; $i ++) { + for ($i = 0; $i < $pushes; ++$i) { array_shift($this->nsStack); } } @@ -485,7 +489,7 @@ class DOMTreeBuilder implements EventHandler 'html', 'br', 'head', - 'title' + 'title', ))) { $this->startTag('html'); $this->endTag($name); @@ -495,13 +499,13 @@ class DOMTreeBuilder implements EventHandler } // Ignore the tag. - $this->parseError("Illegal closing tag at global scope."); + $this->parseError('Illegal closing tag at global scope.'); return; } // Special case handling for SVG. - if ($this->insertMode == static::IM_IN_SVG) { + if ($this->insertMode === static::IM_IN_SVG) { $lname = Elements::normalizeSvgElement($lname); } @@ -512,39 +516,33 @@ class DOMTreeBuilder implements EventHandler $cid = spl_object_hash($this->current); } - // XXX: Not sure whether we need this anymore. - // if ($name != $lname) { - // return $this->quirksTreeResolver($lname); - // } - // XXX: HTML has no parent. What do we do, though, // if this element appears in the wrong place? - if ($lname == 'html') { + if ('html' === $lname) { return; } // remove the namespaced definded by current node if (isset($this->pushes[$cid])) { - for ($i = 0; $i < $this->pushes[$cid][0]; $i ++) { + for ($i = 0; $i < $this->pushes[$cid][0]; ++$i) { array_shift($this->nsStack); } unset($this->pushes[$cid]); } - if (! $this->autoclose($lname)) { + if (!$this->autoclose($lname)) { $this->parseError('Could not find closing tag for ' . $lname); } - // switch ($this->insertMode) { switch ($lname) { - case "head": + case 'head': $this->insertMode = static::IM_AFTER_HEAD; break; - case "body": + case 'body': $this->insertMode = static::IM_AFTER_BODY; break; - case "svg": - case "mathml": + case 'svg': + case 'mathml': $this->insertMode = static::IM_IN_BODY; break; } @@ -566,9 +564,9 @@ class DOMTreeBuilder implements EventHandler // practical as most documents contain these characters. Other text is not // expected here so recording a parse error is necessary. $dataTmp = trim($data, " \t\n\r\f"); - if (! empty($dataTmp)) { + if (!empty($dataTmp)) { // fprintf(STDOUT, "Unexpected insert mode: %d", $this->insertMode); - $this->parseError("Unexpected text. Ignoring: " . $dataTmp); + $this->parseError('Unexpected text. Ignoring: ' . $dataTmp); } return; @@ -585,7 +583,7 @@ class DOMTreeBuilder implements EventHandler public function parseError($msg, $line = 0, $col = 0) { - $this->errors[] = sprintf("Line %d, Col %d: %s", $line, $col, $msg); + $this->errors[] = sprintf('Line %d, Col %d: %s', $line, $col, $msg); } public function getErrors() @@ -602,15 +600,14 @@ class DOMTreeBuilder implements EventHandler public function processingInstruction($name, $data = null) { // XXX: Ignore initial XML declaration, per the spec. - if ($this->insertMode == static::IM_INITIAL && 'xml' == strtolower($name)) { + if ($this->insertMode === static::IM_INITIAL && 'xml' === strtolower($name)) { return; } - // Important: The processor may modify the current DOM tree however - // it sees fit. - if (isset($this->processor)) { + // Important: The processor may modify the current DOM tree however it sees fit. + if ($this->processor instanceof InstructionProcessor) { $res = $this->processor->process($this->current, $name, $data); - if (! empty($res)) { + if (!empty($res)) { $this->current = $res; } @@ -629,24 +626,23 @@ class DOMTreeBuilder implements EventHandler /** * Apply normalization rules to a tag name. - * * See sections 2.9 and 8.1.2. * - * @param string $name - * The tag name. + * @param string $tagName + * * @return string The normalized tag name. */ - protected function normalizeTagName($name) + protected function normalizeTagName($tagName) { /* * Section 2.9 suggests that we should not do this. if (strpos($name, ':') !== false) { // We know from the grammar that there must be at least one other // char besides :, since : is not a legal tag start. $parts = explode(':', $name); return array_pop($parts); } */ - return $name; + return $tagName; } protected function quirksTreeResolver($name) { - throw new \Exception("Not implemented."); + throw new \Exception('Not implemented.'); } /** @@ -660,15 +656,16 @@ class DOMTreeBuilder implements EventHandler { $working = $this->current; do { - if ($working->nodeType != XML_ELEMENT_NODE) { + if (XML_ELEMENT_NODE !== $working->nodeType) { return false; } - if ($working->tagName == $tagName) { + if ($working->tagName === $tagName) { $this->current = $working->parentNode; return true; } } while ($working = $working->parentNode); + return false; } @@ -685,8 +682,8 @@ class DOMTreeBuilder implements EventHandler protected function isAncestor($tagName) { $candidate = $this->current; - while ($candidate->nodeType === XML_ELEMENT_NODE) { - if ($candidate->tagName == $tagName) { + while (XML_ELEMENT_NODE === $candidate->nodeType) { + if ($candidate->tagName === $tagName) { return true; } $candidate = $candidate->parentNode; @@ -704,6 +701,6 @@ class DOMTreeBuilder implements EventHandler */ protected function isParent($tagName) { - return $this->current->tagName == $tagName; + return $this->current->tagName === $tagName; } } diff --git a/vendor/masterminds/html5/src/HTML5/Parser/EventHandler.php b/vendor/masterminds/html5/src/HTML5/Parser/EventHandler.php index 3da71a3fd..9893a718b 100644 --- a/vendor/masterminds/html5/src/HTML5/Parser/EventHandler.php +++ b/vendor/masterminds/html5/src/HTML5/Parser/EventHandler.php @@ -1,4 +1,5 @@ ) - * @return int One of the Tokenizer::TEXTMODE_* constants. + * @param string $name The tag name. + * @param array $attributes An array with all of the tag's attributes. + * @param bool $selfClosing An indicator of whether or not this tag is self-closing (). + * + * @return int one of the Tokenizer::TEXTMODE_* constants */ public function startTag($name, $attributes = array(), $selfClosing = false); @@ -104,7 +98,7 @@ interface EventHandler * A CDATA section. * * @param string $data - * The unparsed character data. + * The unparsed character data */ public function cdata($data); @@ -113,10 +107,8 @@ interface EventHandler * * While user agents don't get PIs, server-side does. * - * @param string $name - * The name of the processor (e.g. 'php'). - * @param string $data - * The unparsed data. + * @param string $name The name of the processor (e.g. 'php'). + * @param string $data The unparsed data. */ public function processingInstruction($name, $data = null); } diff --git a/vendor/masterminds/html5/src/HTML5/Parser/FileInputStream.php b/vendor/masterminds/html5/src/HTML5/Parser/FileInputStream.php index 76bd17b0e..b081ed96b 100644 --- a/vendor/masterminds/html5/src/HTML5/Parser/FileInputStream.php +++ b/vendor/masterminds/html5/src/HTML5/Parser/FileInputStream.php @@ -1,4 +1,5 @@ ' string. * * @param string $sequence - * @param bool $caseSensitive + * @param bool $caseSensitive * * @return bool */ public function sequenceMatches($sequence, $caseSensitive = true) { $portion = substr($this->data, $this->char, strlen($sequence)); - return $caseSensitive ? $portion === $sequence : strcasecmp($portion, $sequence) === 0; + + return $caseSensitive ? $portion === $sequence : 0 === strcasecmp($portion, $sequence); } /** @@ -111,14 +113,13 @@ class Scanner /** * Get the next character. - * * Note: This advances the pointer. * * @return string The next character. */ public function next() { - $this->char++; + ++$this->char; if ($this->char < $this->EOF) { return $this->data[$this->char]; @@ -129,7 +130,6 @@ class Scanner /** * Get the current character. - * * Note, this does not advance the pointer. * * @return string The current character. @@ -157,19 +157,17 @@ class Scanner * Unconsume some of the data. * This moves the data pointer backwards. * - * @param int $howMany - * The number of characters to move the pointer back. + * @param int $howMany The number of characters to move the pointer back. */ public function unconsume($howMany = 1) { if (($this->char - $howMany) >= 0) { - $this->char = $this->char - $howMany; + $this->char -= $howMany; } } /** * Get the next group of that contains hex characters. - * * Note, along with getting the characters the pointer in the data will be * moved as well. * @@ -182,7 +180,6 @@ class Scanner /** * Get the next group of characters that are ASCII Alpha characters. - * * Note, along with getting the characters the pointer in the data will be * moved as well. * @@ -195,7 +192,6 @@ class Scanner /** * Get the next group of characters that are ASCII Alpha characters and numbers. - * * Note, along with getting the characters the pointer in the data will be * moved as well. * @@ -208,7 +204,6 @@ class Scanner /** * Get the next group of numbers. - * * Note, along with getting the characters the pointer in the data will be * moved as well. * @@ -221,12 +216,21 @@ class Scanner /** * Consume whitespace. - * * Whitespace in HTML5 is: formfeed, tab, newline, space. + * + * @return int The length of the matched whitespaces. */ public function whitespace() { - return $this->doCharsWhile("\n\t\f "); + if ($this->char >= $this->EOF) { + return false; + } + + $len = strspn($this->data, "\n\t\f ", $this->char); + + $this->char += $len; + + return $len; } /** @@ -236,7 +240,7 @@ class Scanner */ public function currentLine() { - if (empty($this->EOF) || $this->char == 0) { + if (empty($this->EOF) || 0 === $this->char) { return 1; } @@ -279,7 +283,7 @@ class Scanner public function columnOffset() { // Short circuit for the first char. - if ($this->char == 0) { + if (0 === $this->char) { return 0; } @@ -293,7 +297,7 @@ class Scanner // However, for here we want the length up until the next byte to be // processed, so add one to the current byte ($this->char). - if ($lastLine !== false) { + if (false !== $lastLine) { $findLengthOf = substr($this->data, $lastLine + 1, $this->char - 1 - $lastLine); } else { // After a newline. @@ -341,7 +345,7 @@ class Scanner $crlfTable = array( "\0" => "\xEF\xBF\xBD", "\r\n" => "\n", - "\r" => "\n" + "\r" => "\n", ); return strtr($data, $crlfTable); @@ -355,12 +359,11 @@ class Scanner * Matches as far as possible until we reach a certain set of bytes * and returns the matched substring. * - * @param string $bytes - * Bytes to match. - * @param int $max - * Maximum number of bytes to scan. + * @param string $bytes Bytes to match. + * @param int $max Maximum number of bytes to scan. + * * @return mixed Index or false if no match is found. You should use strong - * equality when checking the result, since index could be 0. + * equality when checking the result, since index could be 0. */ private function doCharsUntil($bytes, $max = null) { @@ -368,7 +371,7 @@ class Scanner return false; } - if ($max === 0 || $max) { + if (0 === $max || $max) { $len = strcspn($this->data, $bytes, $this->char, $max); } else { $len = strcspn($this->data, $bytes, $this->char); @@ -386,12 +389,10 @@ class Scanner * Matches as far as possible with a certain set of bytes * and returns the matched substring. * - * @param string $bytes - * A mask of bytes to match. If ANY byte in this mask matches the - * current char, the pointer advances and the char is part of the - * substring. - * @param int $max - * The max number of chars to read. + * @param string $bytes A mask of bytes to match. If ANY byte in this mask matches the + * current char, the pointer advances and the char is part of the + * substring. + * @param int $max The max number of chars to read. * * @return string */ @@ -401,7 +402,7 @@ class Scanner return false; } - if ($max === 0 || $max) { + if (0 === $max || $max) { $len = strspn($this->data, $bytes, $this->char, $max); } else { $len = strspn($this->data, $bytes, $this->char); diff --git a/vendor/masterminds/html5/src/HTML5/Parser/StringInputStream.php b/vendor/masterminds/html5/src/HTML5/Parser/StringInputStream.php index 0118468f4..0c213feb6 100644 --- a/vendor/masterminds/html5/src/HTML5/Parser/StringInputStream.php +++ b/vendor/masterminds/html5/src/HTML5/Parser/StringInputStream.php @@ -2,6 +2,7 @@ /** * Loads a string to be parsed. */ + namespace Masterminds\HTML5\Parser; /* @@ -50,7 +51,7 @@ class StringInputStream implements InputStream private $data; /** - * The current integer byte position we are in $data + * The current integer byte position we are in $data. */ private $char; @@ -67,9 +68,9 @@ class StringInputStream implements InputStream /** * Create a new InputStream wrapper. * - * @param string $data Data to parse + * @param string $data Data to parse. * @param string $encoding The encoding to use for the data. - * @param string $debug A fprintf format to use to echo the data on stdout. + * @param string $debug A fprintf format to use to echo the data on stdout. */ public function __construct($data, $encoding = 'UTF-8', $debug = '') { @@ -110,7 +111,7 @@ class StringInputStream implements InputStream $crlfTable = array( "\0" => "\xEF\xBF\xBD", "\r\n" => "\n", - "\r" => "\n" + "\r" => "\n", ); return strtr($data, $crlfTable); @@ -121,7 +122,7 @@ class StringInputStream implements InputStream */ public function currentLine() { - if (empty($this->EOF) || $this->char == 0) { + if (empty($this->EOF) || 0 === $this->char) { return 1; } // Add one to $this->char because we want the number for the next @@ -130,9 +131,7 @@ class StringInputStream implements InputStream } /** - * * @deprecated - * */ public function getCurrentLine() { @@ -141,7 +140,6 @@ class StringInputStream implements InputStream /** * Returns the current column of the current line that the tokenizer is at. - * * Newlines are column 0. The first char after a newline is column 1. * * @return int The column number. @@ -149,7 +147,7 @@ class StringInputStream implements InputStream public function columnOffset() { // Short circuit for the first char. - if ($this->char == 0) { + if (0 === $this->char) { return 0; } // strrpos is weird, and the offset needs to be negative for what we @@ -162,7 +160,7 @@ class StringInputStream implements InputStream // However, for here we want the length up until the next byte to be // processed, so add one to the current byte ($this->char). - if ($lastLine !== false) { + if (false !== $lastLine) { $findLengthOf = substr($this->data, $lastLine + 1, $this->char - 1 - $lastLine); } else { // After a newline. @@ -173,9 +171,7 @@ class StringInputStream implements InputStream } /** - * * @deprecated - * */ public function getColumnOffset() { @@ -198,7 +194,7 @@ class StringInputStream implements InputStream */ public function next() { - $this->char ++; + ++$this->char; } /** @@ -212,15 +208,11 @@ class StringInputStream implements InputStream /** * Is the current pointer location valid. * - * @return bool Is the current pointer location valid. + * @return bool Whether the current pointer location is valid. */ public function valid() { - if ($this->char < $this->EOF) { - return true; - } - - return false; + return $this->char < $this->EOF; } /** @@ -229,10 +221,10 @@ class StringInputStream implements InputStream * This reads to the end of the file, and sets the read marker at the * end of the file. * - * @note This performs bounds checking + * Note this performs bounds checking. * * @return string Returns the remaining text. If called when the InputStream is - * already exhausted, it returns an empty string. + * already exhausted, it returns an empty string. */ public function remainingChars() { @@ -254,12 +246,11 @@ class StringInputStream implements InputStream * Matches as far as possible until we reach a certain set of bytes * and returns the matched substring. * - * @param string $bytes - * Bytes to match. - * @param int $max - * Maximum number of bytes to scan. + * @param string $bytes Bytes to match. + * @param int $max Maximum number of bytes to scan. + * * @return mixed Index or false if no match is found. You should use strong - * equality when checking the result, since index could be 0. + * equality when checking the result, since index could be 0. */ public function charsUntil($bytes, $max = null) { @@ -267,7 +258,7 @@ class StringInputStream implements InputStream return false; } - if ($max === 0 || $max) { + if (0 === $max || $max) { $len = strcspn($this->data, $bytes, $this->char, $max); } else { $len = strcspn($this->data, $bytes, $this->char); @@ -285,12 +276,10 @@ class StringInputStream implements InputStream * Matches as far as possible with a certain set of bytes * and returns the matched substring. * - * @param string $bytes - * A mask of bytes to match. If ANY byte in this mask matches the - * current char, the pointer advances and the char is part of the - * substring. - * @param int $max - * The max number of chars to read. + * @param string $bytes A mask of bytes to match. If ANY byte in this mask matches the + * current char, the pointer advances and the char is part of the + * substring. + * @param int $max The max number of chars to read. * * @return string */ @@ -300,7 +289,7 @@ class StringInputStream implements InputStream return false; } - if ($max === 0 || $max) { + if (0 === $max || $max) { $len = strspn($this->data, $bytes, $this->char, $max); } else { $len = strspn($this->data, $bytes, $this->char); @@ -314,13 +303,12 @@ class StringInputStream implements InputStream /** * Unconsume characters. * - * @param int $howMany - * The number of characters to unconsume. + * @param int $howMany The number of characters to unconsume. */ public function unconsume($howMany = 1) { if (($this->char - $howMany) >= 0) { - $this->char = $this->char - $howMany; + $this->char -= $howMany; } } diff --git a/vendor/masterminds/html5/src/HTML5/Parser/Tokenizer.php b/vendor/masterminds/html5/src/HTML5/Parser/Tokenizer.php index 7b0b3f324..f4e96524b 100644 --- a/vendor/masterminds/html5/src/HTML5/Parser/Tokenizer.php +++ b/vendor/masterminds/html5/src/HTML5/Parser/Tokenizer.php @@ -1,4 +1,5 @@ characterReference(); - $tok = $this->scanner->current(); + if ('&' === $tok) { + // Character reference + $ref = $this->decodeCharacterReference(); + $this->buffer($ref); + + $tok = $this->scanner->current(); + } + // Parse tag - if ($tok === '<') { + if ('<' === $tok) { // Any buffered text data can go out now. $this->flushBuffer(); $tok = $this->scanner->next(); - $this->markupDeclaration($tok) - || $this->endTag() - || $this->processingInstruction() - || $this->tagName() - // This always returns false. - || $this->parseError("Illegal tag opening") - || $this->characterData(); + if ('!' === $tok) { + $this->markupDeclaration(); + } elseif ('/' === $tok) { + $this->endTag(); + } elseif ('?' === $tok) { + $this->processingInstruction(); + } elseif (ctype_alpha($tok)) { + $this->tagName(); + } else { + $this->parseError('Illegal tag opening'); + // TODO is this necessary ? + $this->characterData(); + } $tok = $this->scanner->current(); } - // Handle end of document - $this->eof($tok); - - // Parse character - if ($tok !== false) { + if (false === $tok) { + // Handle end of document + $this->eof(); + } else { + // Parse character switch ($this->textMode) { case Elements::TEXT_RAW: $this->rawText($tok); @@ -159,15 +163,21 @@ class Tokenizer break; default: - if (!strspn($tok, "<&")) { - // NULL character - if ($tok === "\00") { - $this->parseError("Received null character."); - } + if ('<' === $tok || '&' === $tok) { + break; + } + + // NULL character + if ("\00" === $tok) { + $this->parseError('Received null character.'); $this->text .= $tok; - $this->scanner->next(); + $this->scanner->consume(); + + break; } + + $this->text .= $this->scanner->charsUntil("<&\0"); } } @@ -184,7 +194,7 @@ class Tokenizer protected function characterData() { $tok = $this->scanner->current(); - if ($tok === false) { + if (false === $tok) { return false; } switch ($this->textMode) { @@ -193,9 +203,10 @@ class Tokenizer case Elements::TEXT_RCDATA: return $this->rcdata($tok); default: - if (strspn($tok, "<&")) { + if ('<' === $tok || '&' === $tok) { return false; } + return $this->text($tok); } } @@ -210,17 +221,17 @@ class Tokenizer protected function text($tok) { // This should never happen... - if ($tok === false) { + if (false === $tok) { return false; } // NULL character - if ($tok === "\00") { - $this->parseError("Received null character."); + if ("\00" === $tok) { + $this->parseError('Received null character.'); } $this->buffer($tok); - $this->scanner->next(); + $this->scanner->consume(); return true; } @@ -263,8 +274,8 @@ class Tokenizer $txt = ''; $caseSensitive = !Elements::isHtml5Element($this->untilTag); - while ($tok !== false && ! ($tok == '<' && ($this->scanner->sequenceMatches($sequence, $caseSensitive)))) { - if ($tok == '&') { + while (false !== $tok && !('<' == $tok && ($this->scanner->sequenceMatches($sequence, $caseSensitive)))) { + if ('&' == $tok) { $txt .= $this->decodeCharacterReference(); $tok = $this->scanner->current(); } else { @@ -274,9 +285,9 @@ class Tokenizer } $len = strlen($sequence); $this->scanner->consume($len); - $len += strlen($this->scanner->whitespace()); - if ($this->scanner->current() !== '>') { - $this->parseError("Unclosed RCDATA end tag"); + $len += $this->scanner->whitespace(); + if ('>' !== $this->scanner->current()) { + $this->parseError('Unclosed RCDATA end tag'); } $this->scanner->unconsume($len); @@ -289,78 +300,45 @@ class Tokenizer /** * If the document is read, emit an EOF event. */ - protected function eof($tok) + protected function eof() { - if ($tok === false) { - // fprintf(STDOUT, "EOF"); - $this->flushBuffer(); - $this->events->eof(); - $this->carryOn = false; - - return true; - } - - return false; - } - - /** - * Handle character references (aka entities). - * - * This version is specific to PCDATA, as it buffers data into the - * text buffer. For a generic version, see decodeCharacterReference(). - * - * HTML5 8.2.4.2 - */ - protected function characterReference() - { - if ($this->scanner->current() !== '&') { - return false; - } - - $ref = $this->decodeCharacterReference(); - $this->buffer($ref); - return true; + // fprintf(STDOUT, "EOF"); + $this->flushBuffer(); + $this->events->eof(); + $this->carryOn = false; } /** * Look for markup. */ - protected function markupDeclaration($tok) + protected function markupDeclaration() { - if ($tok != '!') { - return false; - } - $tok = $this->scanner->next(); // Comment: - if ($tok == '-' && $this->scanner->peek() == '-') { - $this->scanner->next(); // Consume the other '-' - $this->scanner->next(); // Next char. + if ('-' == $tok && '-' == $this->scanner->peek()) { + $this->scanner->consume(2); + return $this->comment(); - } - - elseif ($tok == 'D' || $tok == 'd') { // Doctype + } elseif ('D' == $tok || 'd' == $tok) { // Doctype return $this->doctype(); - } - - elseif ($tok == '[') { // CDATA section + } elseif ('[' == $tok) { // CDATA section return $this->cdataSection(); } // FINISH - $this->parseError("Expected . Emit an empty comment because 8.2.4.46 says to. - if ($tok == '>') { + if ('>' == $tok) { // Parse error. Emit the comment token. $this->parseError("Expected comment data, got '>'"); $this->events->comment(''); - $this->scanner->next(); + $this->scanner->consume(); + return true; } // Replace NULL with the replacement char. - if ($tok == "\0") { + if ("\0" == $tok) { $tok = UTF8Utils::FFFD; } - while (! $this->isCommentEnd()) { + while (!$this->isCommentEnd()) { $comment .= $tok; $tok = $this->scanner->next(); } $this->events->comment($comment); - $this->scanner->next(); + $this->scanner->consume(); + return true; } @@ -706,24 +705,26 @@ class Tokenizer $tok = $this->scanner->current(); // EOF - if ($tok === false) { + if (false === $tok) { // Hit the end. - $this->parseError("Unexpected EOF in a comment."); + $this->parseError('Unexpected EOF in a comment.'); + return true; } // If it doesn't start with -, not the end. - if ($tok != '-') { + if ('-' != $tok) { return false; } // Advance one, and test for '->' - if ($this->scanner->next() == '-' && $this->scanner->peek() == '>') { - $this->scanner->next(); // Consume the last '>' + if ('-' == $this->scanner->next() && '>' == $this->scanner->peek()) { + $this->scanner->consume(); // Consume the last '>' return true; } // Unread '-'; $this->scanner->unconsume(1); + return false; } @@ -739,13 +740,13 @@ class Tokenizer */ protected function doctype() { - if (strcasecmp($this->scanner->current(), 'D')) { - return false; - } // Check that string is DOCTYPE. - $chars = $this->scanner->charsWhile("DOCTYPEdoctype"); - if (strcasecmp($chars, 'DOCTYPE')) { + if ($this->scanner->sequenceMatches('DOCTYPE', false)) { + $this->scanner->consume(7); + } else { + $chars = $this->scanner->charsWhile('DOCTYPEdoctype'); $this->parseError('Expected DOCTYPE, got %s', $chars); + return $this->bogusComment('scanner->current(); // EOF: die. - if ($tok === false) { + if (false === $tok) { $this->events->doctype('html5', EventHandler::DOCTYPE_NONE, '', true); - return $this->eof($tok); + $this->eof(); + + return true; } // NULL char: convert. - if ($tok === "\0") { - $this->parseError("Unexpected null character in DOCTYPE."); + if ("\0" === $tok) { + $this->parseError('Unexpected null character in DOCTYPE.'); } $stop = " \n\f>"; @@ -771,61 +774,68 @@ class Tokenizer $tok = $this->scanner->current(); // If false, emit a parse error, DOCTYPE, and return. - if ($tok === false) { + if (false === $tok) { $this->parseError('Unexpected EOF in DOCTYPE declaration.'); $this->events->doctype($doctypeName, EventHandler::DOCTYPE_NONE, null, true); + return true; } // Short DOCTYPE, like - if ($tok == '>') { + if ('>' == $tok) { // DOCTYPE without a name. - if (strlen($doctypeName) == 0) { - $this->parseError("Expected a DOCTYPE name. Got nothing."); + if (0 == strlen($doctypeName)) { + $this->parseError('Expected a DOCTYPE name. Got nothing.'); $this->events->doctype($doctypeName, 0, null, true); - $this->scanner->next(); + $this->scanner->consume(); + return true; } $this->events->doctype($doctypeName); - $this->scanner->next(); + $this->scanner->consume(); + return true; } $this->scanner->whitespace(); $pub = strtoupper($this->scanner->getAsciiAlpha()); - $white = strlen($this->scanner->whitespace()); + $white = $this->scanner->whitespace(); // Get ID, and flag it as pub or system. - if (($pub == 'PUBLIC' || $pub == 'SYSTEM') && $white > 0) { + if (('PUBLIC' == $pub || 'SYSTEM' == $pub) && $white > 0) { // Get the sys ID. - $type = $pub == 'PUBLIC' ? EventHandler::DOCTYPE_PUBLIC : EventHandler::DOCTYPE_SYSTEM; + $type = 'PUBLIC' == $pub ? EventHandler::DOCTYPE_PUBLIC : EventHandler::DOCTYPE_SYSTEM; $id = $this->quotedString("\0>"); - if ($id === false) { + if (false === $id) { $this->events->doctype($doctypeName, $type, $pub, false); - return false; + + return true; } // Premature EOF. - if ($this->scanner->current() === false) { - $this->parseError("Unexpected EOF in DOCTYPE"); + if (false === $this->scanner->current()) { + $this->parseError('Unexpected EOF in DOCTYPE'); $this->events->doctype($doctypeName, $type, $id, true); + return true; } // Well-formed complete DOCTYPE. $this->scanner->whitespace(); - if ($this->scanner->current() == '>') { + if ('>' == $this->scanner->current()) { $this->events->doctype($doctypeName, $type, $id, false); - $this->scanner->next(); + $this->scanner->consume(); + return true; } // If we get here, we have scanner->charsUntil(">"); - $this->parseError("Malformed DOCTYPE."); + $this->scanner->charsUntil('>'); + $this->parseError('Malformed DOCTYPE.'); $this->events->doctype($doctypeName, $type, $id, true); - $this->scanner->next(); + $this->scanner->consume(); + return true; } @@ -833,35 +843,37 @@ class Tokenizer // Consume to > and trash. $this->scanner->charsUntil('>'); - $this->parseError("Expected PUBLIC or SYSTEM. Got %s.", $pub); + $this->parseError('Expected PUBLIC or SYSTEM. Got %s.', $pub); $this->events->doctype($doctypeName, 0, null, true); - $this->scanner->next(); + $this->scanner->consume(); + return true; } /** * Utility for reading a quoted string. * - * @param string $stopchars - * Characters (in addition to a close-quote) that should stop the string. - * E.g. sometimes '>' is higher precedence than '"' or "'". + * @param string $stopchars Characters (in addition to a close-quote) that should stop the string. + * E.g. sometimes '>' is higher precedence than '"' or "'". * - * @return mixed String if one is found (quotations omitted) + * @return mixed String if one is found (quotations omitted). */ protected function quotedString($stopchars) { $tok = $this->scanner->current(); - if ($tok == '"' || $tok == "'") { - $this->scanner->next(); + if ('"' == $tok || "'" == $tok) { + $this->scanner->consume(); $ret = $this->scanner->charsUntil($tok . $stopchars); if ($this->scanner->current() == $tok) { - $this->scanner->next(); + $this->scanner->consume(); } else { // Parse error because no close quote. - $this->parseError("Expected %s, got %s", $tok, $this->scanner->current()); + $this->parseError('Expected %s, got %s', $tok, $this->scanner->current()); } + return $ret; } + return false; } @@ -872,39 +884,40 @@ class Tokenizer */ protected function cdataSection() { - if ($this->scanner->current() != '[') { - return false; - } $cdata = ''; - $this->scanner->next(); + $this->scanner->consume(); $chars = $this->scanner->charsWhile('CDAT'); - if ($chars != 'CDATA' || $this->scanner->current() != '[') { + if ('CDATA' != $chars || '[' != $this->scanner->current()) { $this->parseError('Expected [CDATA[, got %s', $chars); + return $this->bogusComment('scanner->next(); do { - if ($tok === false) { + if (false === $tok) { $this->parseError('Unexpected EOF inside CDATA.'); $this->bogusComment('scanner->next(); - } while (! $this->scanner->sequenceMatches(']]>')); + } while (!$this->scanner->sequenceMatches(']]>')); // Consume ]]> $this->scanner->consume(3); $this->events->cdata($cdata); + return true; } // ================================================================ // Non-HTML5 // ================================================================ + /** * Handle a processing instruction. * @@ -917,37 +930,39 @@ class Tokenizer */ protected function processingInstruction() { - if ($this->scanner->current() != '?') { + if ('?' != $this->scanner->current()) { return false; } $tok = $this->scanner->next(); $procName = $this->scanner->getAsciiAlpha(); - $white = strlen($this->scanner->whitespace()); + $white = $this->scanner->whitespace(); // If not a PI, send to bogusComment. - if (strlen($procName) == 0 || $white == 0 || $this->scanner->current() == false) { + if (0 == strlen($procName) || 0 == $white || false == $this->scanner->current()) { $this->parseError("Expected processing instruction name, got $tok"); $this->bogusComment('. - while (! ($this->scanner->current() == '?' && $this->scanner->peek() == '>')) { + while (!('?' == $this->scanner->current() && '>' == $this->scanner->peek())) { $data .= $this->scanner->current(); $tok = $this->scanner->next(); - if ($tok === false) { - $this->parseError("Unexpected EOF in processing instruction."); + if (false === $tok) { + $this->parseError('Unexpected EOF in processing instruction.'); $this->events->processingInstruction($procName, $data); + return true; } } - $this->scanner->next(); // > - $this->scanner->next(); // Next token. + $this->scanner->consume(2); // Consume the closing tag $this->events->processingInstruction($procName, $data); + return true; } @@ -969,7 +984,7 @@ class Tokenizer // Optimization for reading larger blocks faster. $first = substr($sequence, 0, 1); - while ($this->scanner->current() !== false) { + while (false !== $this->scanner->current()) { $buffer .= $this->scanner->charsUntil($first); // Stop as soon as we hit the stopping condition. @@ -977,11 +992,12 @@ class Tokenizer return $buffer; } $buffer .= $this->scanner->current(); - $this->scanner->next(); + $this->scanner->consume(); } // If we get here, we hit the EOF. - $this->parseError("Unexpected EOF during text read."); + $this->parseError('Unexpected EOF during text read.'); + return $buffer; } @@ -999,7 +1015,7 @@ class Tokenizer * '' string. * * @param string $sequence - * @param bool $caseSensitive + * @param bool $caseSensitive * * @return bool */ @@ -1019,7 +1035,7 @@ class Tokenizer */ protected function flushBuffer() { - if ($this->text === '') { + if ('' === $this->text) { return; } $this->events->text($this->text); @@ -1069,9 +1085,8 @@ class Tokenizer * * If $inAttribute is set to true, a bare & will be returned as-is. * - * @param bool $inAttribute - * Set to true if the text is inside of an attribute value. - * false otherwise. + * @param bool $inAttribute Set to true if the text is inside of an attribute value. + * false otherwise. * * @return string */ @@ -1081,36 +1096,37 @@ class Tokenizer $tok = $this->scanner->next(); $start = $this->scanner->position(); - if ($tok == false) { + if (false === $tok) { return '&'; } // These indicate not an entity. We return just // the &. - if (strspn($tok, static::WHITE . "&<") == 1) { + if ("\t" === $tok || "\n" === $tok || "\f" === $tok || ' ' === $tok || '&' === $tok || '<' === $tok) { // $this->scanner->next(); return '&'; } // Numeric entity - if ($tok == '#') { + if ('#' === $tok) { $tok = $this->scanner->next(); // Hexidecimal encoding. // X[0-9a-fA-F]+; // x[0-9a-fA-F]+; - if ($tok == 'x' || $tok == 'X') { + if ('x' === $tok || 'X' === $tok) { $tok = $this->scanner->next(); // Consume x // Convert from hex code to char. $hex = $this->scanner->getHex(); if (empty($hex)) { - $this->parseError("Expected &#xHEX;, got &#x%s", $tok); + $this->parseError('Expected &#xHEX;, got &#x%s', $tok); // We unconsume because we don't know what parser rules might // be in effect for the remaining chars. For example. '&#>' // might result in a specific parsing rule inside of tag // contexts, while not inside of pcdata context. $this->scanner->unconsume(2); + return '&'; } $entity = CharacterReference::lookupHex($hex); @@ -1119,17 +1135,17 @@ class Tokenizer else { // Convert from decimal to char. $numeric = $this->scanner->getNumeric(); - if ($numeric === false) { - $this->parseError("Expected &#DIGITS;, got &#%s", $tok); + if (false === $numeric) { + $this->parseError('Expected &#DIGITS;, got &#%s', $tok); $this->scanner->unconsume(2); + return '&'; } $entity = CharacterReference::lookupDecimal($numeric); } - } elseif ($tok === '=' && $inAttribute) { + } elseif ('=' === $tok && $inAttribute) { return '&'; } else { // String entity. - // Attempt to consume a string up to a ';'. // [a-zA-Z0-9]+; $cname = $this->scanner->getAsciiAlphaNum(); @@ -1138,11 +1154,12 @@ class Tokenizer // When no entity is found provide the name of the unmatched string // and continue on as the & is not part of an entity. The & will // be converted to & elsewhere. - if ($entity == null) { - if (!$inAttribute || strlen($cname) === 0) { + if (null === $entity) { + if (!$inAttribute || '' === $cname) { $this->parseError("No match in entity table for '%s'", $cname); } $this->scanner->unconsume($this->scanner->position() - $start); + return '&'; } } @@ -1151,8 +1168,9 @@ class Tokenizer $tok = $this->scanner->current(); // We have an entity. We're done here. - if ($tok == ';') { - $this->scanner->next(); + if (';' === $tok) { + $this->scanner->consume(); + return $entity; } @@ -1160,10 +1178,12 @@ class Tokenizer // entire string. Otherwise, failure to match is an error. if ($inAttribute) { $this->scanner->unconsume($this->scanner->position() - $start); + return '&'; } - $this->parseError("Expected &ENTITY;, got &ENTITY%s (no trailing ;) ", $tok); + $this->parseError('Expected &ENTITY;, got &ENTITY%s (no trailing ;) ', $tok); + return '&' . $entity; } } diff --git a/vendor/masterminds/html5/src/HTML5/Parser/TreeBuildingRules.php b/vendor/masterminds/html5/src/HTML5/Parser/TreeBuildingRules.php index d092872cd..00d3951fd 100644 --- a/vendor/masterminds/html5/src/HTML5/Parser/TreeBuildingRules.php +++ b/vendor/masterminds/html5/src/HTML5/Parser/TreeBuildingRules.php @@ -1,4 +1,5 @@ 1, 'dd' => 1, @@ -29,20 +29,9 @@ class TreeBuildingRules 'tbody' => 1, 'table' => 1, 'optgroup' => 1, - 'option' => 1 + 'option' => 1, ); - /** - * Build a new rules engine. - * - * @param \DOMDocument $doc - * The DOM document to use for evaluation and modification. - */ - public function __construct($doc) - { - $this->doc = $doc; - } - /** * Returns true if the given tagname has special processing rules. */ @@ -71,7 +60,7 @@ class TreeBuildingRules return $this->handleRT($new, $current); case 'optgroup': return $this->closeIfCurrentMatches($new, $current, array( - 'optgroup' + 'optgroup', )); case 'option': return $this->closeIfCurrentMatches($new, $current, array( @@ -79,13 +68,13 @@ class TreeBuildingRules )); case 'tr': return $this->closeIfCurrentMatches($new, $current, array( - 'tr' + 'tr', )); case 'td': case 'th': return $this->closeIfCurrentMatches($new, $current, array( 'th', - 'td' + 'td', )); case 'tbody': case 'thead': @@ -95,7 +84,7 @@ class TreeBuildingRules return $this->closeIfCurrentMatches($new, $current, array( 'thead', 'tfoot', - 'tbody' + 'tbody', )); } @@ -105,7 +94,7 @@ class TreeBuildingRules protected function handleLI($ele, $current) { return $this->closeIfCurrentMatches($ele, $current, array( - 'li' + 'li', )); } @@ -113,7 +102,7 @@ class TreeBuildingRules { return $this->closeIfCurrentMatches($ele, $current, array( 'dt', - 'dd' + 'dd', )); } @@ -121,13 +110,13 @@ class TreeBuildingRules { return $this->closeIfCurrentMatches($ele, $current, array( 'rt', - 'rp' + 'rp', )); } protected function closeIfCurrentMatches($ele, $current, $match) { - if (in_array($current->tagName, $match)) { + if (in_array($current->tagName, $match, true)) { $current->parentNode->appendChild($ele); } else { $current->appendChild($ele); diff --git a/vendor/masterminds/html5/src/HTML5/Parser/UTF8Utils.php b/vendor/masterminds/html5/src/HTML5/Parser/UTF8Utils.php index 451c15586..bbf6d5b42 100644 --- a/vendor/masterminds/html5/src/HTML5/Parser/UTF8Utils.php +++ b/vendor/masterminds/html5/src/HTML5/Parser/UTF8Utils.php @@ -1,5 +1,7 @@ ' ', "\n" => ' ', @@ -1528,6 +1528,6 @@ class HTML5Entities '𝕨' => '𝕨', '𝕩' => '𝕩', '𝕪' => '𝕪', - '𝕫' => '𝕫' + '𝕫' => '𝕫', ); } diff --git a/vendor/masterminds/html5/src/HTML5/Serializer/OutputRules.php b/vendor/masterminds/html5/src/HTML5/Serializer/OutputRules.php index a22683c38..41616d57a 100644 --- a/vendor/masterminds/html5/src/HTML5/Serializer/OutputRules.php +++ b/vendor/masterminds/html5/src/HTML5/Serializer/OutputRules.php @@ -6,6 +6,7 @@ * These output rules are likely to generate output similar to the document that * was parsed. It is not intended to output exactly the document that was parsed. */ + namespace Masterminds\HTML5\Serializer; use Masterminds\HTML5\Elements; @@ -13,10 +14,10 @@ use Masterminds\HTML5\Elements; /** * Generate the output html5 based on element rules. */ -class OutputRules implements \Masterminds\HTML5\Serializer\RulesInterface +class OutputRules implements RulesInterface { /** - * Defined in http://www.w3.org/TR/html51/infrastructure.html#html-namespace-0 + * Defined in http://www.w3.org/TR/html51/infrastructure.html#html-namespace-0. */ const NAMESPACE_HTML = 'http://www.w3.org/1999/xhtml'; @@ -31,7 +32,7 @@ class OutputRules implements \Masterminds\HTML5\Serializer\RulesInterface const NAMESPACE_XMLNS = 'http://www.w3.org/2000/xmlns/'; /** - * Holds the HTML5 element names that causes a namespace switch + * Holds the HTML5 element names that causes a namespace switch. * * @var array */ @@ -50,8 +51,9 @@ class OutputRules implements \Masterminds\HTML5\Serializer\RulesInterface const IM_IN_MATHML = 3; /** - * Used as cache to detect if is available ENT_HTML5 - * @var boolean + * Used as cache to detect if is available ENT_HTML5. + * + * @var bool */ private $hasHTML5 = false; @@ -169,12 +171,13 @@ class OutputRules implements \Masterminds\HTML5\Serializer\RulesInterface // If HHVM, see https://github.com/facebook/hhvm/issues/2727 $this->hasHTML5 = defined('ENT_HTML5') && !defined('HHVM_VERSION'); } + public function addRule(array $rule) { $this->nonBooleanAttributes[] = $rule; } - public function setTraverser(\Masterminds\HTML5\Serializer\Traverser $traverser) + public function setTraverser(Traverser $traverser) { $this->traverser = $traverser; @@ -211,10 +214,10 @@ class OutputRules implements \Masterminds\HTML5\Serializer\RulesInterface // If we are in SVG or MathML there is special handling. // Using if/elseif instead of switch because it's faster in PHP. - if ($name == 'svg') { + if ('svg' == $name) { $this->outputMode = static::IM_IN_SVG; $name = Elements::normalizeSvgElement($name); - } elseif ($name == 'math') { + } elseif ('math' == $name) { $this->outputMode = static::IM_IN_MATHML; } @@ -234,13 +237,13 @@ class OutputRules implements \Masterminds\HTML5\Serializer\RulesInterface } // Close out the SVG or MathML special handling. - if ($name == 'svg' || $name == 'math') { + if ('svg' == $name || 'math' == $name) { $this->outputMode = static::IM_IN_HTML; } } // If not unary, add a closing tag. - if (! Elements::isA($name, Elements::VOID_TAG)) { + if (!Elements::isA($name, Elements::VOID_TAG)) { $this->closeTag($ele); } } @@ -248,13 +251,13 @@ class OutputRules implements \Masterminds\HTML5\Serializer\RulesInterface /** * Write a text node. * - * @param \DOMText $ele - * The text node to write. + * @param \DOMText $ele The text node to write. */ public function text($ele) { if (isset($ele->parentNode) && isset($ele->parentNode->tagName) && Elements::isA($ele->parentNode->localName, Elements::TEXT_RAW)) { $this->wr($ele->data); + return; } @@ -283,20 +286,19 @@ class OutputRules implements \Masterminds\HTML5\Serializer\RulesInterface ->wr($ele->data) ->wr('?>'); } + /** - * Write the namespace attributes + * Write the namespace attributes. * - * - * @param \DOMNode $ele - * The element being written. + * @param \DOMNode $ele The element being written. */ protected function namespaceAttrs($ele) { - if (!$this->xpath || $this->xpath->document !== $ele->ownerDocument){ + if (!$this->xpath || $this->xpath->document !== $ele->ownerDocument) { $this->xpath = new \DOMXPath($ele->ownerDocument); } - foreach( $this->xpath->query('namespace::*[not(.=../../namespace::*)]', $ele ) as $nsNode ) { + foreach ($this->xpath->query('namespace::*[not(.=../../namespace::*)]', $ele) as $nsNode) { if (!in_array($nsNode->nodeValue, $this->implicitNamespaces)) { $this->wr(' ')->wr($nsNode->nodeName)->wr('="')->wr($nsNode->nodeValue)->wr('"'); } @@ -309,18 +311,15 @@ class OutputRules implements \Masterminds\HTML5\Serializer\RulesInterface * Tags for HTML, MathML, and SVG are in the local name. Otherwise, use the * qualified name (8.3). * - * @param \DOMNode $ele - * The element being written. + * @param \DOMNode $ele The element being written. */ protected function openTag($ele) { $this->wr('<')->wr($this->traverser->isLocalElement($ele) ? $ele->localName : $ele->tagName); - $this->attrs($ele); $this->namespaceAttrs($ele); - if ($this->outputMode == static::IM_IN_HTML) { $this->wr('>'); } // If we are not in html mode we are in SVG, MathML, or XML embedded content. @@ -337,7 +336,7 @@ class OutputRules implements \Masterminds\HTML5\Serializer\RulesInterface protected function attrs($ele) { // FIXME: Needs support for xml, xmlns, xlink, and namespaced elements. - if (! $ele->hasAttributes()) { + if (!$ele->hasAttributes()) { return $this; } @@ -345,7 +344,7 @@ class OutputRules implements \Masterminds\HTML5\Serializer\RulesInterface // value-less attributes. $map = $ele->attributes; $len = $map->length; - for ($i = 0; $i < $len; ++ $i) { + for ($i = 0; $i < $len; ++$i) { $node = $map->item($i); $val = $this->enc($node->value, true); @@ -365,45 +364,42 @@ class OutputRules implements \Masterminds\HTML5\Serializer\RulesInterface $this->wr(' ')->wr($name); - if ((isset($val) && $val !== '') || $this->nonBooleanAttribute($node)) { + if ((isset($val) && '' !== $val) || $this->nonBooleanAttribute($node)) { $this->wr('="')->wr($val)->wr('"'); } } } - protected function nonBooleanAttribute(\DOMAttr $attr) { $ele = $attr->ownerElement; - foreach($this->nonBooleanAttributes as $rule){ - - if(isset($rule['nodeNamespace']) && $rule['nodeNamespace']!==$ele->namespaceURI){ + foreach ($this->nonBooleanAttributes as $rule) { + if (isset($rule['nodeNamespace']) && $rule['nodeNamespace'] !== $ele->namespaceURI) { continue; } - if(isset($rule['attNamespace']) && $rule['attNamespace']!==$attr->namespaceURI){ + if (isset($rule['attNamespace']) && $rule['attNamespace'] !== $attr->namespaceURI) { continue; } - if(isset($rule['nodeName']) && !is_array($rule['nodeName']) && $rule['nodeName']!==$ele->localName){ + if (isset($rule['nodeName']) && !is_array($rule['nodeName']) && $rule['nodeName'] !== $ele->localName) { continue; } - if(isset($rule['nodeName']) && is_array($rule['nodeName']) && !in_array($ele->localName, $rule['nodeName'], true)){ + if (isset($rule['nodeName']) && is_array($rule['nodeName']) && !in_array($ele->localName, $rule['nodeName'], true)) { continue; } - if(isset($rule['attrName']) && !is_array($rule['attrName']) && $rule['attrName']!==$attr->localName){ + if (isset($rule['attrName']) && !is_array($rule['attrName']) && $rule['attrName'] !== $attr->localName) { continue; } - if(isset($rule['attrName']) && is_array($rule['attrName']) && !in_array($attr->localName, $rule['attrName'], true)){ + if (isset($rule['attrName']) && is_array($rule['attrName']) && !in_array($attr->localName, $rule['attrName'], true)) { continue; } - if(isset($rule['xpath'])){ - + if (isset($rule['xpath'])) { $xp = $this->getXPath($attr); - if(isset($rule['prefixes'])){ - foreach($rule['prefixes'] as $nsPrefix => $ns){ + if (isset($rule['prefixes'])) { + foreach ($rule['prefixes'] as $nsPrefix => $ns) { $xp->registerNamespace($nsPrefix, $ns); } } - if(!$xp->evaluate($rule['xpath'], $attr)){ + if (!$xp->evaluate($rule['xpath'], $attr)) { continue; } } @@ -414,10 +410,12 @@ class OutputRules implements \Masterminds\HTML5\Serializer\RulesInterface return false; } - private function getXPath(\DOMNode $node){ - if(!$this->xpath){ + private function getXPath(\DOMNode $node) + { + if (!$this->xpath) { $this->xpath = new \DOMXPath($node->ownerDocument); } + return $this->xpath; } @@ -427,8 +425,7 @@ class OutputRules implements \Masterminds\HTML5\Serializer\RulesInterface * Tags for HTML, MathML, and SVG are in the local name. Otherwise, use the * qualified name (8.3). * - * @param \DOMNode $ele - * The element being written. + * @param \DOMNode $ele The element being written. */ protected function closeTag($ele) { @@ -440,25 +437,26 @@ class OutputRules implements \Masterminds\HTML5\Serializer\RulesInterface /** * Write to the output. * - * @param string $text - * The string to put into the output. + * @param string $text The string to put into the output * - * @return \Masterminds\HTML5\Serializer\Traverser $this so it can be used in chaining. + * @return $this */ protected function wr($text) { fwrite($this->out, $text); + return $this; } /** * Write a new line character. * - * @return \Masterminds\HTML5\Serializer\Traverser $this so it can be used in chaining. + * @return $this */ protected function nl() { fwrite($this->out, PHP_EOL); + return $this; } @@ -484,18 +482,15 @@ class OutputRules implements \Masterminds\HTML5\Serializer\RulesInterface * * @todo Use the Entities class in php 5.3 to have html5 entities. * - * @param string $text - * text to encode. - * @param boolean $attribute - * True if we are encoding an attrubute, false otherwise + * @param string $text Text to encode. + * @param bool $attribute True if we are encoding an attrubute, false otherwise. * * @return string The encoded text. */ protected function enc($text, $attribute = false) { - // Escape the text rather than convert to named character references. - if (! $this->encode) { + if (!$this->encode) { return $this->escape($text, $attribute); } @@ -507,7 +502,7 @@ class OutputRules implements \Masterminds\HTML5\Serializer\RulesInterface } // If a version earlier than 5.4 html5 entities are not entirely handled. // This manually handles them. else { - return strtr($text, \Masterminds\HTML5\Serializer\HTML5Entities::$map); + return strtr($text, HTML5Entities::$map); } } @@ -525,14 +520,11 @@ class OutputRules implements \Masterminds\HTML5\Serializer\RulesInterface * * @see http://www.w3.org/TR/2013/CR-html5-20130806/syntax.html#escapingString * - * @param string $text - * text to escape. - * @param boolean $attribute - * True if we are escaping an attrubute, false otherwise + * @param string $text Text to escape. + * @param bool $attribute True if we are escaping an attrubute, false otherwise. */ protected function escape($text, $attribute = false) { - // Not using htmlspecialchars because, while it does escaping, it doesn't // match the requirements of section 8.5. For example, it doesn't handle // non-breaking spaces. @@ -540,14 +532,14 @@ class OutputRules implements \Masterminds\HTML5\Serializer\RulesInterface $replace = array( '"' => '"', '&' => '&', - "\xc2\xa0" => ' ' + "\xc2\xa0" => ' ', ); } else { $replace = array( '<' => '<', '>' => '>', '&' => '&', - "\xc2\xa0" => ' ' + "\xc2\xa0" => ' ', ); } diff --git a/vendor/masterminds/html5/src/HTML5/Serializer/RulesInterface.php b/vendor/masterminds/html5/src/HTML5/Serializer/RulesInterface.php index 6ef5e5e52..69a6ecdad 100644 --- a/vendor/masterminds/html5/src/HTML5/Serializer/RulesInterface.php +++ b/vendor/masterminds/html5/src/HTML5/Serializer/RulesInterface.php @@ -3,28 +3,24 @@ * @file * The interface definition for Rules to generate output. */ + namespace Masterminds\HTML5\Serializer; /** - * To create a new rule set for writing output the RulesInterface needs to be - * implemented. - * The resulting class can be specified in the options with the - * key of rules. + * To create a new rule set for writing output the RulesInterface needs to be implemented. + * The resulting class can be specified in the options with the key of rules. * - * For an example implementation see \Masterminds\HTML5\Serializer\OutputRules. + * For an example implementation see Serializer\OutputRules. */ interface RulesInterface { - /** * The class constructor. * * Note, before the rules can be used a traverser must be registered. * - * @param mixed $output - * The output stream to write output to. - * @param array $options - * An array of options. + * @param mixed $output The output stream to write output to. + * @param array $options An array of options. */ public function __construct($output, $options = array()); @@ -33,11 +29,11 @@ interface RulesInterface * * Note, only one traverser can be used by the rules. * - * @param \Masterminds\HTML5\Serializer\Traverser $traverser - * The traverser used in the rules. - * @return \Masterminds\HTML5\Serializer\RulesInterface $this for the current object. + * @param Traverser $traverser The traverser used in the rules. + * + * @return RulesInterface $this for the current object. */ - public function setTraverser(\Masterminds\HTML5\Serializer\Traverser $traverser); + public function setTraverser(Traverser $traverser); /** * Write a document element (\DOMDocument). @@ -92,7 +88,7 @@ interface RulesInterface /** * Write a processor instruction. * - * To learn about processor instructions see \Masterminds\HTML5\InstructionProcessor + * To learn about processor instructions see InstructionProcessor * * Instead of returning the result write it to the output stream ($output) * that was passed into the constructor. diff --git a/vendor/masterminds/html5/src/HTML5/Serializer/Traverser.php b/vendor/masterminds/html5/src/HTML5/Serializer/Traverser.php index e95dc3664..1e8d7924e 100644 --- a/vendor/masterminds/html5/src/HTML5/Serializer/Traverser.php +++ b/vendor/masterminds/html5/src/HTML5/Serializer/Traverser.php @@ -1,4 +1,5 @@ 'html', 'http://www.w3.org/1998/Math/MathML' => 'math', - 'http://www.w3.org/2000/svg' => 'svg' + 'http://www.w3.org/2000/svg' => 'svg', ); protected $dom; @@ -35,16 +35,13 @@ class Traverser /** * Create a traverser. * - * @param DOMNode|DOMNodeList $dom - * The document or node to traverse. - * @param resource $out - * A stream that allows writing. The traverser will output into this - * stream. - * @param array $options - * An array or options for the traverser as key/value pairs. These include: - * - encode_entities: A bool to specify if full encding should happen for all named - * charachter references. Defaults to false which escapes &'<>". - * - output_rules: The path to the class handling the output rules. + * @param \DOMNode|\DOMNodeList $dom The document or node to traverse. + * @param resource $out A stream that allows writing. The traverser will output into this + * stream. + * @param array $options An array of options for the traverser as key/value pairs. These include: + * - encode_entities: A bool to specify if full encding should happen for all named + * charachter references. Defaults to false which escapes &'<>". + * - output_rules: The path to the class handling the output rules. */ public function __construct($dom, $out, RulesInterface $rules, $options = array()) { @@ -59,8 +56,7 @@ class Traverser /** * Tell the traverser to walk the DOM. * - * @return resource $out - * Returns the output stream. + * @return resource $out Returns the output stream. */ public function walk() { @@ -87,8 +83,7 @@ class Traverser /** * Process a node in the DOM. * - * @param mixed $node - * A node implementing \DOMNode. + * @param mixed $node A node implementing \DOMNode. */ public function node($node) { @@ -119,8 +114,7 @@ class Traverser /** * Walk through all the nodes on a node list. * - * @param \DOMNodeList $nl - * A list of child elements to walk through. + * @param \DOMNodeList $nl A list of child elements to walk through. */ public function children($nl) { @@ -132,10 +126,9 @@ class Traverser /** * Is an element local? * - * @param mixed $ele - * An element that implement \DOMNode. + * @param mixed $ele An element that implement \DOMNode. * - * @return bool True if local and false otherwise. + * @return bool true if local and false otherwise. */ public function isLocalElement($ele) { diff --git a/vendor/masterminds/html5/test/HTML5/ElementsTest.php b/vendor/masterminds/html5/test/HTML5/ElementsTest.php index f4b377a76..08b5ee425 100644 --- a/vendor/masterminds/html5/test/HTML5/ElementsTest.php +++ b/vendor/masterminds/html5/test/HTML5/ElementsTest.php @@ -1,247 +1,247 @@ assertFalse(Elements::isHtml5Element($element), 'html5 element test failed on: ' . $element); @@ -269,14 +269,14 @@ class ElementsTest extends TestCase foreach ($this->mathmlElements as $element) { $this->assertTrue(Elements::isMathMLElement($element), 'MathML element test failed on: ' . $element); - // MathML is case sensetitive so these should all fail. + // MathML is case sensitive so these should all fail. $this->assertFalse(Elements::isMathMLElement(strtoupper($element)), 'MathML element test failed on: ' . strtoupper($element)); } $nonMathML = array( 'foo', 'bar', - 'baz' + 'baz', ); foreach ($nonMathML as $element) { $this->assertFalse(Elements::isMathMLElement($element), 'MathML element test failed on: ' . $element); @@ -288,14 +288,14 @@ class ElementsTest extends TestCase foreach ($this->svgElements as $element) { $this->assertTrue(Elements::isSvgElement($element), 'SVG element test failed on: ' . $element); - // SVG is case sensetitive so these should all fail. + // SVG is case sensitive so these should all fail. $this->assertFalse(Elements::isSvgElement(strtoupper($element)), 'SVG element test failed on: ' . strtoupper($element)); } $nonSVG = array( 'foo', 'bar', - 'baz' + 'baz', ); foreach ($nonSVG as $element) { $this->assertFalse(Elements::isSvgElement($element), 'SVG element test failed on: ' . $element); @@ -313,17 +313,17 @@ class ElementsTest extends TestCase foreach ($this->mathmlElements as $element) { $this->assertTrue(Elements::isElement($element), 'MathML element test failed on: ' . $element); - // MathML is case sensetitive so these should all fail. + // MathML is case sensitive so these should all fail. $this->assertFalse(Elements::isElement(strtoupper($element)), 'MathML element test failed on: ' . strtoupper($element)); } foreach ($this->svgElements as $element) { $this->assertTrue(Elements::isElement($element), 'SVG element test failed on: ' . $element); - // SVG is case sensetitive so these should all fail. But, there is duplication - // html5 and SVG. Since html5 is case insensetitive we need to make sure + // SVG is case sensitive so these should all fail. But, there is duplication + // html5 and SVG. Since html5 is case insensitive we need to make sure // it's not a html5 element first. - if (! in_array($element, $this->html5Elements)) { + if (!in_array($element, $this->html5Elements)) { $this->assertFalse(Elements::isElement(strtoupper($element)), 'SVG element test failed on: ' . strtoupper($element)); } } @@ -331,7 +331,7 @@ class ElementsTest extends TestCase $nonhtml5 = array( 'foo', 'bar', - 'baz' + 'baz', ); foreach ($nonhtml5 as $element) { $this->assertFalse(Elements::isElement($element), 'html5 element test failed on: ' . $element); @@ -348,10 +348,10 @@ class ElementsTest extends TestCase $nonhtml5 = array( 'foo', 'bar', - 'baz' + 'baz', ); foreach ($nonhtml5 as $element) { - $this->assertFalse(Elements::element($element)); + $this->assertEquals(0, Elements::element($element)); } } @@ -373,7 +373,7 @@ class ElementsTest extends TestCase 'embed', 'frame', 'hr', - 'img' + 'img', ); foreach ($voidElements as $element) { @@ -383,7 +383,7 @@ class ElementsTest extends TestCase $nonVoid = array( 'span', 'a', - 'div' + 'div', ); foreach ($nonVoid as $tag) { $this->assertFalse(Elements::isA($tag, Elements::VOID_TAG), 'Void element test failed on: ' . $tag); @@ -421,7 +421,7 @@ class ElementsTest extends TestCase 'table', 'tfoot', 'ul', - 'video' + 'video', ); foreach ($blockTags as $tag) { @@ -431,7 +431,7 @@ class ElementsTest extends TestCase $nonBlockTags = array( 'span', 'img', - 'label' + 'label', ); foreach ($nonBlockTags as $tag) { $this->assertFalse(Elements::isA($tag, Elements::BLOCK_TAG), 'Block tag test failed on: ' . $tag); @@ -446,7 +446,7 @@ class ElementsTest extends TestCase 'BAR' => 'bar', 'fespecularlighting' => 'feSpecularLighting', 'bAz' => 'baz', - 'foreignobject' => 'foreignObject' + 'foreignobject' => 'foreignObject', ); foreach ($tests as $input => $expected) { @@ -462,7 +462,7 @@ class ElementsTest extends TestCase 'BAR' => 'bar', 'limitingconeangle' => 'limitingConeAngle', 'bAz' => 'baz', - 'patterncontentunits' => 'patternContentUnits' + 'patterncontentunits' => 'patternContentUnits', ); foreach ($tests as $input => $expected) { @@ -475,7 +475,7 @@ class ElementsTest extends TestCase $tests = array( 'foo' => 'foo', 'definitionurl' => 'definitionURL', - 'BAR' => 'bar' + 'BAR' => 'bar', ); foreach ($tests as $input => $expected) { diff --git a/vendor/masterminds/html5/test/HTML5/Html5Test.php b/vendor/masterminds/html5/test/HTML5/Html5Test.php index 77643c4a9..47bcafd67 100644 --- a/vendor/masterminds/html5/test/HTML5/Html5Test.php +++ b/vendor/masterminds/html5/test/HTML5/Html5Test.php @@ -1,9 +1,9 @@ html5 = $this->getInstance(); @@ -28,20 +28,19 @@ class Html5Test extends TestCase return $out; } - public function testImageTagsInSvg() { - $html = " + $html = ' foo - + - "; + '; $doc = $this->html5->loadHTML($html); $this->assertInstanceOf('DOMElement', $doc->getElementsByTagName('image')->item(0)); $this->assertEmpty($this->html5->getErrors()); @@ -52,29 +51,29 @@ class Html5Test extends TestCase // doc $dom = $this->html5->loadHTML($this->wrap(''), array( 'implicitNamespaces' => array('t' => 'http://example.com'), - "xmlNamespaces" => true + 'xmlNamespaces' => true, )); $this->assertInstanceOf('\DOMDocument', $dom); $this->assertEmpty($this->html5->getErrors()); $this->assertFalse($this->html5->hasErrors()); - $xpath = new \DOMXPath( $dom ); - $xpath->registerNamespace( "t", "http://example.com" ); - $this->assertEquals(1, $xpath->query( "//t:tag" )->length); + $xpath = new \DOMXPath($dom); + $xpath->registerNamespace('t', 'http://example.com'); + $this->assertEquals(1, $xpath->query('//t:tag')->length); // doc fragment $frag = $this->html5->loadHTMLFragment('', array( 'implicitNamespaces' => array('t' => 'http://example.com'), - "xmlNamespaces" => true + 'xmlNamespaces' => true, )); $this->assertInstanceOf('\DOMDocumentFragment', $frag); $this->assertEmpty($this->html5->getErrors()); $this->assertFalse($this->html5->hasErrors()); $frag->ownerDocument->appendChild($frag); - $xpath = new \DOMXPath( $frag->ownerDocument ); - $xpath->registerNamespace( "t", "http://example.com" ); - $this->assertEquals(1, $xpath->query( "//t:tag" , $frag)->length); + $xpath = new \DOMXPath($frag->ownerDocument); + $xpath->registerNamespace('t', 'http://example.com'); + $this->assertEquals(1, $xpath->query('//t:tag', $frag)->length); } public function testErrors() @@ -162,11 +161,11 @@ class Html5Test extends TestCase // Test resource $file = fopen('php://temp', 'w'); $this->html5->save($dom, $file); - $content = stream_get_contents($file, - 1, 0); + $content = stream_get_contents($file, -1, 0); $this->assertRegExp('|

This is a test.

|', $content); // Test file - $tmpfname = tempnam(sys_get_temp_dir(), "html5-php"); + $tmpfname = tempnam(sys_get_temp_dir(), 'html5-php'); $this->html5->save($dom, $tmpfname); $content = file_get_contents($tmpfname); $this->assertRegExp('|

This is a test.

|', $content); @@ -197,7 +196,7 @@ class Html5Test extends TestCase $html5 = $this->getInstance(array( 'foo' => 'bar', - 'encode_entities' => true + 'encode_entities' => true, )); $options = $html5->getOptions(); $this->assertEquals('bar', $options['foo']); @@ -233,11 +232,11 @@ class Html5Test extends TestCase $list = $dom->getElementsByTagName('svg'); $this->assertNotEmpty($list->length); $svg = $list->item(0); - $this->assertEquals("0 0 3 2", $svg->getAttribute('viewBox')); + $this->assertEquals('0 0 3 2', $svg->getAttribute('viewBox')); $this->assertFalse($svg->hasAttribute('viewbox')); // Test a mixed case tag. - // Note: getElementsByTagName is not case sensetitive. + // Note: getElementsByTagName is not case sensitive. $list = $dom->getElementsByTagName('textPath'); $this->assertNotEmpty($list->length); $textPath = $list->item(0); @@ -292,12 +291,12 @@ class Html5Test extends TestCase // they are handled as normal elements. Note, to do this is really // an invalid example and you should not embed prefixed xml in html5. $dom = $this->html5->loadHTMLFragment( - " + ' Big rectangle thing 40 80 - um, yeah"); + um, yeah'); $this->assertEmpty($this->html5->getErrors()); $markup = $this->html5->saveHTML($dom); @@ -423,7 +422,7 @@ class Html5Test extends TestCase $dom = $this->html5->loadHTML( '', array( - "xmlNamespaces" => true + 'xmlNamespaces' => true, ) ); $out = $this->html5->saveHTML($dom); diff --git a/vendor/masterminds/html5/test/HTML5/Parser/CharacterReferenceTest.php b/vendor/masterminds/html5/test/HTML5/Parser/CharacterReferenceTest.php index 762bcc261..a5eee73c8 100644 --- a/vendor/masterminds/html5/test/HTML5/Parser/CharacterReferenceTest.php +++ b/vendor/masterminds/html5/test/HTML5/Parser/CharacterReferenceTest.php @@ -3,13 +3,13 @@ * @file * Test the Scanner. This requires the InputStream tests are all good. */ + namespace Masterminds\HTML5\Tests\Parser; use Masterminds\HTML5\Parser\CharacterReference; class CharacterReferenceTest extends \Masterminds\HTML5\Tests\TestCase { - public function testLookupName() { $this->assertEquals('&', CharacterReference::lookupName('amp')); diff --git a/vendor/masterminds/html5/test/HTML5/Parser/DOMTreeBuilderTest.php b/vendor/masterminds/html5/test/HTML5/Parser/DOMTreeBuilderTest.php index ef1b3cb41..21e9cea29 100644 --- a/vendor/masterminds/html5/test/HTML5/Parser/DOMTreeBuilderTest.php +++ b/vendor/masterminds/html5/test/HTML5/Parser/DOMTreeBuilderTest.php @@ -3,6 +3,7 @@ * @file * Test the Tree Builder. */ + namespace Masterminds\HTML5\Tests\Parser; use Masterminds\HTML5\Parser\Scanner; @@ -48,7 +49,7 @@ class DOMTreeBuilderTest extends \Masterminds\HTML5\Tests\TestCase public function testDocument() { - $html = ""; + $html = ''; $doc = $this->parse($html); $this->assertInstanceOf('\DOMDocument', $doc); @@ -101,9 +102,10 @@ class DOMTreeBuilderTest extends \Masterminds\HTML5\Tests\TestCase ', $doc->saveXML()); } + public function testBareAmpersandNotAllowedInBody() { - $html = " + $html = ' a&b @@ -113,7 +115,7 @@ class DOMTreeBuilderTest extends \Masterminds\HTML5\Tests\TestCase a&+ a& -- valid - "; + '; $doc = $this->parse($html); $this->assertCount(5, $this->errors); @@ -132,28 +134,28 @@ class DOMTreeBuilderTest extends \Masterminds\HTML5\Tests\TestCase public function testStrangeCapitalization() { - $html = " + $html = ' Hello, world! TheBody - "; + '; $doc = $this->parse($html); $this->assertInstanceOf('\DOMDocument', $doc); $this->assertEquals('html', $doc->documentElement->tagName); - $xpath = new \DOMXPath( $doc ); - $xpath->registerNamespace( "x", "http://www.w3.org/1999/xhtml" ); + $xpath = new \DOMXPath($doc); + $xpath->registerNamespace('x', 'http://www.w3.org/1999/xhtml'); - $this->assertEquals("Hello, world!", $xpath->query( "//x:title" )->item( 0 )->nodeValue); - $this->assertEquals("foo", $xpath->query( "//x:script" )->item( 0 )->nodeValue); + $this->assertEquals('Hello, world!', $xpath->query('//x:title')->item(0)->nodeValue); + $this->assertEquals('foo', $xpath->query('//x:script')->item(0)->nodeValue); } public function testDocumentWithDisabledNamespaces() { - $html = ""; + $html = ''; $doc = $this->parse($html, array('disable_html_ns' => true)); $this->assertInstanceOf('\DOMDocument', $doc); @@ -165,7 +167,7 @@ class DOMTreeBuilderTest extends \Masterminds\HTML5\Tests\TestCase { $targetDom = new \DOMDocument(); - $html = ""; + $html = ''; $doc = $this->parse($html, array('target_document' => $targetDom)); $this->assertInstanceOf('\DOMDocument', $doc); @@ -175,16 +177,16 @@ class DOMTreeBuilderTest extends \Masterminds\HTML5\Tests\TestCase public function testDocumentFakeAttrAbsence() { - $html = "foo"; - $doc = $this->parse($html, array('xmlNamespaces'=>true)); + $html = 'foo'; + $doc = $this->parse($html, array('xmlNamespaces' => true)); $xp = new \DOMXPath($doc); - $this->assertEquals(0, $xp->query("//@html5-php-fake-id-attribute")->length); + $this->assertEquals(0, $xp->query('//@html5-php-fake-id-attribute')->length); } public function testFragment() { - $html = "
test
test2"; + $html = '
test
test2'; $doc = $this->parseFragment($html); $this->assertInstanceOf('\DOMDocumentFragment', $doc); @@ -197,7 +199,7 @@ class DOMTreeBuilderTest extends \Masterminds\HTML5\Tests\TestCase public function testElements() { - $html = ""; + $html = ''; $doc = $this->parse($html); $root = $doc->documentElement; @@ -233,8 +235,8 @@ class DOMTreeBuilderTest extends \Masterminds\HTML5\Tests\TestCase { $dom = $this->parse('foo', array( 'implicitNamespaces' => array( - 't' => 'http://www.example.com' - ) + 't' => 'http://www.example.com', + ), )); $a = $dom->getElementsByTagName('a')->item(0); $attr = $a->getAttributeNode('t:href'); @@ -242,8 +244,8 @@ class DOMTreeBuilderTest extends \Masterminds\HTML5\Tests\TestCase $dom = $this->parse('foo', array( 'implicitNamespaces' => array( - 't' => 'http://www.example.com' - ) + 't' => 'http://www.example.com', + ), )); $list = $dom->getElementsByTagNameNS('http://www.example.com', 'a'); $this->assertEquals(1, $list->length); @@ -258,7 +260,7 @@ class DOMTreeBuilderTest extends \Masterminds\HTML5\Tests\TestCase
foo
', array( - 'xmlNamespaces' => true + 'xmlNamespaces' => true, )); $a = $dom->getElementsByTagName('a')->item(0); $attr = $a->getAttributeNode('t:href'); @@ -283,10 +285,9 @@ class DOMTreeBuilderTest extends \Masterminds\HTML5\Tests\TestCase ', array( - 'xmlNamespaces' => true + 'xmlNamespaces' => true, )); - $this->assertEmpty($this->errors); $div = $dom->getElementById('div'); @@ -299,34 +300,34 @@ class DOMTreeBuilderTest extends \Masterminds\HTML5\Tests\TestCase $this->assertEquals('http://www.prefixed.com/bar1', $bar1->namespaceURI); $bar2 = $dom->getElementById('bar2'); - $this->assertEquals("http://www.prefixed.com/bar2", $bar2->namespaceURI); + $this->assertEquals('http://www.prefixed.com/bar2', $bar2->namespaceURI); $bar3 = $dom->getElementById('bar3'); - $this->assertEquals("http://www.w3.org/1999/xhtml", $bar3->namespaceURI); + $this->assertEquals('http://www.w3.org/1999/xhtml', $bar3->namespaceURI); $bar4 = $dom->getElementById('bar4'); - $this->assertEquals("http://www.prefixed.com/bar4", $bar4->namespaceURI); + $this->assertEquals('http://www.prefixed.com/bar4', $bar4->namespaceURI); $svg = $dom->getElementById('svg'); - $this->assertEquals("http://www.w3.org/2000/svg", $svg->namespaceURI); + $this->assertEquals('http://www.w3.org/2000/svg', $svg->namespaceURI); $prefixed = $dom->getElementById('prefixed'); - $this->assertEquals("http://www.prefixed.com", $prefixed->namespaceURI); + $this->assertEquals('http://www.prefixed.com', $prefixed->namespaceURI); $prefixed = $dom->getElementById('bar5'); - $this->assertEquals("http://www.prefixed.com/xn", $prefixed->namespaceURI); + $this->assertEquals('http://www.prefixed.com/xn', $prefixed->namespaceURI); $prefixed = $dom->getElementById('bar5_x'); - $this->assertEquals("http://www.prefixed.com/bar5_x", $prefixed->namespaceURI); + $this->assertEquals('http://www.prefixed.com/bar5_x', $prefixed->namespaceURI); } public function testMoveNonInlineElements() { - $doc = $this->parse('

line1


line2

'); - $this->assertEquals('

line1


line2', $doc->saveXML($doc->documentElement), 'Move non-inline elements outside of inline containers.'); + $doc = $this->parse('

line1


line2

'); + $this->assertEquals('

line1


line2', $doc->saveXML($doc->documentElement), 'Move non-inline elements outside of inline containers.'); - $doc = $this->parse('

line1

line2

'); - $this->assertEquals('

line1

line2
', $doc->saveXML($doc->documentElement), 'Move non-inline elements outside of inline containers.'); + $doc = $this->parse('

line1

line2

'); + $this->assertEquals('

line1

line2
', $doc->saveXML($doc->documentElement), 'Move non-inline elements outside of inline containers.'); } public function testAttributes() @@ -396,7 +397,7 @@ class DOMTreeBuilderTest extends \Masterminds\HTML5\Tests\TestCase public function testMissingHtmlTag() { - $html = "test"; + $html = 'test'; $doc = $this->parse($html); $this->assertEquals('html', $doc->documentElement->tagName); @@ -411,23 +412,23 @@ class DOMTreeBuilderTest extends \Masterminds\HTML5\Tests\TestCase $comment = $doc->documentElement->childNodes->item(0); $this->assertEquals(XML_COMMENT_NODE, $comment->nodeType); - $this->assertEquals("Hello World.", $comment->data); + $this->assertEquals('Hello World.', $comment->data); $html = ''; $doc = $this->parse($html); $comment = $doc->childNodes->item(1); $this->assertEquals(XML_COMMENT_NODE, $comment->nodeType); - $this->assertEquals("Hello World.", $comment->data); + $this->assertEquals('Hello World.', $comment->data); $comment = $doc->childNodes->item(2); $this->assertEquals(XML_ELEMENT_NODE, $comment->nodeType); - $this->assertEquals("html", $comment->tagName); + $this->assertEquals('html', $comment->tagName); } public function testCDATA() { - $html = "test"; + $html = 'test'; $doc = $this->parse($html); $wrapper = $doc->getElementsByTagName('math')->item(0); @@ -439,7 +440,7 @@ class DOMTreeBuilderTest extends \Masterminds\HTML5\Tests\TestCase public function testText() { - $html = "test"; + $html = 'test'; $doc = $this->parse($html); $wrapper = $doc->getElementsByTagName('math')->item(0); @@ -449,8 +450,8 @@ class DOMTreeBuilderTest extends \Masterminds\HTML5\Tests\TestCase $this->assertEquals('test', $data->data); // The DomTreeBuilder has special handling for text when in before head mode. - $html = " - Foo"; + $html = ' + Foo'; $doc = $this->parse($html); $this->assertEquals('Line 0, Col 0: Unexpected text. Ignoring: Foo', $this->errors[0]); $headElement = $doc->documentElement->firstChild; @@ -459,7 +460,7 @@ class DOMTreeBuilderTest extends \Masterminds\HTML5\Tests\TestCase public function testParseErrors() { - $html = "test"; + $html = '<!DOCTYPE html><html><math><![CDATA[test'; $doc = $this->parse($html); // We're JUST testing that we can access errors. Actual testing of @@ -488,7 +489,7 @@ class DOMTreeBuilderTest extends \Masterminds\HTML5\Tests\TestCase public function testAutocloseP() { - $html = "<!DOCTYPE html><html><body><p><figure></body></html>"; + $html = '<!DOCTYPE html><html><body><p><figure></body></html>'; $doc = $this->parse($html); $p = $doc->getElementsByTagName('p')->item(0); @@ -576,7 +577,7 @@ class DOMTreeBuilderTest extends \Masterminds\HTML5\Tests\TestCase } /** - * Regression for issue #13 + * Regression for issue #13. */ public function testRegressionHTMLNoBody() { @@ -635,13 +636,14 @@ class DOMTreeBuilderTest extends \Masterminds\HTML5\Tests\TestCase </body> </html> EOM; - $dom = $this->parse($html); + $dom = $this->parse($html); $this->assertSame(3, $dom->getElementById('first')->getElementsByTagName('option')->length); $this->assertSame(2, $dom->getElementById('second')->getElementsByTagName('option')->length); } - public function testVoidTag() { + public function testVoidTag() + { $html = <<<EOM <!DOCTYPE html> <html> @@ -660,7 +662,8 @@ EOM; $this->assertSame(0, $dom->getElementsByTagName('meta')->item(1)->childNodes->length); } - public function testIgnoreSelfClosingTag() { + public function testIgnoreSelfClosingTag() + { $html = <<<EOM <!DOCTYPE html> <html> @@ -677,7 +680,8 @@ EOM; $this->assertSame(1, $dom->getElementsByTagName('div')->item(0)->childNodes->length); } - public function testIAudioInParagraph() { + public function testIAudioInParagraph() + { $html = <<<EOM <!DOCTYPE html> <html> diff --git a/vendor/masterminds/html5/test/HTML5/Parser/EventStack.php b/vendor/masterminds/html5/test/HTML5/Parser/EventStack.php index 60e2abe9b..3d1de7708 100644 --- a/vendor/masterminds/html5/test/HTML5/Parser/EventStack.php +++ b/vendor/masterminds/html5/test/HTML5/Parser/EventStack.php @@ -1,4 +1,5 @@ <?php + namespace Masterminds\HTML5\Tests\Parser; use Masterminds\HTML5\Elements; @@ -16,7 +17,6 @@ use Masterminds\HTML5\Parser\EventHandler; */ class EventStack implements EventHandler { - protected $stack; public function __construct() @@ -46,7 +46,7 @@ class EventStack implements EventHandler { $this->stack[] = array( 'name' => $event, - 'data' => $data + 'data' => $data, ); } @@ -56,7 +56,7 @@ class EventStack implements EventHandler $name, $type, $id, - $quirks + $quirks, ); $this->store('doctype', $args); } @@ -65,7 +65,7 @@ class EventStack implements EventHandler { $args = func_get_args(); $this->store('startTag', $args); - if ($name == 'pre' || $name == 'script') { + if ('pre' == $name || 'script' == $name) { return Elements::TEXT_RAW; } } @@ -73,14 +73,14 @@ class EventStack implements EventHandler public function endTag($name) { $this->store('endTag', array( - $name + $name, )); } public function comment($cdata) { $this->store('comment', array( - $cdata + $cdata, )); } @@ -93,7 +93,7 @@ class EventStack implements EventHandler { // fprintf(STDOUT, "Received TEXT event with: " . $cdata); $this->store('text', array( - $cdata + $cdata, )); } diff --git a/vendor/masterminds/html5/test/HTML5/Parser/EventStackError.php b/vendor/masterminds/html5/test/HTML5/Parser/EventStackError.php index e58fdff26..05c0a498f 100644 --- a/vendor/masterminds/html5/test/HTML5/Parser/EventStackError.php +++ b/vendor/masterminds/html5/test/HTML5/Parser/EventStackError.php @@ -1,4 +1,5 @@ <?php + namespace Masterminds\HTML5\Tests\Parser; class EventStackError extends \Exception diff --git a/vendor/masterminds/html5/test/HTML5/Parser/InstructionProcessorMock.php b/vendor/masterminds/html5/test/HTML5/Parser/InstructionProcessorMock.php index 32a220482..4637a802c 100644 --- a/vendor/masterminds/html5/test/HTML5/Parser/InstructionProcessorMock.php +++ b/vendor/masterminds/html5/test/HTML5/Parser/InstructionProcessorMock.php @@ -1,9 +1,9 @@ <?php + namespace Masterminds\HTML5\Tests\Parser; class InstructionProcessorMock implements \Masterminds\HTML5\InstructionProcessor { - public $name = null; public $data = null; @@ -14,9 +14,9 @@ class InstructionProcessorMock implements \Masterminds\HTML5\InstructionProcesso { $this->name = $name; $this->data = $data; - $this->count ++; + ++$this->count; - $div = $element->ownerDocument->createElement("div"); + $div = $element->ownerDocument->createElement('div'); $div->nodeValue = 'foo'; $element->appendChild($div); diff --git a/vendor/masterminds/html5/test/HTML5/Parser/ScannerTest.php b/vendor/masterminds/html5/test/HTML5/Parser/ScannerTest.php index 763eebca3..9f75c4dba 100644 --- a/vendor/masterminds/html5/test/HTML5/Parser/ScannerTest.php +++ b/vendor/masterminds/html5/test/HTML5/Parser/ScannerTest.php @@ -3,6 +3,7 @@ * @file * Test the Scanner. This requires the InputStream tests are all good. */ + namespace Masterminds\HTML5\Tests\Parser; use Masterminds\HTML5\Parser\StringInputStream; @@ -15,7 +16,7 @@ class ScannerTest extends \Masterminds\HTML5\Tests\TestCase */ public function testConstructDeprecated() { - $is = new StringInputStream("abc"); + $is = new StringInputStream('abc'); $s = new Scanner($is); $this->assertInstanceOf('\Masterminds\HTML5\Parser\Scanner', $s); @@ -28,7 +29,7 @@ class ScannerTest extends \Masterminds\HTML5\Tests\TestCase public function testNextDeprecated() { - $s = new Scanner(new StringInputStream("abc")); + $s = new Scanner(new StringInputStream('abc')); $this->assertEquals('b', $s->next()); $this->assertEquals('c', $s->next()); @@ -87,7 +88,7 @@ class ScannerTest extends \Masterminds\HTML5\Tests\TestCase // Move forward a bunch of positions. $amount = 7; - for ($i = 0; $i < $amount; $i ++) { + for ($i = 0; $i < $amount; ++$i) { $s->next(); } @@ -99,7 +100,7 @@ class ScannerTest extends \Masterminds\HTML5\Tests\TestCase public function testGetHex() { - $s = new Scanner("ab13ck45DE*"); + $s = new Scanner('ab13ck45DE*'); $this->assertEquals('ab13c', $s->getHex()); diff --git a/vendor/masterminds/html5/test/HTML5/Parser/TokenizerTest.php b/vendor/masterminds/html5/test/HTML5/Parser/TokenizerTest.php index 30335e1ee..153dd2308 100644 --- a/vendor/masterminds/html5/test/HTML5/Parser/TokenizerTest.php +++ b/vendor/masterminds/html5/test/HTML5/Parser/TokenizerTest.php @@ -1,4 +1,5 @@ <?php + namespace Masterminds\HTML5\Tests\Parser; use Masterminds\HTML5\Parser\UTF8Utils; @@ -10,19 +11,20 @@ class TokenizerTest extends \Masterminds\HTML5\Tests\TestCase // ================================================================ // Additional assertions. // ================================================================ + /** * Tests that an event matches both the event type and the expected value. * * @param string $type - * Expected event type. + * Expected event type * @param string $expects - * The value expected in $event['data'][0]. + * The value expected in $event['data'][0] */ public function assertEventEquals($type, $expects, $event) { $this->assertEquals($type, $event['name'], "Event $type for " . print_r($event, true)); if (is_array($expects)) { - $this->assertEquals($expects, $event['data'], "Event $type should equal " . print_r($expects, true) . ": " . print_r($event, true)); + $this->assertEquals($expects, $event['data'], "Event $type should equal " . print_r($expects, true) . ': ' . print_r($event, true)); } else { $this->assertEquals($expects, $event['data'][0], "Event $type should equal $expects: " . print_r($event, true)); } @@ -33,7 +35,7 @@ class TokenizerTest extends \Masterminds\HTML5\Tests\TestCase */ public function assertEventError($event) { - $this->assertEquals('error', $event['name'], "Expected error for event: " . print_r($event, true)); + $this->assertEquals('error', $event['name'], 'Expected error for event: ' . print_r($event, true)); } /** @@ -65,7 +67,7 @@ class TokenizerTest extends \Masterminds\HTML5\Tests\TestCase // ================================================================ public function testParse() { - list ($tok, $events) = $this->createTokenizer(''); + list($tok, $events) = $this->createTokenizer(''); $tok->parse(); $e1 = $events->get(0); @@ -77,7 +79,7 @@ class TokenizerTest extends \Masterminds\HTML5\Tests\TestCase public function testWhitespace() { $spaces = ' '; - list ($tok, $events) = $this->createTokenizer($spaces); + list($tok, $events) = $this->createTokenizer($spaces); $tok->parse(); @@ -95,7 +97,7 @@ class TokenizerTest extends \Masterminds\HTML5\Tests\TestCase '&amp;' => '&', '&#x0003c;' => '<', '&#38;' => '&', - '&' => '&' + '&' => '&', ); $this->isAllGood('text', 2, $good); @@ -133,7 +135,7 @@ class TokenizerTest extends \Masterminds\HTML5\Tests\TestCase '<![CDATA[', '<![CDATA[hellooooo hello', '<? Hello World ?>', - '<? Hello World' + '<? Hello World', ); foreach ($bogus as $str) { $events = $this->parse($str); @@ -151,7 +153,7 @@ class TokenizerTest extends \Masterminds\HTML5\Tests\TestCase >' => 'test', '</thisIsTheTagThatDoesntEndItJustGoesOnAndOnMyFriend>' => 'thisisthetagthatdoesntenditjustgoesonandonmyfriend', // See 8.2.4.10, which requires this and does not say error. - '</a<b>' => 'a<b' + '</a<b>' => 'a<b', ); $this->isAllGood('endTag', 2, $succeed); @@ -161,7 +163,7 @@ class TokenizerTest extends \Masterminds\HTML5\Tests\TestCase '</a <b>' => 'a', '</a <b <c>' => 'a', '</a is the loneliest letter>' => 'a', - '</a' => 'a' + '</a' => 'a', ); foreach ($fail as $test => $result) { $events = $this->parse($test); @@ -176,7 +178,7 @@ class TokenizerTest extends \Masterminds\HTML5\Tests\TestCase $comments = array( '</>' => '</>', '</ >' => '</ >', - '</ a>' => '</ a>' + '</ a>' => '</ a>', ); foreach ($comments as $test => $result) { $events = $this->parse($test); @@ -198,7 +200,7 @@ class TokenizerTest extends \Masterminds\HTML5\Tests\TestCase '<!-- --$i -->' => ' --$i ', '<!----$i-->' => '--$i', "<!--\nHello World.\na-->" => "\nHello World.\na", - '<!-- <!-- -->' => ' <!-- ' + '<!-- <!-- -->' => ' <!-- ', ); foreach ($good as $test => $expected) { $events = $this->parse($test); @@ -209,7 +211,7 @@ class TokenizerTest extends \Masterminds\HTML5\Tests\TestCase '<!-->' => '', '<!--Hello' => 'Hello', "<!--\0Hello" => UTF8Utils::FFFD . 'Hello', - '<!--' => '' + '<!--' => '', ); foreach ($fail as $test => $expected) { $events = $this->parse($test); @@ -225,7 +227,7 @@ class TokenizerTest extends \Masterminds\HTML5\Tests\TestCase '<![CDATA[ This is a test. ' => ' This is a test. ', 'CDATA' => 'CDATA', ' ]] > ' => ' ]] > ', - ' ' => ' ' + ' ' => ' ', ); $this->isAllGood('cdata', 2, $good); } @@ -237,80 +239,80 @@ class TokenizerTest extends \Masterminds\HTML5\Tests\TestCase 'html', 0, null, - false + false, ), '' => array( 'html', 0, null, - false + false, ), '' => array( 'html', 0, null, - false + false, ), "" => array( 'html', 0, null, - false + false, ), "" => array( 'html', 0, null, - false + false, ), '' => array( 'html', EventStack::DOCTYPE_PUBLIC, 'foo bar', - false + false, ), "" => array( 'html', EventStack::DOCTYPE_PUBLIC, 'foo bar', - false + false, ), '' => array( 'html', EventStack::DOCTYPE_PUBLIC, 'foo bar', - false + false, ), "" => array( 'html', EventStack::DOCTYPE_PUBLIC, 'foo bar', - false + false, ), '' => array( 'html', EventStack::DOCTYPE_SYSTEM, 'foo bar', - false + false, ), "" => array( 'html', EventStack::DOCTYPE_SYSTEM, 'foo bar', - false + false, ), '' => array( 'html', EventStack::DOCTYPE_SYSTEM, 'foo/bar', - false + false, ), "" => array( 'html', EventStack::DOCTYPE_SYSTEM, 'foo bar', - false - ) + false, + ), ); $this->isAllGood('doctype', 2, $good); @@ -319,43 +321,43 @@ class TokenizerTest extends \Masterminds\HTML5\Tests\TestCase null, EventStack::DOCTYPE_NONE, null, - true + true, ), '' => array( null, EventStack::DOCTYPE_NONE, null, - true + true, ), ' array( 'foo', EventStack::DOCTYPE_NONE, null, - true + true, ), ' array( 'foo', EventStack::DOCTYPE_NONE, null, - true + true, ), '' => array( 'foo', EventStack::DOCTYPE_NONE, null, - true + true, ), '' => array( 'foo', EventStack::DOCTYPE_NONE, null, - true + true, ), ' array( 'foo', EventStack::DOCTYPE_NONE, null, - true + true, ), // Can't tell whether these are ids or ID types, since the context is chopped. @@ -363,39 +365,39 @@ class TokenizerTest extends \Masterminds\HTML5\Tests\TestCase 'foo', EventStack::DOCTYPE_NONE, null, - true + true, ), '' => array( 'foo', EventStack::DOCTYPE_NONE, null, - true + true, ), ' array( 'foo', EventStack::DOCTYPE_NONE, null, - true + true, ), '' => array( 'foo', EventStack::DOCTYPE_NONE, null, - true + true, ), ' array( 'html', EventStack::DOCTYPE_SYSTEM, 'foo bar', - true + true, ), '' => array( 'html', EventStack::DOCTYPE_SYSTEM, 'foo bar', - true - ) + true, + ), ); foreach ($bad as $test => $expects) { $events = $this->parse($test); @@ -412,12 +414,12 @@ class TokenizerTest extends \Masterminds\HTML5\Tests\TestCase '' => 'hph', '' => array( 'hph', - 'echo "Hello World"; ' + 'echo "Hello World"; ', ), "" => array( 'hph', - "echo 'Hello World';\n" - ) + "echo 'Hello World';\n", + ), ); $this->isAllGood('pi', 2, $good); } @@ -433,7 +435,7 @@ class TokenizerTest extends \Masterminds\HTML5\Tests\TestCase '' => 'foo', '' => 'foo', "" => 'foo', - '' => 'foo:bar' + '' => 'foo:bar', ); $this->isAllGood('startTag', 2, $open); @@ -442,7 +444,7 @@ class TokenizerTest extends \Masterminds\HTML5\Tests\TestCase '' => 'foo', '' => 'foo', "" => 'foo', - '' => 'foo:bar' + '' => 'foo:bar', ); foreach ($selfClose as $test => $expects) { $events = $this->parse($test); @@ -456,7 +458,7 @@ class TokenizerTest extends \Masterminds\HTML5\Tests\TestCase ' 'foo', ' 'foo', ' 'foo', - ' 'foo' + ' 'foo', ); foreach ($bad as $test => $expects) { @@ -474,7 +476,7 @@ class TokenizerTest extends \Masterminds\HTML5\Tests\TestCase '' => 'color', "" => 'class', '' => 'bgcolor', - '' => 'class' + '' => 'class', ); foreach ($cases as $html => $expected) { @@ -490,18 +492,18 @@ class TokenizerTest extends \Masterminds\HTML5\Tests\TestCase public function testTagNotClosedAfterTagName() { $cases = array( - "" => array( + '' => array( 'noscript', - 'img' + 'img', ), '' => array( 'center', - 'a' + 'a', ), '' => array( 'br', - 'br' - ) + 'br', + ), ); foreach ($cases as $html => $expected) { @@ -575,111 +577,111 @@ class TokenizerTest extends \Masterminds\HTML5\Tests\TestCase '' => array( 'foo', array( - 'bar' => 'baz' + 'bar' => 'baz', ), - false + false, ), '' => array( 'foo', array( - 'bar' => ' baz ' + 'bar' => ' baz ', ), - false + false, ), "" => array( 'foo', array( - 'bar' => "\nbaz\n" + 'bar' => "\nbaz\n", ), - false + false, ), "" => array( 'foo', array( - 'bar' => 'baz' + 'bar' => 'baz', ), - false + false, ), '' => array( 'foo', array( - 'bar' => 'A full sentence.' + 'bar' => 'A full sentence.', ), - false + false, ), "" => array( 'foo', array( 'a' => '1', - 'b' => '2' + 'b' => '2', ), - false + false, ), "" => array( 'foo', array( - 'ns:bar' => 'baz' + 'ns:bar' => 'baz', ), - false + false, ), "" => array( 'foo', array( - 'a' => 'blue&red' + 'a' => 'blue&red', ), - false + false, ), "" => array( 'foo', array( - 'a' => 'blue&red' + 'a' => 'blue&red', ), - false + false, ), "" => array( 'foo', array( - 'a' => 'blue&&&red' + 'a' => 'blue&&&red', ), - false + false, ), "" => array( 'foo', array( - 'a' => 'blue&&red' + 'a' => 'blue&&red', ), - false + false, ), "" => array( 'foo', array( - 'bar' => 'baz' + 'bar' => 'baz', ), - false + false, ), '' => array( 'doe', array( 'a' => null, - 'deer' => null + 'deer' => null, ), - false + false, ), '' => array( 'foo', array( - 'bar' => 'baz' + 'bar' => 'baz', ), - false + false, ), // Updated for 8.1.2.3 '' => array( 'foo', array( - 'bar' => 'baz' + 'bar' => 'baz', ), - false + false, ), // The spec allows an unquoted value '/'. This will not be a closing @@ -687,17 +689,17 @@ class TokenizerTest extends \Masterminds\HTML5\Tests\TestCase '' => array( 'foo', array( - 'bar' => '/' + 'bar' => '/', ), - false + false, ), '' => array( 'foo', array( - 'bar' => 'baz/' + 'bar' => 'baz/', ), - false - ) + false, + ), ); $this->isAllGood('startTag', 2, $good); @@ -706,23 +708,23 @@ class TokenizerTest extends \Masterminds\HTML5\Tests\TestCase '' => array( 'foo', array( - 'bar' => 'baz' + 'bar' => 'baz', ), - true + true, ), '' => array( 'foo', array( - 'bar' => 'baz' + 'bar' => 'baz', ), - true + true, ), '' => array( 'foo', array( - 'bar' => 'BAZ' + 'bar' => 'BAZ', ), - true + true, ), "" => array( 'foo', @@ -730,10 +732,10 @@ class TokenizerTest extends \Masterminds\HTML5\Tests\TestCase 'a' => '1', 'b' => '2', 'c' => '3', - 'd' => null + 'd' => null, ), - true - ) + true, + ), ); $this->isAllGood('startTag', 2, $withEnd); @@ -743,30 +745,30 @@ class TokenizerTest extends \Masterminds\HTML5\Tests\TestCase "" => array( 'foo', array( - 'a' => 'blue&+dark' + 'a' => 'blue&+dark', ), - false + false, ), '' => array( 'foo', array( - 'bar' => null + 'bar' => null, ), - false + false, ), '' => array( 'foo', array( - 'bar' => 'oh"' + 'bar' => 'oh"', ), - false + false, ), // these attributes are ignored because of current implementation @@ -775,23 +777,23 @@ class TokenizerTest extends \Masterminds\HTML5\Tests\TestCase '' => array( 'foo', array(), - false + false, ), '' => array( 'foo', array(), - false + false, ), '' => array( 'foo', array(), - false + false, ), '' => array( 'foo', array(), - false - ) + false, + ), ) ; foreach ($bad as $test => $expects) { @@ -807,23 +809,23 @@ class TokenizerTest extends \Masterminds\HTML5\Tests\TestCase 'foo', array( '=' => null, - '"bar"' => null + '"bar"' => null, ), - false + false, ), '' => array( 'foo', array(), - true + true, ), // character "&" in unquoted attribute shouldn't cause an infinite loop '' => array( 'foo', array( - 'bar' => 'index.php?str=1&id=29' + 'bar' => 'index.php?str=1&id=29', ), - false - ) + false, + ), ); foreach ($reallyBad as $test => $expects) { $events = $this->parse($test); @@ -840,17 +842,17 @@ class TokenizerTest extends \Masterminds\HTML5\Tests\TestCase $this->assertEventEquals('startTag', array( 'foo', array( - 'baz' => '1' + 'baz' => '1', ), - false + false, ), $events->get(1)); $this->assertEventEquals('startTag', array( 'bar', array(), - false + false, ), $events->get(2)); $this->assertEventEquals('endTag', array( - 'foo' + 'foo', ), $events->get(3)); } @@ -864,7 +866,7 @@ class TokenizerTest extends \Masterminds\HTML5\Tests\TestCase "' => '&', '' => '', - '' => 'not a comment' + '' => 'not a comment', ); foreach ($good as $test => $expects) { $events = $this->parse($test); @@ -875,7 +877,7 @@ class TokenizerTest extends \Masterminds\HTML5\Tests\TestCase $bad = array( '
b'); - $this->assertEquals(4, $events->depth(), "Events: " . print_r($events, true)); + $this->assertEquals(4, $events->depth(), 'Events: ' . print_r($events, true)); $this->assertEventEquals('text', 'a', $events->get(0)); $this->assertEventEquals('startTag', 'br', $events->get(1)); $this->assertEventEquals('text', 'b', $events->get(2)); $events = $this->parse('Test'); - $this->assertEquals(4, $events->depth(), "Events: " . print_r($events, true)); + $this->assertEquals(4, $events->depth(), 'Events: ' . print_r($events, true)); $this->assertEventEquals('startTag', 'a', $events->get(0)); $this->assertEventEquals('text', 'Test', $events->get(1)); $this->assertEventEquals('endTag', 'a', $events->get(2)); $events = $this->parse('

0

1

'); - $this->assertEquals(7, $events->depth(), "Events: " . print_r($events, true)); + $this->assertEquals(7, $events->depth(), 'Events: ' . print_r($events, true)); $this->assertEventEquals('startTag', 'p', $events->get(0)); $this->assertEventEquals('text', '0', $events->get(1)); @@ -931,25 +933,24 @@ class TokenizerTest extends \Masterminds\HTML5\Tests\TestCase $this->assertEventEquals('text', '1', $events->get(4)); $this->assertEventEquals('endTag', 'p', $events->get(5)); - $events = $this->parse('ab'); - $this->assertEquals(4, $events->depth(), "Events: " . print_r($events, true)); + $this->assertEquals(4, $events->depth(), 'Events: ' . print_r($events, true)); $this->assertEventEquals('text', 'a', $events->get(0)); $this->assertEventEquals('cdata', 'test', $events->get(1)); $this->assertEventEquals('text', 'b', $events->get(2)); $events = $this->parse('ab'); - $this->assertEquals(4, $events->depth(), "Events: " . print_r($events, true)); + $this->assertEquals(4, $events->depth(), 'Events: ' . print_r($events, true)); $this->assertEventEquals('text', 'a', $events->get(0)); $this->assertEventEquals('comment', 'test', $events->get(1)); $this->assertEventEquals('text', 'b', $events->get(2)); $events = $this->parse('a&b'); - $this->assertEquals(2, $events->depth(), "Events: " . print_r($events, true)); + $this->assertEquals(2, $events->depth(), 'Events: ' . print_r($events, true)); $this->assertEventEquals('text', 'a&b', $events->get(0)); $events = $this->parse('a²b'); - $this->assertEquals(2, $events->depth(), "Events: " . print_r($events, true)); + $this->assertEquals(2, $events->depth(), 'Events: ' . print_r($events, true)); $this->assertEventEquals('text', 'a²b', $events->get(0)); } @@ -965,13 +966,13 @@ class TokenizerTest extends \Masterminds\HTML5\Tests\TestCase return array( new Tokenizer($scanner, $eventHandler), - $eventHandler + $eventHandler, ); } public function parse($string, $debug = false) { - list ($tok, $events) = $this->createTokenizer($string, $debug); + list($tok, $events) = $this->createTokenizer($string, $debug); $tok->parse(); return $events; diff --git a/vendor/masterminds/html5/test/HTML5/Parser/TreeBuildingRulesTest.php b/vendor/masterminds/html5/test/HTML5/Parser/TreeBuildingRulesTest.php index 1d08cbc10..45c68bcfb 100644 --- a/vendor/masterminds/html5/test/HTML5/Parser/TreeBuildingRulesTest.php +++ b/vendor/masterminds/html5/test/HTML5/Parser/TreeBuildingRulesTest.php @@ -3,6 +3,7 @@ * @file * Test the Tree Builder's special-case rules. */ + namespace Masterminds\HTML5\Tests\Parser; use Masterminds\HTML5\Parser\TreeBuildingRules; @@ -15,7 +16,6 @@ use Masterminds\HTML5\Parser\DOMTreeBuilder; */ class TreeBuildingRulesTest extends \Masterminds\HTML5\Tests\TestCase { - const HTML_STUB = 'test%s'; /** @@ -28,8 +28,10 @@ class TreeBuildingRulesTest extends \Masterminds\HTML5\Tests\TestCase $parser = new Tokenizer($scanner, $treeBuilder); $parser->parse(); + return $treeBuilder->document(); } + /** * Convenience function for parsing fragments. */ @@ -40,13 +42,13 @@ class TreeBuildingRulesTest extends \Masterminds\HTML5\Tests\TestCase $parser = new Tokenizer($scanner, $events); $parser->parse(); + return $events->fragment(); } public function testTDFragment() { - - $frag = $this->parseFragment("This is a test of the HTML5 parser"); + $frag = $this->parseFragment('This is a test of the HTML5 parser'); $td = $frag->childNodes->item(0); diff --git a/vendor/masterminds/html5/test/HTML5/Parser/UTF8UtilsTest.php b/vendor/masterminds/html5/test/HTML5/Parser/UTF8UtilsTest.php index 0e8555a9c..72c26a4b3 100644 --- a/vendor/masterminds/html5/test/HTML5/Parser/UTF8UtilsTest.php +++ b/vendor/masterminds/html5/test/HTML5/Parser/UTF8UtilsTest.php @@ -6,21 +6,23 @@ use Masterminds\HTML5\Parser\UTF8Utils; class UTF8UtilsTest extends \Masterminds\HTML5\Tests\TestCase { - public function testConvertToUTF8() { - $out = UTF8Utils::convertToUTF8('éàa', 'ISO-8859-1'); - $this->assertEquals('éàa', $out); - } + public function testConvertToUTF8() + { + $out = UTF8Utils::convertToUTF8('éàa', 'ISO-8859-1'); + $this->assertEquals('éàa', $out); + } - /** - * @todo add tests for invalid codepoints - */ - public function testCheckForIllegalCodepoints() { - $smoke = "Smoke test"; - $err = UTF8Utils::checkForIllegalCodepoints($smoke); - $this->assertEmpty($err); + /** + * @todo add tests for invalid codepoints + */ + public function testCheckForIllegalCodepoints() + { + $smoke = 'Smoke test'; + $err = UTF8Utils::checkForIllegalCodepoints($smoke); + $this->assertEmpty($err); - $data = "Foo Bar \0 Baz"; - $errors = UTF8Utils::checkForIllegalCodepoints($data); - $this->assertContains('null-character', $errors); - } -} \ No newline at end of file + $data = "Foo Bar \0 Baz"; + $errors = UTF8Utils::checkForIllegalCodepoints($data); + $this->assertContains('null-character', $errors); + } +} diff --git a/vendor/masterminds/html5/test/HTML5/Serializer/OutputRulesTest.php b/vendor/masterminds/html5/test/HTML5/Serializer/OutputRulesTest.php index 72253d348..913051657 100644 --- a/vendor/masterminds/html5/test/HTML5/Serializer/OutputRulesTest.php +++ b/vendor/masterminds/html5/test/HTML5/Serializer/OutputRulesTest.php @@ -1,4 +1,5 @@ @@ -33,7 +33,7 @@ class OutputRulesTest extends \Masterminds\HTML5\Tests\TestCase * Using reflection we make a protected method accessible for testing. * * @param string $name - * The name of the method on the Traverser class to test. + * The name of the method on the Traverser class to test * * @return \ReflectionMethod for the specified method */ @@ -65,7 +65,7 @@ class OutputRulesTest extends \Masterminds\HTML5\Tests\TestCase return array( $r, - $stream + $stream, ); } @@ -79,20 +79,20 @@ class OutputRulesTest extends \Masterminds\HTML5\Tests\TestCase $r->document($dom); $expected = '' . PHP_EOL . 'foo' . PHP_EOL; - $this->assertEquals($expected, stream_get_contents($stream, - 1, 0)); + $this->assertEquals($expected, stream_get_contents($stream, -1, 0)); } public function testEmptyDocument() { - $dom = $this->html5->loadHTML(''); + $dom = $this->html5->loadHTML(''); - $stream = fopen('php://temp', 'w'); - $r = new OutputRules($stream, $this->html5->getOptions()); - $t = new Traverser($dom, $stream, $r, $this->html5->getOptions()); + $stream = fopen('php://temp', 'w'); + $r = new OutputRules($stream, $this->html5->getOptions()); + $t = new Traverser($dom, $stream, $r, $this->html5->getOptions()); - $r->document($dom); - $expected = '' . PHP_EOL; - $this->assertEquals($expected, stream_get_contents($stream, - 1, 0)); + $r->document($dom); + $expected = '' . PHP_EOL; + $this->assertEquals($expected, stream_get_contents($stream, -1, 0)); } public function testDoctype() @@ -105,7 +105,7 @@ class OutputRulesTest extends \Masterminds\HTML5\Tests\TestCase $m = $this->getProtectedMethod('doctype'); $m->invoke($r, 'foo'); - $this->assertEquals("" . PHP_EOL, stream_get_contents($stream, - 1, 0)); + $this->assertEquals('' . PHP_EOL, stream_get_contents($stream, -1, 0)); } public function testElement() @@ -129,13 +129,13 @@ class OutputRulesTest extends \Masterminds\HTML5\Tests\TestCase $list = $dom->getElementsByTagName('div'); $r->element($list->item(0)); - $this->assertEquals('
foo bar baz
', stream_get_contents($stream, - 1, 0)); + $this->assertEquals('
foo bar baz
', stream_get_contents($stream, -1, 0)); } - function testSerializeWithNamespaces() + public function testSerializeWithNamespaces() { $this->html5 = $this->getInstance(array( - 'xmlNamespaces' => true + 'xmlNamespaces' => true, )); $source = ' @@ -153,7 +153,7 @@ class OutputRulesTest extends \Masterminds\HTML5\Tests\TestCase '; $dom = $this->html5->loadHTML($source, array( - 'xmlNamespaces' => true + 'xmlNamespaces' => true, )); $this->assertFalse($this->html5->hasErrors(), print_r($this->html5->getErrors(), 1)); @@ -162,10 +162,10 @@ class OutputRulesTest extends \Masterminds\HTML5\Tests\TestCase $t = new Traverser($dom, $stream, $r, $this->html5->getOptions()); $t->walk(); - $rendered = stream_get_contents($stream, - 1, 0); + $rendered = stream_get_contents($stream, -1, 0); - $clear = function($s){ - return trim(preg_replace('/[\s]+/', " ", $s)); + $clear = function ($s) { + return trim(preg_replace('/[\s]+/', ' ', $s)); }; $this->assertEquals($clear($source), $clear($rendered)); @@ -205,7 +205,7 @@ class OutputRulesTest extends \Masterminds\HTML5\Tests\TestCase $jQ("#mktFrmSubmit").wrap("
"); $jQ(".buttonSubmit").prepend(""); }); - ', stream_get_contents($stream, - 1, 0)); + ', stream_get_contents($stream, -1, 0)); } public function testElementWithStyle() @@ -235,7 +235,7 @@ class OutputRulesTest extends \Masterminds\HTML5\Tests\TestCase body > .bar { display: none; } - ', stream_get_contents($stream, - 1, 0)); + ', stream_get_contents($stream, -1, 0)); } public function testOpenTag() @@ -254,7 +254,7 @@ class OutputRulesTest extends \Masterminds\HTML5\Tests\TestCase $list = $dom->getElementsByTagName('div'); $m = $this->getProtectedMethod('openTag'); $m->invoke($r, $list->item(0)); - $this->assertEquals('
', stream_get_contents($stream, - 1, 0)); + $this->assertEquals('
', stream_get_contents($stream, -1, 0)); } public function testCData() @@ -272,7 +272,7 @@ class OutputRulesTest extends \Masterminds\HTML5\Tests\TestCase $list = $dom->getElementsByTagName('div'); $r->cdata($list->item(0)->childNodes->item(0)); - $this->assertEquals('', stream_get_contents($stream, - 1, 0)); + $this->assertEquals('', stream_get_contents($stream, -1, 0)); $dom = $this->html5->loadHTML(' @@ -281,7 +281,7 @@ class OutputRulesTest extends \Masterminds\HTML5\Tests\TestCase '); - $dom->getElementById('foo')->appendChild(new \DOMCdataSection("]]>Foo<[![CDATA test ]]>")); + $dom->getElementById('foo')->appendChild(new \DOMCdataSection(']]>Foo<[![CDATA test ]]>')); $stream = fopen('php://temp', 'w'); $r = new OutputRules($stream, $this->html5->getOptions()); @@ -289,7 +289,7 @@ class OutputRulesTest extends \Masterminds\HTML5\Tests\TestCase $list = $dom->getElementsByTagName('div'); $r->cdata($list->item(0)->childNodes->item(0)); - $this->assertEquals('Foo<[![CDATA test ]]]]>]]>', stream_get_contents($stream, - 1, 0)); + $this->assertEquals('Foo<[![CDATA test ]]]]>]]>', stream_get_contents($stream, -1, 0)); } public function testComment() @@ -307,7 +307,7 @@ class OutputRulesTest extends \Masterminds\HTML5\Tests\TestCase $list = $dom->getElementsByTagName('div'); $r->comment($list->item(0)->childNodes->item(0)); - $this->assertEquals('', stream_get_contents($stream, - 1, 0)); + $this->assertEquals('', stream_get_contents($stream, -1, 0)); $dom = $this->html5->loadHTML(' @@ -326,7 +326,7 @@ class OutputRulesTest extends \Masterminds\HTML5\Tests\TestCase // Could not find more definitive guidelines on what this should be. Went with // what the HTML5 spec says and what \DOMDocument::saveXML() produces. - $this->assertEquals(' --> Foo -->-->', stream_get_contents($stream, - 1, 0)); + $this->assertEquals(' --> Foo -->-->', stream_get_contents($stream, -1, 0)); } public function testText() @@ -344,7 +344,7 @@ class OutputRulesTest extends \Masterminds\HTML5\Tests\TestCase $list = $dom->getElementsByTagName('script'); $r->text($list->item(0)->childNodes->item(0)); - $this->assertEquals('baz();', stream_get_contents($stream, - 1, 0)); + $this->assertEquals('baz();', stream_get_contents($stream, -1, 0)); $dom = $this->html5->loadHTML(' @@ -358,25 +358,25 @@ class OutputRulesTest extends \Masterminds\HTML5\Tests\TestCase $t = new Traverser($dom, $stream, $r, $this->html5->getOptions()); $r->text($foo->firstChild); - $this->assertEquals('<script>alert("hi");</script>', stream_get_contents($stream, - 1, 0)); + $this->assertEquals('<script>alert("hi");</script>', stream_get_contents($stream, -1, 0)); } public function testNl() { - list ($o, $s) = $this->getOutputRules(); + list($o, $s) = $this->getOutputRules(); $m = $this->getProtectedMethod('nl'); $m->invoke($o); - $this->assertEquals(PHP_EOL, stream_get_contents($s, - 1, 0)); + $this->assertEquals(PHP_EOL, stream_get_contents($s, -1, 0)); } public function testWr() { - list ($o, $s) = $this->getOutputRules(); + list($o, $s) = $this->getOutputRules(); $m = $this->getProtectedMethod('wr'); $m->invoke($o, 'foo'); - $this->assertEquals('foo', stream_get_contents($s, - 1, 0)); + $this->assertEquals('foo', stream_get_contents($s, -1, 0)); } public function getEncData() @@ -386,61 +386,62 @@ class OutputRulesTest extends \Masterminds\HTML5\Tests\TestCase false, '&\'<>"', '&\'<>"', - '&'<>"' + '&'<>"', ), array( false, 'This + is. a < test', 'This + is. a < test', - 'This + is. a < test' + 'This + is. a < test', ), array( false, '.+#', '.+#', - '.+#' + '.+#', ), array( true, '.+#\'', '.+#\'', - '.+#'' + '.+#'', ), array( true, '&".<', '&".<', - '&".<' + '&".<', ), array( true, '&\'<>"', '&\'<>"', - '&'<>"' + '&'<>"', ), array( true, "\xc2\xa0\"'", ' "\'', - ' "'' - ) + ' "'', + ), ); } /** * Test basic encoding of text. + * * @dataProvider getEncData */ public function testEnc($isAttribute, $test, $expected, $expectedEncoded) { - list ($o, $s) = $this->getOutputRules(); + list($o, $s) = $this->getOutputRules(); $m = $this->getProtectedMethod('enc'); $this->assertEquals($expected, $m->invoke($o, $test, $isAttribute)); - list ($o, $s) = $this->getOutputRules(array( - 'encode_entities' => true + list($o, $s) = $this->getOutputRules(array( + 'encode_entities' => true, )); $m = $this->getProtectedMethod('enc'); $this->assertEquals($expectedEncoded, $m->invoke($o, $test, $isAttribute)); @@ -448,11 +449,12 @@ class OutputRulesTest extends \Masterminds\HTML5\Tests\TestCase /** * Test basic encoding of text. + * * @dataProvider getEncData */ public function testEscape($isAttribute, $test, $expected, $expectedEncoded) { - list ($o, $s) = $this->getOutputRules(); + list($o, $s) = $this->getOutputRules(); $m = $this->getProtectedMethod('escape'); $this->assertEquals($expected, $m->invoke($o, $test, $isAttribute)); @@ -473,12 +475,13 @@ class OutputRulesTest extends \Masterminds\HTML5\Tests\TestCase array(''), ); } + /** * @dataProvider booleanAttributes */ public function testBooleanAttrs($html) { - $dom = $this->html5->loadHTML(''.$html.''); + $dom = $this->html5->loadHTML('' . $html . ''); $stream = fopen('php://temp', 'w'); $r = new OutputRules($stream, $this->html5->getOptions()); @@ -489,13 +492,12 @@ class OutputRulesTest extends \Masterminds\HTML5\Tests\TestCase $m = $this->getProtectedMethod('attrs'); $m->invoke($r, $node); - $content = stream_get_contents($stream, - 1, 0); + $content = stream_get_contents($stream, -1, 0); $html = preg_replace('~<[a-z]+(.*)>~', '\1', $html); $html = preg_replace('~<[a-z]+(.*)/?>~', '\1', $html); $this->assertEquals($content, $html); - } public function testAttrs() @@ -516,7 +518,7 @@ class OutputRulesTest extends \Masterminds\HTML5\Tests\TestCase $m = $this->getProtectedMethod('attrs'); $m->invoke($r, $list->item(0)); - $content = stream_get_contents($stream, - 1, 0); + $content = stream_get_contents($stream, -1, 0); $this->assertEquals(' id="foo" class="bar baz"', $content); } @@ -544,7 +546,7 @@ class OutputRulesTest extends \Masterminds\HTML5\Tests\TestCase $list = $dom->getElementsByTagName('svg'); $r->element($list->item(0)); - $contents = stream_get_contents($stream, - 1, 0); + $contents = stream_get_contents($stream, -1, 0); $this->assertRegExp('||', $contents); $this->assertRegExp('||', $contents); $this->assertRegExp('||', $contents); @@ -573,7 +575,7 @@ class OutputRulesTest extends \Masterminds\HTML5\Tests\TestCase $list = $dom->getElementsByTagName('math'); $r->element($list->item(0)); - $content = stream_get_contents($stream, - 1, 0); + $content = stream_get_contents($stream, -1, 0); $this->assertRegExp('||', $content); $this->assertRegExp('||', $content); } @@ -587,7 +589,7 @@ class OutputRulesTest extends \Masterminds\HTML5\Tests\TestCase $t = new Traverser($dom, $stream, $r, $this->html5->getOptions()); $r->processorInstruction($dom->firstChild); - $content = stream_get_contents($stream, - 1, 0); + $content = stream_get_contents($stream, -1, 0); $this->assertRegExp('|<\?foo bar \?>|', $content); } @@ -611,7 +613,7 @@ class OutputRulesTest extends \Masterminds\HTML5\Tests\TestCase $list = $dom->getElementsByTagName('address'); $r->element($list->item(0)); - $contents = stream_get_contents($stream, - 1, 0); + $contents = stream_get_contents($stream, -1, 0); $this->assertRegExp('|
|', $contents); $this->assertRegExp('|Dave Raggett,|', $contents); @@ -621,7 +623,7 @@ class OutputRulesTest extends \Masterminds\HTML5\Tests\TestCase } /** - * Ensure direct DOM manipulation doesn't break TEXT_RAW elements (iframe, script, etc...) + * Ensure direct DOM manipulation doesn't break TEXT_RAW elements (iframe, script, etc...). */ public function testHandlingInvalidRawContent() { @@ -635,16 +637,16 @@ class OutputRulesTest extends \Masterminds\HTML5\Tests\TestCase '); - $badNode = $dom->createElement("p", "Bar"); + $badNode = $dom->createElement('p', 'Bar'); // modify the content of the TEXT_RAW element:

Hello!

-

Bar

')!==false); +

Bar

')); } } diff --git a/vendor/masterminds/html5/test/HTML5/Serializer/TraverserTest.php b/vendor/masterminds/html5/test/HTML5/Serializer/TraverserTest.php index a1565538b..d4ae7b351 100644 --- a/vendor/masterminds/html5/test/HTML5/Serializer/TraverserTest.php +++ b/vendor/masterminds/html5/test/HTML5/Serializer/TraverserTest.php @@ -1,13 +1,12 @@ @@ -28,7 +27,7 @@ class TraverserTest extends \Masterminds\HTML5\Tests\TestCase * Using reflection we make a protected method accessible for testing. * * @param string $name - * The name of the method on the Traverser class to test. + * The name of the method on the Traverser class to test * * @return \ReflectionMethod \ReflectionMethod for the specified method */ @@ -51,7 +50,7 @@ class TraverserTest extends \Masterminds\HTML5\Tests\TestCase // We return both the traverser and stream so we can pull from it. return array( $t, - $stream + $stream, ); } @@ -84,7 +83,7 @@ class TraverserTest extends \Masterminds\HTML5\Tests\TestCase $t = new Traverser($dom, $stream, $r, $this->html5->getOptions()); $t->walk(); - $this->assertEquals($html, stream_get_contents($stream, - 1, 0)); + $this->assertEquals($html, stream_get_contents($stream, -1, 0)); } public function testFragment() @@ -99,7 +98,7 @@ class TraverserTest extends \Masterminds\HTML5\Tests\TestCase $t = new Traverser($dom, $stream, $r, $this->html5->getOptions()); $t->walk(); - $this->assertEquals($html, stream_get_contents($stream, - 1, 0)); + $this->assertEquals($html, stream_get_contents($stream, -1, 0)); } public function testProcessorInstructionDeprecated() @@ -116,7 +115,7 @@ class TraverserTest extends \Masterminds\HTML5\Tests\TestCase $t = new Traverser($dom, $stream, $r, $this->html5->getOptions()); $t->walk(); - $this->assertEquals($html, stream_get_contents($stream, - 1, 0)); + $this->assertEquals($html, stream_get_contents($stream, -1, 0)); } public function testProcessorInstruction() @@ -132,6 +131,6 @@ class TraverserTest extends \Masterminds\HTML5\Tests\TestCase $t = new Traverser($dom, $stream, $r, $this->html5->getOptions()); $t->walk(); - $this->assertEquals($html, stream_get_contents($stream, - 1, 0)); + $this->assertEquals($html, stream_get_contents($stream, -1, 0)); } } diff --git a/vendor/masterminds/html5/test/HTML5/TestCase.php b/vendor/masterminds/html5/test/HTML5/TestCase.php index 3cb864547..990e8c15e 100644 --- a/vendor/masterminds/html5/test/HTML5/TestCase.php +++ b/vendor/masterminds/html5/test/HTML5/TestCase.php @@ -1,11 +1,12 @@ test'; const DOC_CLOSE = ''; diff --git a/vendor/masterminds/html5/test/benchmark/run.php b/vendor/masterminds/html5/test/benchmark/run.php index bee7c2dd6..2ca190783 100644 --- a/vendor/masterminds/html5/test/benchmark/run.php +++ b/vendor/masterminds/html5/test/benchmark/run.php @@ -1,6 +1,6 @@ loadHTML($content); $samples = array(); -for ($i = 0; $i < $iterations; $i++) { +for ($i = 0; $i < $iterations; ++$i) { $t = microtime(true); $dom = $html5->loadHTML($content); $samples[] = microtime(true) - $t; } $time = array_sum($samples) / count($samples); -echo "Loading: " . ($time * 1000) . "\n"; +echo 'Loading: ' . ($time * 1000) . "\n"; $samples = array(); -for ($i = 0; $i < $iterations; $i++) { +for ($i = 0; $i < $iterations; ++$i) { $t = microtime(true); $html5->saveHTML($dom); $samples[] = microtime(true) - $t; } $time = array_sum($samples) / count($samples); -echo "Writing: " . ($time * 1000) . "\n"; +echo 'Writing: ' . ($time * 1000) . "\n"; exit(0); diff --git a/vendor/nikic/php-parser/.travis.yml b/vendor/nikic/php-parser/.travis.yml index ee8eba99c..b6abb9658 100644 --- a/vendor/nikic/php-parser/.travis.yml +++ b/vendor/nikic/php-parser/.travis.yml @@ -1,5 +1,5 @@ language: php -dist: trusty +dist: xenial sudo: false cache: @@ -10,6 +10,7 @@ php: - 7.0 - 7.1 - 7.2 + - 7.3 - nightly install: diff --git a/vendor/nikic/php-parser/CHANGELOG.md b/vendor/nikic/php-parser/CHANGELOG.md index 4a3f0063f..2f86b977a 100644 --- a/vendor/nikic/php-parser/CHANGELOG.md +++ b/vendor/nikic/php-parser/CHANGELOG.md @@ -1,8 +1,33 @@ -Version 4.1.1-dev +Version 4.2.1-dev ----------------- Nothing yet. +Version 4.2.0 (2019-01-12) +-------------------------- + +### Added + +* [PHP 7.4] Add support for typed properties through a new `type` subnode of `Stmt\Property`. + Additionally `Builder\Property` now has a `setType()` method. (#567) +* Add `kind` attribute to `Cast\Double_`, which allows to distinguish between `(float)`, + `(double)` and `(real)`. The form of the cast will be preserved by the pretty printer. (#565) + +### Fixed + +* Remove assertion when pretty printing anonymous class with a name (#554). + +Version 4.1.1 (2018-12-26) +-------------------------- + +### Fixed + +* Fix "undefined offset" notice when parsing specific malformed code (#551). + +### Added + +* Support error recovery for missing return type (`function foo() : {}`) (#544). + Version 4.1.0 (2018-10-10) -------------------------- @@ -17,7 +42,7 @@ Version 4.1.0 (2018-10-10) and some cases which we do not expect to occur in practice (such as flexible doc strings being nested within each other through abuse of variable-variable interpolation syntax) may not be recognized correctly. -* Added `DONT_TRAVERSER_CURRENT_AND_CHILDREN` to `NodeTraverser` to skip both traversal of child +* Added `DONT_TRAVERSE_CURRENT_AND_CHILDREN` to `NodeTraverser` to skip both traversal of child nodes, and prevent subsequent visitors from visiting the current node. Version 4.0.4 (2018-09-18) diff --git a/vendor/nikic/php-parser/README.md b/vendor/nikic/php-parser/README.md index 5ae789f9a..e62748eb1 100644 --- a/vendor/nikic/php-parser/README.md +++ b/vendor/nikic/php-parser/README.md @@ -3,7 +3,7 @@ PHP Parser [![Build Status](https://travis-ci.org/nikic/PHP-Parser.svg?branch=master)](https://travis-ci.org/nikic/PHP-Parser) [![Coverage Status](https://coveralls.io/repos/github/nikic/PHP-Parser/badge.svg?branch=master)](https://coveralls.io/github/nikic/PHP-Parser?branch=master) -This is a PHP 5.2 to PHP 7.2 parser written in PHP. Its purpose is to simplify static code analysis and +This is a PHP 5.2 to PHP 7.3 parser written in PHP. Its purpose is to simplify static code analysis and manipulation. [**Documentation for version 4.x**][doc_master] (stable; for running on PHP >= 7.0; for parsing PHP 5.2 to PHP 7.3). diff --git a/vendor/nikic/php-parser/composer.json b/vendor/nikic/php-parser/composer.json index 12e8458a4..152143e77 100644 --- a/vendor/nikic/php-parser/composer.json +++ b/vendor/nikic/php-parser/composer.json @@ -1,8 +1,11 @@ { "name": "nikic/php-parser", - "description": "A PHP parser written in PHP", - "keywords": ["php", "parser"], "type": "library", + "description": "A PHP parser written in PHP", + "keywords": [ + "php", + "parser" + ], "license": "BSD-3-Clause", "authors": [ { @@ -16,15 +19,17 @@ "require-dev": { "phpunit/phpunit": "^6.5 || ^7.0" }, + "extra": { + "branch-alias": { + "dev-master": "4.2-dev" + } + }, "autoload": { "psr-4": { "PhpParser\\": "lib/PhpParser" } }, - "bin": ["bin/php-parse"], - "extra": { - "branch-alias": { - "dev-master": "4.1-dev" - } - } + "bin": [ + "bin/php-parse" + ] } diff --git a/vendor/nikic/php-parser/doc/0_Introduction.markdown b/vendor/nikic/php-parser/doc/0_Introduction.markdown index 240f7fdea..abc40f2bb 100644 --- a/vendor/nikic/php-parser/doc/0_Introduction.markdown +++ b/vendor/nikic/php-parser/doc/0_Introduction.markdown @@ -1,7 +1,7 @@ Introduction ============ -This project is a PHP 5.2 to PHP 7.2 parser **written in PHP itself**. +This project is a PHP 5.2 to PHP 7.3 parser **written in PHP itself**. What is this for? ----------------- @@ -26,11 +26,11 @@ programmatic PHP code analysis are incidentally PHP developers, not C developers What can it parse? ------------------ -The parser supports parsing PHP 5.2-7.2. +The parser supports parsing PHP 5.2-7.3. As the parser is based on the tokens returned by `token_get_all` (which is only able to lex the PHP version it runs on), additionally a wrapper for emulating tokens from newer versions is provided. -This allows to parse PHP 7.2 source code running on PHP 5.5, for example. This emulation is somewhat +This allows to parse PHP 7.3 source code running on PHP 7.0, for example. This emulation is somewhat hacky and not perfect, but it should work well on any sane code. What output does it produce? diff --git a/vendor/nikic/php-parser/doc/2_Usage_of_basic_components.markdown b/vendor/nikic/php-parser/doc/2_Usage_of_basic_components.markdown index 462b56374..9a809ec8e 100644 --- a/vendor/nikic/php-parser/doc/2_Usage_of_basic_components.markdown +++ b/vendor/nikic/php-parser/doc/2_Usage_of_basic_components.markdown @@ -339,7 +339,8 @@ All four methods can either return the changed node or not return at all (i.e. ` case the current node is not changed. The `enterNode()` method can additionally return the value `NodeTraverser::DONT_TRAVERSE_CHILDREN`, -which instructs the traverser to skip all children of the current node. +which instructs the traverser to skip all children of the current node. To furthermore prevent subsequent +visitors from visiting the current node, `NodeTraverser::DONT_TRAVERSE_CURRENT_AND_CHILDREN` can be used instead. The `leaveNode()` method can additionally return the value `NodeTraverser::REMOVE_NODE`, in which case the current node will be removed from the parent array. Furthermore it is possible to return diff --git a/vendor/nikic/php-parser/doc/component/AST_builders.markdown b/vendor/nikic/php-parser/doc/component/AST_builders.markdown index 4f338f6ea..60ae0192d 100644 --- a/vendor/nikic/php-parser/doc/component/AST_builders.markdown +++ b/vendor/nikic/php-parser/doc/component/AST_builders.markdown @@ -48,7 +48,7 @@ $node = $factory->namespace('Name\Space') ->makePublic() ->makeAbstract() // ->makeFinal() ->setReturnType('bool') // ->makeReturnByRef() - ->addParam($factory->param('someParam')->setTypeHint('SomeClass')) + ->addParam($factory->param('someParam')->setType('SomeClass')) ->setDocComment('/** * This method does something. * diff --git a/vendor/nikic/php-parser/doc/component/JSON_representation.markdown b/vendor/nikic/php-parser/doc/component/JSON_representation.markdown index a4d393356..47c3429c0 100644 --- a/vendor/nikic/php-parser/doc/component/JSON_representation.markdown +++ b/vendor/nikic/php-parser/doc/component/JSON_representation.markdown @@ -116,8 +116,8 @@ The JSON representation may be converted back into an AST using the `JsonDecoder ```php decode($json); +$jsonDecoder = new PhpParser\JsonDecoder(); +$ast = $jsonDecoder->decode($json); ``` Note that not all ASTs can be represented using JSON. In particular: @@ -128,4 +128,4 @@ Note that not all ASTs can be represented using JSON. In particular: If the node tree is not representable in JSON, the initial `json_encode()` call will fail. -From the command line, a JSON dump can be obtained using `vendor/bin/php-parse -j file.php`. \ No newline at end of file +From the command line, a JSON dump can be obtained using `vendor/bin/php-parse -j file.php`. diff --git a/vendor/nikic/php-parser/doc/component/Walking_the_AST.markdown b/vendor/nikic/php-parser/doc/component/Walking_the_AST.markdown index fd979d5a7..69af1e832 100644 --- a/vendor/nikic/php-parser/doc/component/Walking_the_AST.markdown +++ b/vendor/nikic/php-parser/doc/component/Walking_the_AST.markdown @@ -215,7 +215,7 @@ once you found it: private $class = null; public function enterNode(Node $node) { if ($node instanceof Node\Stmt\Class_ && - $node->namespaceName->toString() === 'Foo\Bar\Baz' + $node->namespacedName->toString() === 'Foo\Bar\Baz' ) { $this->class = $node; return NodeTraverser::STOP_TRAVERSAL; @@ -235,7 +235,7 @@ A single traverser can be used with multiple visitors: $traverser = new NodeTraverser; $traverser->addVisitor($visitorA); $traverser->addVisitor($visitorB); -$stmts = $traverser->traverser($stmts); +$stmts = $traverser->traverse($stmts); ``` It is important to understand that if a traverser is run with multiple visitors, the visitors will @@ -281,6 +281,8 @@ special enterNode/leaveNode return values: * If *any* visitor returns `DONT_TRAVERSE_CHILDREN`, the children will be skipped for *all* visitors. + * If *any* visitor returns `DONT_TRAVERSE_CURRENT_AND_CHILDREN`, the children will be skipped for *all* + visitors, and all *subsequent* visitors will not visit the current node. * If *any* visitor returns `STOP_TRAVERSAL`, traversal is stopped for *all* visitors. * If a visitor returns a replacement node, subsequent visitors will be passed the replacement node, not the original one. @@ -305,7 +307,7 @@ $nodeFinder = new NodeFinder; $classes = $nodeFinder->findInstanceOf($stmts, Node\Stmt\Class_::class); // Find all classes that extend another class -$extendingClasses = $nodeFinder->findInstanceOf($stmts, function(Node $node) { +$extendingClasses = $nodeFinder->find($stmts, function(Node $node) { return $node instanceof Node\Stmt\Class_ && $node->extends !== null; }); @@ -332,4 +334,4 @@ reverse direction: When working on a node, you might want to check if the parent certain property. PHP-Parser does not add parent (or sibling) references to nodes by itself, but you can easily -emulate this with a visitor. See the [FAQ](FAQ.markdown) for more information. \ No newline at end of file +emulate this with a visitor. See the [FAQ](FAQ.markdown) for more information. diff --git a/vendor/nikic/php-parser/grammar/php5.y b/vendor/nikic/php-parser/grammar/php5.y index abc5cedfa..b81df691e 100644 --- a/vendor/nikic/php-parser/grammar/php5.y +++ b/vendor/nikic/php-parser/grammar/php5.y @@ -628,7 +628,10 @@ expr: | T_REQUIRE expr { $$ = Expr\Include_[$2, Expr\Include_::TYPE_REQUIRE]; } | T_REQUIRE_ONCE expr { $$ = Expr\Include_[$2, Expr\Include_::TYPE_REQUIRE_ONCE]; } | T_INT_CAST expr { $$ = Expr\Cast\Int_ [$2]; } - | T_DOUBLE_CAST expr { $$ = Expr\Cast\Double [$2]; } + | T_DOUBLE_CAST expr + { $attrs = attributes(); + $attrs['kind'] = $this->getFloatCastKind($1); + $$ = new Expr\Cast\Double($2, $attrs); } | T_STRING_CAST expr { $$ = Expr\Cast\String_ [$2]; } | T_ARRAY_CAST expr { $$ = Expr\Cast\Array_ [$2]; } | T_OBJECT_CAST expr { $$ = Expr\Cast\Object_ [$2]; } diff --git a/vendor/nikic/php-parser/grammar/php7.y b/vendor/nikic/php-parser/grammar/php7.y index f7d32ef4b..45a3a036d 100644 --- a/vendor/nikic/php-parser/grammar/php7.y +++ b/vendor/nikic/php-parser/grammar/php7.y @@ -450,11 +450,11 @@ non_empty_parameter_list: ; parameter: - optional_param_type optional_ref optional_ellipsis plain_variable + optional_type optional_ref optional_ellipsis plain_variable { $$ = Node\Param[$4, null, $1, $2, $3]; $this->checkParam($$); } - | optional_param_type optional_ref optional_ellipsis plain_variable '=' expr + | optional_type optional_ref optional_ellipsis plain_variable '=' expr { $$ = Node\Param[$4, $6, $1, $2, $3]; $this->checkParam($$); } - | optional_param_type optional_ref optional_ellipsis error + | optional_type optional_ref optional_ellipsis error { $$ = Node\Param[Expr\Error[], null, $1, $2, $3]; } ; @@ -469,7 +469,7 @@ type: | T_CALLABLE { $$ = Node\Identifier['callable']; } ; -optional_param_type: +optional_type: /* empty */ { $$ = null; } | type_expr { $$ = $1; } ; @@ -477,6 +477,7 @@ optional_param_type: optional_return_type: /* empty */ { $$ = null; } | ':' type_expr { $$ = $2; } + | ':' error { $$ = null; } ; argument_list: @@ -534,8 +535,9 @@ class_statement_list: ; class_statement: - variable_modifiers property_declaration_list ';' - { $$ = Stmt\Property[$1, $2]; $this->checkProperty($$, #1); } + variable_modifiers optional_type property_declaration_list ';' + { $attrs = attributes(); + $$ = new Stmt\Property($1, $3, $attrs, $2); $this->checkProperty($$, #1); } | method_modifiers T_CONST class_const_list ';' { $$ = Stmt\ClassConst[$3, $1]; $this->checkClassConst($$, #1); } | method_modifiers T_FUNCTION optional_ref identifier_ex '(' parameter_list ')' optional_return_type method_body @@ -705,7 +707,10 @@ expr: | T_REQUIRE expr { $$ = Expr\Include_[$2, Expr\Include_::TYPE_REQUIRE]; } | T_REQUIRE_ONCE expr { $$ = Expr\Include_[$2, Expr\Include_::TYPE_REQUIRE_ONCE]; } | T_INT_CAST expr { $$ = Expr\Cast\Int_ [$2]; } - | T_DOUBLE_CAST expr { $$ = Expr\Cast\Double [$2]; } + | T_DOUBLE_CAST expr + { $attrs = attributes(); + $attrs['kind'] = $this->getFloatCastKind($1); + $$ = new Expr\Cast\Double($2, $attrs); } | T_STRING_CAST expr { $$ = Expr\Cast\String_ [$2]; } | T_ARRAY_CAST expr { $$ = Expr\Cast\Array_ [$2]; } | T_OBJECT_CAST expr { $$ = Expr\Cast\Object_ [$2]; } @@ -958,6 +963,7 @@ array_pair_list: comma_or_error: ',' | error + { /* do nothing -- prevent default action of $$=$1. See #551. */ } ; inner_array_pair_list: diff --git a/vendor/nikic/php-parser/lib/PhpParser/Builder/Property.php b/vendor/nikic/php-parser/lib/PhpParser/Builder/Property.php index 439bd09c6..1f3bdb272 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Builder/Property.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Builder/Property.php @@ -4,6 +4,9 @@ namespace PhpParser\Builder; use PhpParser; use PhpParser\BuilderHelpers; +use PhpParser\Node\Identifier; +use PhpParser\Node\Name; +use PhpParser\Node\NullableType; use PhpParser\Node\Stmt; class Property implements PhpParser\Builder @@ -14,6 +17,9 @@ class Property implements PhpParser\Builder protected $default = null; protected $attributes = []; + /** @var null|Identifier|Name|NullableType */ + protected $type; + /** * Creates a property builder. * @@ -95,6 +101,19 @@ class Property implements PhpParser\Builder return $this; } + /** + * Sets the property type for PHP 7.4+. + * + * @param string|Name|NullableType|Identifier $type + * + * @return $this + */ + public function setType($type) { + $this->type = BuilderHelpers::normalizeType($type); + + return $this; + } + /** * Returns the built class node. * @@ -106,7 +125,8 @@ class Property implements PhpParser\Builder [ new Stmt\PropertyProperty($this->name, $this->default) ], - $this->attributes + $this->attributes, + $this->type ); } } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php b/vendor/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php index dcacbfb62..7b019db81 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Internal/PrintableNewAnonClassNode.php @@ -39,7 +39,8 @@ class PrintableNewAnonClassNode extends Expr public static function fromNewNode(Expr\New_ $newNode) { $class = $newNode->class; assert($class instanceof Node\Stmt\Class_); - assert($class->name === null); + // We don't assert that $class->name is null here, to allow consumers to assign unique names + // to anonymous classes for their own purposes. We simplify ignore the name here. return new self( $newNode->args, $class->extends, $class->implements, $class->stmts, $newNode->getAttributes() diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Double.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Double.php index 0cee55439..891ba5f87 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Double.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Cast/Double.php @@ -6,6 +6,11 @@ use PhpParser\Node\Expr\Cast; class Double extends Cast { + // For use in "kind" attribute + const KIND_DOUBLE = 1; // "double" syntax + const KIND_FLOAT = 2; // "float" syntax + const KIND_REAL = 3; // "real" syntax + public function getType() : string { return 'Expr_Cast_Double'; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Param.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Param.php index 0b53f67cc..37d993921 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Param.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Param.php @@ -6,7 +6,7 @@ use PhpParser\NodeAbstract; class Param extends NodeAbstract { - /** @var null|Identifier|Name|NullableType Typehint */ + /** @var null|Identifier|Name|NullableType Type declaration */ public $type; /** @var bool Whether parameter is passed by reference */ public $byRef; @@ -20,12 +20,12 @@ class Param extends NodeAbstract /** * Constructs a parameter node. * - * @param Expr\Variable|Expr\Error $var Parameter variable - * @param null|Expr $default Default value - * @param null|string|Name|NullableType $type Typehint - * @param bool $byRef Whether is passed by reference - * @param bool $variadic Whether this is a variadic argument - * @param array $attributes Additional attributes + * @param Expr\Variable|Expr\Error $var Parameter variable + * @param null|Expr $default Default value + * @param null|string|Identifier|Name|NullableType $type Type declaration + * @param bool $byRef Whether is passed by reference + * @param bool $variadic Whether this is a variadic argument + * @param array $attributes Additional attributes */ public function __construct( $var, Expr $default = null, $type = null, @@ -42,7 +42,7 @@ class Param extends NodeAbstract public function getSubNodeNames() : array { return ['type', 'byRef', 'variadic', 'var', 'default']; } - + public function getType() : string { return 'Param'; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php index 30528509b..81952be0f 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php @@ -6,7 +6,7 @@ use PhpParser\Node; class Case_ extends Node\Stmt { - /** @var null|Node\Expr $cond Condition (null for default) */ + /** @var null|Node\Expr Condition (null for default) */ public $cond; /** @var Node\Stmt[] Statements */ public $stmts; diff --git a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php index 91291aa12..1888bbb62 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Property.php @@ -3,6 +3,9 @@ namespace PhpParser\Node\Stmt; use PhpParser\Node; +use PhpParser\Node\Identifier; +use PhpParser\Node\Name; +use PhpParser\Node\NullableType; class Property extends Node\Stmt { @@ -10,22 +13,26 @@ class Property extends Node\Stmt public $flags; /** @var PropertyProperty[] Properties */ public $props; + /** @var null|Identifier|Name|NullableType Type declaration */ + public $type; /** * Constructs a class property list node. * - * @param int $flags Modifiers - * @param PropertyProperty[] $props Properties - * @param array $attributes Additional attributes + * @param int $flags Modifiers + * @param PropertyProperty[] $props Properties + * @param array $attributes Additional attributes + * @param null|string|Identifier|Name|NullableType $type Type declaration */ - public function __construct(int $flags, array $props, array $attributes = []) { + public function __construct(int $flags, array $props, array $attributes = [], $type = null) { parent::__construct($attributes); $this->flags = $flags; $this->props = $props; + $this->type = \is_string($type) ? new Identifier($type) : $type; } public function getSubNodeNames() : array { - return ['flags', 'props']; + return ['flags', 'type', 'props']; } /** @@ -64,7 +71,7 @@ class Property extends Node\Stmt public function isStatic() : bool { return (bool) ($this->flags & Class_::MODIFIER_STATIC); } - + public function getType() : string { return 'Stmt_Property'; } diff --git a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php index 44d01e107..abbe8ae5e 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php +++ b/vendor/nikic/php-parser/lib/PhpParser/NodeVisitor/NameResolver.php @@ -94,6 +94,10 @@ class NameResolver extends NodeVisitorAbstract || $node instanceof Expr\Closure ) { $this->resolveSignature($node); + } elseif ($node instanceof Stmt\Property) { + if (null !== $node->type) { + $node->type = $this->resolveType($node->type); + } } elseif ($node instanceof Stmt\Const_) { foreach ($node->consts as $const) { $this->addNamespacedName($const); diff --git a/vendor/nikic/php-parser/lib/PhpParser/Parser/Php5.php b/vendor/nikic/php-parser/lib/PhpParser/Parser/Php5.php index 4da2dc979..8c94dfc90 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Parser/Php5.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Parser/Php5.php @@ -2032,7 +2032,9 @@ class Php5 extends \PhpParser\ParserAbstract $this->semValue = new Expr\Cast\Int_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 361 => function ($stackPos) { - $this->semValue = new Expr\Cast\Double($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; + $attrs['kind'] = $this->getFloatCastKind($this->semStack[$stackPos-(2-1)]); + $this->semValue = new Expr\Cast\Double($this->semStack[$stackPos-(2-2)], $attrs); }, 362 => function ($stackPos) { $this->semValue = new Expr\Cast\String_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); diff --git a/vendor/nikic/php-parser/lib/PhpParser/Parser/Php7.php b/vendor/nikic/php-parser/lib/PhpParser/Parser/Php7.php index 768da7217..4c3a6bfb6 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/Parser/Php7.php +++ b/vendor/nikic/php-parser/lib/PhpParser/Parser/Php7.php @@ -18,16 +18,16 @@ use PhpParser\Node\Stmt; class Php7 extends \PhpParser\ParserAbstract { protected $tokenToSymbolMapSize = 392; - protected $actionTableSize = 940; - protected $gotoTableSize = 486; + protected $actionTableSize = 942; + protected $gotoTableSize = 493; protected $invalidSymbol = 157; protected $errorSymbol = 1; protected $defaultAction = -32766; protected $unexpectedTokenRule = 32767; - protected $YY2TBLSTATE = 336; - protected $numNonLeafStates = 581; + protected $YY2TBLSTATE = 337; + protected $numNonLeafStates = 582; protected $symbolToName = array( "EOF", @@ -233,100 +233,101 @@ class Php7 extends \PhpParser\ParserAbstract ); protected $action = array( - 586, 587, 588, 589, 590, 218, 591, 592, 593, 629, - 630, 665, 32, 102, 103, 104, 105, 106, 107, 108, - 109, 110, 111, 112, 113,-32766,-32766,-32766, 881, 882, - 883, 880, 879, 878, 0,-32766,-32766,-32766,-32766,-32766, - -32766, 663, 824, 117, 24,-32766, 428,-32766,-32766,-32766, - -32766,-32766, 594, 914, 916,-32766, 9,-32766,-32766,-32766, - -32766,-32766,-32766, 857, 250, 350, 595, 596, 597, 598, - 599, 600, 601, 119, 250, 661, 881, 882, 883, 880, - 879, 878, 602, 603, 604, 605, 606, 607, 608, 609, - 610, 611, 612, 632, 633, 634, 635, 636, 624, 625, - 626, 627, 628, 613, 614, 615, 616, 617, 618, 619, - 655, 656, 657, 658, 659, 660, 620, 621, 622, 623, - 653, 644, 642, 643, 639, 640, 800, 631, 637, 638, - 645, 646, 648, 647, 649, 650, 45, 46, 405, 47, - 48, 641, 652, 651, -233, 49, 50, 231, 51,-32767, + 587, 588, 589, 590, 591, 218, 592, 593, 594, 630, + 631, 666, 32, 102, 103, 104, 105, 106, 107, 108, + 109, 110, 111, 112, 113,-32766,-32766,-32766, 883, 884, + 885, 882, 881, 880, 0,-32766,-32766,-32766,-32766,-32766, + -32766, 664, 825, 117, 24,-32766, 429,-32766,-32766,-32766, + -32766,-32766, 595, 916, 918,-32766, 9,-32766,-32766,-32766, + -32766,-32766,-32766, 859, 251, 119, 596, 597, 598, 599, + 600, 601, 602,-32766,-32766, 662, 883, 884, 885, 882, + 881, 880, 603, 604, 605, 606, 607, 608, 609, 610, + 611, 612, 613, 633, 634, 635, 636, 637, 625, 626, + 627, 628, 629, 614, 615, 616, 617, 618, 619, 620, + 656, 657, 658, 659, 660, 661, 621, 622, 623, 624, + 654, 645, 643, 644, 640, 641, 231, 632, 638, 639, + 646, 647, 649, 648, 650, 651, 45, 46, 406, 47, + 48, 642, 653, 652, -233, 49, 50, 243, 51,-32767, -32767,-32767,-32767, 93, 94, 95, 96, 97,-32766,-32766, - -32766, 42, -451, 25, -293, -293, 828, 829, 98, 99, - 100, 260, 241, 230, -453, 1047, 828, 829,-32766, 1013, - 873, 52, 53, 486, 101, 670, 242, 54, -238, 55, + -32766, 42, -452, 25, -294, -294, 829, 830, 98, 99, + 100, 261, 242, 266, -454, 1049, 671, 389,-32766, 1015, + 875, 52, 53, 801, 101, 1049, 278, 54, 835, 55, 223, 224, 56, 57, 58, 59, 60, 61, 62, 63, - -452, 25, 234, 64, 357,-32766,-32766,-32766, 990, 1014, - 1015, 407, -271, 1047, -488, 665, 265, 1013,-32766,-32766, - -32766, 746, 248, -451, 250,-32766, 420,-32766,-32766,-32766, - -32766, 388, -258, 1078, 277, -453, 365, -451,-32766, 1077, - -32766,-32766,-32766, 116, -451, 801, 291, 68, 665, -453, - 428, 292, 267, 1065, 417, 418, -453, -489, -456, 373, - 997, -452, 557, 419, 420, 1050, 1019, 1020, 1021, 1022, - 1016, 1017, 245, 764, -451, -452, 217, 429, 1023, 1018, - 362, 295, -452, 1047, -455, 66, 1009, 257,-32766, 262, - 267, 406, -136, -136, -136, -4, 746, 686, 687, 299, - 668, 735, 266, 1090, 37, 20, 408, -136, 409, -136, - 410, -136, 411, -136, 429, 412, 229, 362, 490, 38, - 39, 358, 359, 355, 40, 413, 828, 829, 65, 663, - 44, 290, 669, 414, 415, -451, -492, 33, 1047, 416, - 122, 346, 721, 769, 360, 361, 353, 1099, -91, -451, - 1100, 389,-32766,-32766,-32766, 354, -451, 121, 665, -488, - 267, 28, 226, 379, 1047, 228, 406, 746, 748, 555, - -136, 990,-32766, 219,-32766,-32766, 735, -258, 233, 37, - 20, 408, 351, 409, -495, 410, -495, 411, 665, 451, - 412, 249, 232, 428, 38, 39, 358, 359, 342, 40, - 413, 125, -489, 65, 256, 294, 290, 665, 414, 415, - 25, 30, 118, 74, 416, 267, 356, 678, 769, 360, - 361, 568, 1047, 428, 25, 127, 1013, 540, 123,-32766, - -32766,-32766, -176, 834, 124, -177, 1047, 406, 279, 746, - 1013, 267, 428, 748, 555, -4, 1027, 735, 665, 474, - 37, 20, 408, 281, 409, 990, 410, 115, 411,-32766, - -32766, 412, -218, -218, -218, 38, 39, 358, 359, 990, - 40, 413, 419, 420, 65, -491, 225, 290, 229, 414, - 415, -492, 569, 428, 114, 416, 419, 420, 721, 769, - 360, 361, 131, 541, 68, 133, 362, 130, 317, 267, - 859, 134, 227, 529, 530, 997, 517, 21, 68, 406, - 95, 96, 97, 267, 748, 555, -218, 120, 665, 735, - 665, 129, 37, 20, 408, 745, 409, 244, 410, -82, - 411, 686, 687, 412, -217, -217, -217, 38, 39, 358, - 359, 572, 40, 413, 665, 760, 65, 241, 746, 290, - 101, 414, 415, 428, 43, 428, 1066, 416, 398, 8, - 721, 769, 360, 361, 508, 509, 828, 829, 128, 75, - 76, 77, 858, 578, 665, 1101, 570, -176, -291, 428, - -177, 537, 666, 1047, 523, 663, 748, 555, -217, 31, + -453, 25, 234, 64, 358,-32766,-32766,-32766, 992, 1016, + 1017, 408, -272, 1049, -489, 251, 491, 1015,-32766,-32766, + -32766, 747, 249, -452, 251,-32766, 421,-32766,-32766,-32766, + -32766, 452, -259, 1080, 293, -454, 366, -452,-32766, 1079, + -32766,-32766,-32766, 116, -452, 1101, 292, 68, 1102, -454, + 516, 21, 268, 487, 418, 419, -454, 296, -457,-32766, + 999, -453, 268, 420, 421, 1067, 1021, 1022, 1023, 1024, + 1018, 1019, 246, 1052, -452, -453, 267, 430, 1025, 1020, + 363, 666, -453, 300, -456, 66, 1011, 258, 1029, 263, + 268, 407, -136, -136, -136, -4, 747, 390, 351, 251, + 669, 736, 802, 1092, 37, 20, 409, -136, 410, -136, + 411, -136, 412, -136, -490, 413, 229, 829, 830, 38, + 39, 359, 360, 670, 40, 414, 829, 830, 65, 374, + 44, 291, 558, 415, 416, -452, 765, 380, 1049, 417, + 354, 664, 722, 770, 361, 362, 217, 430, -91, -452, + 363, 33,-32766,-32766,-32766, 355, -452, 114, 666, -489, + 356, 28, 226, 122, 1049, 230, 407, 747, 749, 556, + -136, 992,-32766, 219,-32766,-32766, 736, -259, 233, 37, + 20, 409, 352, 410, -496, 411, -496, 412, 687, 688, + 413, 250, 232, 429, 38, 39, 359, 360, 343, 40, + 414, 829, 830, 65, 257, 295, 291, 666, 415, 416, + 25, 666, 118, 125, 417, 268, 357, 679, 770, 361, + 362, 74, 1049, -238, 25, 115, 1015, 541, 123,-32766, + -32766,-32766, 347, 836, 124, 120, 1049, 407, 280, 747, + 1015, 268, 429, 749, 556, -4, 429, 736, 666, 475, + 37, 20, 409, 746, 410, 992, 411, 121, 412, -490, + 127, 413, -218, -218, -218, 38, 39, 359, 360, 992, + 40, 414, 420, 421, 65, 132, 228, 291, 229, 415, + 416, -493, -82, 429, 569, 417, 420, 421, 722, 770, + 361, 362, 133, 542, 68, 30, 363, 134, -176, 268, + 861, 129, 225, 227, 244, 999, 530, 531, 68, 407, + 95, 96, 97, 268, 749, 556, -218, -177, 666, 736, + 666, 573, 37, 20, 409, -492, 410, 570, 411, 282, + 412, 398, 8, 413, -217, -217, -217, 38, 39, 359, + 360, 761, 40, 414, 666, 666, 65, 242, 747, 291, + 101, 415, 416, 429, 43, 429, 128, 417, 130, 318, + 722, 770, 361, 362, 687, 688, -295, -295, 538, 75, + 76, 77, 509, 510, 829, 830, 567, 667, 664, 429, + 429, 860, 579, 1049, 666, 1103, 749, 556, -217, 31, 123, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, - 97, 98, 99, 100, 887, 241, 990, 746, 406, 668, - -491, 455, 460,-32766, 518, 532, -80, 101, 735, 533, - 370, 37, 20, 408, 549, 409, 377, 410, 10, 411, - 507, 990, 412, 770, 524, 566, 38, 39, 358, 746, - 771, 40, 413, 261, 1029, 65, 264, 1026, 290, 12, - 267, 293, 373, -410, 258, 5, 416, 970, 347, 0, - 335, 348, 331, 259, 0, 0, 0, 563, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 406, 0, 0, - 0, 0, 0, 0, 0, 748, 555, 735, 330, 324, - 37, 20, 408, 457, 409, 762, 410, 853, 411, 556, - 870, 412, 726, 577, 36, 38, 39, 358, 746, 406, - 40, 413, 35, 576, 65, 803, 863, 290, 866, 735, - 787, 865, 37, 20, 408, 416, 409, 862, 410, 782, - 411, 724, 795, 412, 784, 854, 561, 38, 39, 358, - 746, 794, 40, 413, 864, 793, 65, 558, 341, 290, - 340, 560, 276, 275, 748, 555, 571, 416, 567, 565, - 564, 559, 514, 792, 753, 763, 755, 689, 562, 978, - 766, 1097, 1048, 722, 1096, 1098, 681, 768, 406, 746, - 680, 690, 767, 691, 688, 1095, 786, 555, 735, 1063, - 1041, 37, 20, 408, 1055, 409, 1060, 410, 573, 411, - 41, 34, 412, 27, 26, 23, 38, 39, 358, -454, - 406, 40, 413, -455, -456, 65, -478, -480, 290, 237, - 735, 345, 343, 37, 20, 408, 416, 409, 278, 410, - 240, 411, 239, 238, 412, 222, 221, 135, 38, 39, - 358, 132, 126, 40, 413, 73, 72, 65, 71, 406, - 290, 70, 69, 67, 1028, 748, 555, 954, 416, 735, - 957, 548, 37, 20, 408, 503, 409, 484, 410, 313, - 411, 252, 22, 412, 18, 13, -236, 38, 39, 358, - 982, 835, 40, 413, 1011, 953, 65, 748, 555, 290, - -32766,-32766,-32766, 1001, 546, 403, 396, 416, 394, 390, - 314, 19, 17, 16, -91, 15, 14, -233, -234, 0, - -32766, -422,-32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767, - -32767,-32767,-32767, 1010, 1093, 1054, 748, 555, 1040, 1039 + 97, 98, 99, 100, 889, 242, 992, 747, 407, 669, + 456,-32766, 461, 550, 517, 522, -493, 101, 736, 523, + 371, 37, 20, 409, 533, 410, 10, 411, -80, 412, + 1068, 534, 413, -176, 378, 563, 38, 39, 359, 747, + 508, 40, 414, 771, 772, 65, 262, 12, 291, 1031, + 268, 992, -177, 1028, 294, -411, 417, 5, 763, 794, + -492, 513, 374, 348, 265, 349, 0, 564, 259, 0, + 260, 0, 0, 0, 0, 0, 0, 407, 0, 0, + 0, 0, 0, 0, 0, 749, 556, 736, 0, 804, + 37, 20, 409, 325, 410, 336, 411, 557, 412, 332, + 331, 413, 458, 872, 956, 38, 39, 359, 747, 407, + 40, 414, 727, 578, 65, 36, 35, 291, 577, 736, + 788, 865, 37, 20, 409, 417, 410, 795, 411, 868, + 412, 867, 864, 413, 783, 725, 562, 38, 39, 359, + 747, 796, 40, 414, 785, 856, 65, 855, 866, 291, + 559, 342, 341, 561, 749, 556, 277, 417, 276, 572, + 568, 566, 565, 560, 0, 793, 754, 764, 571, 756, + 690, 980, 767, 723, 1043, 1098, 1100, 682, 407, 747, + 769, 681, 691, 768, 692, 689, 787, 556, 736, 1097, + 1050, 37, 20, 409, 1099, 410, 1057, 411, 1062, 412, + 1065, 574, 413, 41, 34, 27, 38, 39, 359, 26, + 407, 40, 414, 23, -455, 65, -456, -457, 291, -479, + 736, -481, 238, 37, 20, 409, 417, 410, 346, 411, + 344, 412, 279, 241, 413, 240, 239, 222, 38, 39, + 359, 221, 135, 40, 414, 131, 126, 65, 73, 407, + 291, 72, 71, 70, 69, 749, 556, 67, 417, 736, + 959, 549, 37, 20, 409, 504, 410, 485, 411, 314, + 412, 253, 22, 413, 18, 13, -236, 38, 39, 359, + 984, 837, 40, 414, 1013, 955, 65, 749, 556, 291, + -32766,-32766,-32766, 1003, 547, 404, 397, 417, 395, 391, + 315, 19, 17, -91, 16, 15, 14, -233, -234, 0, + -32766, 972,-32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767, + -32767,-32767,-32767, -423, 1030, 1012, 749, 556, 1095, 1056, + 1042, 1041 ); protected $actionCheck = array( @@ -337,100 +338,101 @@ class Php7 extends \PhpParser\ParserAbstract 10, 77, 1, 13, 7, 28, 112, 30, 31, 32, 33, 34, 54, 56, 57, 28, 7, 30, 31, 32, 33, 34, 35, 1, 28, 7, 68, 69, 70, 71, - 72, 73, 74, 7, 28, 77, 112, 113, 114, 115, + 72, 73, 74, 8, 9, 77, 112, 113, 114, 115, 116, 117, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, - 122, 123, 124, 125, 126, 127, 29, 129, 130, 131, + 122, 123, 124, 125, 126, 127, 7, 129, 130, 131, 132, 133, 134, 135, 136, 137, 2, 3, 4, 5, 6, 143, 144, 145, 152, 11, 12, 7, 14, 41, 42, 43, 44, 45, 46, 47, 48, 49, 8, 9, 10, 67, 67, 67, 102, 103, 130, 131, 50, 51, - 52, 109, 54, 35, 67, 79, 130, 131, 28, 83, - 118, 47, 48, 1, 66, 1, 7, 53, 152, 55, + 52, 109, 54, 7, 67, 79, 1, 29, 28, 83, + 118, 47, 48, 29, 66, 79, 7, 53, 1, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 67, 67, 68, 69, 70, 8, 9, 10, 112, 75, - 76, 77, 150, 79, 7, 77, 7, 83, 8, 9, + 76, 77, 150, 79, 7, 28, 48, 83, 8, 9, 10, 1, 128, 128, 28, 28, 130, 30, 31, 32, - 33, 29, 7, 1, 7, 128, 102, 142, 28, 7, - 30, 31, 32, 149, 149, 148, 112, 151, 77, 142, - 112, 7, 156, 1, 120, 121, 149, 7, 151, 146, - 1, 128, 149, 129, 130, 1, 132, 133, 134, 135, - 136, 137, 138, 1, 67, 142, 94, 143, 144, 145, - 146, 7, 149, 79, 151, 151, 1, 153, 8, 155, - 156, 71, 72, 73, 74, 0, 1, 102, 103, 7, - 79, 81, 67, 82, 84, 85, 86, 87, 88, 89, - 90, 91, 92, 93, 143, 95, 35, 146, 48, 99, - 100, 101, 102, 7, 104, 105, 130, 131, 108, 77, - 67, 111, 148, 113, 114, 128, 7, 13, 79, 119, - 29, 146, 122, 123, 124, 125, 7, 77, 152, 142, - 80, 149, 8, 9, 10, 7, 149, 15, 77, 152, - 156, 140, 141, 128, 79, 35, 71, 1, 148, 149, + 33, 82, 7, 1, 7, 128, 102, 142, 28, 7, + 30, 31, 32, 149, 149, 77, 112, 151, 80, 142, + 72, 73, 156, 1, 120, 121, 149, 7, 151, 8, + 1, 128, 156, 129, 130, 1, 132, 133, 134, 135, + 136, 137, 138, 1, 67, 142, 67, 143, 144, 145, + 146, 77, 149, 7, 151, 151, 1, 153, 139, 155, + 156, 71, 72, 73, 74, 0, 1, 149, 7, 28, + 79, 81, 148, 82, 84, 85, 86, 87, 88, 89, + 90, 91, 92, 93, 7, 95, 35, 130, 131, 99, + 100, 101, 102, 148, 104, 105, 130, 131, 108, 146, + 67, 111, 149, 113, 114, 128, 1, 128, 79, 119, + 7, 77, 122, 123, 124, 125, 94, 143, 152, 142, + 146, 13, 8, 9, 10, 7, 149, 15, 77, 152, + 7, 140, 141, 29, 79, 35, 71, 1, 148, 149, 150, 112, 28, 13, 30, 31, 81, 152, 35, 84, - 85, 86, 123, 88, 152, 90, 154, 92, 77, 82, + 85, 86, 123, 88, 152, 90, 154, 92, 102, 103, 95, 128, 35, 112, 99, 100, 101, 102, 103, 104, - 105, 149, 152, 108, 109, 142, 111, 77, 113, 114, - 67, 7, 149, 149, 119, 156, 7, 122, 123, 124, - 125, 149, 79, 112, 67, 15, 83, 77, 147, 8, - 9, 10, 7, 152, 149, 7, 79, 71, 143, 1, - 83, 156, 112, 148, 149, 150, 139, 81, 77, 78, - 84, 85, 86, 33, 88, 112, 90, 15, 92, 8, - 9, 95, 96, 97, 98, 99, 100, 101, 102, 112, - 104, 105, 129, 130, 108, 7, 35, 111, 35, 113, - 114, 152, 29, 112, 15, 119, 129, 130, 122, 123, - 124, 125, 15, 143, 151, 15, 146, 97, 98, 156, - 150, 15, 35, 72, 73, 1, 72, 73, 151, 71, - 47, 48, 49, 156, 148, 149, 150, 15, 77, 81, - 77, 29, 84, 85, 86, 29, 88, 29, 90, 29, + 105, 130, 131, 108, 109, 142, 111, 77, 113, 114, + 67, 77, 149, 149, 119, 156, 7, 122, 123, 124, + 125, 149, 79, 152, 67, 15, 83, 77, 147, 8, + 9, 10, 146, 152, 149, 15, 79, 71, 143, 1, + 83, 156, 112, 148, 149, 150, 112, 81, 77, 78, + 84, 85, 86, 29, 88, 112, 90, 15, 92, 152, + 15, 95, 96, 97, 98, 99, 100, 101, 102, 112, + 104, 105, 129, 130, 108, 15, 35, 111, 35, 113, + 114, 7, 29, 112, 149, 119, 129, 130, 122, 123, + 124, 125, 15, 143, 151, 7, 146, 15, 7, 156, + 150, 29, 35, 35, 29, 1, 72, 73, 151, 71, + 47, 48, 49, 156, 148, 149, 150, 7, 77, 81, + 77, 29, 84, 85, 86, 7, 88, 29, 90, 33, 92, 102, 103, 95, 96, 97, 98, 99, 100, 101, - 102, 29, 104, 105, 77, 35, 108, 54, 1, 111, - 66, 113, 114, 112, 67, 112, 152, 119, 102, 103, - 122, 123, 124, 125, 106, 107, 130, 131, 67, 8, - 9, 10, 148, 149, 77, 80, 29, 152, 79, 112, - 152, 74, 77, 79, 93, 77, 148, 149, 150, 28, + 102, 35, 104, 105, 77, 77, 108, 54, 1, 111, + 66, 113, 114, 112, 67, 112, 67, 119, 97, 98, + 122, 123, 124, 125, 102, 103, 102, 103, 74, 8, + 9, 10, 106, 107, 130, 131, 29, 77, 77, 112, + 112, 148, 149, 79, 77, 80, 148, 149, 150, 28, 147, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 79, 54, 112, 1, 71, 79, - 152, 82, 86, 82, 87, 91, 94, 66, 81, 96, - 102, 84, 85, 86, 89, 88, 94, 90, 94, 92, - 109, 112, 95, 123, 96, 29, 99, 100, 101, 1, - 123, 104, 105, 110, 139, 108, 126, 139, 111, 142, - 156, 142, 146, 142, 126, 142, 119, 153, 146, -1, - 146, 146, 146, 127, -1, -1, -1, 29, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 71, -1, -1, - -1, -1, -1, -1, -1, 148, 149, 81, 146, 146, - 84, 85, 86, 146, 88, 147, 90, 148, 92, 149, - 148, 95, 148, 148, 148, 99, 100, 101, 1, 71, + 82, 82, 86, 89, 87, 93, 152, 66, 81, 96, + 102, 84, 85, 86, 91, 88, 94, 90, 94, 92, + 152, 96, 95, 152, 94, 29, 99, 100, 101, 1, + 109, 104, 105, 123, 123, 108, 110, 142, 111, 139, + 156, 112, 152, 139, 142, 142, 119, 142, 147, 150, + 152, 154, 146, 146, 126, 146, -1, 29, 126, -1, + 127, -1, -1, -1, -1, -1, -1, 71, -1, -1, + -1, -1, -1, -1, -1, 148, 149, 81, -1, 148, + 84, 85, 86, 146, 88, 146, 90, 149, 92, 146, + 146, 95, 146, 148, 152, 99, 100, 101, 1, 71, 104, 105, 148, 148, 108, 148, 148, 111, 148, 81, 148, 148, 84, 85, 86, 119, 88, 148, 90, 148, 92, 148, 148, 95, 148, 148, 29, 99, 100, 101, - 1, 148, 104, 105, 148, 150, 108, 149, 149, 111, + 1, 148, 104, 105, 148, 148, 108, 148, 148, 111, 149, 149, 149, 149, 148, 149, 149, 119, 149, 149, - 149, 149, 154, 150, 150, 150, 150, 150, 29, 150, + 149, 149, 149, 149, -1, 150, 150, 150, 29, 150, 150, 150, 150, 150, 150, 150, 150, 150, 71, 1, 150, 150, 150, 150, 150, 150, 148, 149, 81, 150, 150, 84, 85, 86, 150, 88, 150, 90, 150, 92, - 151, 151, 95, 151, 151, 151, 99, 100, 101, 151, + 150, 150, 95, 151, 151, 151, 99, 100, 101, 151, 71, 104, 105, 151, 151, 108, 151, 151, 111, 151, 81, 151, 151, 84, 85, 86, 119, 88, 151, 90, 151, 92, 151, 151, 95, 151, 151, 151, 99, 100, 101, 151, 151, 104, 105, 151, 151, 108, 151, 71, - 111, 151, 151, 151, 155, 148, 149, 152, 119, 81, + 111, 151, 151, 151, 151, 148, 149, 151, 119, 81, 152, 152, 84, 85, 86, 152, 88, 152, 90, 152, 92, 152, 152, 95, 152, 152, 152, 99, 100, 101, 152, 152, 104, 105, 152, 152, 108, 148, 149, 111, 8, 9, 10, 152, 152, 152, 152, 119, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, -1, 28, 153, 30, 31, 32, 33, 34, 35, 36, 37, - 38, 39, 40, 154, 154, 154, 148, 149, 154, 154 + 38, 39, 40, 153, 155, 154, 148, 149, 154, 154, + 154, 154 ); protected $actionBase = array( - 0, 220, 295, 366, 438, 285, 350, 606, -2, -2, - -36, -2, -2, 749, 616, 616, 547, 616, 717, 648, - 788, 788, 788, 281, 443, 441, 441, 467, 371, 441, - 467, 311, 330, 138, -66, -66, -66, -66, -66, -66, + 0, 220, 295, 366, 438, 285, 350, 610, -2, -2, + -36, -2, -2, 616, 547, 547, 749, 547, 717, 648, + 788, 788, 788, 281, 443, 467, 467, 468, 371, 467, + 468, 334, 441, 330, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, @@ -440,53 +442,53 @@ class Php7 extends \PhpParser\ParserAbstract -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, -66, - -66, -66, -66, -66, -66, -66, 184, 184, 97, 182, - 324, 729, 718, 725, 732, 733, 727, 715, 360, 645, - 632, 492, 650, 654, 656, 649, 723, 618, 730, 719, + -66, -66, -66, -66, -66, -66, 175, 175, 154, 252, + 338, 729, 718, 725, 732, 733, 727, 562, 360, 649, + 650, 472, 634, 656, 658, 660, 723, 517, 730, 719, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 561, 561, 561, 561, 561, 280, 30, 451, 421, + 561, 561, 561, 561, 561, 561, 251, 30, 65, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 150, 150, 150, 344, 210, 207, 197, 17, 95, 27, 892, 892, 892, 892, 892, 108, 108, 108, 108, 357, 357, 343, 62, 96, 96, 96, 96, 96, 96, 96, 96, 96, - 96, 96, 96, 96, 259, 463, 463, 36, 36, 36, - 36, 504, 196, 499, 46, 307, 515, 709, 252, 252, - 436, 107, 133, 118, 118, 118, 195, 539, 529, 529, - 529, 529, 221, 221, 529, 529, 270, 264, 232, 95, - 95, 263, 95, 95, 95, 429, 429, 429, 171, 113, - 541, 171, 562, 622, 548, 623, 533, 605, 94, 522, - 204, 528, 525, 204, 204, 204, 458, 434, 431, 762, - 184, 521, 184, 184, 184, 184, 678, 184, 184, 184, - 184, 184, 184, 202, 184, 41, 424, 97, 272, 272, - 420, 272, 493, 235, 614, 425, 404, 493, 493, 493, - 613, 611, 250, 225, -8, 609, 428, 456, 468, 329, - 497, 497, 508, 508, 535, 510, 497, 497, 497, 497, - 497, 664, 664, 508, 540, 508, 535, 659, 508, 510, - 508, 508, 497, 508, 664, 510, 66, 339, 244, 274, - 510, 348, 538, 497, 530, 530, 316, 508, 140, 508, - 37, 546, 664, 664, 546, 179, 510, 209, 575, 565, - 531, 558, 227, 498, 498, 58, 531, 409, 510, 498, - 49, 540, 292, 498, 34, 712, 711, 500, 710, 660, - 707, 681, 705, 560, 520, 527, 695, 694, 704, 662, - 663, 496, 557, 469, 442, 523, 487, 668, 528, 516, - 484, 484, 484, 487, 673, 484, 484, 484, 484, 484, - 484, 484, 484, 779, 519, 536, 502, 553, 542, 342, - 608, 518, 557, 557, 633, 768, 514, 505, 678, 751, - 701, 574, 410, 759, 692, 658, 552, 526, 691, 758, - 743, 612, 469, 742, 634, 501, 635, 557, 636, 484, - 675, 676, 785, 784, 672, 781, 764, 757, 524, 637, - 495, 780, 640, 739, 621, 620, 566, 763, 734, 756, - 641, 754, 642, 564, 537, 766, 491, 680, 687, 619, - 643, 644, 559, 477, 631, 630, 629, 700, 577, 761, - 534, 760, 765, 582, 603, 480, 627, 486, 597, 696, - 453, 507, 596, 594, 738, 626, 689, 593, 625, 752, - 532, 516, 517, 543, 544, 545, 617, 753, 512, 591, - 589, 583, 580, 624, 578, 0, 0, 0, 0, 0, + 96, 96, 96, 96, 259, 464, 463, 463, 271, 271, + 271, 271, 504, 196, 187, 36, 149, 520, 779, 264, + 264, 444, 107, 133, 118, 118, 118, 286, 538, 549, + 549, 549, 549, 221, 221, 549, 549, 168, 272, 232, + 95, 95, 263, 95, 95, 95, 462, 462, 462, 204, + 183, 539, 204, 565, 624, 533, 625, 545, 519, 94, + 527, 106, 528, 529, 106, 106, 106, 466, 178, 434, + 761, 175, 523, 175, 175, 175, 175, 681, 175, 175, + 175, 175, 175, 175, 148, 175, 41, 433, 154, 335, + 335, 496, 335, 493, 209, 619, 491, 488, 493, 493, + 493, 617, 613, 307, 225, -8, 612, 510, 429, 518, + 474, 507, 507, 501, 501, 535, 506, 507, 507, 507, + 507, 507, 672, 672, 501, 540, 501, 535, 662, 501, + 506, 501, 501, 507, 501, 672, 506, 58, 333, 227, + 250, 506, 348, 552, 507, 548, 548, 353, 501, 119, + 501, 37, 553, 672, 672, 553, 140, 506, 166, 580, + 575, 541, 521, 179, 475, 475, 291, 541, 506, 475, + 409, 49, 540, 276, 475, 34, 716, 713, 453, 712, + 663, 711, 689, 710, 558, 530, 531, 700, 696, 707, + 664, 668, 424, 566, 342, 410, 525, 487, 673, 528, + 526, 484, 484, 484, 487, 676, 484, 484, 484, 484, + 484, 484, 484, 484, 781, 522, 536, 420, 557, 550, + 442, 611, 524, 566, 566, 633, 780, 768, 500, 681, + 751, 705, 578, 445, 759, 695, 661, 564, 563, 694, + 758, 743, 614, 342, 742, 635, 489, 636, 566, 637, + 484, 678, 680, 787, 786, 675, 785, 764, 757, 559, + 640, 505, 784, 641, 739, 623, 622, 577, 763, 734, + 756, 642, 754, 643, 574, 537, 766, 532, 687, 691, + 621, 644, 645, 654, 632, 631, 704, 551, 762, 543, + 760, 765, 582, 589, 460, 630, 609, 477, 482, 607, + 701, 498, 494, 606, 603, 738, 629, 692, 597, 627, + 752, 544, 526, 515, 546, 542, 534, 620, 753, 492, + 596, 594, 593, 591, 626, 583, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 134, 134, 134, 134, -2, -2, -2, 0, - 0, -2, 0, 0, 134, 134, 134, 134, 134, 134, + 0, 0, 0, 134, 134, 134, 134, -2, -2, -2, + 0, 0, -2, 0, 0, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, @@ -498,36 +500,36 @@ class Php7 extends \PhpParser\ParserAbstract 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, - 134, 134, 134, 134, 134, 134, 134, 561, 561, 561, + 134, 134, 134, 134, 134, 134, 134, 134, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 561, 561, 561, + 561, 561, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, - 561, 561, 561, 561, -3, 561, 561, -3, 561, 561, - 561, 561, 561, 561, 118, 118, 118, 118, 171, 171, - 171, -84, 171, 171, 171, 171, 171, 171, 171, 171, - 171, 171, 171, 171, 171, 171, 118, 118, 171, 171, - 171, 171, 171, 171, -84, 171, 221, 221, 221, 204, - 204, 171, 0, 0, 0, 0, 0, 497, 221, 171, - 171, 171, 171, 0, 0, 171, 171, 540, 204, 0, - 0, 0, 0, 0, 0, 0, 497, 497, 497, 0, - 497, 221, 0, 272, 184, 400, 400, 400, 400, 0, - 497, 0, 540, 497, 0, 0, 0, 0, 0, 0, - 510, 0, 664, 0, 0, 0, 0, 508, 0, 0, - 0, 0, 0, 0, 0, 0, 540, 0, 0, 0, - 0, 540, 0, 484, 0, 505, 0, 0, 484, 484, - 484, 505, 505, 0, 0, 0, 505 + 561, 561, 561, 561, 561, -3, 561, 561, -3, 561, + 561, 561, 561, 561, 561, 118, 118, 118, 118, 204, + 204, 204, -84, 204, 204, 204, 204, 204, 204, 204, + 204, 204, 204, 204, 204, 204, 204, -84, 118, 118, + 204, 204, 204, 204, 204, 204, 204, 204, 221, 221, + 221, 106, 106, 204, 0, 0, 0, 0, 0, 507, + 221, 204, 204, 204, 204, 0, 0, 204, 204, 540, + 106, 0, 0, 0, 0, 0, 0, 0, 507, 507, + 507, 0, 507, 221, 0, 335, 175, 461, 461, 461, + 461, 0, 507, 0, 540, 507, 0, 0, 0, 0, + 0, 0, 506, 0, 672, 0, 0, 0, 0, 501, + 0, 0, 0, 0, 0, 0, 0, 0, 540, 0, + 0, 0, 0, 540, 0, 484, 0, 500, 0, 0, + 484, 484, 484, 500, 500, 0, 0, 0, 500 ); protected $actionDefault = array( 3,32767,32767,32767,32767,32767,32767,32767,32767, 91, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767, 93, 504, 504, 494,32767, 504, - 494,32767,32767,32767, 312, 312, 312,32767, 449, 449, - 449, 449, 449, 449, 449,32767,32767,32767,32767,32767, - 391,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767,32767,32767,32767, 93, 505, 505, 495,32767, 505, + 495,32767,32767,32767, 313, 313, 313,32767, 450, 450, + 450, 450, 450, 450, 450,32767,32767,32767,32767,32767, + 392,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, @@ -536,103 +538,104 @@ class Php7 extends \PhpParser\ParserAbstract 32767,32767,32767,32767,32767,32767,32767,32767,32767, 91, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 501,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 502,32767,32767,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 374, 375, 377, 378, 311, 450, 257, 500, 310, 129, - 268, 259, 210, 308, 242, 133, 339, 392, 341, 390, - 394, 340, 317, 321, 322, 323, 324, 325, 326, 327, - 328, 329, 330, 331, 332, 315, 316, 393, 371, 370, - 369, 337, 338, 314, 342, 344, 314, 343, 360, 361, - 358, 359, 362, 363, 364, 365, 366,32767,32767,32767, + 375, 376, 378, 379, 312, 451, 258, 501, 311, 129, + 269, 260, 210, 242, 309, 133, 340, 393, 342, 391, + 395, 341, 318, 322, 323, 324, 325, 326, 327, 328, + 329, 330, 331, 332, 333, 316, 317, 394, 372, 371, + 370, 338, 339, 315, 343, 345, 315, 344, 361, 362, + 359, 360, 363, 364, 365, 366, 367,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767, 93,32767,32767,32767, 351, 352, 249, 249, 249, - 249,32767, 249, 294,32767,32767,32767,32767,32767,32767, - 32767, 443, 368, 346, 347, 345,32767, 421,32767,32767, - 32767,32767,32767, 423,32767, 91,32767,32767,32767, 334, - 336, 415, 503, 318, 502,32767,32767, 93,32767,32767, - 32767,32767,32767,32767,32767,32767,32767,32767, 418,32767, - 32767, 409, 91,32767,32767, 91, 173, 229, 231, 178, - 32767, 426,32767,32767,32767,32767,32767,32767,32767,32767, + 32767, 93,32767,32767,32767, 292, 352, 353, 249, 249, + 249, 249,32767, 249,32767, 249,32767,32767,32767,32767, + 32767,32767, 444, 369, 347, 348, 346,32767, 422,32767, + 32767,32767,32767,32767, 424,32767, 91,32767,32767,32767, + 335, 337, 416, 504, 319, 503,32767,32767, 93,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767, 419, + 32767,32767, 410, 91,32767,32767, 91, 173, 229, 231, + 178,32767, 427,32767,32767,32767,32767,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 356, 511,32767, 451,32767, 348, 349, 350, - 32767,32767, 451, 451, 451,32767, 451,32767, 451, 451, - 32767,32767,32767,32767,32767, 178,32767,32767,32767,32767, - 93, 424, 424, 91, 91, 91, 91, 419,32767, 178, - 32767,32767,32767,32767,32767, 178, 90, 90, 90, 90, - 178, 90, 193,32767, 191, 191, 90,32767, 92,32767, - 92, 195,32767, 465, 195, 90, 178, 90, 215, 215, - 400, 180, 92, 251, 251, 92, 400, 90, 178, 251, - 90,32767, 90, 251,32767,32767,32767, 84,32767,32767, + 32767,32767,32767, 357, 512,32767, 452,32767, 349, 350, + 351,32767,32767, 452, 452, 452,32767, 452,32767, 452, + 452,32767,32767,32767,32767,32767, 178,32767,32767,32767, + 32767, 93, 425, 425, 91, 91, 91, 91, 420,32767, + 178,32767,32767,32767,32767,32767, 178, 90, 90, 90, + 90, 178, 90, 193,32767, 191, 191, 90,32767, 92, + 32767, 92, 195,32767, 466, 195, 90, 178, 90, 215, + 215, 401, 180, 92, 251, 251, 92, 401, 178, 251, + 90, 90,32767, 90, 251,32767,32767,32767, 84,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 32767,32767, 411,32767, 431,32767, 444, 463, 409,32767, - 354, 355, 357,32767, 453, 379, 380, 381, 382, 383, - 384, 385, 387,32767, 414,32767,32767, 86, 120, 267, - 32767, 509, 86, 412,32767, 509,32767,32767,32767,32767, - 32767,32767,32767,32767,32767,32767, 86, 86,32767,32767, - 32767,32767, 490,32767, 510,32767, 451, 413,32767, 353, - 427, 470,32767,32767, 452,32767,32767,32767, 86,32767, - 32767,32767,32767,32767,32767,32767,32767,32767, 431,32767, - 32767,32767,32767,32767,32767, 451,32767,32767,32767,32767, - 32767,32767,32767, 307,32767,32767,32767,32767,32767,32767, - 32767,32767, 451,32767,32767, 241,32767,32767,32767,32767, + 32767,32767,32767, 412,32767, 432,32767, 445, 464, 410, + 32767, 355, 356, 358,32767, 454, 380, 381, 382, 383, + 384, 385, 386, 388,32767, 415,32767,32767, 86, 120, + 268,32767, 510, 86, 413,32767, 510,32767,32767,32767, + 32767,32767,32767,32767,32767,32767,32767, 86, 86,32767, + 32767,32767,32767, 491,32767, 511,32767, 452, 414,32767, + 354, 428, 471,32767,32767, 453,32767,32767,32767, 86, + 32767,32767,32767,32767,32767,32767,32767,32767,32767, 432, + 32767,32767,32767,32767,32767,32767, 452,32767,32767,32767, 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, - 84, 60,32767, 287,32767,32767,32767,32767,32767,32767, - 32767,32767,32767,32767,32767, 135, 135, 3, 270, 3, - 270, 135, 135, 135, 270, 270, 135, 135, 135, 135, - 135, 135, 135, 168, 223, 226, 215, 215, 279, 135, - 135 + 32767, 452,32767,32767, 241,32767,32767, 308,32767,32767, + 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767, + 32767, 84, 60,32767, 288,32767,32767,32767,32767,32767, + 32767,32767,32767,32767,32767,32767, 135, 135, 3, 271, + 3, 271, 135, 135, 135, 271, 271, 135, 135, 135, + 135, 135, 135, 135, 168, 223, 226, 215, 215, 280, + 135, 135 ); protected $goto = array( 166, 166, 140, 140, 148, 149, 140, 148, 151, 182, 167, 164, 164, 164, 164, 165, 165, 165, 165, 165, - 165, 165, 160, 161, 162, 163, 179, 177, 180, 430, - 431, 322, 432, 435, 436, 437, 438, 439, 440, 441, - 442, 901, 137, 141, 142, 143, 144, 145, 139, 146, + 165, 165, 160, 161, 162, 163, 179, 177, 180, 431, + 432, 323, 433, 436, 437, 438, 439, 440, 441, 442, + 443, 903, 137, 141, 142, 143, 144, 145, 139, 146, 147, 150, 176, 178, 181, 198, 201, 202, 204, 205, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, - 235, 236, 253, 254, 255, 327, 328, 329, 479, 183, + 236, 237, 254, 255, 256, 328, 329, 330, 480, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 152, 197, 153, 168, 169, 170, 199, - 171, 154, 155, 156, 172, 157, 200, 138, 173, 158, - 174, 175, 159, 542, 203, 447, 551, 203, 743, 444, - 304, 308, 459, 482, 483, 485, 444, 493, 496, 519, - 1087, 1087, 987, 481, 452, 452, 452, 472, 452, 698, - 472, 677, 692, 779, 779, 779, 779, 1087, 467, 773, - 780, 452, 433, 433, 433, 285, 433, 433, 433, 433, - 433, 433, 433, 433, 433, 433, 433, 433, 433, 434, - 434, 434, 676, 434, 434, 434, 434, 434, 434, 434, - 434, 434, 434, 434, 434, 434, 480, 869, 554, 319, - 664, 263, 536, 867, 321, 988, 247, 502, 282, 452, - 452, 515, 516, 1057, 1058, 466, 488, 452, 452, 452, - 3, 4, 465, 989, 1043, 712, 785, 575, 504, 506, - 837, 453, 520, 535, 538, 813, 545, 553, 809, 498, - 498, 1012, 477, 1012, 1012, 1012, 1012, 1012, 1012, 1012, - 1012, 1012, 1012, 1012, 1012, 1012, 703, 675, 976, 765, - 738, 977, 739, 1086, 1086, 499, 501, 547, 802, 783, - 783, 781, 783, 574, 679, 445, 811, 806, 473, 1079, - 1086, 876, 1102, 777, 316, 550, 478, 1067, 492, 703, - 302, 684, 703, 734, 729, 730, 744, 1089, 685, 731, - 682, 732, 733, 683, 877, 737, 306, 449, 521, 470, - 948, 833, 458, 821, 334, 522, 338, 468, 325, 325, - 269, 270, 272, 476, 332, 273, 333, 274, 336, 505, - 339, 525, 1056, 391, 826, 289, 539, 816, 816, 1074, - 694, 694, 510, 283, 312, 11, 704, 704, 704, 706, - 693, 991, 286, 287, 827, 827, 827, 827, 991, 827, - 696, 827, 699, 579, 1062, 1062, 526, 827, 842, 846, - 449, 984, 1053, 708, 790, 991, 991, 991, 991, 1053, - 979, 991, 991, 384, 399, 886, 1064, 1064, 707, 695, - 841, 495, 845, 0, 0, 751, 0, 788, 752, 0, - 0, 0, 0, 0, 0, 1049, 818, 0, 778, 0, - 0, 0, 0, 0, 0, 0, 0, 986, 884, 0, - 0, 711, 464, 983, 0, 0, 0, 0, 844, 0, - 0, 1051, 1051, 844, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 446, 462, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 446, - 0, 462, 0, 0, 305, 0, 450, 372, 0, 374, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 702, 0, 1094 + 171, 154, 155, 156, 172, 157, 200, 138, 158, 173, + 174, 175, 159, 543, 203, 448, 552, 203, 744, 305, + 309, 460, 483, 484, 486, 264, 1089, 1089, 320, 989, + 248, 678, 322, 482, 453, 453, 453, 283, 453, 481, + 871, 555, 739, 1089, 740, 537, 869, 473, 468, 677, + 473, 453, 434, 434, 434, 286, 434, 434, 434, 434, + 434, 434, 434, 434, 434, 434, 434, 434, 434, 435, + 435, 435, 713, 435, 435, 435, 435, 435, 435, 435, + 435, 435, 435, 435, 435, 435, 1088, 1088, 665, 494, + 503, 479, 990, 493, 514, 515, 500, 502, 548, 453, + 453, 699, 786, 1088, 693, 467, 489, 453, 453, 453, + 991, 1045, 466, 978, 766, 839, 979, 576, 505, 507, + 1091, 454, 519, 536, 539, 814, 546, 554, 810, 499, + 499, 1014, 478, 1014, 1014, 1014, 1014, 1014, 1014, 1014, + 1014, 1014, 1014, 1014, 1014, 1014, 708, 696, 843, 474, + 847, 778, 317, 551, 1081, 789, 676, 497, 518, 1059, + 1060, 1069, 878, 303, 819, 680, 779, 803, 784, 784, + 782, 784, 575, 520, 446, 812, 807, 879, 886, 712, + 471, 985, 685, 950, 735, 730, 731, 745, 822, 686, + 732, 683, 733, 734, 684, 834, 738, 3, 4, 445, + 704, 345, 1058, 290, 335, 521, 339, 445, 326, 326, + 270, 271, 273, 477, 333, 274, 334, 275, 337, 506, + 340, 827, 700, 313, 780, 780, 780, 780, 284, 697, + 774, 781, 580, 704, 511, 844, 704, 817, 817, 1076, + 525, 993, 287, 288, 709, 828, 828, 828, 828, 993, + 828, 828, 828, 986, 981, 1064, 1064, 1104, 828, 848, + 888, 791, 1055, 385, 496, 399, 993, 993, 993, 993, + 1055, 0, 993, 993, 0, 0, 0, 1066, 1066, 0, + 0, 0, 450, 0, 695, 695, 752, 0, 0, 753, + 705, 705, 705, 707, 694, 0, 1051, 0, 307, 0, + 0, 0, 0, 0, 459, 0, 524, 0, 0, 469, + 0, 540, 0, 465, 0, 0, 0, 0, 0, 846, + 0, 0, 1053, 1053, 846, 392, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, + 0, 0, 0, 0, 0, 450, 0, 0, 0, 447, + 463, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 447, 0, 463, 0, 0, 306, 0, 451, 373, 0, + 375, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 703, 0, 1096, 0, 0, 0, + 0, 0, 988 ); protected $gotoCheck = array( @@ -647,82 +650,83 @@ class Php7 extends \PhpParser\ParserAbstract 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, - 33, 33, 33, 63, 56, 10, 8, 56, 13, 75, - 49, 49, 49, 49, 49, 49, 75, 15, 46, 46, - 148, 148, 92, 97, 10, 10, 10, 85, 10, 15, - 85, 18, 15, 75, 75, 75, 75, 148, 10, 75, - 75, 10, 135, 135, 135, 80, 135, 135, 135, 135, + 33, 33, 33, 63, 56, 10, 8, 56, 13, 49, + 49, 49, 49, 49, 49, 134, 148, 148, 69, 92, + 134, 18, 69, 97, 10, 10, 10, 69, 10, 7, + 7, 7, 55, 148, 55, 7, 7, 85, 10, 17, + 85, 10, 135, 135, 135, 80, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 137, - 137, 137, 17, 137, 137, 137, 137, 137, 137, 137, - 137, 137, 137, 137, 137, 137, 7, 7, 7, 69, - 5, 134, 7, 7, 69, 92, 134, 73, 69, 10, - 10, 73, 73, 141, 141, 10, 10, 10, 10, 10, - 37, 37, 39, 92, 92, 36, 40, 39, 39, 39, - 94, 10, 39, 39, 39, 39, 39, 39, 39, 86, + 137, 137, 36, 137, 137, 137, 137, 137, 137, 137, + 137, 137, 137, 137, 137, 137, 147, 147, 5, 15, + 73, 2, 92, 2, 73, 73, 68, 68, 68, 10, + 10, 15, 40, 147, 15, 10, 10, 10, 10, 10, + 92, 92, 39, 67, 67, 94, 67, 39, 39, 39, + 147, 10, 39, 39, 39, 39, 39, 39, 39, 86, 86, 86, 10, 86, 86, 86, 86, 86, 86, 86, - 86, 86, 86, 86, 86, 86, 26, 16, 67, 67, - 55, 67, 55, 147, 147, 68, 68, 68, 16, 16, - 16, 16, 16, 16, 13, 16, 16, 16, 136, 146, - 147, 111, 12, 76, 76, 76, 2, 143, 2, 26, - 52, 13, 26, 13, 13, 13, 13, 147, 13, 13, - 13, 13, 13, 13, 111, 13, 65, 12, 54, 53, - 118, 90, 65, 88, 56, 56, 56, 65, 56, 56, + 86, 86, 86, 86, 86, 86, 14, 14, 14, 136, + 14, 76, 76, 76, 146, 14, 16, 46, 46, 141, + 141, 143, 111, 52, 14, 13, 14, 16, 16, 16, + 16, 16, 16, 54, 16, 16, 16, 111, 14, 14, + 53, 14, 13, 118, 13, 13, 13, 13, 88, 13, + 13, 13, 13, 13, 13, 90, 13, 37, 37, 75, + 26, 89, 139, 20, 56, 56, 56, 75, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, - 56, 12, 139, 65, 91, 20, 12, 85, 85, 85, - 26, 26, 24, 11, 19, 65, 26, 26, 26, 26, - 26, 63, 80, 80, 63, 63, 63, 63, 63, 63, - 28, 63, 30, 82, 8, 8, 23, 63, 96, 99, - 12, 127, 97, 32, 79, 63, 63, 63, 63, 97, - 124, 63, 63, 71, 122, 114, 97, 97, 14, 14, - 14, 72, 14, -1, -1, 63, -1, 14, 63, -1, - -1, -1, -1, -1, -1, 97, 14, -1, 14, -1, - -1, -1, -1, -1, -1, -1, -1, 12, 14, -1, - -1, 14, 8, 14, -1, -1, -1, -1, 97, -1, - -1, 97, 97, 97, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 8, 8, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 8, - -1, 8, -1, -1, 8, -1, 8, 8, -1, 8, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 8, -1, 8 + 56, 91, 30, 19, 75, 75, 75, 75, 11, 28, + 75, 75, 82, 26, 24, 96, 26, 85, 85, 85, + 23, 63, 80, 80, 32, 63, 63, 63, 63, 63, + 63, 63, 63, 127, 124, 8, 8, 12, 63, 99, + 114, 79, 97, 71, 72, 122, 63, 63, 63, 63, + 97, -1, 63, 63, -1, -1, -1, 97, 97, -1, + -1, -1, 12, -1, 26, 26, 63, -1, -1, 63, + 26, 26, 26, 26, 26, -1, 97, -1, 65, -1, + -1, -1, -1, -1, 65, -1, 12, -1, -1, 65, + -1, 12, -1, 8, -1, -1, -1, -1, -1, 97, + -1, -1, 97, 97, 97, 65, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 65, -1, -1, -1, + -1, -1, -1, -1, -1, 12, -1, -1, -1, 8, + 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 8, -1, 8, -1, -1, 8, -1, 8, 8, -1, + 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 8, -1, 8, -1, -1, -1, + -1, -1, 12 ); protected $gotoBase = array( - 0, 0, -281, 0, 0, 180, 0, 181, 106, 0, - -141, 54, 6, -19, 11, -253, 245, 170, 139, 45, - 69, 0, 0, 15, 56, 0, -10, 0, 58, 0, - 75, 0, 10, -23, 0, 0, 206, -369, 0, -344, - 197, 0, 0, 0, 0, 0, 93, 0, 0, 81, - 0, 0, 243, 77, 80, 235, 87, 0, 0, 0, - 0, 0, 0, 107, 0, -63, 0, -70, 17, -205, - 0, -2, -3, -363, 0, -115, 14, 0, 0, 9, - -234, 0, 36, 0, 0, 110, 12, 0, 61, 0, - 57, 74, -169, 0, 196, 0, 63, 128, 0, 5, + 0, 0, -367, 0, 0, 178, 0, 134, 106, 0, + -142, 48, 90, -19, -122, -192, 254, 147, 129, 33, + 46, 0, 0, -2, 57, 0, 43, 0, 36, 0, + 44, 0, -10, -23, 0, 0, 163, -283, 0, -345, + 183, 0, 0, 0, 0, 0, 222, 0, 0, 80, + 0, 0, 226, 58, 55, 127, 87, 0, 0, 0, + 0, 0, 0, 107, 0, 38, 0, -106, -43, -267, + 0, -13, -21, -371, 0, 65, -9, 0, 0, 5, + -235, 0, 14, 0, 0, 120, 12, 0, 45, 56, + 51, 70, -173, 0, 191, 0, 39, 128, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 51, 0, 0, 19, 0, 0, 0, 59, 0, - 0, 0, -22, 0, 18, 0, 0, 16, 0, 0, - 0, 0, 0, 0, -66, -65, 242, -48, 0, 73, - 0, -90, 0, 247, 0, 0, 240, 7, -116, 0, + 0, 42, 0, 0, 3, 0, 0, 0, 41, 0, + 0, 0, -32, 0, 1, 0, 0, 7, 0, 0, + 0, 0, 0, 0, -133, -65, 223, -48, 0, 52, + 0, -35, 0, 231, 0, 0, 225, -61, -121, 0, 0 ); protected $gotoDefault = array( - -32768, 404, 582, 2, 583, 654, 662, 527, 421, 552, - 422, 448, 323, 736, 890, 756, 718, 719, 720, 309, - 349, 300, 307, 511, 500, 395, 705, 368, 697, 392, - 700, 367, 709, 136, 528, 400, 713, 1, 715, 454, - 747, 297, 723, 298, 531, 725, 461, 727, 728, 303, - 310, 311, 894, 469, 497, 740, 206, 463, 741, 296, - 742, 750, 320, 301, 378, 401, 315, 871, 487, 318, - 363, 381, 494, 489, 471, 998, 775, 387, 376, 789, - 284, 797, 580, 805, 808, 423, 424, 385, 820, 386, - 831, 825, 1006, 380, 836, 369, 843, 1038, 371, 847, - 220, 850, 344, 512, 337, 855, 856, 6, 861, 543, - 544, 7, 243, 397, 885, 513, 366, 900, 352, 967, - 969, 456, 393, 980, 375, 534, 402, 985, 1042, 364, - 425, 382, 271, 288, 246, 426, 443, 251, 427, 383, - 1045, 1052, 326, 1068, 268, 29, 1080, 1088, 280, 475, - 491 + -32768, 405, 583, 2, 584, 655, 663, 528, 422, 553, + 423, 449, 324, 737, 892, 757, 719, 720, 721, 310, + 350, 301, 308, 512, 501, 396, 706, 369, 698, 393, + 701, 368, 710, 136, 529, 401, 714, 1, 716, 455, + 748, 298, 724, 299, 532, 726, 462, 728, 729, 304, + 311, 312, 896, 470, 498, 741, 206, 464, 742, 297, + 743, 751, 321, 302, 379, 402, 316, 873, 488, 319, + 364, 382, 495, 490, 472, 1000, 776, 388, 377, 790, + 285, 798, 581, 806, 809, 424, 425, 386, 821, 387, + 832, 826, 1008, 381, 838, 370, 845, 1040, 372, 849, + 220, 852, 245, 526, 338, 857, 858, 6, 863, 544, + 545, 7, 235, 400, 887, 527, 367, 902, 353, 969, + 971, 457, 394, 982, 376, 535, 403, 987, 1044, 365, + 426, 383, 272, 289, 247, 427, 444, 252, 428, 384, + 1047, 1054, 327, 1070, 269, 29, 1082, 1090, 281, 476, + 492 ); protected $ruleToNonTerminal = array( @@ -751,13 +755,13 @@ class Php7 extends \PhpParser\ParserAbstract 82, 45, 45, 41, 41, 83, 43, 43, 84, 42, 42, 44, 44, 54, 54, 54, 54, 68, 68, 87, 87, 88, 88, 88, 90, 90, 91, 91, 91, 89, - 89, 69, 69, 92, 92, 93, 93, 94, 94, 94, - 50, 95, 95, 96, 51, 98, 98, 99, 99, 100, - 100, 73, 101, 101, 101, 101, 101, 106, 106, 107, - 107, 108, 108, 108, 108, 108, 109, 110, 110, 105, - 105, 102, 102, 104, 104, 112, 112, 111, 111, 111, - 111, 111, 111, 103, 113, 113, 115, 114, 114, 52, - 116, 116, 46, 46, 33, 33, 33, 33, 33, 33, + 89, 69, 69, 69, 92, 92, 93, 93, 94, 94, + 94, 50, 95, 95, 96, 51, 98, 98, 99, 99, + 100, 100, 73, 101, 101, 101, 101, 101, 106, 106, + 107, 107, 108, 108, 108, 108, 108, 109, 110, 110, + 105, 105, 102, 102, 104, 104, 112, 112, 111, 111, + 111, 111, 111, 111, 103, 113, 113, 115, 114, 114, + 52, 116, 116, 46, 46, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, @@ -765,20 +769,20 @@ class Php7 extends \PhpParser\ParserAbstract 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, - 33, 33, 33, 33, 33, 33, 33, 123, 117, 117, - 122, 122, 125, 126, 126, 127, 128, 128, 128, 75, - 75, 63, 63, 63, 118, 118, 118, 130, 130, 119, - 119, 121, 121, 121, 124, 124, 135, 135, 135, 86, - 137, 137, 137, 120, 120, 120, 120, 120, 120, 120, - 120, 120, 120, 120, 120, 120, 120, 120, 120, 49, - 49, 133, 133, 133, 129, 129, 129, 138, 138, 138, - 138, 138, 138, 56, 56, 56, 97, 97, 97, 97, - 141, 140, 132, 132, 132, 132, 132, 132, 131, 131, - 131, 139, 139, 139, 139, 85, 142, 142, 143, 143, - 143, 143, 143, 143, 143, 136, 145, 145, 144, 144, - 146, 146, 146, 146, 146, 134, 134, 134, 134, 148, - 149, 147, 147, 147, 147, 147, 147, 147, 150, 150, - 150, 150 + 33, 33, 33, 33, 33, 33, 33, 33, 123, 117, + 117, 122, 122, 125, 126, 126, 127, 128, 128, 128, + 75, 75, 63, 63, 63, 118, 118, 118, 130, 130, + 119, 119, 121, 121, 121, 124, 124, 135, 135, 135, + 86, 137, 137, 137, 120, 120, 120, 120, 120, 120, + 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, + 49, 49, 133, 133, 133, 129, 129, 129, 138, 138, + 138, 138, 138, 138, 56, 56, 56, 97, 97, 97, + 97, 141, 140, 132, 132, 132, 132, 132, 132, 131, + 131, 131, 139, 139, 139, 139, 85, 142, 142, 143, + 143, 143, 143, 143, 143, 143, 136, 145, 145, 144, + 144, 146, 146, 146, 146, 146, 134, 134, 134, 134, + 148, 149, 147, 147, 147, 147, 147, 147, 147, 150, + 150, 150, 150 ); protected $ruleToLength = array( @@ -807,34 +811,34 @@ class Php7 extends \PhpParser\ParserAbstract 1, 1, 4, 0, 2, 5, 0, 2, 6, 0, 2, 0, 3, 1, 2, 1, 1, 2, 0, 1, 3, 4, 6, 4, 1, 2, 1, 1, 1, 0, - 1, 0, 2, 2, 4, 1, 3, 1, 2, 2, - 2, 3, 1, 1, 2, 3, 1, 1, 3, 2, - 0, 1, 3, 4, 9, 3, 1, 1, 3, 0, - 2, 4, 5, 4, 4, 4, 3, 1, 1, 1, - 1, 1, 1, 0, 1, 1, 2, 1, 1, 1, - 1, 1, 1, 2, 1, 3, 1, 1, 3, 2, - 3, 1, 0, 1, 1, 3, 3, 3, 4, 1, - 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 2, 2, 2, 2, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 1, 0, 2, 2, 2, 4, 1, 3, 1, 2, + 2, 2, 3, 1, 1, 2, 3, 1, 1, 3, + 2, 0, 1, 4, 4, 9, 3, 1, 1, 3, + 0, 2, 4, 5, 4, 4, 4, 3, 1, 1, + 1, 1, 1, 1, 0, 1, 1, 2, 1, 1, + 1, 1, 1, 1, 2, 1, 3, 1, 1, 3, + 2, 3, 1, 0, 1, 1, 3, 3, 3, 4, + 1, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, - 4, 3, 4, 4, 2, 2, 4, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 1, 3, - 2, 1, 2, 4, 2, 8, 9, 7, 3, 2, - 0, 4, 2, 1, 3, 2, 2, 2, 4, 1, - 1, 1, 2, 3, 1, 1, 1, 1, 1, 0, - 3, 0, 1, 1, 0, 1, 1, 3, 3, 3, - 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 3, 2, 3, 3, 0, - 1, 1, 3, 1, 1, 3, 1, 1, 4, 4, - 4, 1, 4, 1, 1, 3, 1, 4, 2, 2, - 1, 3, 1, 4, 4, 3, 3, 3, 1, 3, - 1, 1, 3, 1, 1, 4, 3, 1, 1, 2, - 1, 3, 4, 3, 0, 1, 1, 1, 3, 1, - 3, 1, 4, 2, 0, 2, 2, 1, 2, 1, - 1, 1, 4, 3, 3, 3, 6, 3, 1, 1, - 2, 1 + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 2, 2, 2, 2, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 5, 4, 3, 4, 4, 2, 2, 4, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, + 3, 2, 1, 2, 4, 2, 8, 9, 7, 3, + 2, 0, 4, 2, 1, 3, 2, 2, 2, 4, + 1, 1, 1, 2, 3, 1, 1, 1, 1, 1, + 0, 3, 0, 1, 1, 0, 1, 1, 3, 3, + 3, 4, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 3, 2, 3, 3, + 0, 1, 1, 3, 1, 1, 3, 1, 1, 4, + 4, 4, 1, 4, 1, 1, 3, 1, 4, 2, + 2, 1, 3, 1, 4, 4, 3, 3, 3, 1, + 3, 1, 1, 3, 1, 1, 4, 3, 1, 1, + 2, 1, 3, 4, 3, 0, 1, 1, 1, 3, + 1, 3, 1, 4, 2, 0, 2, 2, 1, 2, + 1, 1, 1, 4, 3, 3, 3, 6, 3, 1, + 1, 2, 1 ); protected function initReduceCallbacks() { @@ -1617,195 +1621,196 @@ class Php7 extends \PhpParser\ParserAbstract $this->semValue = $this->semStack[$stackPos-(2-2)]; }, 253 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = null; }, 254 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-2)]; - }, - 255 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 256 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 257 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(1-1)], false, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 258 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], true, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 259 => function ($stackPos) { - $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], false, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 260 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 261 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 262 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 263 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 264 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; - }, - 265 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 266 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 267 => function ($stackPos) { - $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 268 => function ($stackPos) { - $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 269 => function ($stackPos) { - if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; } - }, - 270 => function ($stackPos) { $this->semValue = array(); }, + 255 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(4-2)]; + }, + 256 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 257 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 258 => function ($stackPos) { + $this->semValue = new Node\Arg($this->semStack[$stackPos-(1-1)], false, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 259 => function ($stackPos) { + $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], true, false, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 260 => function ($stackPos) { + $this->semValue = new Node\Arg($this->semStack[$stackPos-(2-2)], false, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 261 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, + 262 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 263 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 264 => function ($stackPos) { + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 265 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, + 266 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 267 => function ($stackPos) { + $this->semValue = array($this->semStack[$stackPos-(1-1)]); + }, + 268 => function ($stackPos) { + $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 269 => function ($stackPos) { + $this->semValue = new Stmt\StaticVar($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 270 => function ($stackPos) { + if ($this->semStack[$stackPos-(2-2)] !== null) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; } + }, 271 => function ($stackPos) { + $this->semValue = array(); + }, + 272 => function ($stackPos) { $startAttributes = $this->lookaheadStartAttributes; if (isset($startAttributes['comments'])) { $nop = new Stmt\Nop($startAttributes + $this->endAttributes); } else { $nop = null; }; if ($nop !== null) { $this->semStack[$stackPos-(1-1)][] = $nop; } $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 272 => function ($stackPos) { - $this->semValue = new Stmt\Property($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->checkProperty($this->semValue, $stackPos-(3-1)); - }, 273 => function ($stackPos) { - $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-1)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); $this->checkClassConst($this->semValue, $stackPos-(4-1)); + $attrs = $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes; + $this->semValue = new Stmt\Property($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $attrs, $this->semStack[$stackPos-(4-2)]); $this->checkProperty($this->semValue, $stackPos-(4-1)); }, 274 => function ($stackPos) { + $this->semValue = new Stmt\ClassConst($this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-1)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); $this->checkClassConst($this->semValue, $stackPos-(4-1)); + }, + 275 => function ($stackPos) { $this->semValue = new Stmt\ClassMethod($this->semStack[$stackPos-(9-4)], ['type' => $this->semStack[$stackPos-(9-1)], 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-6)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); $this->checkClassMethod($this->semValue, $stackPos-(9-1)); }, - 275 => function ($stackPos) { + 276 => function ($stackPos) { $this->semValue = new Stmt\TraitUse($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 276 => function ($stackPos) { + 277 => function ($stackPos) { $this->semValue = null; /* will be skipped */ }, - 277 => function ($stackPos) { - $this->semValue = array(); - }, 278 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = array(); }, 279 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 280 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = array(); }, 281 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Precedence($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 282 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(5-1)][0], $this->semStack[$stackPos-(5-1)][1], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = new Stmt\TraitUseAdaptation\Precedence($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 283 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], null, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(5-1)][0], $this->semStack[$stackPos-(5-1)][1], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-4)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, 284 => function ($stackPos) { - $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], $this->semStack[$stackPos-(4-3)], null, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 285 => function ($stackPos) { $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 286 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); + $this->semValue = new Stmt\TraitUseAdaptation\Alias($this->semStack[$stackPos-(4-1)][0], $this->semStack[$stackPos-(4-1)][1], null, $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 287 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = array($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)]); }, 288 => function ($stackPos) { - $this->semValue = array(null, $this->semStack[$stackPos-(1-1)]); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 289 => function ($stackPos) { - $this->semValue = null; + $this->semValue = array(null, $this->semStack[$stackPos-(1-1)]); }, 290 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = null; }, 291 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 292 => function ($stackPos) { - $this->semValue = 0; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 293 => function ($stackPos) { $this->semValue = 0; }, 294 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = 0; }, 295 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 296 => function ($stackPos) { - $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 297 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PUBLIC; + $this->checkModifier($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $stackPos-(2-2)); $this->semValue = $this->semStack[$stackPos-(2-1)] | $this->semStack[$stackPos-(2-2)]; }, 298 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PROTECTED; + $this->semValue = Stmt\Class_::MODIFIER_PUBLIC; }, 299 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_PRIVATE; + $this->semValue = Stmt\Class_::MODIFIER_PROTECTED; }, 300 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_STATIC; + $this->semValue = Stmt\Class_::MODIFIER_PRIVATE; }, 301 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT; + $this->semValue = Stmt\Class_::MODIFIER_STATIC; }, 302 => function ($stackPos) { - $this->semValue = Stmt\Class_::MODIFIER_FINAL; + $this->semValue = Stmt\Class_::MODIFIER_ABSTRACT; }, 303 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = Stmt\Class_::MODIFIER_FINAL; }, 304 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); - }, - 305 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 306 => function ($stackPos) { - $this->semValue = new Node\VarLikeIdentifier(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 307 => function ($stackPos) { - $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 308 => function ($stackPos) { - $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); - }, - 309 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 310 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; - }, - 311 => function ($stackPos) { + 305 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, + 306 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, + 307 => function ($stackPos) { + $this->semValue = new Node\VarLikeIdentifier(substr($this->semStack[$stackPos-(1-1)], 1), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 308 => function ($stackPos) { + $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(1-1)], null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + }, + 309 => function ($stackPos) { + $this->semValue = new Stmt\PropertyProperty($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + }, + 310 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(2-1)]; + }, + 311 => function ($stackPos) { + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + }, 312 => function ($stackPos) { - $this->semValue = array(); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 313 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = array(); }, 314 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 315 => function ($stackPos) { - $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 316 => function ($stackPos) { $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); @@ -1814,434 +1819,436 @@ class Php7 extends \PhpParser\ParserAbstract $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 318 => function ($stackPos) { - $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Assign($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 319 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\AssignRef($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 320 => function ($stackPos) { - $this->semValue = new Expr\Clone_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 321 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Clone_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 322 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 323 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 324 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 325 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 326 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 327 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 328 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 329 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 330 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 331 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 332 => function ($stackPos) { - $this->semValue = new Expr\AssignOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 333 => function ($stackPos) { - $this->semValue = new Expr\PostInc($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\AssignOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 334 => function ($stackPos) { - $this->semValue = new Expr\PreInc($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\PostInc($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 335 => function ($stackPos) { - $this->semValue = new Expr\PostDec($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\PreInc($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 336 => function ($stackPos) { - $this->semValue = new Expr\PreDec($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\PostDec($this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 337 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\PreDec($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 338 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BooleanOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 339 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BooleanAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 340 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\LogicalOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 341 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\LogicalAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 342 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\LogicalXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 343 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BitwiseOr($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 344 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BitwiseAnd($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 345 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\BitwiseXor($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 346 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Concat($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 347 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Plus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 348 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Minus($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 349 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Mul($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 350 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Div($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 351 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Mod($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 352 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\ShiftLeft($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 353 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\ShiftRight($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 354 => function ($stackPos) { - $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Pow($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 355 => function ($stackPos) { - $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\UnaryPlus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 356 => function ($stackPos) { - $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\UnaryMinus($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 357 => function ($stackPos) { - $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\BooleanNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 358 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BitwiseNot($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 359 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Identical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 360 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\NotIdentical($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 361 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Equal($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 362 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\NotEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 363 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Spaceship($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 364 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Smaller($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 365 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\SmallerOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 366 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Greater($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 367 => function ($stackPos) { - $this->semValue = new Expr\Instanceof_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\GreaterOrEqual($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 368 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Expr\Instanceof_($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 369 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 370 => function ($stackPos) { - $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(5-1)], $this->semStack[$stackPos-(5-3)], $this->semStack[$stackPos-(5-5)], $this->startAttributeStack[$stackPos-(5-1)] + $this->endAttributes); }, 371 => function ($stackPos) { - $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\Ternary($this->semStack[$stackPos-(4-1)], null, $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 372 => function ($stackPos) { - $this->semValue = new Expr\Isset_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\BinaryOp\Coalesce($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 373 => function ($stackPos) { - $this->semValue = new Expr\Empty_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Isset_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 374 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Empty_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 375 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 376 => function ($stackPos) { - $this->semValue = new Expr\Eval_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_INCLUDE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 377 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Eval_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 378 => function ($stackPos) { - $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 379 => function ($stackPos) { - $this->semValue = new Expr\Cast\Int_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Include_($this->semStack[$stackPos-(2-2)], Expr\Include_::TYPE_REQUIRE_ONCE, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 380 => function ($stackPos) { - $this->semValue = new Expr\Cast\Double($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Cast\Int_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 381 => function ($stackPos) { - $this->semValue = new Expr\Cast\String_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; + $attrs['kind'] = $this->getFloatCastKind($this->semStack[$stackPos-(2-1)]); + $this->semValue = new Expr\Cast\Double($this->semStack[$stackPos-(2-2)], $attrs); }, 382 => function ($stackPos) { - $this->semValue = new Expr\Cast\Array_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Cast\String_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 383 => function ($stackPos) { - $this->semValue = new Expr\Cast\Object_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Cast\Array_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 384 => function ($stackPos) { - $this->semValue = new Expr\Cast\Bool_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Cast\Object_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 385 => function ($stackPos) { - $this->semValue = new Expr\Cast\Unset_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\Cast\Bool_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 386 => function ($stackPos) { + $this->semValue = new Expr\Cast\Unset_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 387 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes; $attrs['kind'] = strtolower($this->semStack[$stackPos-(2-1)]) === 'exit' ? Expr\Exit_::KIND_EXIT : Expr\Exit_::KIND_DIE; $this->semValue = new Expr\Exit_($this->semStack[$stackPos-(2-2)], $attrs); }, - 387 => function ($stackPos) { + 388 => function ($stackPos) { $this->semValue = new Expr\ErrorSuppress($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 388 => function ($stackPos) { + 389 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 389 => function ($stackPos) { + 390 => function ($stackPos) { $this->semValue = new Expr\ShellExec($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 390 => function ($stackPos) { + 391 => function ($stackPos) { $this->semValue = new Expr\Print_($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 391 => function ($stackPos) { + 392 => function ($stackPos) { $this->semValue = new Expr\Yield_(null, null, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 392 => function ($stackPos) { + 393 => function ($stackPos) { $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(2-2)], null, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 393 => function ($stackPos) { + 394 => function ($stackPos) { $this->semValue = new Expr\Yield_($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-2)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, - 394 => function ($stackPos) { + 395 => function ($stackPos) { $this->semValue = new Expr\YieldFrom($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 395 => function ($stackPos) { + 396 => function ($stackPos) { $this->semValue = new Expr\Closure(['static' => false, 'byRef' => $this->semStack[$stackPos-(8-2)], 'params' => $this->semStack[$stackPos-(8-4)], 'uses' => $this->semStack[$stackPos-(8-6)], 'returnType' => $this->semStack[$stackPos-(8-7)], 'stmts' => $this->semStack[$stackPos-(8-8)]], $this->startAttributeStack[$stackPos-(8-1)] + $this->endAttributes); }, - 396 => function ($stackPos) { + 397 => function ($stackPos) { $this->semValue = new Expr\Closure(['static' => true, 'byRef' => $this->semStack[$stackPos-(9-3)], 'params' => $this->semStack[$stackPos-(9-5)], 'uses' => $this->semStack[$stackPos-(9-7)], 'returnType' => $this->semStack[$stackPos-(9-8)], 'stmts' => $this->semStack[$stackPos-(9-9)]], $this->startAttributeStack[$stackPos-(9-1)] + $this->endAttributes); }, - 397 => function ($stackPos) { + 398 => function ($stackPos) { $this->semValue = array(new Stmt\Class_(null, ['type' => 0, 'extends' => $this->semStack[$stackPos-(7-3)], 'implements' => $this->semStack[$stackPos-(7-4)], 'stmts' => $this->semStack[$stackPos-(7-6)]], $this->startAttributeStack[$stackPos-(7-1)] + $this->endAttributes), $this->semStack[$stackPos-(7-2)]); $this->checkClass($this->semValue[0], -1); }, - 398 => function ($stackPos) { + 399 => function ($stackPos) { $this->semValue = new Expr\New_($this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, - 399 => function ($stackPos) { + 400 => function ($stackPos) { list($class, $ctorArgs) = $this->semStack[$stackPos-(2-2)]; $this->semValue = new Expr\New_($class, $ctorArgs, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, - 400 => function ($stackPos) { + 401 => function ($stackPos) { $this->semValue = array(); }, - 401 => function ($stackPos) { + 402 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(4-3)]; }, - 402 => function ($stackPos) { + 403 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(2-1)]; }, - 403 => function ($stackPos) { + 404 => function ($stackPos) { $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, - 404 => function ($stackPos) { + 405 => function ($stackPos) { $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, - 405 => function ($stackPos) { - $this->semValue = new Expr\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, 406 => function ($stackPos) { - $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\ClosureUse($this->semStack[$stackPos-(2-2)], $this->semStack[$stackPos-(2-1)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 407 => function ($stackPos) { $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 408 => function ($stackPos) { - $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\FuncCall($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 409 => function ($stackPos) { - $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\StaticCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 410 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 411 => function ($stackPos) { $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, + 411 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, 412 => function ($stackPos) { - $this->semValue = new Name\FullyQualified($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Name($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 413 => function ($stackPos) { - $this->semValue = new Name\Relative($this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Name\FullyQualified($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 414 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Name\Relative($this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 415 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 416 => function ($stackPos) { - $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 417 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; }, 418 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 419 => function ($stackPos) { - $this->semValue = null; - }, - 420 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 421 => function ($stackPos) { - $this->semValue = array(); - }, - 422 => function ($stackPos) { - $this->semValue = array(new Scalar\EncapsedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`'), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); - }, - 423 => function ($stackPos) { - foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', true); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; - }, - 424 => function ($stackPos) { - $this->semValue = array(); - }, - 425 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, + 420 => function ($stackPos) { + $this->semValue = null; + }, + 421 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(3-2)]; + }, + 422 => function ($stackPos) { + $this->semValue = array(); + }, + 423 => function ($stackPos) { + $this->semValue = array(new Scalar\EncapsedStringPart(Scalar\String_::parseEscapeSequences($this->semStack[$stackPos-(1-1)], '`'), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes)); + }, + 424 => function ($stackPos) { + foreach ($this->semStack[$stackPos-(1-1)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '`', true); } }; $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 425 => function ($stackPos) { + $this->semValue = array(); + }, 426 => function ($stackPos) { - $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 427 => function ($stackPos) { - $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\ConstFetch($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 428 => function ($stackPos) { - $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], new Expr\Error($this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)]), $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 429 => function ($stackPos) { + $this->semValue = new Expr\ClassConstFetch($this->semStack[$stackPos-(3-1)], new Expr\Error($this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)]), $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); $this->errorState = 2; + }, + 430 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_SHORT; $this->semValue = new Expr\Array_($this->semStack[$stackPos-(3-2)], $attrs); }, - 430 => function ($stackPos) { + 431 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes; $attrs['kind'] = Expr\Array_::KIND_LONG; $this->semValue = new Expr\Array_($this->semStack[$stackPos-(4-3)], $attrs); }, - 431 => function ($stackPos) { + 432 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 432 => function ($stackPos) { + 433 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes; $attrs['kind'] = ($this->semStack[$stackPos-(1-1)][0] === "'" || ($this->semStack[$stackPos-(1-1)][1] === "'" && ($this->semStack[$stackPos-(1-1)][0] === 'b' || $this->semStack[$stackPos-(1-1)][0] === 'B')) ? Scalar\String_::KIND_SINGLE_QUOTED : Scalar\String_::KIND_DOUBLE_QUOTED); $this->semValue = new Scalar\String_(Scalar\String_::parse($this->semStack[$stackPos-(1-1)]), $attrs); }, - 433 => function ($stackPos) { + 434 => function ($stackPos) { $this->semValue = $this->parseLNumber($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 434 => function ($stackPos) { + 435 => function ($stackPos) { $this->semValue = new Scalar\DNumber(Scalar\DNumber::parse($this->semStack[$stackPos-(1-1)]), $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 435 => function ($stackPos) { + 436 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Line($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 436 => function ($stackPos) { + 437 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\File($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 437 => function ($stackPos) { + 438 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Dir($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 438 => function ($stackPos) { + 439 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Class_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 439 => function ($stackPos) { + 440 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Trait_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 440 => function ($stackPos) { + 441 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Method($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 441 => function ($stackPos) { + 442 => function ($stackPos) { $this->semValue = new Scalar\MagicConst\Function_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, - 442 => function ($stackPos) { - $this->semValue = new Scalar\MagicConst\Namespace_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, 443 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Scalar\MagicConst\Namespace_($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 444 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 445 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 446 => function ($stackPos) { - $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(2-2)] + $this->endAttributeStack[$stackPos-(2-2)], true); + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); }, 447 => function ($stackPos) { + $this->semValue = $this->parseDocString($this->semStack[$stackPos-(2-1)], '', $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(2-2)] + $this->endAttributeStack[$stackPos-(2-2)], true); + }, + 448 => function ($stackPos) { $attrs = $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes; $attrs['kind'] = Scalar\String_::KIND_DOUBLE_QUOTED; foreach ($this->semStack[$stackPos-(3-2)] as $s) { if ($s instanceof Node\Scalar\EncapsedStringPart) { $s->value = Node\Scalar\String_::parseEscapeSequences($s->value, '"', true); } }; $this->semValue = new Scalar\Encapsed($this->semStack[$stackPos-(3-2)], $attrs); }, - 448 => function ($stackPos) { + 449 => function ($stackPos) { $this->semValue = $this->parseDocString($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-2)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes, $this->startAttributeStack[$stackPos-(3-3)] + $this->endAttributeStack[$stackPos-(3-3)], true); }, - 449 => function ($stackPos) { - $this->semValue = null; - }, 450 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = null; }, 451 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 452 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 453 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 454 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 455 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 456 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, + 456 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(3-2)]; + }, 457 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 458 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 459 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); @@ -2250,186 +2257,189 @@ class Php7 extends \PhpParser\ParserAbstract $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 461 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 462 => function ($stackPos) { - $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 463 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\MethodCall($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->semStack[$stackPos-(4-4)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 464 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 465 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 466 => function ($stackPos) { - $this->semValue = substr($this->semStack[$stackPos-(1-1)], 1); + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 467 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(4-3)]; + $this->semValue = substr($this->semStack[$stackPos-(1-1)], 1); }, 468 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(4-3)]; }, 469 => function ($stackPos) { - $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 470 => function ($stackPos) { - $var = $this->semStack[$stackPos-(1-1)]; $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes) : $var; + $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); $this->errorState = 2; }, 471 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $var = $this->semStack[$stackPos-(1-1)]; $this->semValue = \is_string($var) ? new Node\VarLikeIdentifier($var, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes) : $var; }, 472 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 473 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 474 => function ($stackPos) { $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 475 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 476 => function ($stackPos) { - $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 477 => function ($stackPos) { $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 478 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\StaticPropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 479 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; - }, - 480 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); - }, - 481 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, - 482 => function ($stackPos) { + 480 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(3-2)]; }, - 483 => function ($stackPos) { + 481 => function ($stackPos) { $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, + 482 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(1-1)]; + }, + 483 => function ($stackPos) { + $this->semValue = $this->semStack[$stackPos-(3-2)]; + }, 484 => function ($stackPos) { - $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 485 => function ($stackPos) { - $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\Error($this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); $this->errorState = 2; }, 486 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + $this->semValue = new Expr\List_($this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 487 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 488 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 489 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); - }, - 490 => function ($stackPos) { $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, + 490 => function ($stackPos) { + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, 491 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 492 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); - }, - 493 => function ($stackPos) { $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, + 493 => function ($stackPos) { + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + }, 494 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 495 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; $end = count($this->semValue)-1; if ($this->semValue[$end] === null) array_pop($this->semValue); + $this->semValue = null; }, 496 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos]; + $this->semValue = $this->semStack[$stackPos-(1-1)]; $end = count($this->semValue)-1; if ($this->semValue[$end] === null) array_pop($this->semValue); }, 497 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos]; }, 498 => function ($stackPos) { - $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; + /* do nothing -- prevent default action of $$=$this->semStack[$1]. See $551. */ }, 499 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semStack[$stackPos-(3-1)][] = $this->semStack[$stackPos-(3-3)]; $this->semValue = $this->semStack[$stackPos-(3-1)]; }, 500 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 501 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(3-3)], $this->semStack[$stackPos-(3-1)], false, $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 502 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(1-1)], null, false, $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 503 => function ($stackPos) { - $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(4-4)], $this->semStack[$stackPos-(4-1)], true, $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 504 => function ($stackPos) { - $this->semValue = null; + $this->semValue = new Expr\ArrayItem($this->semStack[$stackPos-(2-2)], null, true, $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); }, 505 => function ($stackPos) { - $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; + $this->semValue = null; }, 506 => function ($stackPos) { $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 507 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(1-1)]); + $this->semStack[$stackPos-(2-1)][] = $this->semStack[$stackPos-(2-2)]; $this->semValue = $this->semStack[$stackPos-(2-1)]; }, 508 => function ($stackPos) { - $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); + $this->semValue = array($this->semStack[$stackPos-(1-1)]); }, 509 => function ($stackPos) { - $this->semValue = new Scalar\EncapsedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = array($this->semStack[$stackPos-(2-1)], $this->semStack[$stackPos-(2-2)]); }, 510 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\EncapsedStringPart($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 511 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(1-1)]; + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 512 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(1-1)]; }, 513 => function ($stackPos) { - $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(4-1)], $this->semStack[$stackPos-(4-3)], $this->startAttributeStack[$stackPos-(4-1)] + $this->endAttributes); }, 514 => function ($stackPos) { - $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); + $this->semValue = new Expr\PropertyFetch($this->semStack[$stackPos-(3-1)], $this->semStack[$stackPos-(3-3)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 515 => function ($stackPos) { $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 516 => function ($stackPos) { - $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); + $this->semValue = new Expr\Variable($this->semStack[$stackPos-(3-2)], $this->startAttributeStack[$stackPos-(3-1)] + $this->endAttributes); }, 517 => function ($stackPos) { - $this->semValue = $this->semStack[$stackPos-(3-2)]; + $this->semValue = new Expr\ArrayDimFetch($this->semStack[$stackPos-(6-2)], $this->semStack[$stackPos-(6-4)], $this->startAttributeStack[$stackPos-(6-1)] + $this->endAttributes); }, 518 => function ($stackPos) { - $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = $this->semStack[$stackPos-(3-2)]; }, 519 => function ($stackPos) { - $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); + $this->semValue = new Scalar\String_($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 520 => function ($stackPos) { - $this->semValue = $this->parseNumString('-' . $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + $this->semValue = $this->parseNumString($this->semStack[$stackPos-(1-1)], $this->startAttributeStack[$stackPos-(1-1)] + $this->endAttributes); }, 521 => function ($stackPos) { + $this->semValue = $this->parseNumString('-' . $this->semStack[$stackPos-(2-2)], $this->startAttributeStack[$stackPos-(2-1)] + $this->endAttributes); + }, + 522 => function ($stackPos) { $this->semValue = $this->semStack[$stackPos-(1-1)]; }, ]; diff --git a/vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php b/vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php index 8b7bba83f..4d95a6f66 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php +++ b/vendor/nikic/php-parser/lib/PhpParser/ParserAbstract.php @@ -7,6 +7,7 @@ namespace PhpParser; * turn is based on work by Masato Bito. */ use PhpParser\Node\Expr; +use PhpParser\Node\Expr\Cast\Double; use PhpParser\Node\Name; use PhpParser\Node\Param; use PhpParser\Node\Scalar\Encapsed; @@ -680,6 +681,20 @@ abstract class ParserAbstract implements Parser return $this->startAttributeStack[$pos] + $this->endAttributeStack[$pos]; } + protected function getFloatCastKind(string $cast): int + { + $cast = strtolower($cast); + if (strpos($cast, 'float') !== false) { + return Double::KIND_FLOAT; + } + + if (strpos($cast, 'real') !== false) { + return Double::KIND_REAL; + } + + return Double::KIND_DOUBLE; + } + protected function parseLNumber($str, $attributes, $allowInvalidOctal = false) { try { return LNumber::fromString($str, $attributes, $allowInvalidOctal); diff --git a/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php b/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php index 96963307d..993d5f650 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php +++ b/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinter/Standard.php @@ -435,7 +435,15 @@ class Standard extends PrettyPrinterAbstract } protected function pExpr_Cast_Double(Cast\Double $node) { - return $this->pPrefixOp(Cast\Double::class, '(double) ', $node->expr); + $kind = $node->getAttribute('kind', Cast\Double::KIND_DOUBLE); + if ($kind === Cast\Double::KIND_DOUBLE) { + $cast = '(double)'; + } elseif ($kind === Cast\Double::KIND_FLOAT) { + $cast = '(float)'; + } elseif ($kind === Cast\Double::KIND_REAL) { + $cast = '(real)'; + } + return $this->pPrefixOp(Cast\Double::class, $cast . ' ', $node->expr); } protected function pExpr_Cast_String(Cast\String_ $node) { @@ -680,7 +688,9 @@ class Standard extends PrettyPrinterAbstract } protected function pStmt_Property(Stmt\Property $node) { - return (0 === $node->flags ? 'var ' : $this->pModifiers($node->flags)) . $this->pCommaSeparated($node->props) . ';'; + return (0 === $node->flags ? 'var ' : $this->pModifiers($node->flags)) + . ($node->type ? $this->p($node->type) . ' ' : '') + . $this->pCommaSeparated($node->props) . ';'; } protected function pStmt_PropertyProperty(Stmt\PropertyProperty $node) { diff --git a/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php b/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php index 2339c75a3..0cf0637ea 100644 --- a/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php +++ b/vendor/nikic/php-parser/lib/PhpParser/PrettyPrinterAbstract.php @@ -617,12 +617,14 @@ abstract class PrettyPrinterAbstract return $this->pFallback($fallbackNode); } - list($findToken, $extraLeft, $extraRight) = $this->insertionMap[$key]; + list($findToken, $beforeToken, $extraLeft, $extraRight) = $this->insertionMap[$key]; if (null !== $findToken) { - $subStartPos = $this->origTokens->findRight($pos, $findToken) + 1; + $subStartPos = $this->origTokens->findRight($pos, $findToken) + + (int) !$beforeToken; } else { $subStartPos = $pos; } + if (null === $extraLeft && null !== $extraRight) { // If inserting on the right only, skipping whitespace looks better $subStartPos = $this->origTokens->skipRightWhitespace($subStartPos); @@ -1209,6 +1211,7 @@ abstract class PrettyPrinterAbstract 'Stmt_Function->returnType' => $stripColon, 'Stmt_If->else' => $stripLeft, 'Stmt_Namespace->name' => $stripLeft, + 'Stmt_Property->type' => $stripRight, 'Stmt_PropertyProperty->default' => $stripEquals, 'Stmt_Return->expr' => $stripBoth, 'Stmt_StaticVar->default' => $stripEquals, @@ -1226,28 +1229,29 @@ abstract class PrettyPrinterAbstract // TODO: "yield" where both key and value are inserted doesn't work $this->insertionMap = [ - 'Expr_ArrayDimFetch->dim' => ['[', null, null], - 'Expr_ArrayItem->key' => [null, null, ' => '], - 'Expr_Closure->returnType' => [')', ' : ', null], - 'Expr_Ternary->if' => ['?', ' ', ' '], - 'Expr_Yield->key' => [\T_YIELD, null, ' => '], - 'Expr_Yield->value' => [\T_YIELD, ' ', null], - 'Param->type' => [null, null, ' '], - 'Param->default' => [null, ' = ', null], - 'Stmt_Break->num' => [\T_BREAK, ' ', null], - 'Stmt_ClassMethod->returnType' => [')', ' : ', null], - 'Stmt_Class->extends' => [null, ' extends ', null], + 'Expr_ArrayDimFetch->dim' => ['[', false, null, null], + 'Expr_ArrayItem->key' => [null, false, null, ' => '], + 'Expr_Closure->returnType' => [')', false, ' : ', null], + 'Expr_Ternary->if' => ['?', false, ' ', ' '], + 'Expr_Yield->key' => [\T_YIELD, false, null, ' => '], + 'Expr_Yield->value' => [\T_YIELD, false, ' ', null], + 'Param->type' => [null, false, null, ' '], + 'Param->default' => [null, false, ' = ', null], + 'Stmt_Break->num' => [\T_BREAK, false, ' ', null], + 'Stmt_ClassMethod->returnType' => [')', false, ' : ', null], + 'Stmt_Class->extends' => [null, false, ' extends ', null], 'Expr_PrintableNewAnonClass->extends' => [null, ' extends ', null], - 'Stmt_Continue->num' => [\T_CONTINUE, ' ', null], - 'Stmt_Foreach->keyVar' => [\T_AS, null, ' => '], - 'Stmt_Function->returnType' => [')', ' : ', null], - 'Stmt_If->else' => [null, ' ', null], - 'Stmt_Namespace->name' => [\T_NAMESPACE, ' ', null], - 'Stmt_PropertyProperty->default' => [null, ' = ', null], - 'Stmt_Return->expr' => [\T_RETURN, ' ', null], - 'Stmt_StaticVar->default' => [null, ' = ', null], - //'Stmt_TraitUseAdaptation_Alias->newName' => [T_AS, ' ', null], // TODO - 'Stmt_TryCatch->finally' => [null, ' ', null], + 'Stmt_Continue->num' => [\T_CONTINUE, false, ' ', null], + 'Stmt_Foreach->keyVar' => [\T_AS, false, null, ' => '], + 'Stmt_Function->returnType' => [')', false, ' : ', null], + 'Stmt_If->else' => [null, false, ' ', null], + 'Stmt_Namespace->name' => [\T_NAMESPACE, false, ' ', null], + 'Stmt_Property->type' => [\T_VARIABLE, true, null, ' '], + 'Stmt_PropertyProperty->default' => [null, false, ' = ', null], + 'Stmt_Return->expr' => [\T_RETURN, false, ' ', null], + 'Stmt_StaticVar->default' => [null, false, ' = ', null], + //'Stmt_TraitUseAdaptation_Alias->newName' => [T_AS, false, ' ', null], // TODO + 'Stmt_TryCatch->finally' => [null, false, ' ', null], // 'Expr_Exit->expr': Complicated due to optional () // 'Stmt_Case->cond': Conversion from default to case diff --git a/vendor/nikic/php-parser/phpunit.xml.dist b/vendor/nikic/php-parser/phpunit.xml.dist index b375637b9..5271264cb 100644 --- a/vendor/nikic/php-parser/phpunit.xml.dist +++ b/vendor/nikic/php-parser/phpunit.xml.dist @@ -1,6 +1,8 @@ - diff --git a/vendor/nikic/php-parser/test/PhpParser/NodeVisitor/NameResolverTest.php b/vendor/nikic/php-parser/test/PhpParser/NodeVisitor/NameResolverTest.php index 1ffd15aa8..69438ca42 100644 --- a/vendor/nikic/php-parser/test/PhpParser/NodeVisitor/NameResolverTest.php +++ b/vendor/nikic/php-parser/test/PhpParser/NodeVisitor/NameResolverTest.php @@ -95,6 +95,13 @@ namespace Baz { C; E; K; + + class ClassWithTypeProperties + { + public float $php = 7.4; + public ?Foo $person; + protected static ?bool $probability; + } } EOC; $expectedCode = <<<'EOC' @@ -163,6 +170,12 @@ namespace Baz { \Y\T\B\C; \Y\T\D\E; \Z\T\K; + class ClassWithTypeProperties + { + public float $php = 7.4; + public ?\Baz\Foo $person; + protected static ?bool $probability; + } } EOC; diff --git a/vendor/nikic/php-parser/test/PhpParser/ParserTest.php b/vendor/nikic/php-parser/test/PhpParser/ParserTest.php index d31ac6efa..5bbee190d 100644 --- a/vendor/nikic/php-parser/test/PhpParser/ParserTest.php +++ b/vendor/nikic/php-parser/test/PhpParser/ParserTest.php @@ -167,6 +167,10 @@ EOC; ["namespace Foo;", ['kind' => Stmt\Namespace_::KIND_SEMICOLON]], ["namespace Foo {}", ['kind' => Stmt\Namespace_::KIND_BRACED]], ["namespace {}", ['kind' => Stmt\Namespace_::KIND_BRACED]], + ["(float) 5.0", ['kind' => Expr\Cast\Double::KIND_FLOAT]], + ["(double) 5.0", ['kind' => Expr\Cast\Double::KIND_DOUBLE]], + ["(real) 5.0", ['kind' => Expr\Cast\Double::KIND_REAL]], + [" ( REAL ) 5.0", ['kind' => Expr\Cast\Double::KIND_REAL]], ]; } } diff --git a/vendor/nikic/php-parser/test/code/formatPreservation/addingPropertyType.test b/vendor/nikic/php-parser/test/code/formatPreservation/addingPropertyType.test new file mode 100644 index 000000000..2ef332b27 --- /dev/null +++ b/vendor/nikic/php-parser/test/code/formatPreservation/addingPropertyType.test @@ -0,0 +1,39 @@ +Adding property type +----- +stmts[0]->type = new Node\Identifier('string'); +----- +stmts[0]->type = new Node\Identifier('int'); +----- +args[] = new Expr\Variable('y'); expr; +$new->class->name = new Node\Identifier('Anon1'); +----- +stmts[0]->type = null; +----- + operators might accidentally let a float * through. - * + * * @param int|float $number The number we want to convert to an int * @param bool $fail_open Set to true to not throw an exception - * + * * @return float|int * @psalm-suppress InvalidReturnType * diff --git a/vendor/paragonie/random_compat/lib/error_polyfill.php b/vendor/paragonie/random_compat/lib/error_polyfill.php index 6d4a19ac7..c02c5c8b4 100644 --- a/vendor/paragonie/random_compat/lib/error_polyfill.php +++ b/vendor/paragonie/random_compat/lib/error_polyfill.php @@ -1,12 +1,12 @@ $st */ - $st = fstat($fp); - if (($st['mode'] & 0170000) !== 020000) { - fclose($fp); - $fp = false; + if (DIRECTORY_SEPARATOR === '/') { + if (!is_readable('/dev/urandom')) { + throw new Exception( + 'Environment misconfiguration: ' . + '/dev/urandom cannot be read.' + ); + } + /** + * We use /dev/urandom if it is a char device. + * We never fall back to /dev/random + */ + /** @var resource|bool $fp */ + $fp = fopen('/dev/urandom', 'rb'); + if (is_resource($fp)) { + /** @var array $st */ + $st = fstat($fp); + if (($st['mode'] & 0170000) !== 020000) { + fclose($fp); + $fp = false; + } } } @@ -128,29 +147,28 @@ if (!is_callable('random_bytes')) { */ $read = fread($fp, $remaining); if (!is_string($read)) { - if ($read === false) { - /** - * We cannot safely read from the file. Exit the - * do-while loop and trigger the exception condition - * - * @var string|bool - */ - $buf = false; - break; - } + /** + * We cannot safely read from the file. Exit the + * do-while loop and trigger the exception condition + * + * @var string|bool + */ + $buf = false; + break; } /** * Decrease the number of bytes returned from remaining */ $remaining -= RandomCompat_strlen($read); /** - * @var string|bool + * @var string $buf */ - $buf = $buf . $read; + $buf .= $read; } while ($remaining > 0); /** * Is our result valid? + * @var string|bool $buf */ if (is_string($buf)) { if (RandomCompat_strlen($buf) === $bytes) { diff --git a/vendor/paragonie/random_compat/lib/random_bytes_libsodium.php b/vendor/paragonie/random_compat/lib/random_bytes_libsodium.php index 7a95e2b40..2e5629018 100644 --- a/vendor/paragonie/random_compat/lib/random_bytes_libsodium.php +++ b/vendor/paragonie/random_compat/lib/random_bytes_libsodium.php @@ -1,22 +1,22 @@ buildFromDirectory(dirname(__DIR__).'/lib'); -rename( - dirname(__DIR__).'/lib/index.php', - dirname(__DIR__).'/lib/random.php' -); - -/** - * If we pass an (optional) path to a private key as a second argument, we will - * sign the Phar with OpenSSL. - * - * If you leave this out, it will produce an unsigned .phar! - */ -if ($argc > 1) { - if (!@is_readable($argv[1])) { - echo 'Could not read the private key file:', $argv[1], "\n"; - exit(255); - } - $pkeyFile = file_get_contents($argv[1]); - - $private = openssl_get_privatekey($pkeyFile); - if ($private !== false) { - $pkey = ''; - openssl_pkey_export($private, $pkey); - $phar->setSignatureAlgorithm(Phar::OPENSSL, $pkey); - - /** - * Save the corresponding public key to the file - */ - if (!@is_readable($dist.'/random_compat.phar.pubkey')) { - $details = openssl_pkey_get_details($private); - file_put_contents( - $dist.'/random_compat.phar.pubkey', - $details['key'] - ); - } - } else { - echo 'An error occurred reading the private key from OpenSSL.', "\n"; - exit(255); - } -} diff --git a/vendor/paragonie/random_compat/psalm-autoload.php b/vendor/paragonie/random_compat/psalm-autoload.php deleted file mode 100644 index d71d1b818..000000000 --- a/vendor/paragonie/random_compat/psalm-autoload.php +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/vendor/ralouphie/getallheaders/.gitignore b/vendor/ralouphie/getallheaders/.gitignore new file mode 100644 index 000000000..1324e7d3e --- /dev/null +++ b/vendor/ralouphie/getallheaders/.gitignore @@ -0,0 +1,5 @@ +.idea +.DS_store +/vendor/ +composer.phar +composer.lock diff --git a/vendor/ralouphie/getallheaders/.travis.yml b/vendor/ralouphie/getallheaders/.travis.yml new file mode 100644 index 000000000..f45b55fa0 --- /dev/null +++ b/vendor/ralouphie/getallheaders/.travis.yml @@ -0,0 +1,18 @@ +language: php + +php: + - 5.3 + - 5.4 + - 5.5 + - 5.6 + - 7.0 + +before_script: + - composer install + +script: + - mkdir -p build/logs + - php vendor/bin/phpunit -c phpunit.xml + +after_script: + - php vendor/bin/coveralls -v \ No newline at end of file diff --git a/vendor/ralouphie/getallheaders/LICENSE b/vendor/ralouphie/getallheaders/LICENSE new file mode 100644 index 000000000..be5540c2a --- /dev/null +++ b/vendor/ralouphie/getallheaders/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Ralph Khattar + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/vendor/ralouphie/getallheaders/README.md b/vendor/ralouphie/getallheaders/README.md new file mode 100644 index 000000000..f3329d663 --- /dev/null +++ b/vendor/ralouphie/getallheaders/README.md @@ -0,0 +1,19 @@ +getallheaders +============= + +PHP `getallheaders()` polyfill. Compatible with PHP >= 5.3. + +[![Build Status](https://travis-ci.org/ralouphie/getallheaders.svg?branch=master)](https://travis-ci.org/ralouphie/getallheaders) +[![Coverage Status](https://coveralls.io/repos/ralouphie/getallheaders/badge.png?branch=master)](https://coveralls.io/r/ralouphie/getallheaders?branch=master) +[![Latest Stable Version](https://poser.pugx.org/ralouphie/getallheaders/v/stable.png)](https://packagist.org/packages/ralouphie/getallheaders) +[![Latest Unstable Version](https://poser.pugx.org/ralouphie/getallheaders/v/unstable.png)](https://packagist.org/packages/ralouphie/getallheaders) +[![License](https://poser.pugx.org/ralouphie/getallheaders/license.png)](https://packagist.org/packages/ralouphie/getallheaders) + + +This is a simple polyfill for [`getallheaders()`](http://www.php.net/manual/en/function.getallheaders.php). + +## Install + +``` +composer require ralouphie/getallheaders +``` diff --git a/vendor/ralouphie/getallheaders/composer.json b/vendor/ralouphie/getallheaders/composer.json new file mode 100644 index 000000000..5a0d595c9 --- /dev/null +++ b/vendor/ralouphie/getallheaders/composer.json @@ -0,0 +1,21 @@ +{ + "name": "ralouphie/getallheaders", + "description": "A polyfill for getallheaders.", + "license": "MIT", + "authors": [ + { + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" + } + ], + "require": { + "php": ">=5.3" + }, + "require-dev": { + "phpunit/phpunit": "~3.7.0", + "satooshi/php-coveralls": ">=1.0" + }, + "autoload": { + "files": ["src/getallheaders.php"] + } +} \ No newline at end of file diff --git a/vendor/ralouphie/getallheaders/phpunit.xml b/vendor/ralouphie/getallheaders/phpunit.xml new file mode 100644 index 000000000..7255b23d9 --- /dev/null +++ b/vendor/ralouphie/getallheaders/phpunit.xml @@ -0,0 +1,22 @@ + + + + ./tests + + + + + src + + + + + + + + \ No newline at end of file diff --git a/vendor/ralouphie/getallheaders/src/getallheaders.php b/vendor/ralouphie/getallheaders/src/getallheaders.php new file mode 100644 index 000000000..c7285a5ba --- /dev/null +++ b/vendor/ralouphie/getallheaders/src/getallheaders.php @@ -0,0 +1,46 @@ + 'Content-Type', + 'CONTENT_LENGTH' => 'Content-Length', + 'CONTENT_MD5' => 'Content-Md5', + ); + + foreach ($_SERVER as $key => $value) { + if (substr($key, 0, 5) === 'HTTP_') { + $key = substr($key, 5); + if (!isset($copy_server[$key]) || !isset($_SERVER[$key])) { + $key = str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', $key)))); + $headers[$key] = $value; + } + } elseif (isset($copy_server[$key])) { + $headers[$copy_server[$key]] = $value; + } + } + + if (!isset($headers['Authorization'])) { + if (isset($_SERVER['REDIRECT_HTTP_AUTHORIZATION'])) { + $headers['Authorization'] = $_SERVER['REDIRECT_HTTP_AUTHORIZATION']; + } elseif (isset($_SERVER['PHP_AUTH_USER'])) { + $basic_pass = isset($_SERVER['PHP_AUTH_PW']) ? $_SERVER['PHP_AUTH_PW'] : ''; + $headers['Authorization'] = 'Basic ' . base64_encode($_SERVER['PHP_AUTH_USER'] . ':' . $basic_pass); + } elseif (isset($_SERVER['PHP_AUTH_DIGEST'])) { + $headers['Authorization'] = $_SERVER['PHP_AUTH_DIGEST']; + } + } + + return $headers; + } + +} diff --git a/vendor/ralouphie/getallheaders/tests/GetAllHeadersTest.php b/vendor/ralouphie/getallheaders/tests/GetAllHeadersTest.php new file mode 100644 index 000000000..8e3d1790a --- /dev/null +++ b/vendor/ralouphie/getallheaders/tests/GetAllHeadersTest.php @@ -0,0 +1,121 @@ + $val) { + $_SERVER[$key] = $val; + } + $result = getallheaders(); + $this->assertEquals($expected, $result, "Error testing $test_type works."); + } + + public function testWorksData() + { + return array( + array( + 'normal case', + array( + 'Key-One' => 'foo', + 'Key-Two' => 'bar', + 'Another-Key-For-Testing' => 'baz' + ), + array( + 'HTTP_KEY_ONE' => 'foo', + 'HTTP_KEY_TWO' => 'bar', + 'HTTP_ANOTHER_KEY_FOR_TESTING' => 'baz' + ) + ), + array( + 'Content-Type', + array( + 'Content-Type' => 'two' + ), + array( + 'HTTP_CONTENT_TYPE' => 'one', + 'CONTENT_TYPE' => 'two' + ) + ), + array( + 'Content-Length', + array( + 'Content-Length' => '222' + ), + array( + 'CONTENT_LENGTH' => '222', + 'HTTP_CONTENT_LENGTH' => '111' + ) + ), + array( + 'Content-Length (HTTP_CONTENT_LENGTH only)', + array( + 'Content-Length' => '111' + ), + array( + 'HTTP_CONTENT_LENGTH' => '111' + ) + ), + array( + 'Content-MD5', + array( + 'Content-Md5' => 'aef123' + ), + array( + 'CONTENT_MD5' => 'aef123', + 'HTTP_CONTENT_MD5' => 'fea321' + ) + ), + array( + 'Content-MD5 (HTTP_CONTENT_MD5 only)', + array( + 'Content-Md5' => 'f123' + ), + array( + 'HTTP_CONTENT_MD5' => 'f123' + ) + ), + array( + 'Authorization (normal)', + array( + 'Authorization' => 'testing' + ), + array( + 'HTTP_AUTHORIZATION' => 'testing', + ) + ), + array( + 'Authorization (redirect)', + array( + 'Authorization' => 'testing redirect' + ), + array( + 'REDIRECT_HTTP_AUTHORIZATION' => 'testing redirect', + ) + ), + array( + 'Authorization (PHP_AUTH_USER + PHP_AUTH_PW)', + array( + 'Authorization' => 'Basic ' . base64_encode('foo:bar') + ), + array( + 'PHP_AUTH_USER' => 'foo', + 'PHP_AUTH_PW' => 'bar' + ) + ), + array( + 'Authorization (PHP_AUTH_DIGEST)', + array( + 'Authorization' => 'example-digest' + ), + array( + 'PHP_AUTH_DIGEST' => 'example-digest' + ) + ) + ); + } +} diff --git a/vendor/stecman/symfony-console-completion/README.md b/vendor/stecman/symfony-console-completion/README.md index 642af265a..15ce85b4a 100644 --- a/vendor/stecman/symfony-console-completion/README.md +++ b/vendor/stecman/symfony-console-completion/README.md @@ -59,7 +59,7 @@ If you don't need any custom completion behaviour, you can simply add the comple eval $([program] _completion --generate-hook) ``` - By default this registers completion for the absolute path to you application, which will work if the program on accessible on your PATH. You can specify a program name to complete for instead using the `--program` option, which is required if you're using an alias to run the program. + By default this registers completion for the absolute path to you application, which will work if the program is accessible on your PATH. You can specify a program name to complete for instead using the `--program` option, which is required if you're using an alias to run the program. 4. If you want the completion to apply automatically for all new shell sessions, add the command from step 3 to your shell's profile (eg. `~/.bash_profile` or `~/.zshrc`) @@ -206,7 +206,7 @@ To have a completion run for both options and arguments matching the specified n $handler->addHandler( new Completion( Completion::ALL_COMMANDS, - 'pacakge', + 'package', Completion::ALL_TYPES, function() { // ... diff --git a/vendor/stecman/symfony-console-completion/src/CompletionCommand.php b/vendor/stecman/symfony-console-completion/src/CompletionCommand.php index 0a4a8090e..3b3e75a7a 100644 --- a/vendor/stecman/symfony-console-completion/src/CompletionCommand.php +++ b/vendor/stecman/symfony-console-completion/src/CompletionCommand.php @@ -10,7 +10,6 @@ use Symfony\Component\Console\Output\OutputInterface; class CompletionCommand extends SymfonyCommand { - /** * @var CompletionHandler */ @@ -49,6 +48,52 @@ END return $this->createDefinition(); } + /** + * Ignore user-defined global options + * + * Any global options defined by user-code are meaningless to this command. + * Options outside of the core defaults are ignored to avoid name and shortcut conflicts. + */ + public function mergeApplicationDefinition($mergeArgs = true) + { + // Get current application options + $appDefinition = $this->getApplication()->getDefinition(); + $originalOptions = $appDefinition->getOptions(); + + // Temporarily replace application options with a filtered list + $appDefinition->setOptions( + $this->filterApplicationOptions($originalOptions) + ); + + parent::mergeApplicationDefinition($mergeArgs); + + // Restore original application options + $appDefinition->setOptions($originalOptions); + } + + /** + * Reduce the passed list of options to the core defaults (if they exist) + * + * @param InputOption[] $appOptions + * @return InputOption[] + */ + protected function filterApplicationOptions(array $appOptions) + { + return array_filter($appOptions, function(InputOption $option) { + static $coreOptions = array( + 'help' => true, + 'quiet' => true, + 'verbose' => true, + 'version' => true, + 'ansi' => true, + 'no-ansi' => true, + 'no-interaction' => true, + ); + + return isset($coreOptions[$option->getName()]); + }); + } + protected function execute(InputInterface $input, OutputInterface $output) { $this->handler = new CompletionHandler($this->getApplication()); diff --git a/vendor/stecman/symfony-console-completion/tests/Stecman/Component/Symfony/Console/BashCompletion/CompletionCommandTest.php b/vendor/stecman/symfony-console-completion/tests/Stecman/Component/Symfony/Console/BashCompletion/CompletionCommandTest.php new file mode 100644 index 000000000..78b634d8f --- /dev/null +++ b/vendor/stecman/symfony-console-completion/tests/Stecman/Component/Symfony/Console/BashCompletion/CompletionCommandTest.php @@ -0,0 +1,41 @@ +getDefinition()->addOption( + new InputOption('conflicting-shortcut', 'g', InputOption::VALUE_NONE) + ); + + // Conflicting option name + $app->getDefinition()->addOption( + new InputOption('program', null, InputOption::VALUE_REQUIRED) + ); + + $app->add(new CompletionCommand()); + + // Check completion command doesn't throw + $app->doRun(new StringInput('_completion -g --program foo'), new NullOutput()); + $app->doRun(new StringInput('_completion --help'), new NullOutput()); + $app->doRun(new StringInput('help _completion'), new NullOutput()); + + // Check default options are available + $app->doRun(new StringInput('_completion -V -vv --no-ansi --quiet'), new NullOutput()); + } +} diff --git a/vendor/symfony/class-loader/LICENSE b/vendor/symfony/class-loader/LICENSE index 21d7fb9e2..a677f4376 100644 --- a/vendor/symfony/class-loader/LICENSE +++ b/vendor/symfony/class-loader/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2018 Fabien Potencier +Copyright (c) 2004-2019 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/class-loader/phpunit.xml.dist b/vendor/symfony/class-loader/phpunit.xml.dist index 5158b22f2..2ad0b802d 100644 --- a/vendor/symfony/class-loader/phpunit.xml.dist +++ b/vendor/symfony/class-loader/phpunit.xml.dist @@ -1,7 +1,7 @@ $val) { if (isset($this->children[$name])) { - $normalized[$name] = $this->children[$name]->normalize($val); + try { + $normalized[$name] = $this->children[$name]->normalize($val); + } catch (UnsetKeyException $e) { + } unset($value[$name]); } elseif (!$this->removeExtraKeys) { $normalized[$name] = $val; diff --git a/vendor/symfony/config/Definition/BaseNode.php b/vendor/symfony/config/Definition/BaseNode.php index 9057f1478..d3f0f96e3 100644 --- a/vendor/symfony/config/Definition/BaseNode.php +++ b/vendor/symfony/config/Definition/BaseNode.php @@ -282,7 +282,7 @@ abstract class BaseNode implements NodeInterface * * @param $value * - * @return $value The normalized array value + * @return The normalized array value */ protected function preNormalize($value) { diff --git a/vendor/symfony/config/Definition/Builder/ExprBuilder.php b/vendor/symfony/config/Definition/Builder/ExprBuilder.php index 5c070bee7..7ba19515b 100644 --- a/vendor/symfony/config/Definition/Builder/ExprBuilder.php +++ b/vendor/symfony/config/Definition/Builder/ExprBuilder.php @@ -174,7 +174,7 @@ class ExprBuilder } /** - * Sets a closure marking the value as invalid at validation time. + * Sets a closure marking the value as invalid at processing time. * * if you want to add the value of the node in your message just use a %s placeholder. * @@ -192,7 +192,7 @@ class ExprBuilder } /** - * Sets a closure unsetting this key of the array at validation time. + * Sets a closure unsetting this key of the array at processing time. * * @return $this * diff --git a/vendor/symfony/config/Definition/Builder/NodeBuilder.php b/vendor/symfony/config/Definition/Builder/NodeBuilder.php index 1fac66fd3..95863d68f 100644 --- a/vendor/symfony/config/Definition/Builder/NodeBuilder.php +++ b/vendor/symfony/config/Definition/Builder/NodeBuilder.php @@ -133,7 +133,7 @@ class NodeBuilder implements NodeParentInterface /** * Returns the parent node. * - * @return ParentNodeDefinitionInterface|NodeDefinition The parent node + * @return NodeDefinition&ParentNodeDefinitionInterface The parent node */ public function end() { diff --git a/vendor/symfony/config/Definition/Builder/NodeDefinition.php b/vendor/symfony/config/Definition/Builder/NodeDefinition.php index 7486e8c30..3a4d2cdf0 100644 --- a/vendor/symfony/config/Definition/Builder/NodeDefinition.php +++ b/vendor/symfony/config/Definition/Builder/NodeDefinition.php @@ -345,7 +345,7 @@ abstract class NodeDefinition implements NodeParentInterface /** * Instantiate and configure the node according to this definition. * - * @return NodeInterface $node The node instance + * @return NodeInterface The node instance * * @throws InvalidDefinitionException When the definition is invalid */ diff --git a/vendor/symfony/config/LICENSE b/vendor/symfony/config/LICENSE index 21d7fb9e2..a677f4376 100644 --- a/vendor/symfony/config/LICENSE +++ b/vendor/symfony/config/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2018 Fabien Potencier +Copyright (c) 2004-2019 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/config/Tests/Definition/Builder/ArrayNodeDefinitionTest.php b/vendor/symfony/config/Tests/Definition/Builder/ArrayNodeDefinitionTest.php index ba059ff0f..ae3fd0678 100644 --- a/vendor/symfony/config/Tests/Definition/Builder/ArrayNodeDefinitionTest.php +++ b/vendor/symfony/config/Tests/Definition/Builder/ArrayNodeDefinitionTest.php @@ -231,6 +231,25 @@ class ArrayNodeDefinitionTest extends TestCase $this->assertFalse($this->getField($node, 'normalizeKeys')); } + public function testUnsetChild() + { + $node = new ArrayNodeDefinition('root'); + $node + ->children() + ->scalarNode('value') + ->beforeNormalization() + ->ifTrue(function ($value) { + return empty($value); + }) + ->thenUnset() + ->end() + ->end() + ->end() + ; + + $this->assertSame(array(), $node->getNode()->normalize(array('value' => null))); + } + public function testPrototypeVariable() { $node = new ArrayNodeDefinition('root'); diff --git a/vendor/symfony/config/phpunit.xml.dist b/vendor/symfony/config/phpunit.xml.dist index 36ef339fd..1cfdb3cdc 100644 --- a/vendor/symfony/config/phpunit.xml.dist +++ b/vendor/symfony/config/phpunit.xml.dist @@ -1,7 +1,7 @@ getTrace(); + array_unshift($trace, array( + 'function' => '', + 'file' => $e->getFile() ?: 'n/a', + 'line' => $e->getLine() ?: 'n/a', + 'args' => array(), + )); + 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'] : ''; @@ -1155,6 +1162,14 @@ class Application return $this; } + /** + * @internal + */ + public function isSingleCommand() + { + return $this->singleCommand; + } + private function splitStringByWidth($string, $width) { // str_split is not suitable for multi-byte characters, we should use preg_split to get char array properly. diff --git a/vendor/symfony/console/Command/Command.php b/vendor/symfony/console/Command/Command.php index e0b11e783..cd9db7603 100644 --- a/vendor/symfony/console/Command/Command.php +++ b/vendor/symfony/console/Command/Command.php @@ -369,9 +369,9 @@ class Command * Adds an argument. * * @param string $name The argument name - * @param int|null $mode The argument mode: self::REQUIRED or self::OPTIONAL + * @param int|null $mode The argument mode: InputArgument::REQUIRED or InputArgument::OPTIONAL * @param string $description A description text - * @param string|string[]|null $default The default value (for self::OPTIONAL mode only) + * @param string|string[]|null $default The default value (for InputArgument::OPTIONAL mode only) * * @throws InvalidArgumentException When argument mode is not valid * @@ -387,11 +387,11 @@ class Command /** * Adds an option. * - * @param string $name The option name - * @param string|array $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts - * @param int|null $mode The option mode: One of the VALUE_* constants - * @param string $description A description text - * @param string|string[]|bool|null $default The default value (must be null for self::VALUE_NONE) + * @param string $name The option name + * @param string|array $shortcut The shortcuts, can be null, a string of shortcuts delimited by | or an array of shortcuts + * @param int|null $mode The option mode: One of the InputOption::VALUE_* constants + * @param string $description A description text + * @param string|string[]|int|bool|null $default The default value (must be null for InputOption::VALUE_NONE) * * @throws InvalidArgumentException If option mode is invalid or incompatible * @@ -533,6 +533,7 @@ class Command public function getProcessedHelp() { $name = $this->name; + $isSingleCommand = $this->application && $this->application->isSingleCommand(); $placeholders = array( '%command.name%', @@ -540,7 +541,7 @@ class Command ); $replacements = array( $name, - $_SERVER['PHP_SELF'].' '.$name, + $isSingleCommand ? $_SERVER['PHP_SELF'] : $_SERVER['PHP_SELF'].' '.$name, ); return str_replace($placeholders, $replacements, $this->getHelp() ?: $this->getDescription()); diff --git a/vendor/symfony/console/Formatter/OutputFormatter.php b/vendor/symfony/console/Formatter/OutputFormatter.php index 57b95eb14..b9af0b3cc 100644 --- a/vendor/symfony/console/Formatter/OutputFormatter.php +++ b/vendor/symfony/console/Formatter/OutputFormatter.php @@ -157,7 +157,7 @@ class OutputFormatter implements OutputFormatterInterface if (!$open && !$tag) { // $this->styleStack->pop(); - } elseif (false === $style = $this->createStyleFromString(strtolower($tag))) { + } elseif (false === $style = $this->createStyleFromString($tag)) { $output .= $this->applyCurrentStyle($text); } elseif ($open) { $this->styleStack->push($style); @@ -203,13 +203,14 @@ class OutputFormatter implements OutputFormatterInterface $style = new OutputFormatterStyle(); foreach ($matches as $match) { array_shift($match); + $match[0] = strtolower($match[0]); if ('fg' == $match[0]) { - $style->setForeground($match[1]); + $style->setForeground(strtolower($match[1])); } elseif ('bg' == $match[0]) { - $style->setBackground($match[1]); + $style->setBackground(strtolower($match[1])); } elseif ('options' === $match[0]) { - preg_match_all('([^,;]+)', $match[1], $options); + preg_match_all('([^,;]+)', strtolower($match[1]), $options); $options = array_shift($options); foreach ($options as $option) { try { diff --git a/vendor/symfony/console/Helper/TableStyle.php b/vendor/symfony/console/Helper/TableStyle.php index 117e311eb..0ee9dd167 100644 --- a/vendor/symfony/console/Helper/TableStyle.php +++ b/vendor/symfony/console/Helper/TableStyle.php @@ -125,7 +125,7 @@ class TableStyle /** * Gets crossing character. * - * @return string $crossingChar + * @return string */ public function getCrossingChar() { diff --git a/vendor/symfony/console/Input/InputAwareInterface.php b/vendor/symfony/console/Input/InputAwareInterface.php index d0f11e986..5a288de5d 100644 --- a/vendor/symfony/console/Input/InputAwareInterface.php +++ b/vendor/symfony/console/Input/InputAwareInterface.php @@ -21,8 +21,6 @@ interface InputAwareInterface { /** * Sets the Console Input. - * - * @param InputInterface */ public function setInput(InputInterface $input); } diff --git a/vendor/symfony/console/LICENSE b/vendor/symfony/console/LICENSE index 21d7fb9e2..a677f4376 100644 --- a/vendor/symfony/console/LICENSE +++ b/vendor/symfony/console/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2018 Fabien Potencier +Copyright (c) 2004-2019 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/console/Tester/CommandTester.php b/vendor/symfony/console/Tester/CommandTester.php index 131ca9b16..c2d18fa28 100644 --- a/vendor/symfony/console/Tester/CommandTester.php +++ b/vendor/symfony/console/Tester/CommandTester.php @@ -148,7 +148,10 @@ class CommandTester { $stream = fopen('php://memory', 'r+', false); - fwrite($stream, implode(PHP_EOL, $inputs)); + foreach ($inputs as $input) { + fwrite($stream, $input.PHP_EOL); + } + rewind($stream); return $stream; diff --git a/vendor/symfony/console/Tests/ApplicationTest.php b/vendor/symfony/console/Tests/ApplicationTest.php index faa98e5f5..7cd473e5d 100644 --- a/vendor/symfony/console/Tests/ApplicationTest.php +++ b/vendor/symfony/console/Tests/ApplicationTest.php @@ -776,6 +776,20 @@ class ApplicationTest extends TestCase $this->assertStringMatchesFormatFile(self::$fixturesPath.'/application_renderexception_linebreaks.txt', $tester->getDisplay(true), '->renderException() keep multiple line breaks'); } + public function testRenderExceptionStackTraceContainsRootException() + { + $application = new Application(); + $application->setAutoExit(false); + $application->register('foo')->setCode(function () { + throw new \Exception('Verbose exception'); + }); + + $tester = new ApplicationTester($application); + $tester->run(array('command' => 'foo'), array('decorated' => false, 'verbosity' => Output::VERBOSITY_VERBOSE)); + + $this->assertContains(sprintf('() at %s:', __FILE__), $tester->getDisplay()); + } + public function testRun() { $application = new Application(); @@ -905,7 +919,7 @@ class ApplicationTest extends TestCase $application->setAutoExit(false); $application->expects($this->once()) ->method('doRun') - ->will($this->throwException($exception)); + ->willThrowException($exception); $exitCode = $application->run(new ArrayInput(array()), new NullOutput()); @@ -944,7 +958,7 @@ class ApplicationTest extends TestCase $application->setAutoExit(false); $application->expects($this->once()) ->method('doRun') - ->will($this->throwException($exception)); + ->willThrowException($exception); $exitCode = $application->run(new ArrayInput(array()), new NullOutput()); diff --git a/vendor/symfony/console/Tests/Command/CommandTest.php b/vendor/symfony/console/Tests/Command/CommandTest.php index 6bc3f75b9..09c89c416 100644 --- a/vendor/symfony/console/Tests/Command/CommandTest.php +++ b/vendor/symfony/console/Tests/Command/CommandTest.php @@ -166,6 +166,14 @@ class CommandTest extends TestCase $command = new \TestCommand(); $command->setHelp(''); $this->assertContains('description', $command->getProcessedHelp(), '->getProcessedHelp() falls back to the description'); + + $command = new \TestCommand(); + $command->setHelp('The %command.name% command does... Example: php %command.full_name%.'); + $application = new Application(); + $application->add($command); + $application->setDefaultCommand('namespace:name', true); + $this->assertContains('The namespace:name command does...', $command->getProcessedHelp(), '->getProcessedHelp() replaces %command.name% correctly in single command applications'); + $this->assertNotContains('%command.full_name%', $command->getProcessedHelp(), '->getProcessedHelp() replaces %command.full_name% in single command applications'); } public function testGetSetAliases() diff --git a/vendor/symfony/console/Tests/Tester/CommandTesterTest.php b/vendor/symfony/console/Tests/Tester/CommandTesterTest.php index 58eb8103f..da5f2e7ae 100644 --- a/vendor/symfony/console/Tests/Tester/CommandTesterTest.php +++ b/vendor/symfony/console/Tests/Tester/CommandTesterTest.php @@ -112,6 +112,31 @@ class CommandTesterTest extends TestCase $this->assertEquals(implode('', $questions), $tester->getDisplay(true)); } + public function testCommandWithDefaultInputs() + { + $questions = array( + 'What\'s your name?', + 'How are you?', + 'Where do you come from?', + ); + + $command = new Command('foo'); + $command->setHelperSet(new HelperSet(array(new QuestionHelper()))); + $command->setCode(function ($input, $output) use ($questions, $command) { + $helper = $command->getHelper('question'); + $helper->ask($input, $output, new Question($questions[0], 'Bobby')); + $helper->ask($input, $output, new Question($questions[1], 'Fine')); + $helper->ask($input, $output, new Question($questions[2], 'France')); + }); + + $tester = new CommandTester($command); + $tester->setInputs(array('', '', '')); + $tester->execute(array()); + + $this->assertEquals(0, $tester->getStatusCode()); + $this->assertEquals(implode('', $questions), $tester->getDisplay(true)); + } + /** * @expectedException \RuntimeException * @expectedMessage Aborted diff --git a/vendor/symfony/console/phpunit.xml.dist b/vendor/symfony/console/phpunit.xml.dist index 32569d63c..15e7e52a9 100644 --- a/vendor/symfony/console/phpunit.xml.dist +++ b/vendor/symfony/console/phpunit.xml.dist @@ -1,7 +1,7 @@ Attribute[Element[*][name]]]')), + array('[name="foo"]', array("Attribute[Element[*][name = 'foo']]")), + array("[name='foo[1]']", array("Attribute[Element[*][name = 'foo[1]']]")), + array("[name='foo[0][bar]']", array("Attribute[Element[*][name = 'foo[0][bar]']]")), array('a[rel="include"]', array("Attribute[Element[a][rel = 'include']]")), array('a[rel = include]', array("Attribute[Element[a][rel = 'include']]")), array("a[hreflang |= 'en']", array("Attribute[Element[a][hreflang |= 'en']]")), diff --git a/vendor/symfony/css-selector/phpunit.xml.dist b/vendor/symfony/css-selector/phpunit.xml.dist index 65ff1827a..a8e537ef7 100644 --- a/vendor/symfony/css-selector/phpunit.xml.dist +++ b/vendor/symfony/css-selector/phpunit.xml.dist @@ -1,7 +1,7 @@ isFinder && !isset($this->loaded[$class])) { $this->loaded[$class] = true; - if ($file = $this->classLoader[0]->findFile($class) ?: false) { - $wasCached = \function_exists('opcache_is_script_cached') && @opcache_is_script_cached($file); - + if (!$file = $this->classLoader[0]->findFile($class) ?: false) { + // no-op + } elseif (\function_exists('opcache_is_script_cached') && @opcache_is_script_cached($file)) { require $file; - if ($wasCached) { - return; - } + return; + } else { + require $file; } } else { \call_user_func($this->classLoader, $class); @@ -219,7 +219,7 @@ class DebugClassLoader $len = 0; $ns = ''; } else { - $ns = \substr($class, 0, $len); + $ns = \str_replace('_', '\\', \substr($class, 0, $len)); } // Detect annotations on the class @@ -250,13 +250,13 @@ class DebugClassLoader if (!isset(self::$checkedClasses[$use])) { $this->checkClass($use); } - if (isset(self::$deprecated[$use]) && \strncmp($ns, $use, $len)) { + if (isset(self::$deprecated[$use]) && \strncmp($ns, \str_replace('_', '\\', $use), $len)) { $type = class_exists($class, false) ? 'class' : (interface_exists($class, false) ? 'interface' : 'trait'); $verb = class_exists($use, false) || interface_exists($class, false) ? 'extends' : (interface_exists($use, false) ? 'implements' : 'uses'); $deprecations[] = sprintf('The "%s" %s %s "%s" that is deprecated%s.', $class, $type, $verb, $use, self::$deprecated[$use]); } - if (isset(self::$internal[$use]) && \strncmp($ns, $use, $len)) { + if (isset(self::$internal[$use]) && \strncmp($ns, \str_replace('_', '\\', $use), $len)) { $deprecations[] = sprintf('The "%s" %s is considered internal%s. It may change without further notice. You should not use it from "%s".', $use, class_exists($use, false) ? 'class' : (interface_exists($use, false) ? 'interface' : 'trait'), self::$internal[$use], $class); } } diff --git a/vendor/symfony/debug/LICENSE b/vendor/symfony/debug/LICENSE index 21d7fb9e2..a677f4376 100644 --- a/vendor/symfony/debug/LICENSE +++ b/vendor/symfony/debug/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2018 Fabien Potencier +Copyright (c) 2004-2019 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/debug/phpunit.xml.dist b/vendor/symfony/debug/phpunit.xml.dist index 12e58612b..a51bbff93 100644 --- a/vendor/symfony/debug/phpunit.xml.dist +++ b/vendor/symfony/debug/phpunit.xml.dist @@ -1,7 +1,7 @@ graph = $container->getCompiler()->getServiceReferenceGraph(); $this->graph->clear(); $this->lazy = false; + $this->byConstructor = false; foreach ($container->getAliases() as $id => $alias) { $targetId = $this->getDefinitionId((string) $alias); @@ -100,7 +102,8 @@ class AnalyzeServiceReferencesPass extends AbstractRecursivePass implements Repe $targetDefinition, $value, $this->lazy || ($this->hasProxyDumper && $targetDefinition && $targetDefinition->isLazy()), - ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE === $value->getInvalidBehavior() + ContainerInterface::IGNORE_ON_UNINITIALIZED_REFERENCE === $value->getInvalidBehavior(), + $this->byConstructor ); return $value; @@ -118,8 +121,11 @@ class AnalyzeServiceReferencesPass extends AbstractRecursivePass implements Repe } $this->lazy = false; + $byConstructor = $this->byConstructor; + $this->byConstructor = true; $this->processValue($value->getFactory()); $this->processValue($value->getArguments()); + $this->byConstructor = $byConstructor; if (!$this->onlyConstructorArguments) { $this->processValue($value->getProperties()); diff --git a/vendor/symfony/dependency-injection/Compiler/AutowirePass.php b/vendor/symfony/dependency-injection/Compiler/AutowirePass.php index e542e30ea..4aabb0b29 100644 --- a/vendor/symfony/dependency-injection/Compiler/AutowirePass.php +++ b/vendor/symfony/dependency-injection/Compiler/AutowirePass.php @@ -452,7 +452,17 @@ class AutowirePass extends AbstractRecursivePass private function createTypeNotFoundMessage(TypedReference $reference, $label) { - if (!$r = $this->container->getReflectionClass($type = $reference->getType(), false)) { + $trackResources = $this->container->isTrackingResources(); + $this->container->setResourceTracking(false); + try { + if ($r = $this->container->getReflectionClass($type = $reference->getType(), false)) { + $alternatives = $this->createTypeAlternatives($reference); + } + } finally { + $this->container->setResourceTracking($trackResources); + } + + if (!$r) { // either $type does not exist or a parent class does not exist try { $resource = new ClassExistenceResource($type, false); @@ -465,7 +475,6 @@ class AutowirePass extends AbstractRecursivePass $message = sprintf('has type "%s" but this class %s.', $type, $parentMsg ? sprintf('is missing a parent class (%s)', $parentMsg) : 'was not found'); } else { - $alternatives = $this->createTypeAlternatives($reference); $message = $this->container->has($type) ? 'this service is abstract' : 'no such service exists'; $message = sprintf('references %s "%s" but %s.%s', $r->isInterface() ? 'interface' : 'class', $type, $message, $alternatives); diff --git a/vendor/symfony/dependency-injection/Compiler/InlineServiceDefinitionsPass.php b/vendor/symfony/dependency-injection/Compiler/InlineServiceDefinitionsPass.php index 05eb72d97..a229022ed 100644 --- a/vendor/symfony/dependency-injection/Compiler/InlineServiceDefinitionsPass.php +++ b/vendor/symfony/dependency-injection/Compiler/InlineServiceDefinitionsPass.php @@ -127,13 +127,19 @@ class InlineServiceDefinitionsPass extends AbstractRecursivePass implements Repe } $ids = array(); + $isReferencedByConstructor = false; foreach ($graph->getNode($id)->getInEdges() as $edge) { - if ($edge->isWeak()) { + $isReferencedByConstructor = $isReferencedByConstructor || $edge->isReferencedByConstructor(); + if ($edge->isWeak() || $edge->isLazy()) { return false; } $ids[] = $edge->getSourceNode()->getId(); } + if (!$ids) { + return true; + } + if (\count(array_unique($ids)) > 1) { return false; } @@ -142,6 +148,10 @@ class InlineServiceDefinitionsPass extends AbstractRecursivePass implements Repe return false; } - return !$ids || $this->container->getDefinition($ids[0])->isShared(); + if ($isReferencedByConstructor && $this->container->getDefinition($ids[0])->isLazy() && ($definition->getProperties() || $definition->getMethodCalls() || $definition->getConfigurator())) { + return false; + } + + return $this->container->getDefinition($ids[0])->isShared(); } } diff --git a/vendor/symfony/dependency-injection/Compiler/PassConfig.php b/vendor/symfony/dependency-injection/Compiler/PassConfig.php index 31104fb1f..d547c3e95 100644 --- a/vendor/symfony/dependency-injection/Compiler/PassConfig.php +++ b/vendor/symfony/dependency-injection/Compiler/PassConfig.php @@ -51,12 +51,12 @@ class PassConfig $this->optimizationPasses = array(array( new ResolveChildDefinitionsPass(), new ServiceLocatorTagPass(), + new RegisterServiceSubscribersPass(), new DecoratorServicePass(), new ResolveParameterPlaceHoldersPass(false), new ResolveFactoryClassPass(), new FactoryReturnTypePass($resolveClassPass), new CheckDefinitionValidityPass(), - new RegisterServiceSubscribersPass(), new ResolveNamedArgumentsPass(), new AutowireRequiredMethodsPass(), new ResolveBindingsPass(), diff --git a/vendor/symfony/dependency-injection/Compiler/ResolveBindingsPass.php b/vendor/symfony/dependency-injection/Compiler/ResolveBindingsPass.php index bcf265ab4..166e23441 100644 --- a/vendor/symfony/dependency-injection/Compiler/ResolveBindingsPass.php +++ b/vendor/symfony/dependency-injection/Compiler/ResolveBindingsPass.php @@ -34,6 +34,8 @@ class ResolveBindingsPass extends AbstractRecursivePass */ public function process(ContainerBuilder $container) { + $this->usedBindings = $container->getRemovedBindingIds(); + try { parent::process($container); diff --git a/vendor/symfony/dependency-injection/Compiler/ResolveNamedArgumentsPass.php b/vendor/symfony/dependency-injection/Compiler/ResolveNamedArgumentsPass.php index 90cf64adb..36980df09 100644 --- a/vendor/symfony/dependency-injection/Compiler/ResolveNamedArgumentsPass.php +++ b/vendor/symfony/dependency-injection/Compiler/ResolveNamedArgumentsPass.php @@ -49,6 +49,7 @@ class ResolveNamedArgumentsPass extends AbstractRecursivePass if (null === $parameters) { $r = $this->getReflectionMethod($value, $method); $class = $r instanceof \ReflectionMethod ? $r->class : $this->currentId; + $method = $r->getName(); $parameters = $r->getParameters(); } diff --git a/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraph.php b/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraph.php index 4d36ae767..83486f053 100644 --- a/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraph.php +++ b/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraph.php @@ -91,11 +91,13 @@ class ServiceReferenceGraph * @param string $reference * @param bool $lazy * @param bool $weak + * @param bool $byConstructor */ - public function connect($sourceId, $sourceValue, $destId, $destValue = null, $reference = null/*, bool $lazy = false, bool $weak = false*/) + public function connect($sourceId, $sourceValue, $destId, $destValue = null, $reference = null/*, bool $lazy = false, bool $weak = false, bool $byConstructor = false*/) { $lazy = \func_num_args() >= 6 ? func_get_arg(5) : false; $weak = \func_num_args() >= 7 ? func_get_arg(6) : false; + $byConstructor = \func_num_args() >= 8 ? func_get_arg(7) : false; if (null === $sourceId || null === $destId) { return; @@ -103,7 +105,7 @@ class ServiceReferenceGraph $sourceNode = $this->createNode($sourceId, $sourceValue); $destNode = $this->createNode($destId, $destValue); - $edge = new ServiceReferenceGraphEdge($sourceNode, $destNode, $reference, $lazy, $weak); + $edge = new ServiceReferenceGraphEdge($sourceNode, $destNode, $reference, $lazy, $weak, $byConstructor); $sourceNode->addOutEdge($edge); $destNode->addInEdge($edge); diff --git a/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraphEdge.php b/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraphEdge.php index 018905394..5b8c84b6d 100644 --- a/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraphEdge.php +++ b/vendor/symfony/dependency-injection/Compiler/ServiceReferenceGraphEdge.php @@ -25,6 +25,7 @@ class ServiceReferenceGraphEdge private $value; private $lazy; private $weak; + private $byConstructor; /** * @param ServiceReferenceGraphNode $sourceNode @@ -32,14 +33,16 @@ class ServiceReferenceGraphEdge * @param mixed $value * @param bool $lazy * @param bool $weak + * @param bool $byConstructor */ - public function __construct(ServiceReferenceGraphNode $sourceNode, ServiceReferenceGraphNode $destNode, $value = null, $lazy = false, $weak = false) + public function __construct(ServiceReferenceGraphNode $sourceNode, ServiceReferenceGraphNode $destNode, $value = null, $lazy = false, $weak = false, $byConstructor = false) { $this->sourceNode = $sourceNode; $this->destNode = $destNode; $this->value = $value; $this->lazy = $lazy; $this->weak = $weak; + $this->byConstructor = $byConstructor; } /** @@ -91,4 +94,14 @@ class ServiceReferenceGraphEdge { return $this->weak; } + + /** + * Returns true if the edge links with a constructor argument. + * + * @return bool + */ + public function isReferencedByConstructor() + { + return $this->byConstructor; + } } diff --git a/vendor/symfony/dependency-injection/ContainerBuilder.php b/vendor/symfony/dependency-injection/ContainerBuilder.php index 55d2c0112..93239a703 100644 --- a/vendor/symfony/dependency-injection/ContainerBuilder.php +++ b/vendor/symfony/dependency-injection/ContainerBuilder.php @@ -123,6 +123,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface private $removedIds = array(); + private $removedBindingIds = array(); + private static $internalTypes = array( 'int' => true, 'float' => true, @@ -364,11 +366,11 @@ class ContainerBuilder extends Container implements TaggedContainerInterface try { if (isset($this->classReflectors[$class])) { $classReflector = $this->classReflectors[$class]; - } elseif ($this->trackResources) { + } elseif (class_exists(ClassExistenceResource::class)) { $resource = new ClassExistenceResource($class, false); $classReflector = $resource->isFresh(0) ? false : new \ReflectionClass($class); } else { - $classReflector = new \ReflectionClass($class); + $classReflector = class_exists($class) ? new \ReflectionClass($class) : false; } } catch (\ReflectionException $e) { if ($throw) { @@ -531,7 +533,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface throw new BadMethodCallException(sprintf('Setting service "%s" for an unknown or non-synthetic service definition on a compiled container is not allowed.', $id)); } - unset($this->definitions[$id], $this->aliasDefinitions[$id], $this->removedIds[$id]); + $this->removeId($id); + unset($this->removedIds[$id]); parent::set($id, $service); } @@ -544,8 +547,7 @@ class ContainerBuilder extends Container implements TaggedContainerInterface public function removeDefinition($id) { if (isset($this->definitions[$id = $this->normalizeId($id)])) { - unset($this->definitions[$id]); - $this->removedIds[$id] = true; + $this->removeId($id); } } @@ -876,7 +878,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface throw new InvalidArgumentException(sprintf('An alias can not reference itself, got a circular reference on "%s".', $alias)); } - unset($this->definitions[$alias], $this->removedIds[$alias]); + $this->removeId($alias); + unset($this->removedIds[$alias]); return $this->aliasDefinitions[$alias] = $id; } @@ -889,8 +892,7 @@ class ContainerBuilder extends Container implements TaggedContainerInterface public function removeAlias($alias) { if (isset($this->aliasDefinitions[$alias = $this->normalizeId($alias)])) { - unset($this->aliasDefinitions[$alias]); - $this->removedIds[$alias] = true; + $this->removeId($alias); } } @@ -1019,7 +1021,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface $id = $this->normalizeId($id); - unset($this->aliasDefinitions[$id], $this->removedIds[$id]); + $this->removeId($id); + unset($this->removedIds[$id]); return $this->definitions[$id] = $definition; } @@ -1552,6 +1555,18 @@ class ContainerBuilder extends Container implements TaggedContainerInterface return $services; } + /** + * Gets removed binding ids. + * + * @return array + * + * @internal + */ + public function getRemovedBindingIds() + { + return $this->removedBindingIds; + } + /** * Computes a reasonably unique hash of a value. * @@ -1656,4 +1671,21 @@ class ContainerBuilder extends Container implements TaggedContainerInterface return false; } + + private function removeId($id) + { + $this->removedIds[$id] = true; + unset($this->aliasDefinitions[$id]); + + if (!isset($this->definitions[$id])) { + return; + } + + foreach ($this->definitions[$id]->getBindings() as $binding) { + list(, $identifier) = $binding->getValues(); + $this->removedBindingIds[$identifier] = true; + } + + unset($this->definitions[$id]); + } } diff --git a/vendor/symfony/dependency-injection/Definition.php b/vendor/symfony/dependency-injection/Definition.php index e05b81b50..849d617a1 100644 --- a/vendor/symfony/dependency-injection/Definition.php +++ b/vendor/symfony/dependency-injection/Definition.php @@ -400,7 +400,7 @@ class Definition /** * Sets the definition templates to conditionally apply on the current definition, keyed by parent interface/class. * - * @param $instanceof ChildDefinition[] + * @param ChildDefinition[] $instanceof * * @return $this */ diff --git a/vendor/symfony/dependency-injection/Dumper/GraphvizDumper.php b/vendor/symfony/dependency-injection/Dumper/GraphvizDumper.php index 9a087991c..2105d1d40 100644 --- a/vendor/symfony/dependency-injection/Dumper/GraphvizDumper.php +++ b/vendor/symfony/dependency-injection/Dumper/GraphvizDumper.php @@ -149,6 +149,14 @@ class GraphvizDumper extends Dumper $edges[] = array('name' => $name, 'required' => $required, 'to' => $argument, 'lazy' => $lazyEdge); } elseif ($argument instanceof ArgumentInterface) { $edges = array_merge($edges, $this->findEdges($id, $argument->getValues(), $required, $name, true)); + } elseif ($argument instanceof Definition) { + $edges = array_merge($edges, + $this->findEdges($id, $argument->getArguments(), $required, ''), + $this->findEdges($id, $argument->getProperties(), false, '') + ); + foreach ($argument->getMethodCalls() as $call) { + $edges = array_merge($edges, $this->findEdges($id, $call[1], false, $call[0].'()')); + } } elseif (\is_array($argument)) { $edges = array_merge($edges, $this->findEdges($id, $argument, $required, $name, $lazy)); } diff --git a/vendor/symfony/dependency-injection/Dumper/PhpDumper.php b/vendor/symfony/dependency-injection/Dumper/PhpDumper.php index fb12f99da..3a3c24d04 100644 --- a/vendor/symfony/dependency-injection/Dumper/PhpDumper.php +++ b/vendor/symfony/dependency-injection/Dumper/PhpDumper.php @@ -154,14 +154,19 @@ class PhpDumper extends Dumper } } - (new AnalyzeServiceReferencesPass(false))->process($this->container); - $this->circularReferences = array(); + (new AnalyzeServiceReferencesPass(false, !$this->getProxyDumper() instanceof NullDumper))->process($this->container); $checkedNodes = array(); + $this->circularReferences = array(); foreach ($this->container->getCompiler()->getServiceReferenceGraph()->getNodes() as $id => $node) { - $currentPath = array($id => $id); - $this->analyzeCircularReferences($node->getOutEdges(), $checkedNodes, $currentPath); + if (!$node->getValue() instanceof Definition) { + continue; + } + if (!isset($checkedNodes[$id])) { + $this->analyzeCircularReferences($id, $node->getOutEdges(), $checkedNodes); + } } $this->container->getCompiler()->getServiceReferenceGraph()->clear(); + $checkedNodes = array(); $this->docStar = $options['debug'] ? '*' : ''; @@ -297,26 +302,56 @@ EOF; return $this->proxyDumper; } - private function analyzeCircularReferences(array $edges, &$checkedNodes, &$currentPath) + private function analyzeCircularReferences($sourceId, array $edges, &$checkedNodes, &$currentPath = array()) { + $checkedNodes[$sourceId] = true; + $currentPath[$sourceId] = $sourceId; + foreach ($edges as $edge) { $node = $edge->getDestNode(); $id = $node->getId(); - if ($node->getValue() && ($edge->isLazy() || $edge->isWeak())) { + if (!$node->getValue() instanceof Definition || $sourceId === $id || $edge->isLazy() || $edge->isWeak()) { // no-op } elseif (isset($currentPath[$id])) { + $currentId = $id; foreach (array_reverse($currentPath) as $parentId) { - $this->circularReferences[$parentId][$id] = $id; - $id = $parentId; + $this->circularReferences[$parentId][$currentId] = $currentId; + if ($parentId === $id) { + break; + } + $currentId = $parentId; } } elseif (!isset($checkedNodes[$id])) { - $checkedNodes[$id] = true; - $currentPath[$id] = $id; - $this->analyzeCircularReferences($node->getOutEdges(), $checkedNodes, $currentPath); - unset($currentPath[$id]); + $this->analyzeCircularReferences($id, $node->getOutEdges(), $checkedNodes, $currentPath); + } elseif (isset($this->circularReferences[$id])) { + $this->connectCircularReferences($id, $currentPath); } } + unset($currentPath[$sourceId]); + } + + private function connectCircularReferences($sourceId, &$currentPath, &$subPath = array()) + { + $subPath[$sourceId] = $sourceId; + $currentPath[$sourceId] = $sourceId; + + foreach ($this->circularReferences[$sourceId] as $id) { + if (isset($currentPath[$id])) { + $currentId = $id; + foreach (array_reverse($currentPath) as $parentId) { + $this->circularReferences[$parentId][$currentId] = $currentId; + if ($parentId === $id) { + break; + } + $currentId = $parentId; + } + } elseif (!isset($subPath[$id]) && isset($this->circularReferences[$id])) { + $this->connectCircularReferences($id, $currentPath, $subPath); + } + } + unset($currentPath[$sourceId]); + unset($subPath[$sourceId]); } private function collectLineage($class, array &$lineage) @@ -557,7 +592,8 @@ EOF; if (\is_array($callable)) { if ($callable[0] instanceof Reference - || ($callable[0] instanceof Definition && $this->definitionVariables->contains($callable[0]))) { + || ($callable[0] instanceof Definition && $this->definitionVariables->contains($callable[0])) + ) { return sprintf(" %s->%s(\$%s);\n", $this->dumpValue($callable[0]), $callable[1], $variableName); } @@ -591,7 +627,7 @@ EOF; $this->definitionVariables = new \SplObjectStorage(); $this->referenceVariables = array(); $this->variableCount = 0; - $this->definitionVariables[$definition] = $this->referenceVariables[$id] = new Variable('instance'); + $this->referenceVariables[$id] = new Variable('instance'); $return = array(); @@ -663,22 +699,7 @@ EOF; $code .= sprintf(" @trigger_error(%s, E_USER_DEPRECATED);\n\n", $this->export($definition->getDeprecationMessage($id))); } - $head = $tail = ''; - $arguments = array($definition->getArguments(), $definition->getFactory()); - $this->addInlineVariables($head, $tail, $id, $arguments, true); - $code .= '' !== $head ? $head."\n" : ''; - - if ($arguments = array_filter(array($definition->getProperties(), $definition->getMethodCalls(), $definition->getConfigurator()))) { - $this->addInlineVariables($tail, $tail, $id, $arguments, false); - - $tail .= '' !== $tail ? "\n" : ''; - $tail .= $this->addServiceProperties($definition); - $tail .= $this->addServiceMethodCalls($definition); - $tail .= $this->addServiceConfigurator($definition); - } - - $code .= $this->addServiceInstance($id, $definition, '' === $tail) - .('' !== $tail ? "\n".$tail."\n return \$instance;\n" : ''); + $code .= $this->addInlineService($id, $definition); if ($asFile) { $code = implode("\n", array_map(function ($line) { return $line ? substr($line, 8) : $line; }, explode("\n", $code))); @@ -692,35 +713,45 @@ EOF; return $code; } - private function addInlineVariables(&$head, &$tail, $id, array $arguments, $forConstructor) + private function addInlineVariables($id, Definition $definition, array $arguments, $forConstructor) { - $hasSelfRef = false; + $code = ''; foreach ($arguments as $argument) { if (\is_array($argument)) { - $hasSelfRef = $this->addInlineVariables($head, $tail, $id, $argument, $forConstructor) || $hasSelfRef; + $code .= $this->addInlineVariables($id, $definition, $argument, $forConstructor); } elseif ($argument instanceof Reference) { - $hasSelfRef = $this->addInlineReference($head, $id, $this->container->normalizeId($argument), $forConstructor) || $hasSelfRef; + $code .= $this->addInlineReference($id, $definition, $this->container->normalizeId($argument), $forConstructor); } elseif ($argument instanceof Definition) { - $hasSelfRef = $this->addInlineService($head, $tail, $id, $argument, $forConstructor) || $hasSelfRef; + $code .= $this->addInlineService($id, $definition, $argument, $forConstructor); } } - return $hasSelfRef; + return $code; } - private function addInlineReference(&$code, $id, $targetId, $forConstructor) + private function addInlineReference($id, Definition $definition, $targetId, $forConstructor) { - $hasSelfRef = isset($this->circularReferences[$id][$targetId]); - - if ('service_container' === $targetId || isset($this->referenceVariables[$targetId])) { - return $hasSelfRef; - } - list($callCount, $behavior) = $this->serviceCalls[$targetId]; - if (2 > $callCount && (!$hasSelfRef || !$forConstructor)) { - return $hasSelfRef; + while ($this->container->hasAlias($targetId)) { + $targetId = (string) $this->container->getAlias($targetId); + } + + if ($id === $targetId) { + return $this->addInlineService($id, $definition, $definition); + } + + if ('service_container' === $targetId || isset($this->referenceVariables[$targetId])) { + return ''; + } + + $hasSelfRef = isset($this->circularReferences[$id][$targetId]); + $forConstructor = $forConstructor && !isset($this->definitionVariables[$definition]); + $code = $hasSelfRef && !$forConstructor ? $this->addInlineService($id, $definition, $definition) : ''; + + if (isset($this->referenceVariables[$targetId]) || (2 > $callCount && (!$hasSelfRef || !$forConstructor))) { + return $code; } $name = $this->getNextVariableName(); @@ -730,7 +761,7 @@ EOF; $code .= sprintf(" \$%s = %s;\n", $name, $this->getServiceCall($targetId, $reference)); if (!$hasSelfRef || !$forConstructor) { - return $hasSelfRef; + return $code; } $code .= sprintf(<<<'EOTXT' @@ -745,46 +776,56 @@ EOTXT $id ); - return false; + return $code; } - private function addInlineService(&$head, &$tail, $id, Definition $definition, $forConstructor) + private function addInlineService($id, Definition $definition, Definition $inlineDef = null, $forConstructor = true) { - if (isset($this->definitionVariables[$definition])) { - return false; + $isSimpleInstance = $isRootInstance = null === $inlineDef; + + if (isset($this->definitionVariables[$inlineDef = $inlineDef ?: $definition])) { + return ''; } - $arguments = array($definition->getArguments(), $definition->getFactory()); + $arguments = array($inlineDef->getArguments(), $inlineDef->getFactory()); - if (2 > $this->inlinedDefinitions[$definition] && !$definition->getMethodCalls() && !$definition->getProperties() && !$definition->getConfigurator()) { - return $this->addInlineVariables($head, $tail, $id, $arguments, $forConstructor); + $code = $this->addInlineVariables($id, $definition, $arguments, $forConstructor); + + if ($arguments = array_filter(array($inlineDef->getProperties(), $inlineDef->getMethodCalls(), $inlineDef->getConfigurator()))) { + $isSimpleInstance = false; + } elseif ($definition !== $inlineDef && 2 > $this->inlinedDefinitions[$inlineDef]) { + return $code; } - $name = $this->getNextVariableName(); - $this->definitionVariables[$definition] = new Variable($name); - - $code = ''; - if ($forConstructor) { - $hasSelfRef = $this->addInlineVariables($code, $tail, $id, $arguments, $forConstructor); + if (isset($this->definitionVariables[$inlineDef])) { + $isSimpleInstance = false; } else { - $hasSelfRef = $this->addInlineVariables($code, $code, $id, $arguments, $forConstructor); - } - $code .= $this->addNewInstance($definition, '$'.$name, ' = ', $id); - $hasSelfRef && !$forConstructor ? $tail .= ('' !== $tail ? "\n" : '').$code : $head .= ('' !== $head ? "\n" : '').$code; + $name = $definition === $inlineDef ? 'instance' : $this->getNextVariableName(); + $this->definitionVariables[$inlineDef] = new Variable($name); + $code .= '' !== $code ? "\n" : ''; - $code = ''; - $arguments = array($definition->getProperties(), $definition->getMethodCalls(), $definition->getConfigurator()); - $hasSelfRef = $this->addInlineVariables($code, $code, $id, $arguments, false) || $hasSelfRef; + if ('instance' === $name) { + $code .= $this->addServiceInstance($id, $definition, $isSimpleInstance); + } else { + $code .= $this->addNewInstance($inlineDef, '$'.$name, ' = ', $id); + } - $code .= '' !== $code ? "\n" : ''; - $code .= $this->addServiceProperties($definition, $name); - $code .= $this->addServiceMethodCalls($definition, $name); - $code .= $this->addServiceConfigurator($definition, $name); - if ('' !== $code) { - $hasSelfRef ? $tail .= ('' !== $tail ? "\n" : '').$code : $head .= $code; + if ('' !== $inline = $this->addInlineVariables($id, $definition, $arguments, false)) { + $code .= "\n".$inline."\n"; + } elseif ($arguments && 'instance' === $name) { + $code .= "\n"; + } + + $code .= $this->addServiceProperties($inlineDef, $name); + $code .= $this->addServiceMethodCalls($inlineDef, $name); + $code .= $this->addServiceConfigurator($inlineDef, $name); } - return $hasSelfRef; + if ($isRootInstance && !$isSimpleInstance) { + $code .= "\n return \$instance;\n"; + } + + return $code; } /** @@ -1350,7 +1391,7 @@ EOF; /*{$this->docStar} * Computes a dynamic parameter. * - * @param string The name of the dynamic parameter to load + * @param string \$name The name of the dynamic parameter to load * * @return mixed The value of the dynamic parameter * @@ -1781,6 +1822,7 @@ EOF; if ($definition->isShared()) { $code = sprintf('$this->services[\'%s\'] = %s', $id, $code); } + $code = "($code)"; } elseif ($this->asFiles && $definition->isShared() && !$this->isHotPath($definition)) { $code = sprintf("\$this->load('%s.php')", $this->generateMethodName($id)); } else { diff --git a/vendor/symfony/dependency-injection/LICENSE b/vendor/symfony/dependency-injection/LICENSE index 21d7fb9e2..a677f4376 100644 --- a/vendor/symfony/dependency-injection/LICENSE +++ b/vendor/symfony/dependency-injection/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2018 Fabien Potencier +Copyright (c) 2004-2019 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/dependency-injection/Loader/IniFileLoader.php b/vendor/symfony/dependency-injection/Loader/IniFileLoader.php index ed3709104..2ee9ea8ff 100644 --- a/vendor/symfony/dependency-injection/Loader/IniFileLoader.php +++ b/vendor/symfony/dependency-injection/Loader/IniFileLoader.php @@ -70,7 +70,9 @@ class IniFileLoader extends FileLoader private function phpize($value) { // trim on the right as comments removal keep whitespaces - $value = rtrim($value); + if ($value !== $v = rtrim($value)) { + $value = '""' === substr_replace($v, '', 1, -1) ? substr($v, 1, -1) : $v; + } $lowercaseValue = strtolower($value); switch (true) { diff --git a/vendor/symfony/dependency-injection/Loader/YamlFileLoader.php b/vendor/symfony/dependency-injection/Loader/YamlFileLoader.php index 48cfde60d..27899f220 100644 --- a/vendor/symfony/dependency-injection/Loader/YamlFileLoader.php +++ b/vendor/symfony/dependency-injection/Loader/YamlFileLoader.php @@ -595,7 +595,7 @@ class YamlFileLoader extends FileLoader * @param string $id A service identifier * @param string $file A parsed file * - * @throws InvalidArgumentException When errors are occuried + * @throws InvalidArgumentException When errors occur * * @return string|array A parsed callable */ diff --git a/vendor/symfony/dependency-injection/ServiceLocator.php b/vendor/symfony/dependency-injection/ServiceLocator.php index bdedc88e8..10c7c9eb6 100644 --- a/vendor/symfony/dependency-injection/ServiceLocator.php +++ b/vendor/symfony/dependency-injection/ServiceLocator.php @@ -94,39 +94,40 @@ class ServiceLocator implements PsrContainerInterface $class = isset($class[2]['object']) ? \get_class($class[2]['object']) : null; $externalId = $this->externalId ?: $class; - $msg = sprintf('Service "%s" not found: ', $id); + $msg = array(); + $msg[] = sprintf('Service "%s" not found:', $id); if (!$this->container) { $class = null; } elseif ($this->container->has($id) || isset($this->container->getRemovedIds()[$id])) { - $msg .= 'even though it exists in the app\'s container, '; + $msg[] = 'even though it exists in the app\'s container,'; } else { try { $this->container->get($id); $class = null; } catch (ServiceNotFoundException $e) { if ($e->getAlternatives()) { - $msg .= sprintf(' did you mean %s? Anyway, ', $this->formatAlternatives($e->getAlternatives(), 'or')); + $msg[] = sprintf('did you mean %s? Anyway,', $this->formatAlternatives($e->getAlternatives(), 'or')); } else { $class = null; } } } if ($externalId) { - $msg .= sprintf('the container inside "%s" is a smaller service locator that %s', $externalId, $this->formatAlternatives()); + $msg[] = sprintf('the container inside "%s" is a smaller service locator that %s', $externalId, $this->formatAlternatives()); } else { - $msg .= sprintf('the current service locator %s', $this->formatAlternatives()); + $msg[] = sprintf('the current service locator %s', $this->formatAlternatives()); } if (!$class) { // no-op } elseif (is_subclass_of($class, ServiceSubscriberInterface::class)) { - $msg .= sprintf(' Unless you need extra laziness, try using dependency injection instead. Otherwise, you need to declare it using "%s::getSubscribedServices()".', preg_replace('/([^\\\\]++\\\\)++/', '', $class)); + $msg[] = sprintf('Unless you need extra laziness, try using dependency injection instead. Otherwise, you need to declare it using "%s::getSubscribedServices()".', preg_replace('/([^\\\\]++\\\\)++/', '', $class)); } else { - $msg .= 'Try using dependency injection instead.'; + $msg[] = 'Try using dependency injection instead.'; } - return $msg; + return implode(' ', $msg); } private function formatAlternatives(array $alternatives = null, $separator = 'and') diff --git a/vendor/symfony/dependency-injection/Tests/Compiler/IntegrationTest.php b/vendor/symfony/dependency-injection/Tests/Compiler/IntegrationTest.php index 09ba6ab45..104b39f13 100644 --- a/vendor/symfony/dependency-injection/Tests/Compiler/IntegrationTest.php +++ b/vendor/symfony/dependency-injection/Tests/Compiler/IntegrationTest.php @@ -17,6 +17,7 @@ use Symfony\Component\DependencyInjection\Alias; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Loader\YamlFileLoader; use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\DependencyInjection\ServiceSubscriberInterface; /** * This class tests the integration of the different compiler passes. @@ -117,6 +118,21 @@ class IntegrationTest extends TestCase $this->assertFalse($container->hasDefinition('c'), 'Service C was not inlined.'); } + public function testCanDecorateServiceSubscriber() + { + $container = new ContainerBuilder(); + $container->register(ServiceSubscriberStub::class) + ->addTag('container.service_subscriber') + ->setPublic(true); + + $container->register(DecoratedServiceSubscriber::class) + ->setDecoratedService(ServiceSubscriberStub::class); + + $container->compile(); + + $this->assertInstanceOf(DecoratedServiceSubscriber::class, $container->get(ServiceSubscriberStub::class)); + } + /** * @dataProvider getYamlCompileTests */ @@ -207,6 +223,18 @@ class IntegrationTest extends TestCase } } +class ServiceSubscriberStub implements ServiceSubscriberInterface +{ + public static function getSubscribedServices() + { + return array(); + } +} + +class DecoratedServiceSubscriber +{ +} + class IntegrationTestStub extends IntegrationTestStubParent { } diff --git a/vendor/symfony/dependency-injection/Tests/Compiler/ResolveBindingsPassTest.php b/vendor/symfony/dependency-injection/Tests/Compiler/ResolveBindingsPassTest.php index d59b95af5..24909e115 100644 --- a/vendor/symfony/dependency-injection/Tests/Compiler/ResolveBindingsPassTest.php +++ b/vendor/symfony/dependency-injection/Tests/Compiler/ResolveBindingsPassTest.php @@ -111,4 +111,22 @@ class ResolveBindingsPassTest extends TestCase $this->assertEquals(array(array('setDefaultLocale', array('fr'))), $definition->getMethodCalls()); } + + public function testOverriddenBindings() + { + $container = new ContainerBuilder(); + + $binding = new BoundArgument('bar'); + + $container->register('foo', 'stdClass') + ->setBindings(array('$foo' => clone $binding)); + $container->register('bar', 'stdClass') + ->setBindings(array('$foo' => clone $binding)); + + $container->register('foo', 'stdClass'); + + (new ResolveBindingsPass())->process($container); + + $this->assertInstanceOf('stdClass', $container->get('foo')); + } } diff --git a/vendor/symfony/dependency-injection/Tests/Compiler/ResolveChildDefinitionsPassTest.php b/vendor/symfony/dependency-injection/Tests/Compiler/ResolveChildDefinitionsPassTest.php index 1575bd7b0..863f2833e 100644 --- a/vendor/symfony/dependency-injection/Tests/Compiler/ResolveChildDefinitionsPassTest.php +++ b/vendor/symfony/dependency-injection/Tests/Compiler/ResolveChildDefinitionsPassTest.php @@ -434,7 +434,7 @@ class ResolveChildDefinitionsPassTest extends TestCase /** * @expectedException \Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException - * @expectedExceptionMessageRegExp /^Circular reference detected for service "c", path: "c -> b -> a -> c"./ + * @expectedExceptionMessageRegExp /^Circular reference detected for service "a", path: "a -> c -> b -> a"./ */ public function testProcessDetectsChildDefinitionIndirectCircularReference() { diff --git a/vendor/symfony/dependency-injection/Tests/Compiler/ResolveNamedArgumentsPassTest.php b/vendor/symfony/dependency-injection/Tests/Compiler/ResolveNamedArgumentsPassTest.php index fe681b41d..17b8ebf31 100644 --- a/vendor/symfony/dependency-injection/Tests/Compiler/ResolveNamedArgumentsPassTest.php +++ b/vendor/symfony/dependency-injection/Tests/Compiler/ResolveNamedArgumentsPassTest.php @@ -16,8 +16,10 @@ use Symfony\Component\DependencyInjection\Compiler\ResolveNamedArgumentsPass; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\DependencyInjection\Tests\Fixtures\CaseSensitiveClass; +use Symfony\Component\DependencyInjection\Tests\Fixtures\FactoryDummyWithoutReturnTypes; use Symfony\Component\DependencyInjection\Tests\Fixtures\NamedArgumentsDummy; use Symfony\Component\DependencyInjection\Tests\Fixtures\SimilarArgumentsDummy; +use Symfony\Component\DependencyInjection\Tests\Fixtures\TestDefinition1; /** * @author Kévin Dunglas @@ -102,6 +104,7 @@ class ResolveNamedArgumentsPassTest extends TestCase /** * @expectedException \Symfony\Component\DependencyInjection\Exception\InvalidArgumentException + * @expectedExceptionMessage Invalid service "Symfony\Component\DependencyInjection\Tests\Fixtures\NamedArgumentsDummy": method "__construct()" has no argument named "$notFound". Check your service definition. */ public function testArgumentNotFound() { @@ -114,6 +117,24 @@ class ResolveNamedArgumentsPassTest extends TestCase $pass->process($container); } + /** + * @expectedException \Symfony\Component\DependencyInjection\Exception\InvalidArgumentException + * @expectedExceptionMessage Invalid service "Symfony\Component\DependencyInjection\Tests\Fixtures\TestDefinition1": method "Symfony\Component\DependencyInjection\Tests\Fixtures\FactoryDummyWithoutReturnTypes::createTestDefinition1()" has no argument named "$notFound". Check your service definition. + */ + public function testCorrectMethodReportedInException() + { + $container = new ContainerBuilder(); + + $container->register(FactoryDummyWithoutReturnTypes::class, FactoryDummyWithoutReturnTypes::class); + + $definition = $container->register(TestDefinition1::class, TestDefinition1::class); + $definition->setFactory(array(FactoryDummyWithoutReturnTypes::class, 'createTestDefinition1')); + $definition->setArguments(array('$notFound' => '123')); + + $pass = new ResolveNamedArgumentsPass(); + $pass->process($container); + } + public function testTypedArgument() { $container = new ContainerBuilder(); diff --git a/vendor/symfony/dependency-injection/Tests/ContainerBuilderTest.php b/vendor/symfony/dependency-injection/Tests/ContainerBuilderTest.php index 7eccb7d74..354b44187 100644 --- a/vendor/symfony/dependency-injection/Tests/ContainerBuilderTest.php +++ b/vendor/symfony/dependency-injection/Tests/ContainerBuilderTest.php @@ -559,7 +559,7 @@ class ContainerBuilderTest extends TestCase $config->setDefinition('baz', new Definition('BazClass')); $config->setAlias('alias_for_foo', 'foo'); $container->merge($config); - $this->assertEquals(array('service_container', 'foo', 'bar', 'baz'), array_keys($container->getDefinitions()), '->merge() merges definitions already defined ones'); + $this->assertEquals(array('foo', 'bar', 'service_container', 'baz'), array_keys($container->getDefinitions()), '->merge() merges definitions already defined ones'); $aliases = $container->getAliases(); $this->assertArrayHasKey('alias_for_foo', $aliases); @@ -1388,6 +1388,8 @@ class ContainerBuilderTest extends TestCase $foo6 = $container->get('foo6'); $this->assertEquals((object) array('bar6' => (object) array()), $foo6); + + $this->assertInstanceOf(\stdClass::class, $container->get('root')); } public function provideAlmostCircular() diff --git a/vendor/symfony/dependency-injection/Tests/Dumper/GraphvizDumperTest.php b/vendor/symfony/dependency-injection/Tests/Dumper/GraphvizDumperTest.php index ffdd0730c..3c40bb550 100644 --- a/vendor/symfony/dependency-injection/Tests/Dumper/GraphvizDumperTest.php +++ b/vendor/symfony/dependency-injection/Tests/Dumper/GraphvizDumperTest.php @@ -13,7 +13,9 @@ namespace Symfony\Component\DependencyInjection\Tests\Dumper; use PHPUnit\Framework\TestCase; use Symfony\Component\DependencyInjection\ContainerBuilder; +use Symfony\Component\DependencyInjection\Definition; use Symfony\Component\DependencyInjection\Dumper\GraphvizDumper; +use Symfony\Component\DependencyInjection\Reference; class GraphvizDumperTest extends TestCase { @@ -32,11 +34,11 @@ class GraphvizDumperTest extends TestCase $container = include self::$fixturesPath.'/containers/container9.php'; $dumper = new GraphvizDumper($container); - $this->assertEquals(str_replace('%path%', __DIR__, file_get_contents(self::$fixturesPath.'/graphviz/services9.dot')), $dumper->dump(), '->dump() dumps services'); + $this->assertStringEqualsFile(self::$fixturesPath.'/graphviz/services9.dot', $dumper->dump(), '->dump() dumps services'); $container = include self::$fixturesPath.'/containers/container10.php'; $dumper = new GraphvizDumper($container); - $this->assertEquals(str_replace('%path%', __DIR__, file_get_contents(self::$fixturesPath.'/graphviz/services10.dot')), $dumper->dump(), '->dump() dumps services'); + $this->assertStringEqualsFile(self::$fixturesPath.'/graphviz/services10.dot', $dumper->dump(), '->dump() dumps services'); $container = include self::$fixturesPath.'/containers/container10.php'; $dumper = new GraphvizDumper($container); @@ -47,21 +49,21 @@ class GraphvizDumperTest extends TestCase 'node.instance' => array('fillcolor' => 'green', 'style' => 'empty'), 'node.definition' => array('fillcolor' => 'grey'), 'node.missing' => array('fillcolor' => 'red', 'style' => 'empty'), - )), str_replace('%path%', __DIR__, file_get_contents(self::$fixturesPath.'/graphviz/services10-1.dot')), '->dump() dumps services'); + )), file_get_contents(self::$fixturesPath.'/graphviz/services10-1.dot'), '->dump() dumps services'); } public function testDumpWithFrozenContainer() { $container = include self::$fixturesPath.'/containers/container13.php'; $dumper = new GraphvizDumper($container); - $this->assertEquals(str_replace('%path%', __DIR__, file_get_contents(self::$fixturesPath.'/graphviz/services13.dot')), $dumper->dump(), '->dump() dumps services'); + $this->assertStringEqualsFile(self::$fixturesPath.'/graphviz/services13.dot', $dumper->dump(), '->dump() dumps services'); } public function testDumpWithFrozenCustomClassContainer() { $container = include self::$fixturesPath.'/containers/container14.php'; $dumper = new GraphvizDumper($container); - $this->assertEquals(str_replace('%path%', __DIR__, file_get_contents(self::$fixturesPath.'/graphviz/services14.dot')), $dumper->dump(), '->dump() dumps services'); + $this->assertStringEqualsFile(self::$fixturesPath.'/graphviz/services14.dot', $dumper->dump(), '->dump() dumps services'); } public function testDumpWithUnresolvedParameter() @@ -69,6 +71,18 @@ class GraphvizDumperTest extends TestCase $container = include self::$fixturesPath.'/containers/container17.php'; $dumper = new GraphvizDumper($container); - $this->assertEquals(str_replace('%path%', __DIR__, file_get_contents(self::$fixturesPath.'/graphviz/services17.dot')), $dumper->dump(), '->dump() dumps services'); + $this->assertStringEqualsFile(self::$fixturesPath.'/graphviz/services17.dot', $dumper->dump(), '->dump() dumps services'); + } + + public function testDumpWithInlineDefinition() + { + $container = new ContainerBuilder(); + $container->register('foo', 'stdClass')->addArgument( + (new Definition('stdClass'))->addArgument(new Reference('bar')) + ); + $container->register('bar', 'stdClass'); + $dumper = new GraphvizDumper($container); + + $this->assertStringEqualsFile(self::$fixturesPath.'/graphviz/services_inline.dot', $dumper->dump(), '->dump() dumps nested references'); } } diff --git a/vendor/symfony/dependency-injection/Tests/Dumper/PhpDumperTest.php b/vendor/symfony/dependency-injection/Tests/Dumper/PhpDumperTest.php index 3ffcf0dc0..60fa55c3b 100644 --- a/vendor/symfony/dependency-injection/Tests/Dumper/PhpDumperTest.php +++ b/vendor/symfony/dependency-injection/Tests/Dumper/PhpDumperTest.php @@ -752,7 +752,7 @@ class PhpDumperTest extends TestCase ->setPublic(false); $container->register('public_foo', 'stdClass') ->setPublic(true) - ->addArgument(new Expression('service("private_foo")')); + ->addArgument(new Expression('service("private_foo").bar')); $container->compile(); $dumper = new PhpDumper($container); @@ -833,6 +833,8 @@ class PhpDumperTest extends TestCase $foo6 = $container->get('foo6'); $this->assertEquals((object) array('bar6' => (object) array()), $foo6); + + $this->assertInstanceOf(\stdClass::class, $container->get('root')); } public function provideAlmostCircular() diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/FactoryDummyWithoutReturnTypes.php b/vendor/symfony/dependency-injection/Tests/Fixtures/FactoryDummyWithoutReturnTypes.php new file mode 100644 index 000000000..f480a668b --- /dev/null +++ b/vendor/symfony/dependency-injection/Tests/Fixtures/FactoryDummyWithoutReturnTypes.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Tests\Fixtures; + +class FactoryDummyWithoutReturnTypes +{ + public function createTestDefinition1() + { + } +} diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/FooForCircularWithAddCalls.php b/vendor/symfony/dependency-injection/Tests/Fixtures/FooForCircularWithAddCalls.php new file mode 100644 index 000000000..a8331dc3e --- /dev/null +++ b/vendor/symfony/dependency-injection/Tests/Fixtures/FooForCircularWithAddCalls.php @@ -0,0 +1,19 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Tests\Fixtures; + +class FooForCircularWithAddCalls +{ + public function call(\stdClass $argument) + { + } +} diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/TestDefinition1.php b/vendor/symfony/dependency-injection/Tests/Fixtures/TestDefinition1.php new file mode 100644 index 000000000..8ec76a9de --- /dev/null +++ b/vendor/symfony/dependency-injection/Tests/Fixtures/TestDefinition1.php @@ -0,0 +1,18 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\DependencyInjection\Tests\Fixtures; + +use Symfony\Component\DependencyInjection\Definition; + +class TestDefinition1 extends Definition +{ +} diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/config/instanceof.expected.yml b/vendor/symfony/dependency-injection/Tests/Fixtures/config/instanceof.expected.yml index b12a30422..9f0bfbba7 100644 --- a/vendor/symfony/dependency-injection/Tests/Fixtures/config/instanceof.expected.yml +++ b/vendor/symfony/dependency-injection/Tests/Fixtures/config/instanceof.expected.yml @@ -4,6 +4,9 @@ services: class: Symfony\Component\DependencyInjection\ContainerInterface public: true synthetic: true + foo: + class: App\FooService + public: true Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Foo: class: Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Foo public: true @@ -16,6 +19,3 @@ services: shared: false configurator: c - foo: - class: App\FooService - public: true diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/config/prototype.expected.yml b/vendor/symfony/dependency-injection/Tests/Fixtures/config/prototype.expected.yml index ebfe087d7..0af4d530a 100644 --- a/vendor/symfony/dependency-injection/Tests/Fixtures/config/prototype.expected.yml +++ b/vendor/symfony/dependency-injection/Tests/Fixtures/config/prototype.expected.yml @@ -4,15 +4,6 @@ services: class: Symfony\Component\DependencyInjection\ContainerInterface public: true synthetic: true - Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Foo: - class: Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Foo - public: true - tags: - - { name: foo } - - { name: baz } - deprecated: '%service_id%' - arguments: [1] - factory: f Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Sub\Bar: class: Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Sub\Bar public: true @@ -23,3 +14,12 @@ services: lazy: true arguments: [1] factory: f + Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Foo: + class: Symfony\Component\DependencyInjection\Tests\Fixtures\Prototype\Foo + public: true + tags: + - { name: foo } + - { name: baz } + deprecated: '%service_id%' + arguments: [1] + factory: f diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container_almost_circular.php b/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container_almost_circular.php index 3286f3d02..4c9906f7a 100644 --- a/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container_almost_circular.php +++ b/vendor/symfony/dependency-injection/Tests/Fixtures/containers/container_almost_circular.php @@ -4,6 +4,7 @@ use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Definition; use Symfony\Component\DependencyInjection\Dumper\PhpDumper; use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\DependencyInjection\Tests\Fixtures\FooForCircularWithAddCalls; $public = 'public' === $visibility; $container = new ContainerBuilder(); @@ -115,4 +116,33 @@ $container->register('baz6', 'stdClass') ->setPublic(true) ->setProperty('bar6', new Reference('bar6')); +// provided by Christian Schiffler + +$container + ->register('root', 'stdClass') + ->setArguments([new Reference('level2'), new Reference('multiuse1')]) + ->setPublic(true); + +$container + ->register('level2', FooForCircularWithAddCalls::class) + ->addMethodCall('call', [new Reference('level3')]); + +$container->register('multiuse1', 'stdClass'); + +$container + ->register('level3', 'stdClass') + ->addArgument(new Reference('level4')); + +$container + ->register('level4', 'stdClass') + ->setArguments([new Reference('multiuse1'), new Reference('level5')]); + +$container + ->register('level5', 'stdClass') + ->addArgument(new Reference('level6')); + +$container + ->register('level6', FooForCircularWithAddCalls::class) + ->addMethodCall('call', [new Reference('level5')]); + return $container; diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/graphviz/services_inline.dot b/vendor/symfony/dependency-injection/Tests/Fixtures/graphviz/services_inline.dot new file mode 100644 index 000000000..b430b186d --- /dev/null +++ b/vendor/symfony/dependency-injection/Tests/Fixtures/graphviz/services_inline.dot @@ -0,0 +1,10 @@ +digraph sc { + ratio="compress" + node [fontsize="11" fontname="Arial" shape="record"]; + edge [fontsize="9" fontname="Arial" color="grey" arrowhead="open" arrowsize="0.5"]; + + node_service_container [label="service_container (Psr\Container\ContainerInterface, Symfony\Component\DependencyInjection\ContainerInterface)\nSymfony\\Component\\DependencyInjection\\ContainerInterface\n", shape=record, fillcolor="#eeeeee", style="filled"]; + node_foo [label="foo\nstdClass\n", shape=record, fillcolor="#eeeeee", style="filled"]; + node_bar [label="bar\nstdClass\n", shape=record, fillcolor="#eeeeee", style="filled"]; + node_foo -> node_bar [label="" style="filled"]; +} diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/ini/types.ini b/vendor/symfony/dependency-injection/Tests/Fixtures/ini/types.ini index 19cc5b3b3..75840907d 100644 --- a/vendor/symfony/dependency-injection/Tests/Fixtures/ini/types.ini +++ b/vendor/symfony/dependency-injection/Tests/Fixtures/ini/types.ini @@ -11,9 +11,10 @@ constant = PHP_VERSION 12 = 12 12_string = '12' + 12_quoted_number = "12" 12_comment = 12 ; comment 12_string_comment = '12' ; comment - 12_string_comment_again = "12" ; comment + 12_quoted_number_comment = "12" ; comment -12 = -12 0 = 0 1 = 1 diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services10.php b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services10.php index a7b43ceef..aa078ab85 100644 --- a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services10.php +++ b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services10.php @@ -115,7 +115,7 @@ class ProjectServiceContainer extends Container /** * Computes a dynamic parameter. * - * @param string The name of the dynamic parameter to load + * @param string $name The name of the dynamic parameter to load * * @return mixed The value of the dynamic parameter * diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services12.php b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services12.php index 9947d36ac..4266ad8e5 100644 --- a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services12.php +++ b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services12.php @@ -122,7 +122,7 @@ class ProjectServiceContainer extends Container /** * Computes a dynamic parameter. * - * @param string The name of the dynamic parameter to load + * @param string $name The name of the dynamic parameter to load * * @return mixed The value of the dynamic parameter * diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services19.php b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services19.php index 1092363fd..c8b57a7cc 100644 --- a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services19.php +++ b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services19.php @@ -132,7 +132,7 @@ class ProjectServiceContainer extends Container /** * Computes a dynamic parameter. * - * @param string The name of the dynamic parameter to load + * @param string $name The name of the dynamic parameter to load * * @return mixed The value of the dynamic parameter * diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services26.php b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services26.php index 16b99007a..d6256008f 100644 --- a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services26.php +++ b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services26.php @@ -138,7 +138,7 @@ class Symfony_DI_PhpDumper_Test_EnvParameters extends Container /** * Computes a dynamic parameter. * - * @param string The name of the dynamic parameter to load + * @param string $name The name of the dynamic parameter to load * * @return mixed The value of the dynamic parameter * diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services8.php b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services8.php index 56e2a98cc..285942eb1 100644 --- a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services8.php +++ b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services8.php @@ -102,7 +102,7 @@ class ProjectServiceContainer extends Container /** * Computes a dynamic parameter. * - * @param string The name of the dynamic parameter to load + * @param string $name The name of the dynamic parameter to load * * @return mixed The value of the dynamic parameter * diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services9.php b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services9.php index ad316b23c..fc04f5fae 100644 --- a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services9.php +++ b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services9.php @@ -126,7 +126,7 @@ class ProjectServiceContainer extends Container { $this->services['configured_service_simple'] = $instance = new \stdClass(); - ${($_ = isset($this->services['configurator_service_simple']) ? $this->services['configurator_service_simple'] : $this->services['configurator_service_simple'] = new \ConfClass('bar')) && false ?: '_'}->configureStdClass($instance); + ${($_ = isset($this->services['configurator_service_simple']) ? $this->services['configurator_service_simple'] : ($this->services['configurator_service_simple'] = new \ConfClass('bar'))) && false ?: '_'}->configureStdClass($instance); return $instance; } diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services9_as_files.txt b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services9_as_files.txt index fa89e0494..fa032cbc1 100644 --- a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services9_as_files.txt +++ b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services9_as_files.txt @@ -158,7 +158,6 @@ use Symfony\Component\DependencyInjection\Argument\RewindableGenerator; $this->services['foo_with_inline'] = $instance = new \Foo(); $a = new \Bar(); - $a->pub = 'pub'; $a->setBaz(${($_ = isset($this->services['baz']) ? $this->services['baz'] : $this->load('getBazService.php')) && false ?: '_'}); @@ -244,7 +243,7 @@ use Symfony\Component\DependencyInjection\Argument\RewindableGenerator; return $this->services['tagged_iterator'] = new \Bar(new RewindableGenerator(function () { yield 0 => ${($_ = isset($this->services['foo']) ? $this->services['foo'] : $this->load('getFooService.php')) && false ?: '_'}; - yield 1 => ${($_ = isset($this->services['tagged_iterator_foo']) ? $this->services['tagged_iterator_foo'] : $this->services['tagged_iterator_foo'] = new \Bar()) && false ?: '_'}; + yield 1 => ${($_ = isset($this->services['tagged_iterator_foo']) ? $this->services['tagged_iterator_foo'] : ($this->services['tagged_iterator_foo'] = new \Bar())) && false ?: '_'}; }, 2)); [Container%s/getTaggedIteratorFooService.php] => services['foo_with_inline'] = $instance = new \Foo(); $a = new \Bar(); - $a->pub = 'pub'; $a->setBaz(${($_ = isset($this->services['baz']) ? $this->services['baz'] : $this->getBazService()) && false ?: '_'}); @@ -356,7 +355,7 @@ class ProjectServiceContainer extends Container { return $this->services['tagged_iterator'] = new \Bar(new RewindableGenerator(function () { yield 0 => ${($_ = isset($this->services['foo']) ? $this->services['foo'] : $this->getFooService()) && false ?: '_'}; - yield 1 => ${($_ = isset($this->services['tagged_iterator_foo']) ? $this->services['tagged_iterator_foo'] : $this->services['tagged_iterator_foo'] = new \Bar()) && false ?: '_'}; + yield 1 => ${($_ = isset($this->services['tagged_iterator_foo']) ? $this->services['tagged_iterator_foo'] : ($this->services['tagged_iterator_foo'] = new \Bar())) && false ?: '_'}; }, 2)); } @@ -433,7 +432,7 @@ class ProjectServiceContainer extends Container /** * Computes a dynamic parameter. * - * @param string The name of the dynamic parameter to load + * @param string $name The name of the dynamic parameter to load * * @return mixed The value of the dynamic parameter * diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_adawson.php b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_adawson.php index 8e9e65ad9..37b95567c 100644 --- a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_adawson.php +++ b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_adawson.php @@ -133,7 +133,13 @@ class ProjectServiceContainer extends Container */ protected function getHandler2Service() { - return $this->services['App\Handler2'] = new \App\Handler2(${($_ = isset($this->services['App\Db']) ? $this->services['App\Db'] : $this->getDbService()) && false ?: '_'}, ${($_ = isset($this->services['App\Schema']) ? $this->services['App\Schema'] : $this->getSchemaService()) && false ?: '_'}, ${($_ = isset($this->services['App\Processor']) ? $this->services['App\Processor'] : $this->getProcessorService()) && false ?: '_'}); + $a = ${($_ = isset($this->services['App\Processor']) ? $this->services['App\Processor'] : $this->getProcessorService()) && false ?: '_'}; + + if (isset($this->services['App\Handler2'])) { + return $this->services['App\Handler2']; + } + + return $this->services['App\Handler2'] = new \App\Handler2(${($_ = isset($this->services['App\Db']) ? $this->services['App\Db'] : $this->getDbService()) && false ?: '_'}, ${($_ = isset($this->services['App\Schema']) ? $this->services['App\Schema'] : $this->getSchemaService()) && false ?: '_'}, $a); } /** diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_almost_circular_private.php b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_almost_circular_private.php index 882f22843..8aa4a2c40 100644 --- a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_almost_circular_private.php +++ b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_almost_circular_private.php @@ -34,13 +34,26 @@ class Symfony_DI_PhpDumper_Test_Almost_Circular_Private extends Container 'foo5' => 'getFoo5Service', 'foo6' => 'getFoo6Service', 'foobar4' => 'getFoobar4Service', + 'level2' => 'getLevel2Service', + 'level3' => 'getLevel3Service', + 'level4' => 'getLevel4Service', + 'level5' => 'getLevel5Service', + 'level6' => 'getLevel6Service', 'logger' => 'getLoggerService', 'manager' => 'getManagerService', 'manager2' => 'getManager2Service', + 'multiuse1' => 'getMultiuse1Service', + 'root' => 'getRootService', 'subscriber' => 'getSubscriberService', ); $this->privates = array( 'bar6' => true, + 'level2' => true, + 'level3' => true, + 'level4' => true, + 'level5' => true, + 'level6' => true, + 'multiuse1' => true, ); $this->aliases = array(); @@ -62,7 +75,13 @@ class Symfony_DI_PhpDumper_Test_Almost_Circular_Private extends Container 'foobar' => true, 'foobar2' => true, 'foobar3' => true, + 'level2' => true, + 'level3' => true, + 'level4' => true, + 'level5' => true, + 'level6' => true, 'logger2' => true, + 'multiuse1' => true, 'subscriber2' => true, ); } @@ -141,10 +160,10 @@ class Symfony_DI_PhpDumper_Test_Almost_Circular_Private extends Container $this->services['connection'] = $instance = new \stdClass($a, $b); - $a->subscriber = ${($_ = isset($this->services['subscriber']) ? $this->services['subscriber'] : $this->getSubscriberService()) && false ?: '_'}; - $b->logger = ${($_ = isset($this->services['logger']) ? $this->services['logger'] : $this->getLoggerService()) && false ?: '_'}; + $a->subscriber = ${($_ = isset($this->services['subscriber']) ? $this->services['subscriber'] : $this->getSubscriberService()) && false ?: '_'}; + return $instance; } @@ -157,19 +176,19 @@ class Symfony_DI_PhpDumper_Test_Almost_Circular_Private extends Container { $a = new \stdClass(); - $c = new \stdClass(); + $b = new \stdClass(); - $this->services['connection2'] = $instance = new \stdClass($a, $c); + $this->services['connection2'] = $instance = new \stdClass($a, $b); - $b = ${($_ = isset($this->services['manager2']) ? $this->services['manager2'] : $this->getManager2Service()) && false ?: '_'}; + $c = new \stdClass($instance); - $a->subscriber2 = new \stdClass($b); + $d = ${($_ = isset($this->services['manager2']) ? $this->services['manager2'] : $this->getManager2Service()) && false ?: '_'}; - $d = new \stdClass($instance); + $c->handler2 = new \stdClass($d); - $d->handler2 = new \stdClass($b); + $b->logger2 = $c; - $c->logger2 = $d; + $a->subscriber2 = new \stdClass($d); return $instance; } @@ -216,7 +235,6 @@ class Symfony_DI_PhpDumper_Test_Almost_Circular_Private extends Container $this->services['foo5'] = $instance = new \stdClass(); $a = new \stdClass($instance); - $a->foo = $instance; $instance->bar = $a; @@ -306,6 +324,16 @@ class Symfony_DI_PhpDumper_Test_Almost_Circular_Private extends Container return $this->services['manager2'] = new \stdClass($a); } + /** + * Gets the public 'root' shared service. + * + * @return \stdClass + */ + protected function getRootService() + { + return $this->services['root'] = new \stdClass(${($_ = isset($this->services['level2']) ? $this->services['level2'] : $this->getLevel2Service()) && false ?: '_'}, ${($_ = isset($this->services['multiuse1']) ? $this->services['multiuse1'] : ($this->services['multiuse1'] = new \stdClass())) && false ?: '_'}); + } + /** * Gets the public 'subscriber' shared service. * @@ -337,4 +365,78 @@ class Symfony_DI_PhpDumper_Test_Almost_Circular_Private extends Container return $this->services['bar6'] = new \stdClass($a); } + + /** + * Gets the private 'level2' shared service. + * + * @return \Symfony\Component\DependencyInjection\Tests\Fixtures\FooForCircularWithAddCalls + */ + protected function getLevel2Service() + { + $this->services['level2'] = $instance = new \Symfony\Component\DependencyInjection\Tests\Fixtures\FooForCircularWithAddCalls(); + + $instance->call(${($_ = isset($this->services['level3']) ? $this->services['level3'] : $this->getLevel3Service()) && false ?: '_'}); + + return $instance; + } + + /** + * Gets the private 'level3' shared service. + * + * @return \stdClass + */ + protected function getLevel3Service() + { + return $this->services['level3'] = new \stdClass(${($_ = isset($this->services['level4']) ? $this->services['level4'] : $this->getLevel4Service()) && false ?: '_'}); + } + + /** + * Gets the private 'level4' shared service. + * + * @return \stdClass + */ + protected function getLevel4Service() + { + return $this->services['level4'] = new \stdClass(${($_ = isset($this->services['multiuse1']) ? $this->services['multiuse1'] : ($this->services['multiuse1'] = new \stdClass())) && false ?: '_'}, ${($_ = isset($this->services['level5']) ? $this->services['level5'] : $this->getLevel5Service()) && false ?: '_'}); + } + + /** + * Gets the private 'level5' shared service. + * + * @return \stdClass + */ + protected function getLevel5Service() + { + $a = ${($_ = isset($this->services['level6']) ? $this->services['level6'] : $this->getLevel6Service()) && false ?: '_'}; + + if (isset($this->services['level5'])) { + return $this->services['level5']; + } + + return $this->services['level5'] = new \stdClass($a); + } + + /** + * Gets the private 'level6' shared service. + * + * @return \Symfony\Component\DependencyInjection\Tests\Fixtures\FooForCircularWithAddCalls + */ + protected function getLevel6Service() + { + $this->services['level6'] = $instance = new \Symfony\Component\DependencyInjection\Tests\Fixtures\FooForCircularWithAddCalls(); + + $instance->call(${($_ = isset($this->services['level5']) ? $this->services['level5'] : $this->getLevel5Service()) && false ?: '_'}); + + return $instance; + } + + /** + * Gets the private 'multiuse1' shared service. + * + * @return \stdClass + */ + protected function getMultiuse1Service() + { + return $this->services['multiuse1'] = new \stdClass(); + } } diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_almost_circular_public.php b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_almost_circular_public.php index 573cc9bef..a5de37f12 100644 --- a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_almost_circular_public.php +++ b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_almost_circular_public.php @@ -41,13 +41,26 @@ class Symfony_DI_PhpDumper_Test_Almost_Circular_Public extends Container 'foobar2' => 'getFoobar2Service', 'foobar3' => 'getFoobar3Service', 'foobar4' => 'getFoobar4Service', + 'level2' => 'getLevel2Service', + 'level3' => 'getLevel3Service', + 'level4' => 'getLevel4Service', + 'level5' => 'getLevel5Service', + 'level6' => 'getLevel6Service', 'logger' => 'getLoggerService', 'manager' => 'getManagerService', 'manager2' => 'getManager2Service', + 'multiuse1' => 'getMultiuse1Service', + 'root' => 'getRootService', 'subscriber' => 'getSubscriberService', ); $this->privates = array( 'bar6' => true, + 'level2' => true, + 'level3' => true, + 'level4' => true, + 'level5' => true, + 'level6' => true, + 'multiuse1' => true, ); $this->aliases = array(); @@ -62,7 +75,13 @@ class Symfony_DI_PhpDumper_Test_Almost_Circular_Public extends Container 'bar6' => true, 'config' => true, 'config2' => true, + 'level2' => true, + 'level3' => true, + 'level4' => true, + 'level5' => true, + 'level6' => true, 'logger2' => true, + 'multiuse1' => true, 'subscriber2' => true, ); } @@ -107,7 +126,7 @@ class Symfony_DI_PhpDumper_Test_Almost_Circular_Public extends Container { $this->services['bar3'] = $instance = new \BarCircular(); - $a = ${($_ = isset($this->services['foobar3']) ? $this->services['foobar3'] : $this->services['foobar3'] = new \FoobarCircular()) && false ?: '_'}; + $a = ${($_ = isset($this->services['foobar3']) ? $this->services['foobar3'] : ($this->services['foobar3'] = new \FoobarCircular())) && false ?: '_'}; $instance->addFoobar($a, $a); @@ -155,11 +174,16 @@ class Symfony_DI_PhpDumper_Test_Almost_Circular_Public extends Container */ protected function getConnectionService() { - $a = new \stdClass(); + $a = ${($_ = isset($this->services['dispatcher']) ? $this->services['dispatcher'] : $this->getDispatcherService()) && false ?: '_'}; - $this->services['connection'] = $instance = new \stdClass(${($_ = isset($this->services['dispatcher']) ? $this->services['dispatcher'] : $this->getDispatcherService()) && false ?: '_'}, $a); + if (isset($this->services['connection'])) { + return $this->services['connection']; + } + $b = new \stdClass(); - $a->logger = ${($_ = isset($this->services['logger']) ? $this->services['logger'] : $this->getLoggerService()) && false ?: '_'}; + $this->services['connection'] = $instance = new \stdClass($a, $b); + + $b->logger = ${($_ = isset($this->services['logger']) ? $this->services['logger'] : $this->getLoggerService()) && false ?: '_'}; return $instance; } @@ -171,15 +195,19 @@ class Symfony_DI_PhpDumper_Test_Almost_Circular_Public extends Container */ protected function getConnection2Service() { - $a = new \stdClass(); + $a = ${($_ = isset($this->services['dispatcher2']) ? $this->services['dispatcher2'] : $this->getDispatcher2Service()) && false ?: '_'}; - $this->services['connection2'] = $instance = new \stdClass(${($_ = isset($this->services['dispatcher2']) ? $this->services['dispatcher2'] : $this->getDispatcher2Service()) && false ?: '_'}, $a); + if (isset($this->services['connection2'])) { + return $this->services['connection2']; + } + $b = new \stdClass(); - $b = new \stdClass($instance); + $this->services['connection2'] = $instance = new \stdClass($a, $b); - $b->handler2 = new \stdClass(${($_ = isset($this->services['manager2']) ? $this->services['manager2'] : $this->getManager2Service()) && false ?: '_'}); + $c = new \stdClass($instance); + $c->handler2 = new \stdClass(${($_ = isset($this->services['manager2']) ? $this->services['manager2'] : $this->getManager2Service()) && false ?: '_'}); - $a->logger2 = $b; + $b->logger2 = $c; return $instance; } @@ -396,6 +424,16 @@ class Symfony_DI_PhpDumper_Test_Almost_Circular_Public extends Container return $this->services['manager2'] = new \stdClass($a); } + /** + * Gets the public 'root' shared service. + * + * @return \stdClass + */ + protected function getRootService() + { + return $this->services['root'] = new \stdClass(${($_ = isset($this->services['level2']) ? $this->services['level2'] : $this->getLevel2Service()) && false ?: '_'}, ${($_ = isset($this->services['multiuse1']) ? $this->services['multiuse1'] : ($this->services['multiuse1'] = new \stdClass())) && false ?: '_'}); + } + /** * Gets the public 'subscriber' shared service. * @@ -403,7 +441,13 @@ class Symfony_DI_PhpDumper_Test_Almost_Circular_Public extends Container */ protected function getSubscriberService() { - return $this->services['subscriber'] = new \stdClass(${($_ = isset($this->services['manager']) ? $this->services['manager'] : $this->getManagerService()) && false ?: '_'}); + $a = ${($_ = isset($this->services['manager']) ? $this->services['manager'] : $this->getManagerService()) && false ?: '_'}; + + if (isset($this->services['subscriber'])) { + return $this->services['subscriber']; + } + + return $this->services['subscriber'] = new \stdClass($a); } /** @@ -421,4 +465,78 @@ class Symfony_DI_PhpDumper_Test_Almost_Circular_Public extends Container return $this->services['bar6'] = new \stdClass($a); } + + /** + * Gets the private 'level2' shared service. + * + * @return \Symfony\Component\DependencyInjection\Tests\Fixtures\FooForCircularWithAddCalls + */ + protected function getLevel2Service() + { + $this->services['level2'] = $instance = new \Symfony\Component\DependencyInjection\Tests\Fixtures\FooForCircularWithAddCalls(); + + $instance->call(${($_ = isset($this->services['level3']) ? $this->services['level3'] : $this->getLevel3Service()) && false ?: '_'}); + + return $instance; + } + + /** + * Gets the private 'level3' shared service. + * + * @return \stdClass + */ + protected function getLevel3Service() + { + return $this->services['level3'] = new \stdClass(${($_ = isset($this->services['level4']) ? $this->services['level4'] : $this->getLevel4Service()) && false ?: '_'}); + } + + /** + * Gets the private 'level4' shared service. + * + * @return \stdClass + */ + protected function getLevel4Service() + { + return $this->services['level4'] = new \stdClass(${($_ = isset($this->services['multiuse1']) ? $this->services['multiuse1'] : ($this->services['multiuse1'] = new \stdClass())) && false ?: '_'}, ${($_ = isset($this->services['level5']) ? $this->services['level5'] : $this->getLevel5Service()) && false ?: '_'}); + } + + /** + * Gets the private 'level5' shared service. + * + * @return \stdClass + */ + protected function getLevel5Service() + { + $a = ${($_ = isset($this->services['level6']) ? $this->services['level6'] : $this->getLevel6Service()) && false ?: '_'}; + + if (isset($this->services['level5'])) { + return $this->services['level5']; + } + + return $this->services['level5'] = new \stdClass($a); + } + + /** + * Gets the private 'level6' shared service. + * + * @return \Symfony\Component\DependencyInjection\Tests\Fixtures\FooForCircularWithAddCalls + */ + protected function getLevel6Service() + { + $this->services['level6'] = $instance = new \Symfony\Component\DependencyInjection\Tests\Fixtures\FooForCircularWithAddCalls(); + + $instance->call(${($_ = isset($this->services['level5']) ? $this->services['level5'] : $this->getLevel5Service()) && false ?: '_'}); + + return $instance; + } + + /** + * Gets the private 'multiuse1' shared service. + * + * @return \stdClass + */ + protected function getMultiuse1Service() + { + return $this->services['multiuse1'] = new \stdClass(); + } } diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_array_params.php b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_array_params.php index 4776d98c3..5ef6cb688 100644 --- a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_array_params.php +++ b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_array_params.php @@ -125,7 +125,7 @@ class ProjectServiceContainer extends Container /** * Computes a dynamic parameter. * - * @param string The name of the dynamic parameter to load + * @param string $name The name of the dynamic parameter to load * * @return mixed The value of the dynamic parameter * diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_base64_env.php b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_base64_env.php index f1b92397d..6b6be9569 100644 --- a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_base64_env.php +++ b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_base64_env.php @@ -104,7 +104,7 @@ class Symfony_DI_PhpDumper_Test_Base64Parameters extends Container /** * Computes a dynamic parameter. * - * @param string The name of the dynamic parameter to load + * @param string $name The name of the dynamic parameter to load * * @return mixed The value of the dynamic parameter * diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_deep_graph.php b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_deep_graph.php index 03441e6a4..9a1d1ab8c 100644 --- a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_deep_graph.php +++ b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_deep_graph.php @@ -81,8 +81,8 @@ class Symfony_DI_PhpDumper_Test_Deep_Graph extends Container if (isset($this->services['foo'])) { return $this->services['foo']; } - $b = new \stdClass(); + $c = new \stdClass(); $c->p3 = new \stdClass(); diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_env_in_id.php b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_env_in_id.php index 6bc714a20..dab23e1db 100644 --- a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_env_in_id.php +++ b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_env_in_id.php @@ -73,7 +73,7 @@ class ProjectServiceContainer extends Container */ protected function getBarService() { - return $this->services['bar'] = new \stdClass(${($_ = isset($this->services['bar_%env(BAR)%']) ? $this->services['bar_%env(BAR)%'] : $this->services['bar_%env(BAR)%'] = new \stdClass()) && false ?: '_'}); + return $this->services['bar'] = new \stdClass(${($_ = isset($this->services['bar_%env(BAR)%']) ? $this->services['bar_%env(BAR)%'] : ($this->services['bar_%env(BAR)%'] = new \stdClass())) && false ?: '_'}); } /** @@ -83,7 +83,7 @@ class ProjectServiceContainer extends Container */ protected function getFooService() { - return $this->services['foo'] = new \stdClass(${($_ = isset($this->services['bar_%env(BAR)%']) ? $this->services['bar_%env(BAR)%'] : $this->services['bar_%env(BAR)%'] = new \stdClass()) && false ?: '_'}, array('baz_'.$this->getEnv('string:BAR') => new \stdClass())); + return $this->services['foo'] = new \stdClass(${($_ = isset($this->services['bar_%env(BAR)%']) ? $this->services['bar_%env(BAR)%'] : ($this->services['bar_%env(BAR)%'] = new \stdClass())) && false ?: '_'}, array('baz_'.$this->getEnv('string:BAR') => new \stdClass())); } /** @@ -145,7 +145,7 @@ class ProjectServiceContainer extends Container /** * Computes a dynamic parameter. * - * @param string The name of the dynamic parameter to load + * @param string $name The name of the dynamic parameter to load * * @return mixed The value of the dynamic parameter * diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_inline_requires.php b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_inline_requires.php index 2db58bdda..c6927eb95 100644 --- a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_inline_requires.php +++ b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_inline_requires.php @@ -110,7 +110,7 @@ class ProjectServiceContainer extends Container include_once $this->targetDirs[1].'/includes/HotPath/C2.php'; include_once $this->targetDirs[1].'/includes/HotPath/C3.php'; - return $this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C2'] = new \Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C2(${($_ = isset($this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C3']) ? $this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C3'] : $this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C3'] = new \Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C3()) && false ?: '_'}); + return $this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C2'] = new \Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C2(${($_ = isset($this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C3']) ? $this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C3'] : ($this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C3'] = new \Symfony\Component\DependencyInjection\Tests\Fixtures\includes\HotPath\C3())) && false ?: '_'}); } /** @@ -174,7 +174,7 @@ class ProjectServiceContainer extends Container /** * Computes a dynamic parameter. * - * @param string The name of the dynamic parameter to load + * @param string $name The name of the dynamic parameter to load * * @return mixed The value of the dynamic parameter * diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_inline_self_ref.php b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_inline_self_ref.php index 5cb1002fe..fa8a4e690 100644 --- a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_inline_self_ref.php +++ b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_inline_self_ref.php @@ -64,14 +64,14 @@ class Symfony_DI_PhpDumper_Test_Inline_Self_Ref extends Container */ protected function getFooService() { - $b = new \App\Bar(); - $a = new \App\Baz($b); + $a = new \App\Bar(); - $this->services['App\Foo'] = $instance = new \App\Foo($a); + $b = new \App\Baz($a); + $b->bar = $a; - $b->foo = $instance; + $this->services['App\Foo'] = $instance = new \App\Foo($b); - $a->bar = $b; + $a->foo = $instance; return $instance; } diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_legacy_privates.php b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_legacy_privates.php index 7aa1bff87..d720ae396 100644 --- a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_legacy_privates.php +++ b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_legacy_privates.php @@ -98,7 +98,7 @@ class Symfony_DI_PhpDumper_Test_Legacy_Privates extends Container */ protected function getBarService() { - return $this->services['bar'] = new \stdClass(${($_ = isset($this->services['private_not_inlined']) ? $this->services['private_not_inlined'] : $this->services['private_not_inlined'] = new \stdClass()) && false ?: '_'}); + return $this->services['bar'] = new \stdClass(${($_ = isset($this->services['private_not_inlined']) ? $this->services['private_not_inlined'] : ($this->services['private_not_inlined'] = new \stdClass())) && false ?: '_'}); } /** diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_locator.php b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_locator.php index 496f6aa77..c436aea40 100644 --- a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_locator.php +++ b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_locator.php @@ -76,7 +76,7 @@ class ProjectServiceContainer extends Container */ protected function getBarServiceService() { - return $this->services['bar_service'] = new \stdClass(${($_ = isset($this->services['baz_service']) ? $this->services['baz_service'] : $this->services['baz_service'] = new \stdClass()) && false ?: '_'}); + return $this->services['bar_service'] = new \stdClass(${($_ = isset($this->services['baz_service']) ? $this->services['baz_service'] : ($this->services['baz_service'] = new \stdClass())) && false ?: '_'}); } /** @@ -89,7 +89,7 @@ class ProjectServiceContainer extends Container return $this->services['foo_service'] = new \Symfony\Component\DependencyInjection\ServiceLocator(array('bar' => function () { return ${($_ = isset($this->services['bar_service']) ? $this->services['bar_service'] : $this->getBarServiceService()) && false ?: '_'}; }, 'baz' => function () { - $f = function (\stdClass $v) { return $v; }; return $f(${($_ = isset($this->services['baz_service']) ? $this->services['baz_service'] : $this->services['baz_service'] = new \stdClass()) && false ?: '_'}); + $f = function (\stdClass $v) { return $v; }; return $f(${($_ = isset($this->services['baz_service']) ? $this->services['baz_service'] : ($this->services['baz_service'] = new \stdClass())) && false ?: '_'}); }, 'nil' => function () { return NULL; })); @@ -133,7 +133,7 @@ class ProjectServiceContainer extends Container protected function getTranslator1Service() { return $this->services['translator_1'] = new \Symfony\Component\DependencyInjection\Tests\Fixtures\StubbedTranslator(new \Symfony\Component\DependencyInjection\ServiceLocator(array('translator.loader_1' => function () { - return ${($_ = isset($this->services['translator.loader_1']) ? $this->services['translator.loader_1'] : $this->services['translator.loader_1'] = new \stdClass()) && false ?: '_'}; + return ${($_ = isset($this->services['translator.loader_1']) ? $this->services['translator.loader_1'] : ($this->services['translator.loader_1'] = new \stdClass())) && false ?: '_'}; }))); } @@ -145,10 +145,10 @@ class ProjectServiceContainer extends Container protected function getTranslator2Service() { $this->services['translator_2'] = $instance = new \Symfony\Component\DependencyInjection\Tests\Fixtures\StubbedTranslator(new \Symfony\Component\DependencyInjection\ServiceLocator(array('translator.loader_2' => function () { - return ${($_ = isset($this->services['translator.loader_2']) ? $this->services['translator.loader_2'] : $this->services['translator.loader_2'] = new \stdClass()) && false ?: '_'}; + return ${($_ = isset($this->services['translator.loader_2']) ? $this->services['translator.loader_2'] : ($this->services['translator.loader_2'] = new \stdClass())) && false ?: '_'}; }))); - $instance->addResource('db', ${($_ = isset($this->services['translator.loader_2']) ? $this->services['translator.loader_2'] : $this->services['translator.loader_2'] = new \stdClass()) && false ?: '_'}, 'nl'); + $instance->addResource('db', ${($_ = isset($this->services['translator.loader_2']) ? $this->services['translator.loader_2'] : ($this->services['translator.loader_2'] = new \stdClass())) && false ?: '_'}, 'nl'); return $instance; } @@ -161,10 +161,10 @@ class ProjectServiceContainer extends Container protected function getTranslator3Service() { $this->services['translator_3'] = $instance = new \Symfony\Component\DependencyInjection\Tests\Fixtures\StubbedTranslator(new \Symfony\Component\DependencyInjection\ServiceLocator(array('translator.loader_3' => function () { - return ${($_ = isset($this->services['translator.loader_3']) ? $this->services['translator.loader_3'] : $this->services['translator.loader_3'] = new \stdClass()) && false ?: '_'}; + return ${($_ = isset($this->services['translator.loader_3']) ? $this->services['translator.loader_3'] : ($this->services['translator.loader_3'] = new \stdClass())) && false ?: '_'}; }))); - $a = ${($_ = isset($this->services['translator.loader_3']) ? $this->services['translator.loader_3'] : $this->services['translator.loader_3'] = new \stdClass()) && false ?: '_'}; + $a = ${($_ = isset($this->services['translator.loader_3']) ? $this->services['translator.loader_3'] : ($this->services['translator.loader_3'] = new \stdClass())) && false ?: '_'}; $instance->addResource('db', $a, 'nl'); $instance->addResource('db', $a, 'en'); diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_private_frozen.php b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_private_frozen.php index 1275e9f26..8ef589c12 100644 --- a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_private_frozen.php +++ b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_private_frozen.php @@ -67,7 +67,7 @@ class ProjectServiceContainer extends Container */ protected function getBarServiceService() { - return $this->services['bar_service'] = new \stdClass(${($_ = isset($this->services['baz_service']) ? $this->services['baz_service'] : $this->services['baz_service'] = new \stdClass()) && false ?: '_'}); + return $this->services['bar_service'] = new \stdClass(${($_ = isset($this->services['baz_service']) ? $this->services['baz_service'] : ($this->services['baz_service'] = new \stdClass())) && false ?: '_'}); } /** @@ -77,7 +77,7 @@ class ProjectServiceContainer extends Container */ protected function getFooServiceService() { - return $this->services['foo_service'] = new \stdClass(${($_ = isset($this->services['baz_service']) ? $this->services['baz_service'] : $this->services['baz_service'] = new \stdClass()) && false ?: '_'}); + return $this->services['foo_service'] = new \stdClass(${($_ = isset($this->services['baz_service']) ? $this->services['baz_service'] : ($this->services['baz_service'] = new \stdClass())) && false ?: '_'}); } /** diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_private_in_expression.php b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_private_in_expression.php index fe84f4975..75cbc2730 100644 --- a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_private_in_expression.php +++ b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_private_in_expression.php @@ -67,7 +67,7 @@ class ProjectServiceContainer extends Container */ protected function getPublicFooService() { - return $this->services['public_foo'] = new \stdClass(${($_ = isset($this->services['private_foo']) ? $this->services['private_foo'] : $this->services['private_foo'] = new \stdClass()) && false ?: '_'}); + return $this->services['public_foo'] = new \stdClass(${($_ = isset($this->services['private_foo']) ? $this->services['private_foo'] : ($this->services['private_foo'] = new \stdClass())) && false ?: '_'}->bar); } /** diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_rot13_env.php b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_rot13_env.php index aab87ec7a..efbb00231 100644 --- a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_rot13_env.php +++ b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_rot13_env.php @@ -78,7 +78,7 @@ class Symfony_DI_PhpDumper_Test_Rot13Parameters extends Container protected function getContainer_EnvVarProcessorsLocatorService() { return $this->services['container.env_var_processors_locator'] = new \Symfony\Component\DependencyInjection\ServiceLocator(array('rot13' => function () { - return ${($_ = isset($this->services['Symfony\Component\DependencyInjection\Tests\Dumper\Rot13EnvVarProcessor']) ? $this->services['Symfony\Component\DependencyInjection\Tests\Dumper\Rot13EnvVarProcessor'] : $this->services['Symfony\Component\DependencyInjection\Tests\Dumper\Rot13EnvVarProcessor'] = new \Symfony\Component\DependencyInjection\Tests\Dumper\Rot13EnvVarProcessor()) && false ?: '_'}; + return ${($_ = isset($this->services['Symfony\Component\DependencyInjection\Tests\Dumper\Rot13EnvVarProcessor']) ? $this->services['Symfony\Component\DependencyInjection\Tests\Dumper\Rot13EnvVarProcessor'] : ($this->services['Symfony\Component\DependencyInjection\Tests\Dumper\Rot13EnvVarProcessor'] = new \Symfony\Component\DependencyInjection\Tests\Dumper\Rot13EnvVarProcessor())) && false ?: '_'}; })); } @@ -133,7 +133,7 @@ class Symfony_DI_PhpDumper_Test_Rot13Parameters extends Container /** * Computes a dynamic parameter. * - * @param string The name of the dynamic parameter to load + * @param string $name The name of the dynamic parameter to load * * @return mixed The value of the dynamic parameter * diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_subscriber.php b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_subscriber.php index 9475c9230..8f198f0ba 100644 --- a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_subscriber.php +++ b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_subscriber.php @@ -84,13 +84,13 @@ class ProjectServiceContainer extends Container protected function getFooServiceService() { return $this->services['foo_service'] = new \Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber((new \Symfony\Component\DependencyInjection\ServiceLocator(array('Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\CustomDefinition' => function () { - $f = function (\Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition $v = null) { return $v; }; return $f(${($_ = isset($this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition']) ? $this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition'] : $this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition'] = new \Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition()) && false ?: '_'}); + $f = function (\Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition $v = null) { return $v; }; return $f(${($_ = isset($this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition']) ? $this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition'] : ($this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition'] = new \Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition())) && false ?: '_'}); }, 'Symfony\\Component\\DependencyInjection\\Tests\\Fixtures\\TestServiceSubscriber' => function () { - $f = function (\Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber $v) { return $v; }; return $f(${($_ = isset($this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber']) ? $this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber'] : $this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber'] = new \Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber()) && false ?: '_'}); + $f = function (\Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber $v) { return $v; }; return $f(${($_ = isset($this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber']) ? $this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber'] : ($this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber'] = new \Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber())) && false ?: '_'}); }, 'bar' => function () { - $f = function (\Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition $v) { return $v; }; return $f(${($_ = isset($this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber']) ? $this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber'] : $this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber'] = new \Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber()) && false ?: '_'}); + $f = function (\Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition $v) { return $v; }; return $f(${($_ = isset($this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber']) ? $this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber'] : ($this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber'] = new \Symfony\Component\DependencyInjection\Tests\Fixtures\TestServiceSubscriber())) && false ?: '_'}); }, 'baz' => function () { - $f = function (\Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition $v = null) { return $v; }; return $f(${($_ = isset($this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition']) ? $this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition'] : $this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition'] = new \Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition()) && false ?: '_'}); + $f = function (\Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition $v = null) { return $v; }; return $f(${($_ = isset($this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition']) ? $this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition'] : ($this->services['Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition'] = new \Symfony\Component\DependencyInjection\Tests\Fixtures\CustomDefinition())) && false ?: '_'}); })))->withContext('foo_service', $this)); } diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_tsantos.php b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_tsantos.php index c8b3f9d50..dbaa70956 100644 --- a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_tsantos.php +++ b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_tsantos.php @@ -67,22 +67,20 @@ class ProjectServiceContainer extends Container { $a = new \TSantos\Serializer\NormalizerRegistry(); - $d = new \TSantos\Serializer\EventDispatcher\EventDispatcher(); - $d->addSubscriber(new \TSantos\SerializerBundle\EventListener\StopwatchListener(new \Symfony\Component\Stopwatch\Stopwatch(true))); - - $this->services['tsantos_serializer'] = $instance = new \TSantos\Serializer\EventEmitterSerializer(new \TSantos\Serializer\Encoder\JsonEncoder(), $a, $d); - $b = new \TSantos\Serializer\Normalizer\CollectionNormalizer(); + $c = new \TSantos\Serializer\EventDispatcher\EventDispatcher(); + $c->addSubscriber(new \TSantos\SerializerBundle\EventListener\StopwatchListener(new \Symfony\Component\Stopwatch\Stopwatch(true))); + + $this->services['tsantos_serializer'] = $instance = new \TSantos\Serializer\EventEmitterSerializer(new \TSantos\Serializer\Encoder\JsonEncoder(), $a, $c); + $b->setSerializer($instance); - - $c = new \TSantos\Serializer\Normalizer\JsonNormalizer(); - - $c->setSerializer($instance); + $d = new \TSantos\Serializer\Normalizer\JsonNormalizer(); + $d->setSerializer($instance); $a->add(new \TSantos\Serializer\Normalizer\ObjectNormalizer(new \TSantos\SerializerBundle\Serializer\CircularReferenceHandler())); $a->add($b); - $a->add($c); + $a->add($d); return $instance; } diff --git a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_uninitialized_ref.php b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_uninitialized_ref.php index 4d0c00b28..c53e336d2 100644 --- a/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_uninitialized_ref.php +++ b/vendor/symfony/dependency-injection/Tests/Fixtures/php/services_uninitialized_ref.php @@ -107,7 +107,7 @@ class Symfony_DI_PhpDumper_Test_Uninitialized_Reference extends Container { $this->services['baz'] = $instance = new \stdClass(); - $instance->foo3 = ${($_ = isset($this->services['foo3']) ? $this->services['foo3'] : $this->services['foo3'] = new \stdClass()) && false ?: '_'}; + $instance->foo3 = ${($_ = isset($this->services['foo3']) ? $this->services['foo3'] : ($this->services['foo3'] = new \stdClass())) && false ?: '_'}; return $instance; } diff --git a/vendor/symfony/dependency-injection/Tests/Loader/IniFileLoaderTest.php b/vendor/symfony/dependency-injection/Tests/Loader/IniFileLoaderTest.php index 65b5db93c..c2332f822 100644 --- a/vendor/symfony/dependency-injection/Tests/Loader/IniFileLoaderTest.php +++ b/vendor/symfony/dependency-injection/Tests/Loader/IniFileLoaderTest.php @@ -58,7 +58,6 @@ class IniFileLoaderTest extends TestCase $this->markTestSkipped(sprintf('Converting the value "%s" to "%s" is not supported by the IniFileLoader.', $key, $value)); } - $this->loader->load('types.ini'); $expected = parse_ini_file(__DIR__.'/../Fixtures/ini/types.ini', true, INI_SCANNER_TYPED); $this->assertSame($value, $expected['parameters'][$key], '->load() converts values to PHP types'); } @@ -78,9 +77,10 @@ class IniFileLoaderTest extends TestCase array('constant', PHP_VERSION, true), array('12', 12, true), array('12_string', '12', true), + array('12_quoted_number', 12, false), // INI_SCANNER_RAW removes the double quotes array('12_comment', 12, true), array('12_string_comment', '12', true), - array('12_string_comment_again', '12', true), + array('12_quoted_number_comment', 12, false), // INI_SCANNER_RAW removes the double quotes array('-12', -12, true), array('1', 1, true), array('0', 0, true), diff --git a/vendor/symfony/dependency-injection/Tests/ServiceLocatorTest.php b/vendor/symfony/dependency-injection/Tests/ServiceLocatorTest.php index 56fac643e..aa9790e83 100644 --- a/vendor/symfony/dependency-injection/Tests/ServiceLocatorTest.php +++ b/vendor/symfony/dependency-injection/Tests/ServiceLocatorTest.php @@ -115,6 +115,20 @@ class ServiceLocatorTest extends TestCase $subscriber->getFoo(); } + /** + * @expectedException \Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException + * @expectedExceptionMessage Service "foo" not found: even though it exists in the app's container, the container inside "foo" is a smaller service locator that is empty... Try using dependency injection instead. + */ + public function testGetThrowsServiceNotFoundException() + { + $container = new Container(); + $container->set('foo', new \stdClass()); + + $locator = new ServiceLocator(array()); + $locator = $locator->withContext('foo', $container); + $locator->get('foo'); + } + public function testInvoke() { $locator = new ServiceLocator(array( diff --git a/vendor/symfony/dependency-injection/phpunit.xml.dist b/vendor/symfony/dependency-injection/phpunit.xml.dist index 781f767d5..21dee2a80 100644 --- a/vendor/symfony/dependency-injection/phpunit.xml.dist +++ b/vendor/symfony/dependency-injection/phpunit.xml.dist @@ -1,7 +1,7 @@ node->getAttribute('id')); - $fieldNodes = $xpath->query(sprintf('descendant::input[@form=%s] | descendant::button[@form=%1$s] | descendant::textarea[@form=%1$s] | descendant::select[@form=%1$s] | //form[@id=%1$s]//input[not(@form)] | //form[@id=%1$s]//button[not(@form)] | //form[@id=%1$s]//textarea[not(@form)] | //form[@id=%1$s]//select[not(@form)]', $formId)); + $fieldNodes = $xpath->query(sprintf('( descendant::input[@form=%s] | descendant::button[@form=%1$s] | descendant::textarea[@form=%1$s] | descendant::select[@form=%1$s] | //form[@id=%1$s]//input[not(@form)] | //form[@id=%1$s]//button[not(@form)] | //form[@id=%1$s]//textarea[not(@form)] | //form[@id=%1$s]//select[not(@form)] )[not(ancestor::template)]', $formId)); foreach ($fieldNodes as $node) { $this->addField($node); } } else { // do the xpath query with $this->node as the context node, to only find descendant elements // however, descendant elements with form attribute are not part of this form - $fieldNodes = $xpath->query('descendant::input[not(@form)] | descendant::button[not(@form)] | descendant::textarea[not(@form)] | descendant::select[not(@form)]', $this->node); + $fieldNodes = $xpath->query('( descendant::input[not(@form)] | descendant::button[not(@form)] | descendant::textarea[not(@form)] | descendant::select[not(@form)] )[not(ancestor::template)]', $this->node); foreach ($fieldNodes as $node) { $this->addField($node); } diff --git a/vendor/symfony/dom-crawler/LICENSE b/vendor/symfony/dom-crawler/LICENSE index 21d7fb9e2..a677f4376 100644 --- a/vendor/symfony/dom-crawler/LICENSE +++ b/vendor/symfony/dom-crawler/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2018 Fabien Potencier +Copyright (c) 2004-2019 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/dom-crawler/Tests/FormTest.php b/vendor/symfony/dom-crawler/Tests/FormTest.php index 29e6ac5e2..f7ea51b2d 100644 --- a/vendor/symfony/dom-crawler/Tests/FormTest.php +++ b/vendor/symfony/dom-crawler/Tests/FormTest.php @@ -400,6 +400,10 @@ class FormTest extends TestCase $form = $this->createForm('
'); $this->assertEquals(array('bar' => 'bar'), $form->getValues(), '->getValues() does not include disabled fields'); + + $form = $this->createForm('
'); + $this->assertEquals(array('bar' => 'bar'), $form->getValues(), '->getValues() does not include template fields'); + $this->assertFalse($form->has('foo')); } public function testSetValues() @@ -450,6 +454,10 @@ class FormTest extends TestCase $form = $this->createForm('
'); $this->assertEquals(array(), $form->getFiles(), '->getFiles() does not include disabled file fields'); + + $form = $this->createForm('
'); + $this->assertEquals(array(), $form->getFiles(), '->getFiles() does not include template file fields'); + $this->assertFalse($form->has('foo')); } public function testGetPhpFiles() @@ -869,7 +877,7 @@ class FormTest extends TestCase protected function createForm($form, $method = null, $currentUri = null) { $dom = new \DOMDocument(); - $dom->loadHTML(''.$form.''); + @$dom->loadHTML(''.$form.''); $xPath = new \DOMXPath($dom); $nodes = $xPath->query('//input | //button'); diff --git a/vendor/symfony/dom-crawler/phpunit.xml.dist b/vendor/symfony/dom-crawler/phpunit.xml.dist index ad714a8fd..5f63490ce 100644 --- a/vendor/symfony/dom-crawler/phpunit.xml.dist +++ b/vendor/symfony/dom-crawler/phpunit.xml.dist @@ -1,7 +1,7 @@ dispatcher = $dispatcher; $this->stopwatch = $stopwatch; $this->logger = $logger; - $this->called = array(); $this->wrappedListeners = array(); } @@ -123,6 +122,10 @@ class TraceableEventDispatcher implements TraceableEventDispatcherInterface */ public function dispatch($eventName, Event $event = null) { + if (null === $this->callStack) { + $this->callStack = new \SplObjectStorage(); + } + if (null === $event) { $event = new Event(); } @@ -132,19 +135,24 @@ class TraceableEventDispatcher implements TraceableEventDispatcherInterface } $this->preProcess($eventName); - $this->preDispatch($eventName, $event); - - $e = $this->stopwatch->start($eventName, 'section'); - - $this->dispatcher->dispatch($eventName, $event); - - if ($e->isStarted()) { - $e->stop(); + try { + $this->preDispatch($eventName, $event); + try { + $e = $this->stopwatch->start($eventName, 'section'); + try { + $this->dispatcher->dispatch($eventName, $event); + } finally { + if ($e->isStarted()) { + $e->stop(); + } + } + } finally { + $this->postDispatch($eventName, $event); + } + } finally { + $this->postProcess($eventName); } - $this->postDispatch($eventName, $event); - $this->postProcess($eventName); - return $event; } @@ -153,11 +161,15 @@ class TraceableEventDispatcher implements TraceableEventDispatcherInterface */ public function getCalledListeners() { + if (null === $this->callStack) { + return array(); + } + $called = array(); - foreach ($this->called as $eventName => $listeners) { - foreach ($listeners as $listener) { - $called[$eventName.'.'.$listener->getPretty()] = $listener->getInfo($eventName); - } + foreach ($this->callStack as $listener) { + list($eventName) = $this->callStack->getInfo(); + + $called[] = $listener->getInfo($eventName); } return $called; @@ -183,9 +195,9 @@ class TraceableEventDispatcher implements TraceableEventDispatcherInterface foreach ($allListeners as $eventName => $listeners) { foreach ($listeners as $listener) { $called = false; - if (isset($this->called[$eventName])) { - foreach ($this->called[$eventName] as $l) { - if ($l->getWrappedListener() === $listener) { + if (null !== $this->callStack) { + foreach ($this->callStack as $calledListener) { + if ($calledListener->getWrappedListener() === $listener) { $called = true; break; @@ -197,19 +209,19 @@ class TraceableEventDispatcher implements TraceableEventDispatcherInterface if (!$listener instanceof WrappedListener) { $listener = new WrappedListener($listener, null, $this->stopwatch, $this); } - $notCalled[$eventName.'.'.$listener->getPretty()] = $listener->getInfo($eventName); + $notCalled[] = $listener->getInfo($eventName); } } } - uasort($notCalled, array($this, 'sortListenersByPriority')); + uasort($notCalled, array($this, 'sortNotCalledListeners')); return $notCalled; } public function reset() { - $this->called = array(); + $this->callStack = null; } /** @@ -249,10 +261,11 @@ class TraceableEventDispatcher implements TraceableEventDispatcherInterface { foreach ($this->dispatcher->getListeners($eventName) as $listener) { $priority = $this->getListenerPriority($eventName, $listener); - $wrappedListener = new WrappedListener($listener, null, $this->stopwatch, $this); + $wrappedListener = new WrappedListener($listener instanceof WrappedListener ? $listener->getWrappedListener() : $listener, null, $this->stopwatch, $this); $this->wrappedListeners[$eventName][] = $wrappedListener; $this->dispatcher->removeListener($eventName, $listener); $this->dispatcher->addListener($eventName, $wrappedListener, $priority); + $this->callStack->attach($wrappedListener, array($eventName)); } } @@ -281,8 +294,8 @@ class TraceableEventDispatcher implements TraceableEventDispatcherInterface if (!isset($this->called[$eventName])) { $this->called[$eventName] = new \SplObjectStorage(); } - - $this->called[$eventName]->attach($listener); + } else { + $this->callStack->detach($listener); } if (null !== $this->logger && $skipped) { @@ -299,8 +312,12 @@ class TraceableEventDispatcher implements TraceableEventDispatcherInterface } } - private function sortListenersByPriority($a, $b) + private function sortNotCalledListeners(array $a, array $b) { + if (0 !== $cmp = strcmp($a['event'], $b['event'])) { + return $cmp; + } + 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 2d8126a65..d49f69de7 100644 --- a/vendor/symfony/event-dispatcher/Debug/WrappedListener.php +++ b/vendor/symfony/event-dispatcher/Debug/WrappedListener.php @@ -34,7 +34,6 @@ class WrappedListener public function __construct($listener, $name, Stopwatch $stopwatch, EventDispatcherInterface $dispatcher = null) { $this->listener = $listener; - $this->name = $name; $this->stopwatch = $stopwatch; $this->dispatcher = $dispatcher; $this->called = false; @@ -44,7 +43,15 @@ class WrappedListener $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'; + $r = new \ReflectionFunction($listener); + if (false !== strpos($r->name, '{closure}')) { + $this->pretty = $this->name = 'closure'; + } elseif ($class = $r->getClosureScopeClass()) { + $this->name = $class->name; + $this->pretty = $this->name.'::'.$r->name; + } else { + $this->pretty = $this->name = $r->name; + } } elseif (\is_string($listener)) { $this->pretty = $this->name = $listener; } else { diff --git a/vendor/symfony/event-dispatcher/EventDispatcherInterface.php b/vendor/symfony/event-dispatcher/EventDispatcherInterface.php index d3d0cb8a4..bde753a12 100644 --- a/vendor/symfony/event-dispatcher/EventDispatcherInterface.php +++ b/vendor/symfony/event-dispatcher/EventDispatcherInterface.php @@ -23,11 +23,11 @@ interface EventDispatcherInterface /** * Dispatches an event to all registered listeners. * - * @param string $eventName The name of the event to dispatch. The name of - * the event is the name of the method that is - * invoked on listeners. - * @param Event $event The event to pass to the event handlers/listeners - * If not supplied, an empty Event instance is created + * @param string $eventName The name of the event to dispatch. The name of + * the event is the name of the method that is + * invoked on listeners. + * @param Event|null $event The event to pass to the event handlers/listeners + * If not supplied, an empty Event instance is created * * @return Event */ @@ -46,7 +46,7 @@ interface EventDispatcherInterface /** * Adds an event subscriber. * - * The subscriber is asked for all the events he is + * The subscriber is asked for all the events it is * interested in and added as a listener for these events. */ public function addSubscriber(EventSubscriberInterface $subscriber); @@ -64,7 +64,7 @@ interface EventDispatcherInterface /** * Gets the listeners of a specific event or all listeners sorted by descending priority. * - * @param string $eventName The name of the event + * @param string|null $eventName The name of the event * * @return array The event listeners for the specified event, or all event listeners by event name */ @@ -85,7 +85,7 @@ interface EventDispatcherInterface /** * Checks whether an event has any registered listeners. * - * @param string $eventName The name of the event + * @param string|null $eventName The name of the event * * @return bool true if the specified event has any listeners, false otherwise */ diff --git a/vendor/symfony/event-dispatcher/EventSubscriberInterface.php b/vendor/symfony/event-dispatcher/EventSubscriberInterface.php index 8af778919..6e1976b86 100644 --- a/vendor/symfony/event-dispatcher/EventSubscriberInterface.php +++ b/vendor/symfony/event-dispatcher/EventSubscriberInterface.php @@ -12,7 +12,7 @@ namespace Symfony\Component\EventDispatcher; /** - * An EventSubscriber knows himself what events he is interested in. + * An EventSubscriber knows itself what events it is interested in. * If an EventSubscriber is added to an EventDispatcherInterface, the manager invokes * {@link getSubscribedEvents} and registers the subscriber as a listener for all * returned events. diff --git a/vendor/symfony/event-dispatcher/GenericEvent.php b/vendor/symfony/event-dispatcher/GenericEvent.php index 95c99408d..f0be7e18f 100644 --- a/vendor/symfony/event-dispatcher/GenericEvent.php +++ b/vendor/symfony/event-dispatcher/GenericEvent.php @@ -38,7 +38,7 @@ class GenericEvent extends Event implements \ArrayAccess, \IteratorAggregate /** * Getter for subject property. * - * @return mixed $subject The observer subject + * @return mixed The observer subject */ public function getSubject() { diff --git a/vendor/symfony/event-dispatcher/LICENSE b/vendor/symfony/event-dispatcher/LICENSE index 21d7fb9e2..a677f4376 100644 --- a/vendor/symfony/event-dispatcher/LICENSE +++ b/vendor/symfony/event-dispatcher/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2018 Fabien Potencier +Copyright (c) 2004-2019 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/event-dispatcher/Tests/AbstractEventDispatcherTest.php b/vendor/symfony/event-dispatcher/Tests/AbstractEventDispatcherTest.php index 9997a7b0e..6d377d11f 100644 --- a/vendor/symfony/event-dispatcher/Tests/AbstractEventDispatcherTest.php +++ b/vendor/symfony/event-dispatcher/Tests/AbstractEventDispatcherTest.php @@ -426,7 +426,7 @@ class TestEventSubscriberWithPriorities implements EventSubscriberInterface return array( 'pre.foo' => array('preFoo', 10), 'post.foo' => array('postFoo'), - ); + ); } } diff --git a/vendor/symfony/event-dispatcher/Tests/Debug/TraceableEventDispatcherTest.php b/vendor/symfony/event-dispatcher/Tests/Debug/TraceableEventDispatcherTest.php index d7c5ce18c..b322d9d68 100644 --- a/vendor/symfony/event-dispatcher/Tests/Debug/TraceableEventDispatcherTest.php +++ b/vendor/symfony/event-dispatcher/Tests/Debug/TraceableEventDispatcherTest.php @@ -110,17 +110,17 @@ class TraceableEventDispatcherTest extends TestCase $tdispatcher->addListener('foo', function () {}, 5); $listeners = $tdispatcher->getNotCalledListeners(); - $this->assertArrayHasKey('stub', $listeners['foo.closure']); - unset($listeners['foo.closure']['stub']); + $this->assertArrayHasKey('stub', $listeners[0]); + unset($listeners[0]['stub']); $this->assertEquals(array(), $tdispatcher->getCalledListeners()); - $this->assertEquals(array('foo.closure' => array('event' => 'foo', 'pretty' => 'closure', 'priority' => 5)), $listeners); + $this->assertEquals(array(array('event' => 'foo', 'pretty' => 'closure', 'priority' => 5)), $listeners); $tdispatcher->dispatch('foo'); $listeners = $tdispatcher->getCalledListeners(); - $this->assertArrayHasKey('stub', $listeners['foo.closure']); - unset($listeners['foo.closure']['stub']); - $this->assertEquals(array('foo.closure' => array('event' => 'foo', 'pretty' => 'closure', 'priority' => 5)), $listeners); + $this->assertArrayHasKey('stub', $listeners[0]); + unset($listeners[0]['stub']); + $this->assertEquals(array(array('event' => 'foo', 'pretty' => 'closure', 'priority' => 5)), $listeners); $this->assertEquals(array(), $tdispatcher->getNotCalledListeners()); } @@ -133,10 +133,22 @@ class TraceableEventDispatcherTest extends TestCase $tdispatcher->reset(); $listeners = $tdispatcher->getNotCalledListeners(); - $this->assertArrayHasKey('stub', $listeners['foo.closure']); - unset($listeners['foo.closure']['stub']); + $this->assertArrayHasKey('stub', $listeners[0]); + unset($listeners[0]['stub']); $this->assertEquals(array(), $tdispatcher->getCalledListeners()); - $this->assertEquals(array('foo.closure' => array('event' => 'foo', 'pretty' => 'closure', 'priority' => 5)), $listeners); + $this->assertEquals(array(array('event' => 'foo', 'pretty' => 'closure', 'priority' => 5)), $listeners); + } + + public function testDispatchAfterReset() + { + $tdispatcher = new TraceableEventDispatcher(new EventDispatcher(), new Stopwatch()); + $tdispatcher->addListener('foo', function () {}, 5); + + $tdispatcher->reset(); + $tdispatcher->dispatch('foo'); + + $listeners = $tdispatcher->getCalledListeners(); + $this->assertArrayHasKey('stub', $listeners[0]); } public function testGetCalledListenersNested() diff --git a/vendor/symfony/event-dispatcher/Tests/Debug/WrappedListenerTest.php b/vendor/symfony/event-dispatcher/Tests/Debug/WrappedListenerTest.php new file mode 100644 index 000000000..f743f148d --- /dev/null +++ b/vendor/symfony/event-dispatcher/Tests/Debug/WrappedListenerTest.php @@ -0,0 +1,64 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\EventDispatcher\Tests\Debug; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\EventDispatcher\Debug\WrappedListener; +use Symfony\Component\EventDispatcher\EventDispatcherInterface; +use Symfony\Component\Stopwatch\Stopwatch; + +class WrappedListenerTest extends TestCase +{ + /** + * @dataProvider provideListenersToDescribe + */ + public function testListenerDescription(callable $listener, $expected) + { + $wrappedListener = new WrappedListener($listener, null, $this->getMockBuilder(Stopwatch::class)->getMock(), $this->getMockBuilder(EventDispatcherInterface::class)->getMock()); + + $this->assertStringMatchesFormat($expected, $wrappedListener->getPretty()); + } + + public function provideListenersToDescribe() + { + $listeners = array( + array(new FooListener(), 'Symfony\Component\EventDispatcher\Tests\Debug\FooListener::__invoke'), + array(array(new FooListener(), 'listen'), 'Symfony\Component\EventDispatcher\Tests\Debug\FooListener::listen'), + array(array('Symfony\Component\EventDispatcher\Tests\Debug\FooListener', 'listenStatic'), 'Symfony\Component\EventDispatcher\Tests\Debug\FooListener::listenStatic'), + array('var_dump', 'var_dump'), + array(function () {}, 'closure'), + ); + + if (\PHP_VERSION_ID >= 70100) { + $listeners[] = array(\Closure::fromCallable(array(new FooListener(), 'listen')), 'Symfony\Component\EventDispatcher\Tests\Debug\FooListener::listen'); + $listeners[] = array(\Closure::fromCallable(array('Symfony\Component\EventDispatcher\Tests\Debug\FooListener', 'listenStatic')), 'Symfony\Component\EventDispatcher\Tests\Debug\FooListener::listenStatic'); + $listeners[] = array(\Closure::fromCallable(function () {}), 'closure'); + } + + return $listeners; + } +} + +class FooListener +{ + public function listen() + { + } + + public function __invoke() + { + } + + public static function listenStatic() + { + } +} diff --git a/vendor/symfony/event-dispatcher/phpunit.xml.dist b/vendor/symfony/event-dispatcher/phpunit.xml.dist index b3ad1bdf5..f2eb1692c 100644 --- a/vendor/symfony/event-dispatcher/phpunit.xml.dist +++ b/vendor/symfony/event-dispatcher/phpunit.xml.dist @@ -1,7 +1,7 @@ markTestSkipped('could read test files while test requires unreadable'); @@ -723,7 +723,7 @@ class FinderTest extends Iterator\RealIteratorTestCase // restore original permissions chmod($testDir, 0777); - clearstatcache($testDir); + clearstatcache(true, $testDir); if ($couldRead) { $this->markTestSkipped('could read test files while test requires unreadable'); diff --git a/vendor/symfony/finder/phpunit.xml.dist b/vendor/symfony/finder/phpunit.xml.dist index 0e1a8669b..078847af9 100644 --- a/vendor/symfony/finder/phpunit.xml.dist +++ b/vendor/symfony/finder/phpunit.xml.dist @@ -1,7 +1,7 @@ server->remove('IIS_WasUrlRewritten'); } elseif ($this->server->has('REQUEST_URI')) { $requestUri = $this->server->get('REQUEST_URI'); - // 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)); + + if ('' !== $requestUri && '/' === $requestUri[0]) { + // To only use path and query remove the fragment. + if (false !== $pos = strpos($requestUri, '#')) { + $requestUri = substr($requestUri, 0, $pos); + } + } else { + // HTTP proxy reqs setup request URI with scheme and host [and port] + the URL path, + // only use URL path. + $uriComponents = parse_url($requestUri); + + if (isset($uriComponents['path'])) { + $requestUri = $uriComponents['path']; + } + + if (isset($uriComponents['query'])) { + $requestUri .= '?'.$uriComponents['query']; + } } } elseif ($this->server->has('ORIG_PATH_INFO')) { // IIS 5.0, PHP as CGI diff --git a/vendor/symfony/http-foundation/Response.php b/vendor/symfony/http-foundation/Response.php index 832260a51..f267d1e0e 100644 --- a/vendor/symfony/http-foundation/Response.php +++ b/vendor/symfony/http-foundation/Response.php @@ -334,8 +334,9 @@ class Response // headers foreach ($this->headers->allPreserveCaseWithoutCookies() as $name => $values) { + $replace = 0 === strcasecmp($name, 'Content-Type'); foreach ($values as $value) { - header($name.': '.$value, false, $this->statusCode); + header($name.': '.$value, $replace, $this->statusCode); } } diff --git a/vendor/symfony/http-foundation/Session/Storage/Handler/AbstractSessionHandler.php b/vendor/symfony/http-foundation/Session/Storage/Handler/AbstractSessionHandler.php index 5b5c1d817..0d119498d 100644 --- a/vendor/symfony/http-foundation/Session/Storage/Handler/AbstractSessionHandler.php +++ b/vendor/symfony/http-foundation/Session/Storage/Handler/AbstractSessionHandler.php @@ -131,7 +131,7 @@ abstract class AbstractSessionHandler implements \SessionHandlerInterface, \Sess if (\PHP_VERSION_ID < 70000) { $this->prefetchData = null; } - if (!headers_sent() && ini_get('session.use_cookies')) { + if (!headers_sent() && filter_var(ini_get('session.use_cookies'), FILTER_VALIDATE_BOOLEAN)) { if (!$this->sessionName) { throw new \LogicException(sprintf('Session name cannot be empty, did you forget to call "parent::open()" in "%s"?.', \get_class($this))); } @@ -159,7 +159,7 @@ abstract class AbstractSessionHandler implements \SessionHandlerInterface, \Sess header($h, false); } } else { - setcookie($this->sessionName, '', 0, ini_get('session.cookie_path'), ini_get('session.cookie_domain'), ini_get('session.cookie_secure'), ini_get('session.cookie_httponly')); + setcookie($this->sessionName, '', 0, ini_get('session.cookie_path'), ini_get('session.cookie_domain'), filter_var(ini_get('session.cookie_secure'), FILTER_VALIDATE_BOOLEAN), filter_var(ini_get('session.cookie_httponly'), FILTER_VALIDATE_BOOLEAN)); } } diff --git a/vendor/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php b/vendor/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php index c5f0527f9..8c0c42fd2 100644 --- a/vendor/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php +++ b/vendor/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php @@ -637,7 +637,7 @@ class PdoSessionHandler extends AbstractSessionHandler throw new \RuntimeException('Failed to read session: INSERT reported a duplicate id but next SELECT did not return any data.'); } - if (!ini_get('session.use_strict_mode') && self::LOCK_TRANSACTIONAL === $this->lockMode && 'sqlite' !== $this->driver) { + if (!filter_var(ini_get('session.use_strict_mode'), FILTER_VALIDATE_BOOLEAN) && self::LOCK_TRANSACTIONAL === $this->lockMode && 'sqlite' !== $this->driver) { // In strict mode, session fixation is not possible: new sessions always start with a unique // random id, so that concurrency is not possible and this code path can be skipped. // Exclusive-reading of non-existent rows does not block, so we need to do an insert to block diff --git a/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php b/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php index 1ec5c7ff4..a18f812d5 100644 --- a/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php +++ b/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php @@ -137,7 +137,7 @@ class NativeSessionStorage implements SessionStorageInterface throw new \RuntimeException('Failed to start the session: already started by PHP.'); } - if (ini_get('session.use_cookies') && headers_sent($file, $line)) { + if (filter_var(ini_get('session.use_cookies'), FILTER_VALIDATE_BOOLEAN) && headers_sent($file, $line)) { throw new \RuntimeException(sprintf('Failed to start the session because headers have already been sent by "%s" at line %d.', $file, $line)); } diff --git a/vendor/symfony/http-foundation/Tests/Fixtures/response-functional/common.inc b/vendor/symfony/http-foundation/Tests/Fixtures/response-functional/common.inc index f9c40a9a3..0bdf9e4b7 100644 --- a/vendor/symfony/http-foundation/Tests/Fixtures/response-functional/common.inc +++ b/vendor/symfony/http-foundation/Tests/Fixtures/response-functional/common.inc @@ -22,7 +22,7 @@ error_reporting(-1); ini_set('html_errors', 0); ini_set('display_errors', 1); -if (ini_get('xdebug.default_enable')) { +if (filter_var(ini_get('xdebug.default_enable'), FILTER_VALIDATE_BOOLEAN)) { xdebug_disable(); } diff --git a/vendor/symfony/http-foundation/Tests/RequestTest.php b/vendor/symfony/http-foundation/Tests/RequestTest.php index ff4dd67b3..f2c8f94f7 100644 --- a/vendor/symfony/http-foundation/Tests/RequestTest.php +++ b/vendor/symfony/http-foundation/Tests/RequestTest.php @@ -232,6 +232,104 @@ class RequestTest extends TestCase $this->assertEquals(80, $request->getPort()); $this->assertEquals('test.com', $request->getHttpHost()); $this->assertFalse($request->isSecure()); + + // Fragment should not be included in the URI + $request = Request::create('http://test.com/foo#bar'); + $this->assertEquals('http://test.com/foo', $request->getUri()); + } + + public function testCreateWithRequestUri() + { + $request = Request::create('http://test.com:80/foo'); + $request->server->set('REQUEST_URI', 'http://test.com:80/foo'); + $this->assertEquals('http://test.com/foo', $request->getUri()); + $this->assertEquals('/foo', $request->getPathInfo()); + $this->assertEquals('test.com', $request->getHost()); + $this->assertEquals('test.com', $request->getHttpHost()); + $this->assertEquals(80, $request->getPort()); + $this->assertFalse($request->isSecure()); + + $request = Request::create('http://test.com:8080/foo'); + $request->server->set('REQUEST_URI', 'http://test.com:8080/foo'); + $this->assertEquals('http://test.com:8080/foo', $request->getUri()); + $this->assertEquals('/foo', $request->getPathInfo()); + $this->assertEquals('test.com', $request->getHost()); + $this->assertEquals('test.com:8080', $request->getHttpHost()); + $this->assertEquals(8080, $request->getPort()); + $this->assertFalse($request->isSecure()); + + $request = Request::create('http://test.com/foo?bar=foo', 'GET', array('bar' => 'baz')); + $request->server->set('REQUEST_URI', 'http://test.com/foo?bar=foo'); + $this->assertEquals('http://test.com/foo?bar=baz', $request->getUri()); + $this->assertEquals('/foo', $request->getPathInfo()); + $this->assertEquals('bar=baz', $request->getQueryString()); + $this->assertEquals('test.com', $request->getHost()); + $this->assertEquals('test.com', $request->getHttpHost()); + $this->assertEquals(80, $request->getPort()); + $this->assertFalse($request->isSecure()); + + $request = Request::create('https://test.com:443/foo'); + $request->server->set('REQUEST_URI', 'https://test.com:443/foo'); + $this->assertEquals('https://test.com/foo', $request->getUri()); + $this->assertEquals('/foo', $request->getPathInfo()); + $this->assertEquals('test.com', $request->getHost()); + $this->assertEquals('test.com', $request->getHttpHost()); + $this->assertEquals(443, $request->getPort()); + $this->assertTrue($request->isSecure()); + + // Fragment should not be included in the URI + $request = Request::create('http://test.com/foo#bar'); + $request->server->set('REQUEST_URI', 'http://test.com/foo#bar'); + $this->assertEquals('http://test.com/foo', $request->getUri()); + } + + /** + * @dataProvider getRequestUriData + */ + public function testGetRequestUri($serverRequestUri, $expected, $message) + { + $request = new Request(); + $request->server->add(array( + 'REQUEST_URI' => $serverRequestUri, + + // For having http://test.com + 'SERVER_NAME' => 'test.com', + 'SERVER_PORT' => 80, + )); + + $this->assertSame($expected, $request->getRequestUri(), $message); + $this->assertSame($expected, $request->server->get('REQUEST_URI'), 'Normalize the request URI.'); + } + + public function getRequestUriData() + { + $message = 'Do not modify the path.'; + yield array('/foo', '/foo', $message); + yield array('//bar/foo', '//bar/foo', $message); + yield array('///bar/foo', '///bar/foo', $message); + + $message = 'Handle when the scheme, host are on REQUEST_URI.'; + yield array('http://test.com/foo?bar=baz', '/foo?bar=baz', $message); + + $message = 'Handle when the scheme, host and port are on REQUEST_URI.'; + yield array('http://test.com:80/foo', '/foo', $message); + yield array('https://test.com:8080/foo', '/foo', $message); + yield array('https://test.com:443/foo', '/foo', $message); + + $message = 'Fragment should not be included in the URI'; + yield array('http://test.com/foo#bar', '/foo', $message); + yield array('/foo#bar', '/foo', $message); + } + + public function testGetRequestUriWithoutRequiredHeader() + { + $expected = ''; + + $request = new Request(); + + $message = 'Fallback to empty URI when headers are missing.'; + $this->assertSame($expected, $request->getRequestUri(), $message); + $this->assertSame($expected, $request->server->get('REQUEST_URI'), 'Normalize the request URI.'); } public function testCreateCheckPrecedence() @@ -332,6 +430,9 @@ class RequestTest extends TestCase { $request = new Request(); $this->assertEquals('json', $request->getFormat('application/json; charset=utf-8')); + $this->assertEquals('json', $request->getFormat('application/json;charset=utf-8')); + $this->assertEquals('json', $request->getFormat('application/json ; charset=utf-8')); + $this->assertEquals('json', $request->getFormat('application/json ;charset=utf-8')); } /** 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 3060452e9..853e96d28 100644 --- a/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php +++ b/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php @@ -160,7 +160,7 @@ class PdoSessionHandlerTest extends TestCase if (\defined('HHVM_VERSION')) { $this->markTestSkipped('PHPUnit_MockObject cannot mock the PDOStatement class on HHVM. See https://github.com/sebastianbergmann/phpunit-mock-objects/pull/289'); } - if (ini_get('session.use_strict_mode')) { + if (filter_var(ini_get('session.use_strict_mode'), FILTER_VALIDATE_BOOLEAN)) { $this->markTestSkipped('Strict mode needs no locking for new sessions.'); } diff --git a/vendor/symfony/http-foundation/phpunit.xml.dist b/vendor/symfony/http-foundation/phpunit.xml.dist index c1d61f8bf..f57bc9e62 100644 --- a/vendor/symfony/http-foundation/phpunit.xml.dist +++ b/vendor/symfony/http-foundation/phpunit.xml.dist @@ -1,7 +1,7 @@ $r->getName(), 'method' => null, 'file' => $r->getFileName(), 'line' => $r->getStartLine(), ); + + if (false !== strpos($r->name, '{closure}')) { + return $controller; + } + $controller['method'] = $r->name; + + if ($class = $r->getClosureScopeClass()) { + $controller['class'] = $class->name; + } else { + return $r->name; + } + + return $controller; } if (\is_object($controller)) { diff --git a/vendor/symfony/http-kernel/DependencyInjection/AddAnnotatedClassesToCachePass.php b/vendor/symfony/http-kernel/DependencyInjection/AddAnnotatedClassesToCachePass.php index 645e8f30f..4e59123d1 100644 --- a/vendor/symfony/http-kernel/DependencyInjection/AddAnnotatedClassesToCachePass.php +++ b/vendor/symfony/http-kernel/DependencyInjection/AddAnnotatedClassesToCachePass.php @@ -63,7 +63,7 @@ class AddAnnotatedClassesToCachePass implements CompilerPassInterface * @param array $patterns The class patterns to expand * @param array $classes The existing classes to match against the patterns * - * @return array A list of classes derivated from the patterns + * @return array A list of classes derived from the patterns */ private function expandClasses(array $patterns, array $classes) { diff --git a/vendor/symfony/http-kernel/EventListener/ExceptionListener.php b/vendor/symfony/http-kernel/EventListener/ExceptionListener.php index 147e09013..71de60434 100644 --- a/vendor/symfony/http-kernel/EventListener/ExceptionListener.php +++ b/vendor/symfony/http-kernel/EventListener/ExceptionListener.php @@ -112,7 +112,7 @@ class ExceptionListener implements EventSubscriberInterface * @param \Exception $exception The thrown exception * @param Request $request The original request * - * @return Request $request The cloned request + * @return Request The cloned request */ protected function duplicateRequest(\Exception $exception, Request $request) { diff --git a/vendor/symfony/http-kernel/HttpCache/HttpCache.php b/vendor/symfony/http-kernel/HttpCache/HttpCache.php index 44405209d..ebc5ba686 100644 --- a/vendor/symfony/http-kernel/HttpCache/HttpCache.php +++ b/vendor/symfony/http-kernel/HttpCache/HttpCache.php @@ -93,7 +93,7 @@ class HttpCache implements HttpKernelInterface, TerminableInterface /** * Gets the current store. * - * @return StoreInterface $store A StoreInterface instance + * @return StoreInterface A StoreInterface instance */ public function getStore() { diff --git a/vendor/symfony/http-kernel/HttpKernel.php b/vendor/symfony/http-kernel/HttpKernel.php index 36c673093..f34d9b322 100644 --- a/vendor/symfony/http-kernel/HttpKernel.php +++ b/vendor/symfony/http-kernel/HttpKernel.php @@ -263,6 +263,9 @@ class HttpKernel implements HttpKernelInterface, TerminableInterface } } + /** + * Returns a human-readable string for the specified variable. + */ private function varToString($var) { if (\is_object($var)) { diff --git a/vendor/symfony/http-kernel/Kernel.php b/vendor/symfony/http-kernel/Kernel.php index f0137c684..f70e246d4 100644 --- a/vendor/symfony/http-kernel/Kernel.php +++ b/vendor/symfony/http-kernel/Kernel.php @@ -67,11 +67,11 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl private $requestStackSize = 0; private $resetServices = false; - const VERSION = '3.4.18'; - const VERSION_ID = 30418; + const VERSION = '3.4.21'; + const VERSION_ID = 30421; const MAJOR_VERSION = 3; const MINOR_VERSION = 4; - const RELEASE_VERSION = 18; + const RELEASE_VERSION = 21; const EXTRA_VERSION = ''; const END_OF_MAINTENANCE = '11/2020'; @@ -862,7 +862,10 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl $fs->dumpFile($dir.$file, $code); @chmod($dir.$file, 0666 & ~umask()); } - @unlink(\dirname($dir.$file).'.legacy'); + $legacyFile = \dirname($dir.$file).'.legacy'; + if (file_exists($legacyFile)) { + @unlink($legacyFile); + } $cache->write($rootCode, $container->getResources()); } diff --git a/vendor/symfony/http-kernel/LICENSE b/vendor/symfony/http-kernel/LICENSE index 21d7fb9e2..a677f4376 100644 --- a/vendor/symfony/http-kernel/LICENSE +++ b/vendor/symfony/http-kernel/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2018 Fabien Potencier +Copyright (c) 2004-2019 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/http-kernel/Tests/DataCollector/DumpDataCollectorTest.php b/vendor/symfony/http-kernel/Tests/DataCollector/DumpDataCollectorTest.php index fd5ea11e7..341ddc6d8 100644 --- a/vendor/symfony/http-kernel/Tests/DataCollector/DumpDataCollectorTest.php +++ b/vendor/symfony/http-kernel/Tests/DataCollector/DumpDataCollectorTest.php @@ -125,11 +125,8 @@ EOTXT; $collector->dump($data); $line = __LINE__ - 1; $output = preg_replace("/\033\[[^m]*m/", '', ob_get_clean()); - if (\PHP_VERSION_ID >= 50400) { - $this->assertSame("DumpDataCollectorTest.php on line {$line}:\n456\n", $output); - } else { - $this->assertSame("\"DumpDataCollectorTest.php on line {$line}:\"\n456\n", $output); - } + + $this->assertSame("DumpDataCollectorTest.php on line {$line}:\n456\n", $output); ob_start(); $collector->__destruct(); diff --git a/vendor/symfony/http-kernel/Tests/EventListener/TranslatorListenerTest.php b/vendor/symfony/http-kernel/Tests/EventListener/TranslatorListenerTest.php index 23b833177..c1d56ec85 100644 --- a/vendor/symfony/http-kernel/Tests/EventListener/TranslatorListenerTest.php +++ b/vendor/symfony/http-kernel/Tests/EventListener/TranslatorListenerTest.php @@ -47,7 +47,7 @@ class TranslatorListenerTest extends TestCase $this->translator ->expects($this->at(0)) ->method('setLocale') - ->will($this->throwException(new \InvalidArgumentException())); + ->willThrowException(new \InvalidArgumentException()); $this->translator ->expects($this->at(1)) ->method('setLocale') @@ -84,7 +84,7 @@ class TranslatorListenerTest extends TestCase $this->translator ->expects($this->at(0)) ->method('setLocale') - ->will($this->throwException(new \InvalidArgumentException())); + ->willThrowException(new \InvalidArgumentException()); $this->translator ->expects($this->at(1)) ->method('setLocale') diff --git a/vendor/symfony/http-kernel/Tests/Fragment/EsiFragmentRendererTest.php b/vendor/symfony/http-kernel/Tests/Fragment/EsiFragmentRendererTest.php index 00d796d52..51e575620 100644 --- a/vendor/symfony/http-kernel/Tests/Fragment/EsiFragmentRendererTest.php +++ b/vendor/symfony/http-kernel/Tests/Fragment/EsiFragmentRendererTest.php @@ -72,7 +72,7 @@ class EsiFragmentRendererTest extends TestCase $altReference = new ControllerReference('alt_controller', array(), array()); $this->assertEquals( - '', + '', $strategy->render($reference, $request, array('alt' => $altReference))->getContent() ); } diff --git a/vendor/symfony/http-kernel/Tests/Fragment/HIncludeFragmentRendererTest.php b/vendor/symfony/http-kernel/Tests/Fragment/HIncludeFragmentRendererTest.php index 10fbccf0f..68f8ded4e 100644 --- a/vendor/symfony/http-kernel/Tests/Fragment/HIncludeFragmentRendererTest.php +++ b/vendor/symfony/http-kernel/Tests/Fragment/HIncludeFragmentRendererTest.php @@ -32,7 +32,7 @@ class HIncludeFragmentRendererTest extends TestCase { $strategy = new HIncludeFragmentRenderer(null, new UriSigner('foo')); - $this->assertEquals('', $strategy->render(new ControllerReference('main_controller', array(), array()), Request::create('/'))->getContent()); + $this->assertEquals('', $strategy->render(new ControllerReference('main_controller', array(), array()), Request::create('/'))->getContent()); } public function testRenderWithUri() @@ -80,7 +80,7 @@ class HIncludeFragmentRendererTest extends TestCase $engine->expects($this->once()) ->method('exists') ->with('default') - ->will($this->throwException(new \InvalidArgumentException())); + ->willThrowException(new \InvalidArgumentException()); // only default $strategy = new HIncludeFragmentRenderer($engine); @@ -93,7 +93,7 @@ class HIncludeFragmentRendererTest extends TestCase $engine->expects($this->once()) ->method('exists') ->with('loading...') - ->will($this->throwException(new \RuntimeException())); + ->willThrowException(new \RuntimeException()); // only default $strategy = new HIncludeFragmentRenderer($engine); diff --git a/vendor/symfony/http-kernel/Tests/Fragment/SsiFragmentRendererTest.php b/vendor/symfony/http-kernel/Tests/Fragment/SsiFragmentRendererTest.php index f72580311..ff98fd261 100644 --- a/vendor/symfony/http-kernel/Tests/Fragment/SsiFragmentRendererTest.php +++ b/vendor/symfony/http-kernel/Tests/Fragment/SsiFragmentRendererTest.php @@ -51,7 +51,7 @@ class SsiFragmentRendererTest extends TestCase $altReference = new ControllerReference('alt_controller', array(), array()); $this->assertEquals( - '', + '', $strategy->render($reference, $request, array('alt' => $altReference))->getContent() ); } diff --git a/vendor/symfony/http-kernel/Tests/HttpKernelTest.php b/vendor/symfony/http-kernel/Tests/HttpKernelTest.php index 4b9ec69d1..239865a86 100644 --- a/vendor/symfony/http-kernel/Tests/HttpKernelTest.php +++ b/vendor/symfony/http-kernel/Tests/HttpKernelTest.php @@ -200,7 +200,7 @@ class HttpKernelTest extends TestCase public function testHandleWhenTheControllerIsAnObjectWithInvoke() { $dispatcher = new EventDispatcher(); - $kernel = $this->getHttpKernel($dispatcher, new Controller()); + $kernel = $this->getHttpKernel($dispatcher, new TestController()); $this->assertResponseEquals(new Response('foo'), $kernel->handle(new Request())); } @@ -216,7 +216,7 @@ class HttpKernelTest extends TestCase public function testHandleWhenTheControllerIsAnArray() { $dispatcher = new EventDispatcher(); - $kernel = $this->getHttpKernel($dispatcher, array(new Controller(), 'controller')); + $kernel = $this->getHttpKernel($dispatcher, array(new TestController(), 'controller')); $this->assertResponseEquals(new Response('foo'), $kernel->handle(new Request())); } @@ -224,7 +224,7 @@ class HttpKernelTest extends TestCase public function testHandleWhenTheControllerIsAStaticArray() { $dispatcher = new EventDispatcher(); - $kernel = $this->getHttpKernel($dispatcher, array('Symfony\Component\HttpKernel\Tests\Controller', 'staticcontroller')); + $kernel = $this->getHttpKernel($dispatcher, array('Symfony\Component\HttpKernel\Tests\TestController', 'staticcontroller')); $this->assertResponseEquals(new Response('foo'), $kernel->handle(new Request())); } @@ -381,7 +381,7 @@ class HttpKernelTest extends TestCase } } -class Controller +class TestController { public function __invoke() { diff --git a/vendor/symfony/http-kernel/Tests/UriSignerTest.php b/vendor/symfony/http-kernel/Tests/UriSignerTest.php index 84ec19f70..9b7fe08a9 100644 --- a/vendor/symfony/http-kernel/Tests/UriSignerTest.php +++ b/vendor/symfony/http-kernel/Tests/UriSignerTest.php @@ -21,7 +21,8 @@ class UriSignerTest extends TestCase $signer = new UriSigner('foobar'); $this->assertContains('?_hash=', $signer->sign('http://example.com/foo')); - $this->assertContains('&_hash=', $signer->sign('http://example.com/foo?foo=bar')); + $this->assertContains('?_hash=', $signer->sign('http://example.com/foo?foo=bar')); + $this->assertContains('&foo=', $signer->sign('http://example.com/foo?foo=bar')); } public function testCheck() @@ -45,7 +46,7 @@ class UriSignerTest extends TestCase $signer = new UriSigner('foobar'); $this->assertSame( - 'http://example.com/foo?baz=bay&foo=bar&_hash=rIOcC%2FF3DoEGo%2FvnESjSp7uU9zA9S%2F%2BOLhxgMexoPUM%3D', + 'http://example.com/foo?_hash=rIOcC%2FF3DoEGo%2FvnESjSp7uU9zA9S%2F%2BOLhxgMexoPUM%3D&baz=bay&foo=bar', $signer->sign('http://example.com/foo?foo=bar&baz=bay') ); $this->assertTrue($signer->check($signer->sign('http://example.com/foo?foo=bar&baz=bay'))); @@ -61,4 +62,15 @@ class UriSignerTest extends TestCase ); $this->assertTrue($signer->check($signer->sign('http://example.com/foo?foo=bar&baz=bay'))); } + + public function testSignerWorksWithFragments() + { + $signer = new UriSigner('foobar'); + + $this->assertSame( + 'http://example.com/foo?_hash=EhpAUyEobiM3QTrKxoLOtQq5IsWyWedoXDPqIjzNj5o%3D&bar=foo&foo=bar#foobar', + $signer->sign('http://example.com/foo?bar=foo&foo=bar#foobar') + ); + $this->assertTrue($signer->check($signer->sign('http://example.com/foo?bar=foo&foo=bar#foobar'))); + } } diff --git a/vendor/symfony/http-kernel/UriSigner.php b/vendor/symfony/http-kernel/UriSigner.php index 28459b4ec..63d1a0856 100644 --- a/vendor/symfony/http-kernel/UriSigner.php +++ b/vendor/symfony/http-kernel/UriSigner.php @@ -51,8 +51,9 @@ class UriSigner } $uri = $this->buildUrl($url, $params); + $params[$this->parameter] = $this->computeHash($uri); - return $uri.(false === strpos($uri, '?') ? '?' : '&').$this->parameter.'='.$this->computeHash($uri); + return $this->buildUrl($url, $params); } /** @@ -75,7 +76,7 @@ class UriSigner return false; } - $hash = urlencode($params[$this->parameter]); + $hash = $params[$this->parameter]; unset($params[$this->parameter]); return $this->computeHash($this->buildUrl($url, $params)) === $hash; @@ -83,7 +84,7 @@ class UriSigner private function computeHash($uri) { - return urlencode(base64_encode(hash_hmac('sha256', $uri, $this->secret, true))); + return base64_encode(hash_hmac('sha256', $uri, $this->secret, true)); } private function buildUrl(array $url, array $params = array()) diff --git a/vendor/symfony/http-kernel/phpunit.xml.dist b/vendor/symfony/http-kernel/phpunit.xml.dist index e0de769dd..3fc07707f 100644 --- a/vendor/symfony/http-kernel/phpunit.xml.dist +++ b/vendor/symfony/http-kernel/phpunit.xml.dist @@ -1,7 +1,7 @@ assertEquals($expected, $result); } + public function testFindWithNullAsDefault() + { + if (ini_get('open_basedir')) { + $this->markTestSkipped('Cannot test when open_basedir is set'); + } + + $this->setPath(''); + + $finder = new ExecutableFinder(); + + $result = $finder->find('foo'); + + $this->assertNull($result); + } + public function testFindWithExtraDirs() { if (ini_get('open_basedir')) { diff --git a/vendor/symfony/process/phpunit.xml.dist b/vendor/symfony/process/phpunit.xml.dist index d38846730..c32f25101 100644 --- a/vendor/symfony/process/phpunit.xml.dist +++ b/vendor/symfony/process/phpunit.xml.dist @@ -1,7 +1,7 @@ count() && $class->hasMethod('__invoke')) { + $globals = $this->resetGlobals(); foreach ($this->reader->getClassAnnotations($class) as $annot) { if ($annot instanceof $this->routeAnnotationClass) { - $globals['path'] = ''; - $globals['name'] = ''; - $this->addRoute($collection, $annot, $globals, $class, $class->getMethod('__invoke')); } } @@ -212,17 +210,7 @@ abstract class AnnotationClassLoader implements LoaderInterface protected function getGlobals(\ReflectionClass $class) { - $globals = array( - 'path' => '', - 'requirements' => array(), - 'options' => array(), - 'defaults' => array(), - 'schemes' => array(), - 'methods' => array(), - 'host' => '', - 'condition' => '', - 'name' => '', - ); + $globals = $this->resetGlobals(); if ($annot = $this->reader->getClassAnnotation($class, $this->routeAnnotationClass)) { if (null !== $annot->getName()) { @@ -265,6 +253,21 @@ abstract class AnnotationClassLoader implements LoaderInterface return $globals; } + private function resetGlobals() + { + return array( + 'path' => '', + 'requirements' => array(), + 'options' => array(), + 'defaults' => array(), + 'schemes' => array(), + 'methods' => array(), + 'host' => '', + 'condition' => '', + 'name' => '', + ); + } + protected function createRoute($path, $defaults, $requirements, $options, $host, $schemes, $methods, $condition) { return new Route($path, $defaults, $requirements, $options, $host, $schemes, $methods, $condition); diff --git a/vendor/symfony/routing/Matcher/UrlMatcher.php b/vendor/symfony/routing/Matcher/UrlMatcher.php index ec3a05c95..4b6494288 100644 --- a/vendor/symfony/routing/Matcher/UrlMatcher.php +++ b/vendor/symfony/routing/Matcher/UrlMatcher.php @@ -118,15 +118,44 @@ class UrlMatcher implements UrlMatcherInterface, RequestMatcherInterface */ protected function matchCollection($pathinfo, RouteCollection $routes) { + // HEAD and GET are equivalent as per RFC + if ('HEAD' === $method = $this->context->getMethod()) { + $method = 'GET'; + } + $supportsTrailingSlash = '/' !== $pathinfo && '' !== $pathinfo && $this instanceof RedirectableUrlMatcherInterface; + foreach ($routes as $name => $route) { $compiledRoute = $route->compile(); + $staticPrefix = $compiledRoute->getStaticPrefix(); + $requiredMethods = $route->getMethods(); // check the static prefix of the URL first. Only use the more expensive preg_match when it matches - if ('' !== $compiledRoute->getStaticPrefix() && 0 !== strpos($pathinfo, $compiledRoute->getStaticPrefix())) { + if ('' === $staticPrefix || 0 === strpos($pathinfo, $staticPrefix)) { + // no-op + } elseif (!$supportsTrailingSlash || ($requiredMethods && !\in_array('GET', $requiredMethods)) || 'GET' !== $method) { + continue; + } elseif ('/' === substr($staticPrefix, -1) && substr($staticPrefix, 0, -1) === $pathinfo) { + return $this->allow = array(); + } else { + continue; + } + $regex = $compiledRoute->getRegex(); + + if ($supportsTrailingSlash && $pos = strpos($regex, '/$')) { + $regex = substr($regex, 0, $pos).'/?$'.substr($regex, $pos + 2); + $hasTrailingSlash = true; + } else { + $hasTrailingSlash = false; + } + + if (!preg_match($regex, $pathinfo, $matches)) { continue; } - if (!preg_match($compiledRoute->getRegex(), $pathinfo, $matches)) { + if ($hasTrailingSlash && '/' !== substr($pathinfo, -1)) { + if ((!$requiredMethods || \in_array('GET', $requiredMethods)) && 'GET' === $method) { + return $this->allow = array(); + } continue; } @@ -142,12 +171,7 @@ class UrlMatcher implements UrlMatcherInterface, RequestMatcherInterface } // check HTTP method requirement - if ($requiredMethods = $route->getMethods()) { - // HEAD and GET are equivalent as per RFC - if ('HEAD' === $method = $this->context->getMethod()) { - $method = 'GET'; - } - + if ($requiredMethods) { if (!\in_array($method, $requiredMethods)) { if (self::REQUIREMENT_MATCH === $status[0]) { $this->allow = array_merge($this->allow, $requiredMethods); @@ -159,6 +183,8 @@ class UrlMatcher implements UrlMatcherInterface, RequestMatcherInterface return $this->getAttributes($route, $name, array_replace($matches, $hostMatches, isset($status[1]) ? $status[1] : array())); } + + return array(); } /** diff --git a/vendor/symfony/routing/Router.php b/vendor/symfony/routing/Router.php index 56842a4d3..3f4838ea0 100644 --- a/vendor/symfony/routing/Router.php +++ b/vendor/symfony/routing/Router.php @@ -375,7 +375,7 @@ class Router implements RouterInterface, RequestMatcherInterface * Provides the ConfigCache factory implementation, falling back to a * default implementation if necessary. * - * @return ConfigCacheFactoryInterface $configCacheFactory + * @return ConfigCacheFactoryInterface */ private function getConfigCacheFactory() { diff --git a/vendor/symfony/routing/Tests/Loader/AnnotationClassLoaderTest.php b/vendor/symfony/routing/Tests/Loader/AnnotationClassLoaderTest.php index beab0b2e8..a0230ada8 100644 --- a/vendor/symfony/routing/Tests/Loader/AnnotationClassLoaderTest.php +++ b/vendor/symfony/routing/Tests/Loader/AnnotationClassLoaderTest.php @@ -181,7 +181,7 @@ class AnnotationClassLoaderTest extends AbstractAnnotationLoaderTest $this->assertEquals(array_merge($classRouteData['methods'], $methodRouteData['methods']), $route->getMethods(), '->load merges class and method route methods'); } - public function testInvokableClassRouteLoad() + public function testInvokableClassRouteLoadWithMethodAnnotation() { $classRouteData = array( 'name' => 'route1', @@ -209,6 +209,41 @@ class AnnotationClassLoaderTest extends AbstractAnnotationLoaderTest $this->assertEquals($classRouteData['methods'], $route->getMethods(), '->load preserves class route methods'); } + public function testInvokableClassRouteLoadWithClassAnnotation() + { + $classRouteData = array( + 'name' => 'route1', + 'path' => '/', + 'schemes' => array('https'), + 'methods' => array('GET'), + ); + + $this->reader + ->expects($this->exactly(1)) + ->method('getClassAnnotation') + ->will($this->returnValue($this->getAnnotatedRoute($classRouteData))) + ; + + $this->reader + ->expects($this->exactly(1)) + ->method('getClassAnnotations') + ->will($this->returnValue(array($this->getAnnotatedRoute($classRouteData)))) + ; + + $this->reader + ->expects($this->once()) + ->method('getMethodAnnotations') + ->will($this->returnValue(array())) + ; + + $routeCollection = $this->loader->load('Symfony\Component\Routing\Tests\Fixtures\AnnotatedClasses\BazClass'); + $route = $routeCollection->get($classRouteData['name']); + + $this->assertSame($classRouteData['path'], $route->getPath(), '->load preserves class route path'); + $this->assertEquals($classRouteData['schemes'], $route->getSchemes(), '->load preserves class route schemes'); + $this->assertEquals($classRouteData['methods'], $route->getMethods(), '->load preserves class route methods'); + } + public function testInvokableClassMultipleRouteLoad() { $classRouteData1 = array( diff --git a/vendor/symfony/routing/Tests/Matcher/Dumper/PhpMatcherDumperTest.php b/vendor/symfony/routing/Tests/Matcher/Dumper/PhpMatcherDumperTest.php index 66e858a82..68721bd63 100644 --- a/vendor/symfony/routing/Tests/Matcher/Dumper/PhpMatcherDumperTest.php +++ b/vendor/symfony/routing/Tests/Matcher/Dumper/PhpMatcherDumperTest.php @@ -430,9 +430,6 @@ class PhpMatcherDumperTest extends TestCase ); } - /** - * @param $dumper - */ private function generateDumpedMatcher(RouteCollection $collection, $redirectableStub = false) { $options = array('class' => $this->matcherClass); diff --git a/vendor/symfony/routing/Tests/Matcher/RedirectableUrlMatcherTest.php b/vendor/symfony/routing/Tests/Matcher/RedirectableUrlMatcherTest.php index 0f3cdeaba..9857f0502 100644 --- a/vendor/symfony/routing/Tests/Matcher/RedirectableUrlMatcherTest.php +++ b/vendor/symfony/routing/Tests/Matcher/RedirectableUrlMatcherTest.php @@ -117,6 +117,34 @@ class RedirectableUrlMatcherTest extends UrlMatcherTest $this->assertSame(array('_route' => 'foo'), $matcher->match('/foo')); } + public function testFallbackPage() + { + $coll = new RouteCollection(); + $coll->add('foo', new Route('/foo/')); + $coll->add('bar', new Route('/{name}')); + + $matcher = $this->getUrlMatcher($coll); + $matcher->expects($this->once())->method('redirect')->with('/foo/')->will($this->returnValue(array('_route' => 'foo'))); + $this->assertSame(array('_route' => 'foo'), $matcher->match('/foo')); + } + + public function testSlashAndVerbPrecedenceWithRedirection() + { + $coll = new RouteCollection(); + $coll->add('a', new Route('/api/customers/{customerId}/contactpersons', array(), array(), array(), '', array(), array('post'))); + $coll->add('b', new Route('/api/customers/{customerId}/contactpersons/', array(), array(), array(), '', array(), array('get'))); + + $matcher = $this->getUrlMatcher($coll); + $expected = array( + '_route' => 'b', + 'customerId' => '123', + ); + $this->assertEquals($expected, $matcher->match('/api/customers/123/contactpersons/')); + + $matcher->expects($this->once())->method('redirect')->with('/api/customers/123/contactpersons/')->willReturn(array()); + $this->assertEquals($expected, $matcher->match('/api/customers/123/contactpersons')); + } + protected function getUrlMatcher(RouteCollection $routes, RequestContext $context = null) { return $this->getMockForAbstractClass('Symfony\Component\Routing\Matcher\RedirectableUrlMatcher', array($routes, $context ?: new RequestContext())); diff --git a/vendor/symfony/routing/Tests/Matcher/UrlMatcherTest.php b/vendor/symfony/routing/Tests/Matcher/UrlMatcherTest.php index 0d4b44b09..85647f0be 100644 --- a/vendor/symfony/routing/Tests/Matcher/UrlMatcherTest.php +++ b/vendor/symfony/routing/Tests/Matcher/UrlMatcherTest.php @@ -502,6 +502,31 @@ class UrlMatcherTest extends TestCase $matcher->match('/'); } + public function testSlashAndVerbPrecedence() + { + $coll = new RouteCollection(); + $coll->add('a', new Route('/api/customers/{customerId}/contactpersons/', array(), array(), array(), '', array(), array('post'))); + $coll->add('b', new Route('/api/customers/{customerId}/contactpersons', array(), array(), array(), '', array(), array('get'))); + + $matcher = $this->getUrlMatcher($coll); + $expected = array( + '_route' => 'b', + 'customerId' => '123', + ); + $this->assertEquals($expected, $matcher->match('/api/customers/123/contactpersons')); + + $coll = new RouteCollection(); + $coll->add('a', new Route('/api/customers/{customerId}/contactpersons/', array(), array(), array(), '', array(), array('get'))); + $coll->add('b', new Route('/api/customers/{customerId}/contactpersons', array(), array(), array(), '', array(), array('post'))); + + $matcher = $this->getUrlMatcher($coll, new RequestContext('', 'POST')); + $expected = array( + '_route' => 'b', + 'customerId' => '123', + ); + $this->assertEquals($expected, $matcher->match('/api/customers/123/contactpersons')); + } + protected function getUrlMatcher(RouteCollection $routes, RequestContext $context = null) { return new UrlMatcher($routes, $context ?: new RequestContext()); diff --git a/vendor/symfony/routing/phpunit.xml.dist b/vendor/symfony/routing/phpunit.xml.dist index bcc095952..df742eab0 100644 --- a/vendor/symfony/routing/phpunit.xml.dist +++ b/vendor/symfony/routing/phpunit.xml.dist @@ -1,7 +1,7 @@ getClass()) { - if (!$this->serializer instanceof DenormalizerInterface) { - throw new LogicException(sprintf('Cannot create an instance of %s from serialized data because the serializer inject in "%s" is not a denormalizer', $constructorParameter->getClass(), static::class)); - } - $parameterClass = $constructorParameter->getClass()->getName(); - $parameterData = $this->serializer->denormalize($parameterData, $parameterClass, $format, $this->createChildContext($context, $paramName)); - } - } catch (\ReflectionException $e) { - throw new RuntimeException(sprintf('Could not determine the class of the parameter "%s".', $key), 0, $e); - } // Don't run set for a parameter passed to the constructor - $params[] = $parameterData; + $params[] = $this->denormalizeParameter($reflectionClass, $constructorParameter, $paramName, $parameterData, $context, $format); unset($data[$key]); } elseif ($constructorParameter->isDefaultValueAvailable()) { $params[] = $constructorParameter->getDefaultValue(); @@ -390,6 +379,27 @@ abstract class AbstractNormalizer extends SerializerAwareNormalizer implements N return new $class(); } + /** + * @internal + */ + protected function denormalizeParameter(\ReflectionClass $class, \ReflectionParameter $parameter, $parameterName, $parameterData, array $context, $format = null) + { + try { + if (null !== $parameter->getClass()) { + if (!$this->serializer instanceof DenormalizerInterface) { + throw new LogicException(sprintf('Cannot create an instance of %s from serialized data because the serializer inject in "%s" is not a denormalizer', $parameter->getClass(), static::class)); + } + $parameterClass = $parameter->getClass()->getName(); + + return $this->serializer->denormalize($parameterData, $parameterClass, $format, $this->createChildContext($context, $parameterName)); + } + + return $parameterData; + } catch (\ReflectionException $e) { + throw new RuntimeException(sprintf('Could not determine the class of the parameter "%s".', $parameterName), 0, $e); + } + } + /** * @param array $parentContext * @param string $attribute diff --git a/vendor/symfony/serializer/Normalizer/AbstractObjectNormalizer.php b/vendor/symfony/serializer/Normalizer/AbstractObjectNormalizer.php index aff70ee4c..1c3f54b60 100644 --- a/vendor/symfony/serializer/Normalizer/AbstractObjectNormalizer.php +++ b/vendor/symfony/serializer/Normalizer/AbstractObjectNormalizer.php @@ -304,6 +304,18 @@ abstract class AbstractObjectNormalizer extends AbstractNormalizer throw new NotNormalizableValueException(sprintf('The type of the "%s" attribute for class "%s" must be one of "%s" ("%s" given).', $attribute, $currentClass, implode('", "', array_keys($expectedTypes)), \gettype($data))); } + /** + * @internal + */ + protected function denormalizeParameter(\ReflectionClass $class, \ReflectionParameter $parameter, $parameterName, $parameterData, array $context, $format = null) + { + if (null === $this->propertyTypeExtractor || null === $types = $this->propertyTypeExtractor->getTypes($class->getName(), $parameterName)) { + return parent::denormalizeParameter($class, $parameter, $parameterName, $parameterData, $context, $format); + } + + return $this->validateAndDenormalize($class->getName(), $parameterName, $parameterData, $format, $context); + } + /** * Sets an attribute and apply the name converter if necessary. * diff --git a/vendor/symfony/serializer/Normalizer/DateTimeNormalizer.php b/vendor/symfony/serializer/Normalizer/DateTimeNormalizer.php index be469a4d5..aaa4e8b94 100644 --- a/vendor/symfony/serializer/Normalizer/DateTimeNormalizer.php +++ b/vendor/symfony/serializer/Normalizer/DateTimeNormalizer.php @@ -59,7 +59,8 @@ class DateTimeNormalizer implements NormalizerInterface, DenormalizerInterface $timezone = $this->getTimezone($context); if (null !== $timezone) { - $object = (new \DateTimeImmutable('@'.$object->getTimestamp()))->setTimezone($timezone); + $object = clone $object; + $object = $object->setTimezone($timezone); } return $object->format($format); diff --git a/vendor/symfony/serializer/Tests/DeserializeNestedArrayOfObjectsTest.php b/vendor/symfony/serializer/Tests/DeserializeNestedArrayOfObjectsTest.php new file mode 100644 index 000000000..e94c7dc0d --- /dev/null +++ b/vendor/symfony/serializer/Tests/DeserializeNestedArrayOfObjectsTest.php @@ -0,0 +1,128 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Serializer\Tests; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\PropertyInfo\Extractor\PhpDocExtractor; +use Symfony\Component\Serializer\Encoder\JsonEncoder; +use Symfony\Component\Serializer\Normalizer\ArrayDenormalizer; +use Symfony\Component\Serializer\Normalizer\ObjectNormalizer; +use Symfony\Component\Serializer\Serializer; + +class DeserializeNestedArrayOfObjectsTest extends TestCase +{ + public function provider() + { + return array( + //from property PhpDoc + array(Zoo::class), + //from argument constructor PhpDoc + array(ZooImmutable::class), + ); + } + + /** + * @dataProvider provider + */ + public function testPropertyPhpDoc($class) + { + //GIVEN + $json = << new JsonEncoder())); + //WHEN + /** @var Zoo $zoo */ + $zoo = $serializer->deserialize($json, $class, 'json'); + //THEN + self::assertCount(1, $zoo->getAnimals()); + self::assertInstanceOf(Animal::class, $zoo->getAnimals()[0]); + } +} + +class Zoo +{ + /** @var Animal[] */ + private $animals = array(); + + /** + * @return Animal[] + */ + public function getAnimals() + { + return $this->animals; + } + + /** + * @param Animal[] $animals + */ + public function setAnimals(array $animals) + { + $this->animals = $animals; + } +} + +class ZooImmutable +{ + /** @var Animal[] */ + private $animals = array(); + + /** + * @param Animal[] $animals + */ + public function __construct(array $animals = array()) + { + $this->animals = $animals; + } + + /** + * @return Animal[] + */ + public function getAnimals() + { + return $this->animals; + } +} + +class Animal +{ + /** @var string */ + private $name; + + public function __construct() + { + echo ''; + } + + /** + * @return string|null + */ + public function getName() + { + return $this->name; + } + + /** + * @param string|null $name + */ + public function setName($name) + { + $this->name = $name; + } +} diff --git a/vendor/symfony/serializer/Tests/Normalizer/DateTimeNormalizerTest.php b/vendor/symfony/serializer/Tests/Normalizer/DateTimeNormalizerTest.php index 178519b30..e86fbdc48 100644 --- a/vendor/symfony/serializer/Tests/Normalizer/DateTimeNormalizerTest.php +++ b/vendor/symfony/serializer/Tests/Normalizer/DateTimeNormalizerTest.php @@ -78,6 +78,82 @@ class DateTimeNormalizerTest extends TestCase yield array('2016-12-01T09:00:00+09:00', new \DateTimeImmutable('2016/12/01', new \DateTimeZone('UTC')), new \DateTimeZone('Japan')); } + /** + * @dataProvider normalizeUsingTimeZonePassedInContextAndExpectedFormatWithMicrosecondsProvider + */ + public function testNormalizeUsingTimeZonePassedInContextAndFormattedWithMicroseconds($expected, $expectedFormat, $input, $timezone) + { + $this->assertSame( + $expected, + $this->normalizer->normalize( + $input, + null, + array( + DateTimeNormalizer::TIMEZONE_KEY => $timezone, + DateTimeNormalizer::FORMAT_KEY => $expectedFormat, + ) + ) + ); + } + + public function normalizeUsingTimeZonePassedInContextAndExpectedFormatWithMicrosecondsProvider() + { + yield array( + '2018-12-01T18:03:06.067634', + 'Y-m-d\TH:i:s.u', + \DateTime::createFromFormat( + 'Y-m-d\TH:i:s.u', + '2018-12-01T18:03:06.067634', + new \DateTimeZone('UTC') + ), + null, + ); + + yield array( + '2018-12-01T18:03:06.067634', + 'Y-m-d\TH:i:s.u', + \DateTime::createFromFormat( + 'Y-m-d\TH:i:s.u', + '2018-12-01T18:03:06.067634', + new \DateTimeZone('UTC') + ), + new \DateTimeZone('UTC'), + ); + + yield array( + '2018-12-01T19:03:06.067634+01:00', + 'Y-m-d\TH:i:s.uP', + \DateTimeImmutable::createFromFormat( + 'Y-m-d\TH:i:s.u', + '2018-12-01T18:03:06.067634', + new \DateTimeZone('UTC') + ), + new \DateTimeZone('Europe/Rome'), + ); + + yield array( + '2018-12-01T20:03:06.067634+02:00', + 'Y-m-d\TH:i:s.uP', + \DateTime::createFromFormat( + 'Y-m-d\TH:i:s.u', + '2018-12-01T18:03:06.067634', + new \DateTimeZone('UTC') + ), + new \DateTimeZone('Europe/Kiev'), + ); + + yield array( + '2018-12-01T19:03:06.067634', + 'Y-m-d\TH:i:s.u', + \DateTime::createFromFormat( + 'Y-m-d\TH:i:s.u', + '2018-12-01T18:03:06.067634', + new \DateTimeZone('UTC') + ), + new \DateTimeZone('Europe/Berlin'), + ); + } + /** * @expectedException \Symfony\Component\Serializer\Exception\InvalidArgumentException * @expectedExceptionMessage The object must implement the "\DateTimeInterface". diff --git a/vendor/symfony/serializer/phpunit.xml.dist b/vendor/symfony/serializer/phpunit.xml.dist index ce9af71d9..2d99ce1d4 100644 --- a/vendor/symfony/serializer/phpunit.xml.dist +++ b/vendor/symfony/serializer/phpunit.xml.dist @@ -1,7 +1,7 @@ messages[$domain]['all'] = $target->all($domain);``, // because doing so will drop messages like {x: x ∈ source ∧ x ∉ target.all ∧ x ∈ target.fallback} // - // For 'new' messages, the code can't be simplied as ``array_diff_assoc($this->target->all($domain), $this->source->all($domain));`` + // For 'new' messages, the code can't be simplified as ``array_diff_assoc($this->target->all($domain), $this->source->all($domain));`` // because doing so will not exclude messages like {x: x ∈ target ∧ x ∉ source.all ∧ x ∈ source.fallback} // - // For 'obsolete' messages, the code can't be simplifed as ``array_diff_assoc($this->source->all($domain), $this->target->all($domain))`` + // For 'obsolete' messages, the code can't be simplified as ``array_diff_assoc($this->source->all($domain), $this->target->all($domain))`` // because doing so will not exclude messages like {x: x ∈ source ∧ x ∉ target.all ∧ x ∈ target.fallback} foreach ($this->source->all($domain) as $id => $message) { diff --git a/vendor/symfony/translation/DataCollectorTranslator.php b/vendor/symfony/translation/DataCollectorTranslator.php index 5d4d819e0..00147bcf3 100644 --- a/vendor/symfony/translation/DataCollectorTranslator.php +++ b/vendor/symfony/translation/DataCollectorTranslator.php @@ -90,7 +90,7 @@ class DataCollectorTranslator implements TranslatorInterface, TranslatorBagInter /** * Gets the fallback locales. * - * @return array $locales The fallback locales + * @return array The fallback locales */ public function getFallbackLocales() { diff --git a/vendor/symfony/translation/Dumper/FileDumper.php b/vendor/symfony/translation/Dumper/FileDumper.php index fe85e5dee..f81f79c3c 100644 --- a/vendor/symfony/translation/Dumper/FileDumper.php +++ b/vendor/symfony/translation/Dumper/FileDumper.php @@ -53,7 +53,7 @@ abstract class FileDumper implements DumperInterface /** * Sets backup flag. * - * @param bool + * @param bool $backup */ public function setBackup($backup) { diff --git a/vendor/symfony/translation/LICENSE b/vendor/symfony/translation/LICENSE index 21d7fb9e2..a677f4376 100644 --- a/vendor/symfony/translation/LICENSE +++ b/vendor/symfony/translation/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2018 Fabien Potencier +Copyright (c) 2004-2019 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/translation/Loader/XliffFileLoader.php b/vendor/symfony/translation/Loader/XliffFileLoader.php index 4cb196f9d..11a9ce4d4 100644 --- a/vendor/symfony/translation/Loader/XliffFileLoader.php +++ b/vendor/symfony/translation/Loader/XliffFileLoader.php @@ -91,7 +91,7 @@ class XliffFileLoader implements LoaderInterface $source = isset($attributes['resname']) && $attributes['resname'] ? $attributes['resname'] : $translation->source; // If the xlf file has another encoding specified, try to convert it because // simple_xml will always return utf-8 encoded values - $target = $this->utf8ToCharset((string) (isset($translation->target) ? $translation->target : $source), $encoding); + $target = $this->utf8ToCharset((string) (isset($translation->target) ? $translation->target : $translation->source), $encoding); $catalogue->set((string) $source, $target, $domain); diff --git a/vendor/symfony/translation/LoggingTranslator.php b/vendor/symfony/translation/LoggingTranslator.php index 014567086..7fedac913 100644 --- a/vendor/symfony/translation/LoggingTranslator.php +++ b/vendor/symfony/translation/LoggingTranslator.php @@ -89,7 +89,7 @@ class LoggingTranslator implements TranslatorInterface, TranslatorBagInterface /** * Gets the fallback locales. * - * @return array $locales The fallback locales + * @return array The fallback locales */ public function getFallbackLocales() { diff --git a/vendor/symfony/translation/Tests/Loader/XliffFileLoaderTest.php b/vendor/symfony/translation/Tests/Loader/XliffFileLoaderTest.php index 94406fd5f..c6958486c 100644 --- a/vendor/symfony/translation/Tests/Loader/XliffFileLoaderTest.php +++ b/vendor/symfony/translation/Tests/Loader/XliffFileLoaderTest.php @@ -66,7 +66,7 @@ class XliffFileLoaderTest extends TestCase $loader = new XliffFileLoader(); $catalogue = $loader->load(__DIR__.'/../fixtures/resname.xlf', 'en', 'domain1'); - $this->assertEquals(array('foo' => 'bar', 'bar' => 'baz', 'baz' => 'foo'), $catalogue->all('domain1')); + $this->assertEquals(array('foo' => 'bar', 'bar' => 'baz', 'baz' => 'foo', 'qux' => 'qux source'), $catalogue->all('domain1')); } public function testIncompleteResource() diff --git a/vendor/symfony/translation/Tests/TranslatorCacheTest.php b/vendor/symfony/translation/Tests/TranslatorCacheTest.php index 3e71ae74e..49b3748cc 100644 --- a/vendor/symfony/translation/Tests/TranslatorCacheTest.php +++ b/vendor/symfony/translation/Tests/TranslatorCacheTest.php @@ -123,7 +123,7 @@ class TranslatorCacheTest extends TestCase { /* * Similar to the previous test. After we used the second translator, make - * sure there's still a useable cache for the first one. + * sure there's still a usable cache for the first one. */ $locale = 'any_locale'; @@ -142,7 +142,7 @@ class TranslatorCacheTest extends TestCase $translator->addResource($format, array($msgid => 'FAIL'), $locale); $translator->trans($msgid); - // Now the first translator must still have a useable cache. + // Now the first translator must still have a usable cache. $translator = new Translator($locale, null, $this->tmpDir, $debug); $translator->addLoader($format, $this->createFailingLoader()); $translator->addResource($format, array($msgid => 'OK'), $locale); diff --git a/vendor/symfony/translation/Tests/fixtures/resname.xlf b/vendor/symfony/translation/Tests/fixtures/resname.xlf index 2df16af94..4fa5c0017 100644 --- a/vendor/symfony/translation/Tests/fixtures/resname.xlf +++ b/vendor/symfony/translation/Tests/fixtures/resname.xlf @@ -14,6 +14,9 @@ baz foo + + qux source + diff --git a/vendor/symfony/translation/Translator.php b/vendor/symfony/translation/Translator.php index b76aabb8d..c965a0bb4 100644 --- a/vendor/symfony/translation/Translator.php +++ b/vendor/symfony/translation/Translator.php @@ -179,7 +179,7 @@ class Translator implements TranslatorInterface, TranslatorBagInterface /** * Gets the fallback locales. * - * @return array $locales The fallback locales + * @return array The fallback locales */ public function getFallbackLocales() { diff --git a/vendor/symfony/translation/TranslatorInterface.php b/vendor/symfony/translation/TranslatorInterface.php index 9fcfd5bcf..b5033a8bc 100644 --- a/vendor/symfony/translation/TranslatorInterface.php +++ b/vendor/symfony/translation/TranslatorInterface.php @@ -38,7 +38,7 @@ interface TranslatorInterface * Translates the given choice message by choosing a translation according to a number. * * @param string $id The message id (may also be an object that can be cast to string) - * @param int $number The number to use to find the indice of the message + * @param int $number The number to use to find the index of the message * @param array $parameters An array of parameters for the message * @param string|null $domain The domain for the message or null to use the default * @param string|null $locale The locale or null to use the default diff --git a/vendor/symfony/translation/Util/ArrayConverter.php b/vendor/symfony/translation/Util/ArrayConverter.php index b98e7ce82..e8b7559df 100644 --- a/vendor/symfony/translation/Util/ArrayConverter.php +++ b/vendor/symfony/translation/Util/ArrayConverter.php @@ -69,7 +69,7 @@ class ArrayConverter $elem = &$elem[$part]; } - if (\is_array($elem) && \count($elem) > 0 && $parentOfElem) { + if ($elem && \is_array($elem) && $parentOfElem) { /* Process next case: * 'foo.bar': 'test1' * 'foo': 'test2' diff --git a/vendor/symfony/translation/phpunit.xml.dist b/vendor/symfony/translation/phpunit.xml.dist index 1fafa4691..21d324618 100644 --- a/vendor/symfony/translation/phpunit.xml.dist +++ b/vendor/symfony/translation/phpunit.xml.dist @@ -1,7 +1,7 @@ 0 && \is_string(key($options))) { + if ($options && \is_array($options) && \is_string(key($options))) { foreach ($options as $option => $value) { if (array_key_exists($option, $knownOptions)) { $this->$option = $value; diff --git a/vendor/symfony/validator/ConstraintViolation.php b/vendor/symfony/validator/ConstraintViolation.php index 848c77611..ae9ff89eb 100644 --- a/vendor/symfony/validator/ConstraintViolation.php +++ b/vendor/symfony/validator/ConstraintViolation.php @@ -79,13 +79,13 @@ class ConstraintViolation implements ConstraintViolationInterface } $propertyPath = (string) $this->propertyPath; - $code = $this->code; + $code = (string) $this->code; if ('' !== $propertyPath && '[' !== $propertyPath[0] && '' !== $class) { $class .= '.'; } - if (!empty($code)) { + if ('' !== $code) { $code = ' (code '.$code.')'; } diff --git a/vendor/symfony/validator/Constraints/BicValidator.php b/vendor/symfony/validator/Constraints/BicValidator.php index 51aecc384..2a27beff9 100644 --- a/vendor/symfony/validator/Constraints/BicValidator.php +++ b/vendor/symfony/validator/Constraints/BicValidator.php @@ -13,6 +13,7 @@ namespace Symfony\Component\Validator\Constraints; use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Exception\UnexpectedTypeException; /** * @author Michael Hirschler @@ -26,6 +27,10 @@ class BicValidator extends ConstraintValidator */ public function validate($value, Constraint $constraint) { + if (!$constraint instanceof Bic) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Bic'); + } + if (null === $value || '' === $value) { return; } diff --git a/vendor/symfony/validator/Constraints/CountValidator.php b/vendor/symfony/validator/Constraints/CountValidator.php index 39be8aa82..01f82a346 100644 --- a/vendor/symfony/validator/Constraints/CountValidator.php +++ b/vendor/symfony/validator/Constraints/CountValidator.php @@ -25,6 +25,10 @@ class CountValidator extends ConstraintValidator */ public function validate($value, Constraint $constraint) { + if (!$constraint instanceof Count) { + throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Count'); + } + if (null === $value) { return; } diff --git a/vendor/symfony/validator/Constraints/IbanValidator.php b/vendor/symfony/validator/Constraints/IbanValidator.php index 9d8d5b863..00f65049d 100644 --- a/vendor/symfony/validator/Constraints/IbanValidator.php +++ b/vendor/symfony/validator/Constraints/IbanValidator.php @@ -129,6 +129,7 @@ class IbanValidator extends ConstraintValidator 'TN' => 'TN59\d{2}\d{3}\d{13}\d{2}', // Tunisia 'TR' => 'TR\d{2}\d{5}[\dA-Z]{1}[\dA-Z]{16}', // Turkey 'UA' => 'UA\d{2}\d{6}[\dA-Z]{19}', // Ukraine + 'VA' => 'VA\d{2}\d{3}\d{15}', // Vatican City State 'VG' => 'VG\d{2}[A-Z]{4}\d{16}', // Virgin Islands, British 'WF' => 'FR\d{2}\d{5}\d{5}[\dA-Z]{11}\d{2}', // Wallis and Futuna Islands 'XK' => 'XK\d{2}\d{4}\d{10}\d{2}', // Republic of Kosovo diff --git a/vendor/symfony/validator/Constraints/UuidValidator.php b/vendor/symfony/validator/Constraints/UuidValidator.php index 38e9a0da8..26de4614f 100644 --- a/vendor/symfony/validator/Constraints/UuidValidator.php +++ b/vendor/symfony/validator/Constraints/UuidValidator.php @@ -66,14 +66,14 @@ class UuidValidator extends ConstraintValidator */ public function validate($value, Constraint $constraint) { - if (null === $value || '' === $value) { - return; - } - if (!$constraint instanceof Uuid) { throw new UnexpectedTypeException($constraint, __NAMESPACE__.'\Uuid'); } + if (null === $value || '' === $value) { + return; + } + if (!is_scalar($value) && !(\is_object($value) && method_exists($value, '__toString'))) { throw new UnexpectedTypeException($value, 'string'); } diff --git a/vendor/symfony/validator/Context/ExecutionContextInterface.php b/vendor/symfony/validator/Context/ExecutionContextInterface.php index 544c82f6c..e4f7df175 100644 --- a/vendor/symfony/validator/Context/ExecutionContextInterface.php +++ b/vendor/symfony/validator/Context/ExecutionContextInterface.php @@ -112,7 +112,7 @@ interface ExecutionContextInterface * Returns the currently validated object. * * If the validator is currently validating a class constraint, the - * object of that class is returned. If it is a validating a property or + * object of that class is returned. If it is validating a property or * getter constraint, the object that the property/getter belongs to is * returned. * diff --git a/vendor/symfony/validator/LICENSE b/vendor/symfony/validator/LICENSE index 21d7fb9e2..a677f4376 100644 --- a/vendor/symfony/validator/LICENSE +++ b/vendor/symfony/validator/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2018 Fabien Potencier +Copyright (c) 2004-2019 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/validator/Resources/translations/validators.ja.xlf b/vendor/symfony/validator/Resources/translations/validators.ja.xlf index 0c61d1571..207d4ba7a 100644 --- a/vendor/symfony/validator/Resources/translations/validators.ja.xlf +++ b/vendor/symfony/validator/Resources/translations/validators.ja.xlf @@ -326,6 +326,10 @@ This value should be a multiple of {{ compared_value }}. {{ compared_value }}の倍数でなければなりません。 + + This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}. + このSWIFTコードはIBANコード({{ iban }})に関連付けられていません。 + diff --git a/vendor/symfony/validator/Resources/translations/validators.vi.xlf b/vendor/symfony/validator/Resources/translations/validators.vi.xlf index e1833c79c..750a4d91e 100644 --- a/vendor/symfony/validator/Resources/translations/validators.vi.xlf +++ b/vendor/symfony/validator/Resources/translations/validators.vi.xlf @@ -40,7 +40,7 @@ This field is missing. - Lĩnh vực này là mất tích. + Lĩnh vực này bị thiếu. This value is not a valid date. @@ -132,7 +132,7 @@ This file is not a valid image. - Tập tin không phải là hình ảnh. + Tập tin không phải là hình ảnh hợp lệ. This is not a valid IP address. @@ -148,7 +148,7 @@ This value is not a valid country. - Giá trị không phải là nước hợp lệ. + Giá trị không phải là quốc gia hợp lệ. This value is already used. @@ -180,7 +180,7 @@ This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters. - Giá trị phải có chính xác {{ limit }} kí tự.|Giá trị phải có chính xác {{ limit }} kí tự. + Giá trị này phải có chính xác {{ limit }} kí tự.|Giá trị này phải có chính xác {{ limit }} kí tự. The file was only partially uploaded. @@ -204,11 +204,11 @@ This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more. - Danh sách phải chứa {{ limit }} hoặc nhiều hơn thành phần.|Danh sách phải chứa {{ limit }} hoặc nhiều hơn thành phần. + Danh sách phải chứa {{ limit }} thành phần hoặc nhiều hơn.|Danh sách phải chứa {{ limit }} thành phần hoặc nhiều hơn. This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less. - Danh sách phải chứa {{ limit }} hoặc ít hơn thành phần.|Danh sách phải chứa {{ limit }} hoặc ít hơn thành phần. + Danh sách phải chứa {{ limit }} thành phần hoặc ít hơn.|Danh sách phải chứa {{ limit }} thành phần hoặc ít hơn. This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements. @@ -240,11 +240,11 @@ This value is not a valid ISSN. - Giá trị không là ISSN hợp lệ. + Giá trị không phải là ISSN hợp lệ. This value is not a valid currency. - Giá trị không phải là đơn vi tiền tệ hợp lệ. + Giá trị không phải là đơn vị tiền tệ hợp lệ. This value should be equal to {{ compared_value }}. @@ -268,7 +268,7 @@ This value should be less than or equal to {{ compared_value }}. - Giá trị không được phép nhỏ hơn hoặc bằng {{ compared_value }}. + Giá trị phải nhỏ hơn hoặc bằng {{ compared_value }}. This value should not be equal to {{ compared_value }}. diff --git a/vendor/symfony/validator/Tests/ConstraintViolationTest.php b/vendor/symfony/validator/Tests/ConstraintViolationTest.php index cef4782e0..edaa7fa50 100644 --- a/vendor/symfony/validator/Tests/ConstraintViolationTest.php +++ b/vendor/symfony/validator/Tests/ConstraintViolationTest.php @@ -53,4 +53,59 @@ EOF; $this->assertSame($expected, (string) $violation); } + + public function testToStringHandlesCodes() + { + $violation = new ConstraintViolation( + '42 cannot be used here', + 'this is the message template', + array(), + array('some_value' => 42), + 'some_value', + null, + null, + 0 + ); + + $expected = <<<'EOF' +Array.some_value: + 42 cannot be used here (code 0) +EOF; + + $this->assertSame($expected, (string) $violation); + } + + public function testToStringOmitsEmptyCodes() + { + $expected = <<<'EOF' +Array.some_value: + 42 cannot be used here +EOF; + + $violation = new ConstraintViolation( + '42 cannot be used here', + 'this is the message template', + array(), + array('some_value' => 42), + 'some_value', + null, + null, + null + ); + + $this->assertSame($expected, (string) $violation); + + $violation = new ConstraintViolation( + '42 cannot be used here', + 'this is the message template', + array(), + array('some_value' => 42), + 'some_value', + null, + null, + '' + ); + + $this->assertSame($expected, (string) $violation); + } } diff --git a/vendor/symfony/validator/Tests/Constraints/IbanValidatorTest.php b/vendor/symfony/validator/Tests/Constraints/IbanValidatorTest.php index 7f9ba339c..e5c63c365 100644 --- a/vendor/symfony/validator/Tests/Constraints/IbanValidatorTest.php +++ b/vendor/symfony/validator/Tests/Constraints/IbanValidatorTest.php @@ -156,6 +156,7 @@ class IbanValidatorTest extends ConstraintValidatorTestCase array('TR330006100519786457841326'), //Turkey array('UA213223130000026007233566001'), //Ukraine array('AE260211000000230064016'), //United Arab Emirates + array('VA59001123000012345678'), //Vatican City State ); } @@ -274,6 +275,7 @@ class IbanValidatorTest extends ConstraintValidatorTestCase array('TR3300061005197864578413261'), //Turkey array('UA21AAAA1300000260072335660012'), //Ukraine array('AE2602110000002300640161'), //United Arab Emirates + array('VA590011230000123456781'), //Vatican City State ); } @@ -385,6 +387,7 @@ class IbanValidatorTest extends ConstraintValidatorTestCase array('TR330006100519786457841327'), //Turkey array('UA213223130000026007233566002'), //Ukraine array('AE260211000000230064017'), //United Arab Emirates + array('VA59001123000012345671'), //Vatican City State ); } diff --git a/vendor/symfony/validator/Tests/Validator/RecursiveValidatorTest.php b/vendor/symfony/validator/Tests/Validator/RecursiveValidatorTest.php index 9e0afe063..49ebef0c7 100644 --- a/vendor/symfony/validator/Tests/Validator/RecursiveValidatorTest.php +++ b/vendor/symfony/validator/Tests/Validator/RecursiveValidatorTest.php @@ -12,6 +12,10 @@ namespace Symfony\Component\Validator\Tests\Validator; use Symfony\Component\Translation\IdentityTranslator; +use Symfony\Component\Validator\Constraints\All; +use Symfony\Component\Validator\Constraints\Collection; +use Symfony\Component\Validator\Constraints\Length; +use Symfony\Component\Validator\Constraints\NotBlank; use Symfony\Component\Validator\ConstraintValidatorFactory; use Symfony\Component\Validator\Context\ExecutionContextFactory; use Symfony\Component\Validator\Mapping\Factory\MetadataFactoryInterface; @@ -95,4 +99,38 @@ class RecursiveValidatorTest extends AbstractTest $validator->validate($entity, null, array()); } + + public function testCollectionConstraintValidateAllGroupsForNestedConstraints() + { + $this->metadata->addPropertyConstraint('data', new Collection(array('fields' => array( + 'one' => array(new NotBlank(array('groups' => 'one')), new Length(array('min' => 2, 'groups' => 'two'))), + 'two' => array(new NotBlank(array('groups' => 'two'))), + )))); + + $entity = new Entity(); + $entity->data = array('one' => 't', 'two' => ''); + + $violations = $this->validator->validate($entity, null, array('one', 'two')); + + $this->assertCount(2, $violations); + $this->assertInstanceOf(Length::class, $violations->get(0)->getConstraint()); + $this->assertInstanceOf(NotBlank::class, $violations->get(1)->getConstraint()); + } + + public function testAllConstraintValidateAllGroupsForNestedConstraints() + { + $this->metadata->addPropertyConstraint('data', new All(array('constraints' => array( + new NotBlank(array('groups' => 'one')), + new Length(array('min' => 2, 'groups' => 'two')), + )))); + + $entity = new Entity(); + $entity->data = array('one' => 't', 'two' => ''); + + $violations = $this->validator->validate($entity, null, array('one', 'two')); + + $this->assertCount(2, $violations); + $this->assertInstanceOf(NotBlank::class, $violations->get(0)->getConstraint()); + $this->assertInstanceOf(Length::class, $violations->get(1)->getConstraint()); + } } diff --git a/vendor/symfony/validator/Validator/RecursiveContextualValidator.php b/vendor/symfony/validator/Validator/RecursiveContextualValidator.php index f50f767bd..230161836 100644 --- a/vendor/symfony/validator/Validator/RecursiveContextualValidator.php +++ b/vendor/symfony/validator/Validator/RecursiveContextualValidator.php @@ -12,6 +12,7 @@ namespace Symfony\Component\Validator\Validator; use Symfony\Component\Validator\Constraint; +use Symfony\Component\Validator\Constraints\Composite; use Symfony\Component\Validator\Constraints\GroupSequence; use Symfony\Component\Validator\ConstraintValidatorFactoryInterface; use Symfony\Component\Validator\Context\ExecutionContext; @@ -787,6 +788,10 @@ class RecursiveContextualValidator implements ContextualValidatorInterface if (null !== $cacheKey) { $constraintHash = spl_object_hash($constraint); + if ($constraint instanceof Composite) { + $constraintHash .= $group; + } + if ($context->isConstraintValidated($cacheKey, $constraintHash)) { continue; } diff --git a/vendor/symfony/validator/phpunit.xml.dist b/vendor/symfony/validator/phpunit.xml.dist index 0e82129d7..5d07c4e64 100644 --- a/vendor/symfony/validator/phpunit.xml.dist +++ b/vendor/symfony/validator/phpunit.xml.dist @@ -1,7 +1,7 @@ value = $identifier; - if (0 < $i = strrpos($identifier, '\\')) { - $this->attr['ellipsis'] = \strlen($identifier) - $i; - $this->attr['ellipsis-type'] = 'class'; - $this->attr['ellipsis-tail'] = 1; - } - try { if (null !== $callable) { if ($callable instanceof \Closure) { @@ -58,8 +54,31 @@ class ClassStub extends ConstStub $r = new \ReflectionClass($r[0]); } } + + if (false !== strpos($identifier, "class@anonymous\0")) { + $this->value = $identifier = preg_replace_callback('/class@anonymous\x00.*?\.php0x?[0-9a-fA-F]++/', function ($m) { + return \class_exists($m[0], false) ? get_parent_class($m[0]).'@anonymous' : $m[0]; + }, $identifier); + } + + if (null !== $callable && $r instanceof \ReflectionFunctionAbstract) { + $s = ReflectionCaster::castFunctionAbstract($r, array(), new Stub(), true); + $s = ReflectionCaster::getSignature($s); + + if ('()' === substr($identifier, -2)) { + $this->value = substr_replace($identifier, $s, -2); + } else { + $this->value .= $s; + } + } } catch (\ReflectionException $e) { return; + } finally { + if (0 < $i = strrpos($this->value, '\\')) { + $this->attr['ellipsis'] = \strlen($this->value) - $i; + $this->attr['ellipsis-type'] = 'class'; + $this->attr['ellipsis-tail'] = 1; + } } if ($f = $r->getFileName()) { @@ -75,9 +94,9 @@ class ClassStub extends ConstStub } if (!\is_array($callable)) { - $callable = new static($callable); + $callable = new static($callable, $callable); } elseif (\is_string($callable[0])) { - $callable[0] = new static($callable[0]); + $callable[0] = new static($callable[0], $callable); } else { $callable[1] = new static($callable[1], $callable); } diff --git a/vendor/symfony/var-dumper/Caster/ExceptionCaster.php b/vendor/symfony/var-dumper/Caster/ExceptionCaster.php index 49df71da7..f3af638d9 100644 --- a/vendor/symfony/var-dumper/Caster/ExceptionCaster.php +++ b/vendor/symfony/var-dumper/Caster/ExceptionCaster.php @@ -71,7 +71,9 @@ 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']); + $class = \get_class($a[$xPrefix.'previous']); + $class = 'c' === $class[0] && 0 === strpos($class, "class@anonymous\0") ? get_parent_class($class).'@anonymous' : $class; + self::traceUnshift($b[$xPrefix.'trace'], $class, $b[$prefix.'file'], $b[$prefix.'line']); $a[$trace] = new TraceStub($b[$xPrefix.'trace'], false, 0, -\count($a[$trace]->value)); } @@ -279,6 +281,12 @@ class ExceptionCaster } unset($a[$xPrefix.'string'], $a[Caster::PREFIX_DYNAMIC.'xdebug_message'], $a[Caster::PREFIX_DYNAMIC.'__destructorException']); + if (isset($a[Caster::PREFIX_PROTECTED.'message']) && false !== strpos($a[Caster::PREFIX_PROTECTED.'message'], "class@anonymous\0")) { + $a[Caster::PREFIX_PROTECTED.'message'] = preg_replace_callback('/class@anonymous\x00.*?\.php0x?[0-9a-fA-F]++/', function ($m) { + return \class_exists($m[0], false) ? get_parent_class($m[0]).'@anonymous' : $m[0]; + }, $a[Caster::PREFIX_PROTECTED.'message']); + } + if (isset($a[Caster::PREFIX_PROTECTED.'file'], $a[Caster::PREFIX_PROTECTED.'line'])) { $a[Caster::PREFIX_PROTECTED.'file'] = new LinkStub($a[Caster::PREFIX_PROTECTED.'file'], $a[Caster::PREFIX_PROTECTED.'line']); } diff --git a/vendor/symfony/var-dumper/Caster/IntlCaster.php b/vendor/symfony/var-dumper/Caster/IntlCaster.php new file mode 100644 index 000000000..a69813079 --- /dev/null +++ b/vendor/symfony/var-dumper/Caster/IntlCaster.php @@ -0,0 +1,171 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * @author Nicolas Grekas + * @author Jan Schädlich + */ +class IntlCaster +{ + public static function castMessageFormatter(\MessageFormatter $c, array $a, Stub $stub, $isNested) + { + $a += array( + Caster::PREFIX_VIRTUAL.'locale' => $c->getLocale(), + Caster::PREFIX_VIRTUAL.'pattern' => $c->getPattern(), + ); + + return self::castError($c, $a); + } + + public static function castNumberFormatter(\NumberFormatter $c, array $a, Stub $stub, $isNested, $filter = 0) + { + $a += array( + Caster::PREFIX_VIRTUAL.'locale' => $c->getLocale(), + Caster::PREFIX_VIRTUAL.'pattern' => $c->getPattern(), + ); + + if ($filter & Caster::EXCLUDE_VERBOSE) { + $stub->cut += 3; + + return self::castError($c, $a); + } + + $a += array( + Caster::PREFIX_VIRTUAL.'attributes' => new EnumStub( + array( + 'PARSE_INT_ONLY' => $c->getAttribute(\NumberFormatter::PARSE_INT_ONLY), + 'GROUPING_USED' => $c->getAttribute(\NumberFormatter::GROUPING_USED), + 'DECIMAL_ALWAYS_SHOWN' => $c->getAttribute(\NumberFormatter::DECIMAL_ALWAYS_SHOWN), + 'MAX_INTEGER_DIGITS' => $c->getAttribute(\NumberFormatter::MAX_INTEGER_DIGITS), + 'MIN_INTEGER_DIGITS' => $c->getAttribute(\NumberFormatter::MIN_INTEGER_DIGITS), + 'INTEGER_DIGITS' => $c->getAttribute(\NumberFormatter::INTEGER_DIGITS), + 'MAX_FRACTION_DIGITS' => $c->getAttribute(\NumberFormatter::MAX_FRACTION_DIGITS), + 'MIN_FRACTION_DIGITS' => $c->getAttribute(\NumberFormatter::MIN_FRACTION_DIGITS), + 'FRACTION_DIGITS' => $c->getAttribute(\NumberFormatter::FRACTION_DIGITS), + 'MULTIPLIER' => $c->getAttribute(\NumberFormatter::MULTIPLIER), + 'GROUPING_SIZE' => $c->getAttribute(\NumberFormatter::GROUPING_SIZE), + 'ROUNDING_MODE' => $c->getAttribute(\NumberFormatter::ROUNDING_MODE), + 'ROUNDING_INCREMENT' => $c->getAttribute(\NumberFormatter::ROUNDING_INCREMENT), + 'FORMAT_WIDTH' => $c->getAttribute(\NumberFormatter::FORMAT_WIDTH), + 'PADDING_POSITION' => $c->getAttribute(\NumberFormatter::PADDING_POSITION), + 'SECONDARY_GROUPING_SIZE' => $c->getAttribute(\NumberFormatter::SECONDARY_GROUPING_SIZE), + 'SIGNIFICANT_DIGITS_USED' => $c->getAttribute(\NumberFormatter::SIGNIFICANT_DIGITS_USED), + 'MIN_SIGNIFICANT_DIGITS' => $c->getAttribute(\NumberFormatter::MIN_SIGNIFICANT_DIGITS), + 'MAX_SIGNIFICANT_DIGITS' => $c->getAttribute(\NumberFormatter::MAX_SIGNIFICANT_DIGITS), + 'LENIENT_PARSE' => $c->getAttribute(\NumberFormatter::LENIENT_PARSE), + ) + ), + Caster::PREFIX_VIRTUAL.'text_attributes' => new EnumStub( + array( + 'POSITIVE_PREFIX' => $c->getTextAttribute(\NumberFormatter::POSITIVE_PREFIX), + 'POSITIVE_SUFFIX' => $c->getTextAttribute(\NumberFormatter::POSITIVE_SUFFIX), + 'NEGATIVE_PREFIX' => $c->getTextAttribute(\NumberFormatter::NEGATIVE_PREFIX), + 'NEGATIVE_SUFFIX' => $c->getTextAttribute(\NumberFormatter::NEGATIVE_SUFFIX), + 'PADDING_CHARACTER' => $c->getTextAttribute(\NumberFormatter::PADDING_CHARACTER), + 'CURRENCY_CODE' => $c->getTextAttribute(\NumberFormatter::CURRENCY_CODE), + 'DEFAULT_RULESET' => $c->getTextAttribute(\NumberFormatter::DEFAULT_RULESET), + 'PUBLIC_RULESETS' => $c->getTextAttribute(\NumberFormatter::PUBLIC_RULESETS), + ) + ), + Caster::PREFIX_VIRTUAL.'symbols' => new EnumStub( + array( + 'DECIMAL_SEPARATOR_SYMBOL' => $c->getSymbol(\NumberFormatter::DECIMAL_SEPARATOR_SYMBOL), + 'GROUPING_SEPARATOR_SYMBOL' => $c->getSymbol(\NumberFormatter::GROUPING_SEPARATOR_SYMBOL), + 'PATTERN_SEPARATOR_SYMBOL' => $c->getSymbol(\NumberFormatter::PATTERN_SEPARATOR_SYMBOL), + 'PERCENT_SYMBOL' => $c->getSymbol(\NumberFormatter::PERCENT_SYMBOL), + 'ZERO_DIGIT_SYMBOL' => $c->getSymbol(\NumberFormatter::ZERO_DIGIT_SYMBOL), + 'DIGIT_SYMBOL' => $c->getSymbol(\NumberFormatter::DIGIT_SYMBOL), + 'MINUS_SIGN_SYMBOL' => $c->getSymbol(\NumberFormatter::MINUS_SIGN_SYMBOL), + 'PLUS_SIGN_SYMBOL' => $c->getSymbol(\NumberFormatter::PLUS_SIGN_SYMBOL), + 'CURRENCY_SYMBOL' => $c->getSymbol(\NumberFormatter::CURRENCY_SYMBOL), + 'INTL_CURRENCY_SYMBOL' => $c->getSymbol(\NumberFormatter::INTL_CURRENCY_SYMBOL), + 'MONETARY_SEPARATOR_SYMBOL' => $c->getSymbol(\NumberFormatter::MONETARY_SEPARATOR_SYMBOL), + 'EXPONENTIAL_SYMBOL' => $c->getSymbol(\NumberFormatter::EXPONENTIAL_SYMBOL), + 'PERMILL_SYMBOL' => $c->getSymbol(\NumberFormatter::PERMILL_SYMBOL), + 'PAD_ESCAPE_SYMBOL' => $c->getSymbol(\NumberFormatter::PAD_ESCAPE_SYMBOL), + 'INFINITY_SYMBOL' => $c->getSymbol(\NumberFormatter::INFINITY_SYMBOL), + 'NAN_SYMBOL' => $c->getSymbol(\NumberFormatter::NAN_SYMBOL), + 'SIGNIFICANT_DIGIT_SYMBOL' => $c->getSymbol(\NumberFormatter::SIGNIFICANT_DIGIT_SYMBOL), + 'MONETARY_GROUPING_SEPARATOR_SYMBOL' => $c->getSymbol(\NumberFormatter::MONETARY_GROUPING_SEPARATOR_SYMBOL), + ) + ), + ); + + return self::castError($c, $a); + } + + public static function castIntlTimeZone(\IntlTimeZone $c, array $a, Stub $stub, $isNested) + { + $a += array( + Caster::PREFIX_VIRTUAL.'display_name' => $c->getDisplayName(), + Caster::PREFIX_VIRTUAL.'id' => $c->getID(), + Caster::PREFIX_VIRTUAL.'raw_offset' => $c->getRawOffset(), + ); + + if ($c->useDaylightTime()) { + $a += array( + Caster::PREFIX_VIRTUAL.'dst_savings' => $c->getDSTSavings(), + ); + } + + return self::castError($c, $a); + } + + public static function castIntlCalendar(\IntlCalendar $c, array $a, Stub $stub, $isNested, $filter = 0) + { + $a += array( + Caster::PREFIX_VIRTUAL.'type' => $c->getType(), + Caster::PREFIX_VIRTUAL.'first_day_of_week' => $c->getFirstDayOfWeek(), + Caster::PREFIX_VIRTUAL.'minimal_days_in_first_week' => $c->getMinimalDaysInFirstWeek(), + Caster::PREFIX_VIRTUAL.'repeated_wall_time_option' => $c->getRepeatedWallTimeOption(), + Caster::PREFIX_VIRTUAL.'skipped_wall_time_option' => $c->getSkippedWallTimeOption(), + Caster::PREFIX_VIRTUAL.'time' => $c->getTime(), + Caster::PREFIX_VIRTUAL.'type' => $c->getType(), + Caster::PREFIX_VIRTUAL.'in_daylight_time' => $c->inDaylightTime(), + Caster::PREFIX_VIRTUAL.'is_lenient' => $c->isLenient(), + Caster::PREFIX_VIRTUAL.'time_zone' => ($filter & Caster::EXCLUDE_VERBOSE) ? new CutStub($c->getTimeZone()) : $c->getTimeZone(), + ); + + return self::castError($c, $a); + } + + public static function castIntlDateFormatter(\IntlDateFormatter $c, array $a, Stub $stub, $isNested, $filter = 0) + { + $a += array( + Caster::PREFIX_VIRTUAL.'locale' => $c->getLocale(), + Caster::PREFIX_VIRTUAL.'pattern' => $c->getPattern(), + Caster::PREFIX_VIRTUAL.'calendar' => $c->getCalendar(), + Caster::PREFIX_VIRTUAL.'time_zone_id' => $c->getTimeZoneId(), + Caster::PREFIX_VIRTUAL.'time_type' => $c->getTimeType(), + Caster::PREFIX_VIRTUAL.'date_type' => $c->getDateType(), + Caster::PREFIX_VIRTUAL.'calendar_object' => ($filter & Caster::EXCLUDE_VERBOSE) ? new CutStub($c->getCalendarObject()) : $c->getCalendarObject(), + Caster::PREFIX_VIRTUAL.'time_zone' => ($filter & Caster::EXCLUDE_VERBOSE) ? new CutStub($c->getTimeZone()) : $c->getTimeZone(), + ); + + return self::castError($c, $a); + } + + private static function castError($c, array $a): array + { + if ($errorCode = $c->getErrorCode()) { + $a += array( + Caster::PREFIX_VIRTUAL.'error_code' => $errorCode, + Caster::PREFIX_VIRTUAL.'error_message' => $c->getErrorMessage(), + ); + } + + return $a; + } +} diff --git a/vendor/symfony/var-dumper/Caster/MemcachedCaster.php b/vendor/symfony/var-dumper/Caster/MemcachedCaster.php new file mode 100644 index 000000000..99a33bca6 --- /dev/null +++ b/vendor/symfony/var-dumper/Caster/MemcachedCaster.php @@ -0,0 +1,79 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * @author Jan Schädlich + */ +class MemcachedCaster +{ + private static $optionConstants; + private static $defaultOptions; + + public static function castMemcached(\Memcached $c, array $a, Stub $stub, $isNested) + { + $a += array( + Caster::PREFIX_VIRTUAL.'servers' => $c->getServerList(), + Caster::PREFIX_VIRTUAL.'options' => new EnumStub( + self::getNonDefaultOptions($c) + ), + ); + + return $a; + } + + private static function getNonDefaultOptions(\Memcached $c) + { + self::$defaultOptions = self::$defaultOptions ?? self::discoverDefaultOptions(); + self::$optionConstants = self::$optionConstants ?? self::getOptionConstants(); + + $nonDefaultOptions = array(); + foreach (self::$optionConstants as $constantKey => $value) { + if (self::$defaultOptions[$constantKey] !== $option = $c->getOption($value)) { + $nonDefaultOptions[$constantKey] = $option; + } + } + + return $nonDefaultOptions; + } + + private static function discoverDefaultOptions() + { + $defaultMemcached = new \Memcached(); + $defaultMemcached->addServer('127.0.0.1', 11211); + + $defaultOptions = array(); + self::$optionConstants = self::$optionConstants ?? self::getOptionConstants(); + + foreach (self::$optionConstants as $constantKey => $value) { + $defaultOptions[$constantKey] = $defaultMemcached->getOption($value); + } + + return $defaultOptions; + } + + private static function getOptionConstants() + { + $reflectedMemcached = new \ReflectionClass(\Memcached::class); + + $optionConstants = array(); + foreach ($reflectedMemcached->getConstants() as $constantKey => $value) { + if (0 === strpos($constantKey, 'OPT_')) { + $optionConstants[$constantKey] = $value; + } + } + + return $optionConstants; + } +} diff --git a/vendor/symfony/var-dumper/Caster/ProxyManagerCaster.php b/vendor/symfony/var-dumper/Caster/ProxyManagerCaster.php new file mode 100644 index 000000000..da037b6b3 --- /dev/null +++ b/vendor/symfony/var-dumper/Caster/ProxyManagerCaster.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use ProxyManager\Proxy\ProxyInterface; +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * @author Nicolas Grekas + */ +class ProxyManagerCaster +{ + public static function castProxy(ProxyInterface $c, array $a, Stub $stub, $isNested) + { + if ($parent = \get_parent_class($c)) { + $stub->class .= ' - '.$parent; + } + $stub->class .= '@proxy'; + + return $a; + } +} diff --git a/vendor/symfony/var-dumper/Caster/RedisCaster.php b/vendor/symfony/var-dumper/Caster/RedisCaster.php index 112097fd9..0fcd9d96f 100644 --- a/vendor/symfony/var-dumper/Caster/RedisCaster.php +++ b/vendor/symfony/var-dumper/Caster/RedisCaster.php @@ -26,6 +26,24 @@ class RedisCaster 2 => 'IGBINARY', // Optional Redis::SERIALIZER_IGBINARY ); + private static $mode = array( + \Redis::ATOMIC => 'ATOMIC', + \Redis::MULTI => 'MULTI', + \Redis::PIPELINE => 'PIPELINE', + ); + + private static $compression = array( + 0 => 'NONE', // Redis::COMPRESSION_NONE + 1 => 'LZF', // Redis::COMPRESSION_LZF + ); + + private static $failover = array( + \RedisCluster::FAILOVER_NONE => 'NONE', + \RedisCluster::FAILOVER_ERROR => 'ERROR', + \RedisCluster::FAILOVER_DISTRIBUTE => 'DISTRIBUTE', + \RedisCluster::FAILOVER_DISTRIBUTE_SLAVES => 'DISTRIBUTE_SLAVES', + ); + public static function castRedis(\Redis $c, array $a, Stub $stub, $isNested) { $prefix = Caster::PREFIX_VIRTUAL; @@ -36,23 +54,19 @@ class RedisCaster ); } - $ser = $c->getOption(\Redis::OPT_SERIALIZER); - $retry = \defined('Redis::OPT_SCAN') ? $c->getOption(\Redis::OPT_SCAN) : 0; + $mode = $c->getMode(); return $a + array( $prefix.'isConnected' => $connected, $prefix.'host' => $c->getHost(), $prefix.'port' => $c->getPort(), $prefix.'auth' => $c->getAuth(), + $prefix.'mode' => isset(self::$mode[$mode]) ? new ConstStub(self::$mode[$mode], $mode) : $mode, $prefix.'dbNum' => $c->getDbNum(), $prefix.'timeout' => $c->getTimeout(), + $prefix.'lastError' => $c->getLastError(), $prefix.'persistentId' => $c->getPersistentID(), - $prefix.'options' => new EnumStub(array( - 'READ_TIMEOUT' => $c->getOption(\Redis::OPT_READ_TIMEOUT), - 'SERIALIZER' => isset(self::$serializer[$ser]) ? new ConstStub(self::$serializer[$ser], $ser) : $ser, - 'PREFIX' => $c->getOption(\Redis::OPT_PREFIX), - 'SCAN' => new ConstStub($retry ? 'RETRY' : 'NORETRY', $retry), - )), + $prefix.'options' => self::getRedisOptions($c), ); } @@ -63,6 +77,74 @@ class RedisCaster return $a + array( $prefix.'hosts' => $c->_hosts(), $prefix.'function' => ClassStub::wrapCallable($c->_function()), + $prefix.'lastError' => $c->getLastError(), + $prefix.'options' => self::getRedisOptions($c), ); } + + public static function castRedisCluster(\RedisCluster $c, array $a, Stub $stub, $isNested) + { + $prefix = Caster::PREFIX_VIRTUAL; + $failover = $c->getOption(\RedisCluster::OPT_SLAVE_FAILOVER); + + $a += array( + $prefix.'_masters' => $c->_masters(), + $prefix.'_redir' => $c->_redir(), + $prefix.'mode' => new ConstStub($c->getMode() ? 'MULTI' : 'ATOMIC', $c->getMode()), + $prefix.'lastError' => $c->getLastError(), + $prefix.'options' => self::getRedisOptions($c, array( + 'SLAVE_FAILOVER' => isset(self::$failover[$failover]) ? new ConstStub(self::$failover[$failover], $failover) : $failover, + )), + ); + + return $a; + } + + /** + * @param \Redis|\RedisArray|\RedisCluster $redis + */ + private static function getRedisOptions($redis, array $options = array()): EnumStub + { + $serializer = $redis->getOption(\Redis::OPT_SERIALIZER); + if (\is_array($serializer)) { + foreach ($serializer as &$v) { + if (isset(self::$serializer[$v])) { + $v = new ConstStub(self::$serializer[$v], $v); + } + } + } elseif (isset(self::$serializer[$serializer])) { + $serializer = new ConstStub(self::$serializer[$serializer], $serializer); + } + + $compression = \defined('Redis::OPT_COMPRESSION') ? $redis->getOption(\Redis::OPT_COMPRESSION) : 0; + if (\is_array($compression)) { + foreach ($compression as &$v) { + if (isset(self::$compression[$v])) { + $v = new ConstStub(self::$compression[$v], $v); + } + } + } elseif (isset(self::$compression[$compression])) { + $compression = new ConstStub(self::$compression[$compression], $compression); + } + + $retry = \defined('Redis::OPT_SCAN') ? $redis->getOption(\Redis::OPT_SCAN) : 0; + if (\is_array($retry)) { + foreach ($retry as &$v) { + $v = new ConstStub($v ? 'RETRY' : 'NORETRY', $v); + } + } else { + $retry = new ConstStub($retry ? 'RETRY' : 'NORETRY', $retry); + } + + $options += array( + 'TCP_KEEPALIVE' => \defined('Redis::OPT_TCP_KEEPALIVE') ? $redis->getOption(\Redis::OPT_TCP_KEEPALIVE) : 0, + 'READ_TIMEOUT' => $redis->getOption(\Redis::OPT_READ_TIMEOUT), + 'COMPRESSION' => $compression, + 'SERIALIZER' => $serializer, + 'PREFIX' => $redis->getOption(\Redis::OPT_PREFIX), + 'SCAN' => $retry, + ); + + return new EnumStub($options); + } } diff --git a/vendor/symfony/var-dumper/Caster/ReflectionCaster.php b/vendor/symfony/var-dumper/Caster/ReflectionCaster.php index c625e787d..35a764a50 100644 --- a/vendor/symfony/var-dumper/Caster/ReflectionCaster.php +++ b/vendor/symfony/var-dumper/Caster/ReflectionCaster.php @@ -38,6 +38,20 @@ class ReflectionCaster $a = static::castFunctionAbstract($c, $a, $stub, $isNested, $filter); + if (false === strpos($c->name, '{closure}')) { + $stub->class = isset($a[$prefix.'class']) ? $a[$prefix.'class']->value.'::'.$c->name : $c->name; + unset($a[$prefix.'class']); + } + unset($a[$prefix.'extra']); + + $stub->class .= self::getSignature($a); + + if ($filter & Caster::EXCLUDE_VERBOSE) { + $stub->cut += ($c->getFileName() ? 2 : 0) + \count($a); + + return array(); + } + if (isset($a[$prefix.'parameters'])) { foreach ($a[$prefix.'parameters']->value as &$v) { $param = $v; @@ -51,14 +65,11 @@ class ReflectionCaster } } - if (!($filter & Caster::EXCLUDE_VERBOSE) && $f = $c->getFileName()) { + if ($f = $c->getFileName()) { $a[$prefix.'file'] = new LinkStub($f, $c->getStartLine()); $a[$prefix.'line'] = $c->getStartLine().' to '.$c->getEndLine(); } - $prefix = Caster::PREFIX_DYNAMIC; - unset($a['name'], $a[$prefix.'this'], $a[$prefix.'parameter'], $a[Caster::PREFIX_VIRTUAL.'extra']); - return $a; } @@ -294,6 +305,52 @@ class ReflectionCaster return $a; } + public static function getSignature(array $a) + { + $prefix = Caster::PREFIX_VIRTUAL; + $signature = ''; + + if (isset($a[$prefix.'parameters'])) { + foreach ($a[$prefix.'parameters']->value as $k => $param) { + $signature .= ', '; + if ($type = $param->getType()) { + if (!$param->isOptional() && $param->allowsNull()) { + $signature .= '?'; + } + $signature .= substr(strrchr('\\'.$type->getName(), '\\'), 1).' '; + } + $signature .= $k; + + if (!$param->isDefaultValueAvailable()) { + continue; + } + $v = $param->getDefaultValue(); + $signature .= ' = '; + + if ($param->isDefaultValueConstant()) { + $signature .= substr(strrchr('\\'.$param->getDefaultValueConstantName(), '\\'), 1); + } elseif (null === $v) { + $signature .= 'null'; + } elseif (\is_array($v)) { + $signature .= $v ? '[…'.\count($v).']' : '[]'; + } elseif (\is_string($v)) { + $signature .= 10 > \strlen($v) && false === strpos($v, '\\') ? "'{$v}'" : "'…".\strlen($v)."'"; + } elseif (\is_bool($v)) { + $signature .= $v ? 'true' : 'false'; + } else { + $signature .= $v; + } + } + } + $signature = (empty($a[$prefix.'returnsReference']) ? '' : '&').'('.substr($signature, 2).')'; + + if (isset($a[$prefix.'returnType'])) { + $signature .= ': '.substr(strrchr('\\'.$a[$prefix.'returnType'], '\\'), 1); + } + + return $signature; + } + private static function addExtra(&$a, \Reflector $c) { $x = isset($a[Caster::PREFIX_VIRTUAL.'extra']) ? $a[Caster::PREFIX_VIRTUAL.'extra']->value : array(); diff --git a/vendor/symfony/var-dumper/Cloner/AbstractCloner.php b/vendor/symfony/var-dumper/Cloner/AbstractCloner.php index f8dfa97c9..9c8ec92be 100644 --- a/vendor/symfony/var-dumper/Cloner/AbstractCloner.php +++ b/vendor/symfony/var-dumper/Cloner/AbstractCloner.php @@ -81,6 +81,7 @@ abstract class AbstractCloner implements ClonerInterface 'Symfony\Component\VarDumper\Caster\FrameStub' => array('Symfony\Component\VarDumper\Caster\ExceptionCaster', 'castFrameStub'), 'Symfony\Component\Debug\Exception\SilencedErrorContext' => array('Symfony\Component\VarDumper\Caster\ExceptionCaster', 'castSilencedErrorContext'), + 'ProxyManager\Proxy\ProxyInterface' => array('Symfony\Component\VarDumper\Caster\ProxyManagerCaster', 'castProxy'), 'PHPUnit_Framework_MockObject_MockObject' => array('Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'), 'Prophecy\Prophecy\ProphecySubjectInterface' => array('Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'), 'Mockery\MockInterface' => array('Symfony\Component\VarDumper\Caster\StubCaster', 'cutInternals'), @@ -107,6 +108,7 @@ abstract class AbstractCloner implements ClonerInterface 'Redis' => array('Symfony\Component\VarDumper\Caster\RedisCaster', 'castRedis'), 'RedisArray' => array('Symfony\Component\VarDumper\Caster\RedisCaster', 'castRedisArray'), + 'RedisCluster' => array('Symfony\Component\VarDumper\Caster\RedisCaster', 'castRedisCluster'), 'DateTimeInterface' => array('Symfony\Component\VarDumper\Caster\DateCaster', 'castDateTime'), 'DateInterval' => array('Symfony\Component\VarDumper\Caster\DateCaster', 'castInterval'), @@ -115,6 +117,14 @@ abstract class AbstractCloner implements ClonerInterface 'GMP' => array('Symfony\Component\VarDumper\Caster\GmpCaster', 'castGmp'), + 'MessageFormatter' => array('Symfony\Component\VarDumper\Caster\IntlCaster', 'castMessageFormatter'), + 'NumberFormatter' => array('Symfony\Component\VarDumper\Caster\IntlCaster', 'castNumberFormatter'), + 'IntlTimeZone' => array('Symfony\Component\VarDumper\Caster\IntlCaster', 'castIntlTimeZone'), + 'IntlCalendar' => array('Symfony\Component\VarDumper\Caster\IntlCaster', 'castIntlCalendar'), + 'IntlDateFormatter' => array('Symfony\Component\VarDumper\Caster\IntlCaster', 'castIntlDateFormatter'), + + 'Memcached' => array('Symfony\Component\VarDumper\Caster\MemcachedCaster', 'castMemcached'), + ':curl' => array('Symfony\Component\VarDumper\Caster\ResourceCaster', 'castCurl'), ':dba' => array('Symfony\Component\VarDumper\Caster\ResourceCaster', 'castDba'), ':dba persistent' => array('Symfony\Component\VarDumper\Caster\ResourceCaster', 'castDba'), @@ -218,7 +228,7 @@ abstract class AbstractCloner implements ClonerInterface } if ($this->prevErrorHandler) { - return \call_user_func($this->prevErrorHandler, $type, $msg, $file, $line, $context); + return ($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 0dbff7ae5..0604a38f5 100644 --- a/vendor/symfony/var-dumper/Cloner/Data.php +++ b/vendor/symfony/var-dumper/Cloner/Data.php @@ -115,9 +115,7 @@ class Data implements \ArrayAccess, \Countable, \IteratorAggregate throw new \LogicException(sprintf('%s object holds non-iterable type "%s".', self::class, \gettype($value))); } - foreach ($value as $k => $v) { - yield $k => $v; - } + yield from $value; } public function __get($key) diff --git a/vendor/symfony/var-dumper/Cloner/VarCloner.php b/vendor/symfony/var-dumper/Cloner/VarCloner.php index 012743cd6..e02ff9d2b 100644 --- a/vendor/symfony/var-dumper/Cloner/VarCloner.php +++ b/vendor/symfony/var-dumper/Cloner/VarCloner.php @@ -30,8 +30,8 @@ class VarCloner extends AbstractCloner $queue = array(array($var)); // This breadth-first queue is the return value $indexedArrays = array(); // Map of queue indexes that hold numerically indexed arrays $hardRefs = array(); // Map of original zval ids to stub objects - $objRefs = array(); // Map of original object handles to their stub object couterpart - $resRefs = array(); // Map of original resource handles to their stub object couterpart + $objRefs = array(); // Map of original object handles to their stub object counterpart + $resRefs = array(); // Map of original resource handles to their stub object counterpart $values = array(); // Map of stub objects' ids to original values $maxItems = $this->maxItems; $maxString = $this->maxString; diff --git a/vendor/symfony/var-dumper/Command/Descriptor/HtmlDescriptor.php b/vendor/symfony/var-dumper/Command/Descriptor/HtmlDescriptor.php index e786964d5..c7eeeb2ae 100644 --- a/vendor/symfony/var-dumper/Command/Descriptor/HtmlDescriptor.php +++ b/vendor/symfony/var-dumper/Command/Descriptor/HtmlDescriptor.php @@ -57,7 +57,7 @@ class HtmlDescriptor implements DumpDescriptorInterface $sourceDescription = ''; if (isset($context['source'])) { $source = $context['source']; - $projectDir = $source['project_dir']; + $projectDir = $source['project_dir'] ?? null; $sourceDescription = sprintf('%s on line %d', $source['name'], $source['line']); if (isset($source['file_link'])) { $sourceDescription = sprintf('%s', $source['file_link'], $sourceDescription); diff --git a/vendor/symfony/var-dumper/Dumper/AbstractDumper.php b/vendor/symfony/var-dumper/Dumper/AbstractDumper.php index abcda1af8..37140b715 100644 --- a/vendor/symfony/var-dumper/Dumper/AbstractDumper.php +++ b/vendor/symfony/var-dumper/Dumper/AbstractDumper.php @@ -164,7 +164,7 @@ abstract class AbstractDumper implements DataDumperInterface, DumperInterface */ protected function dumpLine($depth) { - \call_user_func($this->lineDumper, $this->line, $depth, $this->indentPad); + ($this->lineDumper)($this->line, $depth, $this->indentPad); $this->line = ''; } diff --git a/vendor/symfony/var-dumper/Dumper/HtmlDumper.php b/vendor/symfony/var-dumper/Dumper/HtmlDumper.php index 0edb97cdc..e15a2b644 100644 --- a/vendor/symfony/var-dumper/Dumper/HtmlDumper.php +++ b/vendor/symfony/var-dumper/Dumper/HtmlDumper.php @@ -23,6 +23,41 @@ class HtmlDumper extends CliDumper { public static $defaultOutput = 'php://output'; + protected static $themes = array( + 'dark' => array( + 'default' => 'background-color:#18171B; color:#FF8400; line-height:1.2em; font:12px Menlo, Monaco, Consolas, monospace; word-wrap: break-word; white-space: pre-wrap; position:relative; z-index:99999; word-break: break-all', + 'num' => 'font-weight:bold; color:#1299DA', + 'const' => 'font-weight:bold', + 'str' => 'font-weight:bold; color:#56DB3A', + 'note' => 'color:#1299DA', + 'ref' => 'color:#A0A0A0', + 'public' => 'color:#FFFFFF', + 'protected' => 'color:#FFFFFF', + 'private' => 'color:#FFFFFF', + 'meta' => 'color:#B729D9', + 'key' => 'color:#56DB3A', + 'index' => 'color:#1299DA', + 'ellipsis' => 'color:#FF8400', + 'ns' => 'user-select:none;', + ), + 'light' => array( + 'default' => 'background:none; color:#CC7832; line-height:1.2em; font:12px Menlo, Monaco, Consolas, monospace; word-wrap: break-word; white-space: pre-wrap; position:relative; z-index:99999; word-break: break-all', + 'num' => 'font-weight:bold; color:#1299DA', + 'const' => 'font-weight:bold', + 'str' => 'font-weight:bold; color:#629755;', + 'note' => 'color:#6897BB', + 'ref' => 'color:#6E6E6E', + 'public' => 'color:#262626', + 'protected' => 'color:#262626', + 'private' => 'color:#262626', + 'meta' => 'color:#B729D9', + 'key' => 'color:#789339', + 'index' => 'color:#1299DA', + 'ellipsis' => 'color:#CC7832', + 'ns' => 'user-select:none;', + ), + ); + protected $dumpHeader; protected $dumpPrefix = '
';
     protected $dumpSuffix = '
'; @@ -30,21 +65,7 @@ class HtmlDumper extends CliDumper protected $colors = true; protected $headerIsDumped = false; protected $lastDepth = -1; - protected $styles = array( - 'default' => 'background-color:#18171B; color:#FF8400; line-height:1.2em; font:12px Menlo, Monaco, Consolas, monospace; word-wrap: break-word; white-space: pre-wrap; position:relative; z-index:99999; word-break: break-all', - 'num' => 'font-weight:bold; color:#1299DA', - 'const' => 'font-weight:bold', - 'str' => 'font-weight:bold; color:#56DB3A', - 'note' => 'color:#1299DA', - 'ref' => 'color:#A0A0A0', - 'public' => 'color:#FFFFFF', - 'protected' => 'color:#FFFFFF', - 'private' => 'color:#FFFFFF', - 'meta' => 'color:#B729D9', - 'key' => 'color:#56DB3A', - 'index' => 'color:#1299DA', - 'ellipsis' => 'color:#FF8400', - ); + protected $styles; private $displayOptions = array( 'maxDepth' => 1, @@ -61,6 +82,7 @@ class HtmlDumper extends CliDumper AbstractDumper::__construct($output, $charset, $flags); $this->dumpId = 'sf-dump-'.mt_rand(); $this->displayOptions['fileLinkFormat'] = ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format'); + $this->styles = static::$themes['dark'] ?? self::$themes['dark']; } /** @@ -72,6 +94,15 @@ class HtmlDumper extends CliDumper $this->styles = $styles + $this->styles; } + public function setTheme(string $themeName) + { + if (!isset(static::$themes[$themeName])) { + throw new \InvalidArgumentException(sprintf('Theme "%s" does not exist in class "%s".', $themeName, static::class)); + } + + $this->setStyles(static::$themes[$themeName]); + } + /** * Configures display options. * @@ -473,6 +504,9 @@ return function (root, x) { if (currentNode) { reveal(currentNode); highlight(root, currentNode, state.nodes); + if ('scrollIntoView' in currentNode) { + currentNode.scrollIntoView(); + } } counter.textContent = (state.isEmpty() ? 0 : state.idx + 1) + ' of ' + state.count(); } @@ -837,9 +871,21 @@ EOHTML } $v = "".preg_replace_callback(static::$controlCharsRx, function ($c) use ($map) { - $s = ''; + $s = $b = ' .sf-dump .sf-dump-ref { color: #6E6E6E; } .dumped-tag > .sf-dump .sf-dump-ellipsis { color: #CC7832; max-width: 100em; } .dumped-tag > .sf-dump .sf-dump-ellipsis-path { max-width: 5em; } +.dumped-tag > .sf-dump .sf-dump-ns { user-select: none; } diff --git a/vendor/symfony/var-dumper/Resources/functions/dump.php b/vendor/symfony/var-dumper/Resources/functions/dump.php index 248f25512..e1543a8df 100644 --- a/vendor/symfony/var-dumper/Resources/functions/dump.php +++ b/vendor/symfony/var-dumper/Resources/functions/dump.php @@ -32,14 +32,12 @@ if (!function_exists('dump')) { } if (!function_exists('dd')) { - function dd($var, ...$moreVars) + function dd(...$vars) { - VarDumper::dump($var); - - foreach ($moreVars as $v) { + foreach ($vars as $v) { VarDumper::dump($v); } - exit(1); + die(1); } } diff --git a/vendor/symfony/var-dumper/Tests/Caster/ExceptionCasterTest.php b/vendor/symfony/var-dumper/Tests/Caster/ExceptionCasterTest.php index 4f9b538a0..aab1a9f38 100644 --- a/vendor/symfony/var-dumper/Tests/Caster/ExceptionCasterTest.php +++ b/vendor/symfony/var-dumper/Tests/Caster/ExceptionCasterTest.php @@ -223,6 +223,23 @@ Exception { #file: "%sExceptionCasterTest.php" #line: 28 } +EODUMP; + + $this->assertDumpMatchesFormat($expectedDump, $e, Caster::EXCLUDE_VERBOSE); + } + + public function testAnonymous() + { + $e = new \Exception(sprintf('Boo "%s" ba.', \get_class(new class('Foo') extends \Exception { + }))); + + $expectedDump = <<<'EODUMP' +Exception { + #message: "Boo "Exception@anonymous" ba." + #code: 0 + #file: "%sExceptionCasterTest.php" + #line: %d +} EODUMP; $this->assertDumpMatchesFormat($expectedDump, $e, Caster::EXCLUDE_VERBOSE); diff --git a/vendor/symfony/var-dumper/Tests/Caster/IntlCasterTest.php b/vendor/symfony/var-dumper/Tests/Caster/IntlCasterTest.php new file mode 100644 index 000000000..7c8e02858 --- /dev/null +++ b/vendor/symfony/var-dumper/Tests/Caster/IntlCasterTest.php @@ -0,0 +1,299 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Tests\Caster; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\VarDumper\Test\VarDumperTestTrait; + +/** + * @requires extension intl + */ +class IntlCasterTest extends TestCase +{ + use VarDumperTestTrait; + + public function testMessageFormatter() + { + $var = new \MessageFormatter('en', 'Hello {name}'); + + $expected = <<assertDumpEquals($expected, $var); + } + + public function testCastNumberFormatter() + { + $var = new \NumberFormatter('en', \NumberFormatter::DECIMAL); + + $expectedLocale = $var->getLocale(); + $expectedPattern = $var->getPattern(); + + $expectedAttribute1 = $var->getAttribute(\NumberFormatter::PARSE_INT_ONLY); + $expectedAttribute2 = $var->getAttribute(\NumberFormatter::GROUPING_USED); + $expectedAttribute3 = $var->getAttribute(\NumberFormatter::DECIMAL_ALWAYS_SHOWN); + $expectedAttribute4 = $var->getAttribute(\NumberFormatter::MAX_INTEGER_DIGITS); + $expectedAttribute5 = $var->getAttribute(\NumberFormatter::MIN_INTEGER_DIGITS); + $expectedAttribute6 = $var->getAttribute(\NumberFormatter::INTEGER_DIGITS); + $expectedAttribute7 = $var->getAttribute(\NumberFormatter::MAX_FRACTION_DIGITS); + $expectedAttribute8 = $var->getAttribute(\NumberFormatter::MIN_FRACTION_DIGITS); + $expectedAttribute9 = $var->getAttribute(\NumberFormatter::FRACTION_DIGITS); + $expectedAttribute10 = $var->getAttribute(\NumberFormatter::MULTIPLIER); + $expectedAttribute11 = $var->getAttribute(\NumberFormatter::GROUPING_SIZE); + $expectedAttribute12 = $var->getAttribute(\NumberFormatter::ROUNDING_MODE); + $expectedAttribute13 = number_format($var->getAttribute(\NumberFormatter::ROUNDING_INCREMENT), 1); + $expectedAttribute14 = $var->getAttribute(\NumberFormatter::FORMAT_WIDTH); + $expectedAttribute15 = $var->getAttribute(\NumberFormatter::PADDING_POSITION); + $expectedAttribute16 = $var->getAttribute(\NumberFormatter::SECONDARY_GROUPING_SIZE); + $expectedAttribute17 = $var->getAttribute(\NumberFormatter::SIGNIFICANT_DIGITS_USED); + $expectedAttribute18 = $var->getAttribute(\NumberFormatter::MIN_SIGNIFICANT_DIGITS); + $expectedAttribute19 = $var->getAttribute(\NumberFormatter::MAX_SIGNIFICANT_DIGITS); + $expectedAttribute20 = $var->getAttribute(\NumberFormatter::LENIENT_PARSE); + + $expectedTextAttribute1 = $var->getTextAttribute(\NumberFormatter::POSITIVE_PREFIX); + $expectedTextAttribute2 = $var->getTextAttribute(\NumberFormatter::POSITIVE_SUFFIX); + $expectedTextAttribute3 = $var->getTextAttribute(\NumberFormatter::NEGATIVE_PREFIX); + $expectedTextAttribute4 = $var->getTextAttribute(\NumberFormatter::NEGATIVE_SUFFIX); + $expectedTextAttribute5 = $var->getTextAttribute(\NumberFormatter::PADDING_CHARACTER); + $expectedTextAttribute6 = $var->getTextAttribute(\NumberFormatter::CURRENCY_CODE); + $expectedTextAttribute7 = $var->getTextAttribute(\NumberFormatter::DEFAULT_RULESET) ? 'true' : 'false'; + $expectedTextAttribute8 = $var->getTextAttribute(\NumberFormatter::PUBLIC_RULESETS) ? 'true' : 'false'; + + $expectedSymbol1 = $var->getSymbol(\NumberFormatter::DECIMAL_SEPARATOR_SYMBOL); + $expectedSymbol2 = $var->getSymbol(\NumberFormatter::GROUPING_SEPARATOR_SYMBOL); + $expectedSymbol3 = $var->getSymbol(\NumberFormatter::PATTERN_SEPARATOR_SYMBOL); + $expectedSymbol4 = $var->getSymbol(\NumberFormatter::PERCENT_SYMBOL); + $expectedSymbol5 = $var->getSymbol(\NumberFormatter::ZERO_DIGIT_SYMBOL); + $expectedSymbol6 = $var->getSymbol(\NumberFormatter::DIGIT_SYMBOL); + $expectedSymbol7 = $var->getSymbol(\NumberFormatter::MINUS_SIGN_SYMBOL); + $expectedSymbol8 = $var->getSymbol(\NumberFormatter::PLUS_SIGN_SYMBOL); + $expectedSymbol9 = $var->getSymbol(\NumberFormatter::CURRENCY_SYMBOL); + $expectedSymbol10 = $var->getSymbol(\NumberFormatter::INTL_CURRENCY_SYMBOL); + $expectedSymbol11 = $var->getSymbol(\NumberFormatter::MONETARY_SEPARATOR_SYMBOL); + $expectedSymbol12 = $var->getSymbol(\NumberFormatter::EXPONENTIAL_SYMBOL); + $expectedSymbol13 = $var->getSymbol(\NumberFormatter::PERMILL_SYMBOL); + $expectedSymbol14 = $var->getSymbol(\NumberFormatter::PAD_ESCAPE_SYMBOL); + $expectedSymbol15 = $var->getSymbol(\NumberFormatter::INFINITY_SYMBOL); + $expectedSymbol16 = $var->getSymbol(\NumberFormatter::NAN_SYMBOL); + $expectedSymbol17 = $var->getSymbol(\NumberFormatter::SIGNIFICANT_DIGIT_SYMBOL); + $expectedSymbol18 = $var->getSymbol(\NumberFormatter::MONETARY_GROUPING_SEPARATOR_SYMBOL); + + $expected = <<assertDumpEquals($expected, $var); + } + + public function testCastIntlTimeZoneWithDST() + { + $var = \IntlTimeZone::createTimeZone('America/Los_Angeles'); + + $expectedDisplayName = $var->getDisplayName(); + $expectedDSTSavings = $var->getDSTSavings(); + $expectedID = $var->getID(); + $expectedRawOffset = $var->getRawOffset(); + + $expected = <<assertDumpEquals($expected, $var); + } + + public function testCastIntlTimeZoneWithoutDST() + { + $var = \IntlTimeZone::createTimeZone('Asia/Bangkok'); + + $expectedDisplayName = $var->getDisplayName(); + $expectedID = $var->getID(); + $expectedRawOffset = $var->getRawOffset(); + + $expected = <<assertDumpEquals($expected, $var); + } + + public function testCastIntlCalendar() + { + $var = \IntlCalendar::createInstance('America/Los_Angeles', 'en'); + + $expectedType = $var->getType(); + $expectedFirstDayOfWeek = $var->getFirstDayOfWeek(); + $expectedMinimalDaysInFirstWeek = $var->getMinimalDaysInFirstWeek(); + $expectedRepeatedWallTimeOption = $var->getRepeatedWallTimeOption(); + $expectedSkippedWallTimeOption = $var->getSkippedWallTimeOption(); + $expectedTime = $var->getTime().'.0'; + $expectedInDaylightTime = $var->inDaylightTime() ? 'true' : 'false'; + $expectedIsLenient = $var->isLenient() ? 'true' : 'false'; + + $expectedTimeZone = $var->getTimeZone(); + $expectedTimeZoneDisplayName = $expectedTimeZone->getDisplayName(); + $expectedTimeZoneID = $expectedTimeZone->getID(); + $expectedTimeZoneRawOffset = $expectedTimeZone->getRawOffset(); + $expectedTimeZoneDSTSavings = $expectedTimeZone->getDSTSavings(); + + $expected = <<assertDumpEquals($expected, $var); + } + + public function testCastDateFormatter() + { + $var = new \IntlDateFormatter('en', \IntlDateFormatter::TRADITIONAL, \IntlDateFormatter::TRADITIONAL); + + $expectedLocale = $var->getLocale(); + $expectedPattern = $var->getPattern(); + $expectedCalendar = $var->getCalendar(); + $expectedTimeZoneId = $var->getTimeZoneId(); + $expectedTimeType = $var->getTimeType(); + $expectedDateType = $var->getDateType(); + + $expectedCalendarObject = $var->getCalendarObject(); + $expectedCalendarObjectType = $expectedCalendarObject->getType(); + $expectedCalendarObjectFirstDayOfWeek = $expectedCalendarObject->getFirstDayOfWeek(); + $expectedCalendarObjectMinimalDaysInFirstWeek = $expectedCalendarObject->getMinimalDaysInFirstWeek(); + $expectedCalendarObjectRepeatedWallTimeOption = $expectedCalendarObject->getRepeatedWallTimeOption(); + $expectedCalendarObjectSkippedWallTimeOption = $expectedCalendarObject->getSkippedWallTimeOption(); + $expectedCalendarObjectTime = $expectedCalendarObject->getTime().'.0'; + $expectedCalendarObjectInDaylightTime = $expectedCalendarObject->inDaylightTime() ? 'true' : 'false'; + $expectedCalendarObjectIsLenient = $expectedCalendarObject->isLenient() ? 'true' : 'false'; + + $expectedCalendarObjectTimeZone = $expectedCalendarObject->getTimeZone(); + $expectedCalendarObjectTimeZoneDisplayName = $expectedCalendarObjectTimeZone->getDisplayName(); + $expectedCalendarObjectTimeZoneID = $expectedCalendarObjectTimeZone->getID(); + $expectedCalendarObjectTimeZoneRawOffset = $expectedCalendarObjectTimeZone->getRawOffset(); + $expectedCalendarObjectTimeZoneDSTSavings = $expectedCalendarObjectTimeZone->getDSTSavings(); + + $expectedTimeZone = $var->getTimeZone(); + $expectedTimeZoneDisplayName = $expectedTimeZone->getDisplayName(); + $expectedTimeZoneID = $expectedTimeZone->getID(); + $expectedTimeZoneRawOffset = $expectedTimeZone->getRawOffset(); + $expectedTimeZoneDSTSavings = $expectedTimeZone->getDSTSavings(); + + $expected = <<assertDumpEquals($expected, $var); + } +} diff --git a/vendor/symfony/var-dumper/Tests/Caster/MemcachedCasterTest.php b/vendor/symfony/var-dumper/Tests/Caster/MemcachedCasterTest.php new file mode 100644 index 000000000..df48390af --- /dev/null +++ b/vendor/symfony/var-dumper/Tests/Caster/MemcachedCasterTest.php @@ -0,0 +1,93 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Tests\Caster; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\VarDumper\Test\VarDumperTestTrait; + +/** + * @author Jan Schädlich + */ +class MemcachedCasterTest extends TestCase +{ + use VarDumperTestTrait; + + public function testCastMemcachedWithDefaultOptions() + { + if (!class_exists('Memcached')) { + $this->markTestSkipped('Memcached not available'); + } + + $var = new \Memcached(); + $var->addServer('127.0.0.1', 11211); + $var->addServer('127.0.0.2', 11212); + + $expected = << array:3 [ + "host" => "127.0.0.1" + "port" => 11211 + "type" => "TCP" + ] + 1 => array:3 [ + "host" => "127.0.0.2" + "port" => 11212 + "type" => "TCP" + ] + ] + options: {} +} +EOTXT; + $this->assertDumpEquals($expected, $var); + } + + public function testCastMemcachedWithCustomOptions() + { + if (!class_exists('Memcached')) { + $this->markTestSkipped('Memcached not available'); + } + + $var = new \Memcached(); + $var->addServer('127.0.0.1', 11211); + $var->addServer('127.0.0.2', 11212); + + // set a subset of non default options to test boolean, string and integer output + $var->setOption(\Memcached::OPT_COMPRESSION, false); + $var->setOption(\Memcached::OPT_PREFIX_KEY, 'pre'); + $var->setOption(\Memcached::OPT_DISTRIBUTION, \Memcached::DISTRIBUTION_CONSISTENT); + + $expected = <<<'EOTXT' +Memcached { + servers: array:2 [ + 0 => array:3 [ + "host" => "127.0.0.1" + "port" => 11211 + "type" => "TCP" + ] + 1 => array:3 [ + "host" => "127.0.0.2" + "port" => 11212 + "type" => "TCP" + ] + ] + options: { + OPT_COMPRESSION: false + OPT_PREFIX_KEY: "pre" + OPT_DISTRIBUTION: 1 + } +} +EOTXT; + + $this->assertDumpEquals($expected, $var); + } +} diff --git a/vendor/symfony/var-dumper/Tests/Caster/RedisCasterTest.php b/vendor/symfony/var-dumper/Tests/Caster/RedisCasterTest.php index f724639d4..3edbed638 100644 --- a/vendor/symfony/var-dumper/Tests/Caster/RedisCasterTest.php +++ b/vendor/symfony/var-dumper/Tests/Caster/RedisCasterTest.php @@ -49,11 +49,15 @@ Redis {%A host: "127.0.0.1" port: 6379 auth: null + mode: ATOMIC dbNum: 0 timeout: 0.0 + lastError: null persistentId: null options: { + TCP_KEEPALIVE: 0 READ_TIMEOUT: 0.0 + COMPRESSION: NONE SERIALIZER: NONE PREFIX: null SCAN: NORETRY diff --git a/vendor/symfony/var-dumper/Tests/Caster/ReflectionCasterTest.php b/vendor/symfony/var-dumper/Tests/Caster/ReflectionCasterTest.php index 828fc30bf..64aa52a01 100644 --- a/vendor/symfony/var-dumper/Tests/Caster/ReflectionCasterTest.php +++ b/vendor/symfony/var-dumper/Tests/Caster/ReflectionCasterTest.php @@ -68,14 +68,14 @@ EOTXT $var = function ($x) use ($a, &$b) {}; $this->assertDumpMatchesFormat( - <<markTestSkipped('Not for HHVM.'); + } + $var = array( + (new \ReflectionMethod($this, __FUNCTION__))->getClosure($this), + (new \ReflectionMethod(__CLASS__, 'tearDownAfterClass'))->getClosure(), + ); + + $this->assertDumpMatchesFormat( + << Symfony\Component\VarDumper\Tests\Caster\ReflectionCasterTest::testFromCallableClosureCaster() { + this: Symfony\Component\VarDumper\Tests\Caster\ReflectionCasterTest { …} + file: "%sReflectionCasterTest.php" + line: "%d to %d" + } + 1 => %sTestCase::tearDownAfterClass() { + file: "%sTestCase.php" + line: "%d to %d" + } +] +EOTXT + , $var + ); + } + public function testClosureCasterExcludingVerbosity() { - $var = function () {}; + $var = function &($a = 5) {}; - $expectedDump = <<assertDumpEquals($expectedDump, $var, Caster::EXCLUDE_VERBOSE); + $this->assertDumpEquals('Closure&($a = 5) { …6}', $var, Caster::EXCLUDE_VERBOSE); } public function testReflectionParameter() @@ -140,7 +161,7 @@ EOTXT $this->assertDumpMatchesFormat( << %d - "ino" => %d + "ino" => %i "nlink" => %d "rdev" => 0 "blksize" => %i diff --git a/vendor/symfony/var-dumper/Tests/Caster/StubCasterTest.php b/vendor/symfony/var-dumper/Tests/Caster/StubCasterTest.php index 36603c51c..de2f5f5ae 100644 --- a/vendor/symfony/var-dumper/Tests/Caster/StubCasterTest.php +++ b/vendor/symfony/var-dumper/Tests/Caster/StubCasterTest.php @@ -141,7 +141,7 @@ EODUMP; $expectedDump = <<<'EODUMP' array:1 [ - 0 => "hello" + 0 => "hello(?stdClass $a, stdClass $b = null)" ] EODUMP; @@ -185,6 +185,27 @@ EODUMP; 0 => "hello" ] +EODUMP; + + $this->assertStringMatchesFormat($expectedDump, $dump); + } + + public function testClassStubWithAnonymousClass() + { + $var = array(new ClassStub(\get_class(new class() extends \Exception { + }))); + + $cloner = new VarCloner(); + $dumper = new HtmlDumper(); + $dumper->setDumpHeader(''); + $dumper->setDumpBoundaries('', ''); + $dump = $dumper->dump($cloner->cloneVar($var), true, array('fileLinkFormat' => '%f:%l')); + + $expectedDump = <<<'EODUMP' +array:1 [ + 0 => "Exception@anonymous" +] + EODUMP; $this->assertStringMatchesFormat($expectedDump, $dump); diff --git a/vendor/symfony/var-dumper/Tests/Command/Descriptor/CliDescriptorTest.php b/vendor/symfony/var-dumper/Tests/Command/Descriptor/CliDescriptorTest.php new file mode 100644 index 000000000..46032b7b7 --- /dev/null +++ b/vendor/symfony/var-dumper/Tests/Command/Descriptor/CliDescriptorTest.php @@ -0,0 +1,134 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Tests\Command\Descriptor; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Console\Output\BufferedOutput; +use Symfony\Component\VarDumper\Cloner\Data; +use Symfony\Component\VarDumper\Command\Descriptor\CliDescriptor; +use Symfony\Component\VarDumper\Dumper\CliDumper; + +class CliDescriptorTest extends TestCase +{ + private static $timezone; + + public static function setUpBeforeClass() + { + self::$timezone = date_default_timezone_get(); + date_default_timezone_set('UTC'); + } + + public static function tearDownAfterClass() + { + date_default_timezone_set(self::$timezone); + } + + /** + * @dataProvider provideContext + */ + public function testDescribe(array $context, string $expectedOutput) + { + $output = new BufferedOutput(); + $descriptor = new CliDescriptor(new CliDumper(function ($s) { + return $s; + })); + + $descriptor->describe($output, new Data(array(array(123))), $context + array('timestamp' => 1544804268.3668), 1); + + $this->assertStringMatchesFormat(trim($expectedOutput), str_replace(PHP_EOL, "\n", trim($output->fetch()))); + } + + public function provideContext() + { + yield 'source' => array( + array( + 'source' => array( + 'name' => 'CliDescriptorTest.php', + 'line' => 30, + 'file' => '/Users/ogi/symfony/src/Symfony/Component/VarDumper/Tests/Command/Descriptor/CliDescriptorTest.php', + ), + ), + << array( + array( + 'source' => array( + 'name' => 'CliDescriptorTest.php', + 'line' => 30, + 'file_relative' => 'src/Symfony/Component/VarDumper/Tests/Command/Descriptor/CliDescriptorTest.php', + 'file' => '/Users/ogi/symfony/src/Symfony/Component/VarDumper/Tests/Command/Descriptor/CliDescriptorTest.php', + 'file_link' => 'phpstorm://open?file=/Users/ogi/symfony/src/Symfony/Component/VarDumper/Tests/Command/Descriptor/CliDescriptorTest.php&line=30', + ), + ), + << array( + array( + 'cli' => array( + 'identifier' => 'd8bece1c', + 'command_line' => 'bin/phpunit', + ), + ), + << array( + array( + 'request' => array( + 'identifier' => 'd8bece1c', + 'controller' => new Data(array(array('FooController.php'))), + 'method' => 'GET', + 'uri' => 'http://localhost/foo', + ), + ), + << + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Tests\Command\Descriptor; + +use PHPUnit\Framework\TestCase; +use Symfony\Component\Console\Output\BufferedOutput; +use Symfony\Component\VarDumper\Cloner\Data; +use Symfony\Component\VarDumper\Command\Descriptor\HtmlDescriptor; +use Symfony\Component\VarDumper\Dumper\HtmlDumper; + +class HtmlDescriptorTest extends TestCase +{ + private static $timezone; + + public static function setUpBeforeClass() + { + self::$timezone = date_default_timezone_get(); + date_default_timezone_set('UTC'); + } + + public static function tearDownAfterClass() + { + date_default_timezone_set(self::$timezone); + } + + public function testItOutputsStylesAndScriptsOnFirstDescribeCall() + { + $output = new BufferedOutput(); + $dumper = $this->createMock(HtmlDumper::class); + $dumper->method('dump')->willReturn('[DUMPED]'); + $descriptor = new HtmlDescriptor($dumper); + + $descriptor->describe($output, new Data(array(array(123))), array('timestamp' => 1544804268.3668), 1); + + $this->assertStringMatchesFormat('%A', $output->fetch(), 'styles & scripts are output'); + + $descriptor->describe($output, new Data(array(array(123))), array('timestamp' => 1544804268.3668), 1); + + $this->assertStringNotMatchesFormat('%A', $output->fetch(), 'styles & scripts are output only once'); + } + + /** + * @dataProvider provideContext + */ + public function testDescribe(array $context, string $expectedOutput) + { + $output = new BufferedOutput(); + $dumper = $this->createMock(HtmlDumper::class); + $dumper->method('dump')->willReturn('[DUMPED]'); + $descriptor = new HtmlDescriptor($dumper); + + $descriptor->describe($output, new Data(array(array(123))), $context + array('timestamp' => 1544804268.3668), 1); + + $this->assertStringMatchesFormat(trim($expectedOutput), trim(preg_replace('@@s', '', $output->fetch()))); + } + + public function provideContext() + { + yield 'source' => array( + array( + 'source' => array( + 'name' => 'CliDescriptorTest.php', + 'line' => 30, + 'file' => '/Users/ogi/symfony/src/Symfony/Component/VarDumper/Tests/Command/Descriptor/CliDescriptorTest.php', + ), + ), + << +
+
+

-

+ +
+ +
+
+

+ CliDescriptorTest.php on line 30 +

+ [DUMPED] +
+ +TXT + ); + + yield 'source full' => array( + array( + 'source' => array( + 'name' => 'CliDescriptorTest.php', + 'project_dir' => 'src/Symfony/', + 'line' => 30, + 'file_relative' => 'src/Symfony/Component/VarDumper/Tests/Command/Descriptor/CliDescriptorTest.php', + 'file' => '/Users/ogi/symfony/src/Symfony/Component/VarDumper/Tests/Command/Descriptor/CliDescriptorTest.php', + 'file_link' => 'phpstorm://open?file=/Users/ogi/symfony/src/Symfony/Component/VarDumper/Tests/Command/Descriptor/CliDescriptorTest.php&line=30', + ), + ), + << +
+
+

-

+ +
+
+
    +
  • project dirsrc/Symfony/
  • +
+
+
+
+

+ CliDescriptorTest.php on line 30 +

+ [DUMPED] +
+ +TXT + ); + + yield 'cli' => array( + array( + 'cli' => array( + 'identifier' => 'd8bece1c', + 'command_line' => 'bin/phpunit', + ), + ), + << +
+
+

$ bin/phpunit

+ +
+ +
+
+

+ +

+ [DUMPED] +
+ +TXT + ); + + yield 'request' => array( + array( + 'request' => array( + 'identifier' => 'd8bece1c', + 'controller' => new Data(array(array('FooController.php'))), + 'method' => 'GET', + 'uri' => 'http://localhost/foo', + ), + ), + << +
+
+

GET http://localhost/foo

+ +
+
+
    +
  • controller[DUMPED]
  • +
+
+
+
+

+ +

+ [DUMPED] +
+ +TXT + ); + } +} diff --git a/vendor/symfony/var-dumper/Tests/Dumper/CliDumperTest.php b/vendor/symfony/var-dumper/Tests/Dumper/CliDumperTest.php index d25f88d16..919d4e4a7 100644 --- a/vendor/symfony/var-dumper/Tests/Dumper/CliDumperTest.php +++ b/vendor/symfony/var-dumper/Tests/Dumper/CliDumperTest.php @@ -61,7 +61,10 @@ array:24 [ 5 => -INF 6 => {$intMax} "str" => "déjà\\n" - 7 => b"é\\x00" + 7 => b""" + é\\x00test\\t\\n + ing + """ "[]" => [] "res" => stream resource {@{$res} %A wrapper_type: "plainfile" @@ -75,7 +78,7 @@ array:24 [ +foo: "foo" +"bar": "bar" } - "closure" => Closure {#%d + "closure" => Closure(\$a, PDO &\$b = null) {#%d class: "Symfony\Component\VarDumper\Tests\Dumper\CliDumperTest" this: Symfony\Component\VarDumper\Tests\Dumper\CliDumperTest {#%d …} parameters: { diff --git a/vendor/symfony/var-dumper/Tests/Dumper/HtmlDumperTest.php b/vendor/symfony/var-dumper/Tests/Dumper/HtmlDumperTest.php index ac2f8f2c3..af3db4b75 100644 --- a/vendor/symfony/var-dumper/Tests/Dumper/HtmlDumperTest.php +++ b/vendor/symfony/var-dumper/Tests/Dumper/HtmlDumperTest.php @@ -63,8 +63,11 @@ class HtmlDumperTest extends TestCase 4 => INF 5 => -INF 6 => {$intMax} - "str" => "d&%s;j&%s;\\n" - 7 => b"&%s;\\x00" + "str" => "d&%s;j&%s;\\n" + 7 => b""" + é\\x00test\\t\\n + ing + """ "[]" => [] "res" => stream resource @{$res} %A wrapper_type: "plainfile" @@ -78,7 +81,7 @@ class HtmlDumperTest extends TestCase +foo: "foo" +"bar": "bar" } - "closure" => Closure {#%d + "closure" => Closure(\$a, PDO &\$b = null) {#%d class: "Symfony\Component\VarDumper\Tests\Dumper\HtmlDumperTest" this: HtmlDumperTest {#%d &%s;} diff --git a/vendor/symfony/var-dumper/Tests/Fixtures/FooInterface.php b/vendor/symfony/var-dumper/Tests/Fixtures/FooInterface.php index 874110a5b..172958b47 100644 --- a/vendor/symfony/var-dumper/Tests/Fixtures/FooInterface.php +++ b/vendor/symfony/var-dumper/Tests/Fixtures/FooInterface.php @@ -7,5 +7,5 @@ interface FooInterface /** * Hello. */ - public function foo(); + public function foo(?\stdClass $a, \stdClass $b = null); } diff --git a/vendor/symfony/var-dumper/Tests/Fixtures/dumb-var.php b/vendor/symfony/var-dumper/Tests/Fixtures/dumb-var.php index 59ee19bda..780f3b28d 100644 --- a/vendor/symfony/var-dumper/Tests/Fixtures/dumb-var.php +++ b/vendor/symfony/var-dumper/Tests/Fixtures/dumb-var.php @@ -17,7 +17,7 @@ $g = fopen(__FILE__, 'r'); $var = array( 'number' => 1, null, 'const' => 1.1, true, false, NAN, INF, -INF, PHP_INT_MAX, - 'str' => "déjà\n", "\xE9\x00", + 'str' => "déjà\n", "\xE9\x00test\t\ning", '[]' => array(), 'res' => $g, 'obj' => $foo, diff --git a/vendor/symfony/var-dumper/VarDumper.php b/vendor/symfony/var-dumper/VarDumper.php index a9ed05b3b..7c302a21f 100644 --- a/vendor/symfony/var-dumper/VarDumper.php +++ b/vendor/symfony/var-dumper/VarDumper.php @@ -29,13 +29,19 @@ class VarDumper { if (null === self::$handler) { $cloner = new VarCloner(); - $dumper = \in_array(\PHP_SAPI, array('cli', 'phpdbg'), true) ? new CliDumper() : new HtmlDumper(); + + if (isset($_SERVER['VAR_DUMPER_FORMAT'])) { + $dumper = 'html' === $_SERVER['VAR_DUMPER_FORMAT'] ? new HtmlDumper() : new CliDumper(); + } else { + $dumper = \in_array(\PHP_SAPI, array('cli', 'phpdbg')) ? new CliDumper() : new HtmlDumper(); + } + self::$handler = function ($var) use ($cloner, $dumper) { $dumper->dump($cloner->cloneVar($var)); }; } - return \call_user_func(self::$handler, $var); + return (self::$handler)($var); } public static function setHandler(callable $callable = null) diff --git a/vendor/symfony/var-dumper/composer.json b/vendor/symfony/var-dumper/composer.json index 59e920172..a1b3b45ec 100644 --- a/vendor/symfony/var-dumper/composer.json +++ b/vendor/symfony/var-dumper/composer.json @@ -22,6 +22,7 @@ }, "require-dev": { "ext-iconv": "*", + "symfony/console": "~3.4|~4.0", "symfony/process": "~3.4|~4.0", "twig/twig": "~1.34|~2.4" }, @@ -47,7 +48,7 @@ "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "4.1-dev" + "dev-master": "4.2-dev" } } } diff --git a/vendor/symfony/var-dumper/phpunit.xml.dist b/vendor/symfony/var-dumper/phpunit.xml.dist index 4a25f42db..3243fcd02 100644 --- a/vendor/symfony/var-dumper/phpunit.xml.dist +++ b/vendor/symfony/var-dumper/phpunit.xml.dist @@ -1,7 +1,7 @@ [^ ]+) *(?P.*)#u', $values['value'], $matches)) { $isRef = $matches['ref']; + $this->refsBeingParsed[] = $isRef; $values['value'] = $matches['value']; } @@ -244,6 +246,7 @@ class Parser } if ($isRef) { $this->refs[$isRef] = end($data); + array_pop($this->refsBeingParsed); } } elseif ( self::preg_match('#^(?P(?:![^\s]++\s++)?(?:'.Inline::REGEX_QUOTED_STRING.'|(?:!?!php/const:)?[^ \'"\[\{!].*?)) *\:(\s++(?P.+))?$#u', rtrim($this->currentLine), $values) @@ -287,6 +290,10 @@ class Parser if (isset($values['value'][0]) && '*' === $values['value'][0]) { $refName = substr(rtrim($values['value']), 1); if (!array_key_exists($refName, $this->refs)) { + if (false !== $pos = array_search($refName, $this->refsBeingParsed, true)) { + throw new ParseException(sprintf('Circular reference [%s, %s] detected for reference "%s".', implode(', ', \array_slice($this->refsBeingParsed, $pos)), $refName, $refName), $this->currentLineNb + 1, $this->currentLine, $this->filename); + } + throw new ParseException(sprintf('Reference "%s" does not exist.', $refName), $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); } @@ -340,6 +347,7 @@ class Parser } } elseif ('<<' !== $key && isset($values['value']) && self::preg_match('#^&(?P[^ ]++) *+(?P.*)#u', $values['value'], $matches)) { $isRef = $matches['ref']; + $this->refsBeingParsed[] = $isRef; $values['value'] = $matches['value']; } @@ -395,6 +403,7 @@ class Parser } if ($isRef) { $this->refs[$isRef] = $data[$key]; + array_pop($this->refsBeingParsed); } } else { // multiple documents are not supported @@ -500,6 +509,7 @@ class Parser $parser->totalNumberOfLines = $this->totalNumberOfLines; $parser->skippedLineNumbers = $skippedLineNumbers; $parser->refs = &$this->refs; + $parser->refsBeingParsed = $this->refsBeingParsed; return $parser->doParse($yaml, $flags); } @@ -689,6 +699,10 @@ class Parser } if (!array_key_exists($value, $this->refs)) { + if (false !== $pos = array_search($value, $this->refsBeingParsed, true)) { + throw new ParseException(sprintf('Circular reference [%s, %s] detected for reference "%s".', implode(', ', \array_slice($this->refsBeingParsed, $pos)), $value, $value), $this->currentLineNb + 1, $this->currentLine, $this->filename); + } + throw new ParseException(sprintf('Reference "%s" does not exist.', $value), $this->currentLineNb + 1, $this->currentLine, $this->filename); } diff --git a/vendor/symfony/yaml/Tests/ParserTest.php b/vendor/symfony/yaml/Tests/ParserTest.php index 6372fe45e..38ed1b340 100644 --- a/vendor/symfony/yaml/Tests/ParserTest.php +++ b/vendor/symfony/yaml/Tests/ParserTest.php @@ -2177,6 +2177,48 @@ EOE; $this->parser->parse($yaml); } + /** + * @dataProvider circularReferenceProvider + * @expectedException \Symfony\Component\Yaml\Exception\ParseException + * @expectedExceptionMessage Circular reference [foo, bar, foo] detected + */ + public function testDetectCircularReferences($yaml) + { + $this->parser->parse($yaml, Yaml::PARSE_CUSTOM_TAGS); + } + + public function circularReferenceProvider() + { + $tests = array(); + + $yaml = << setRules(array( + ->setRules([ '@Symfony' => true, '@Symfony:risky' => true, - 'array_syntax' => array('syntax' => 'long'), + 'array_syntax' => ['syntax' => 'short'], 'php_unit_fqcn_annotation' => false, 'no_unreachable_default_argument_value' => false, - 'braces' => array('allow_single_line_closure' => true), + 'braces' => ['allow_single_line_closure' => true], 'heredoc_to_nowdoc' => false, 'dir_constant' => false, - )) + ]) ->setRiskyAllowed(true) ->setFinder(PhpCsFixer\Finder::create()->in(__DIR__)) ; diff --git a/vendor/twig/twig/.travis.yml b/vendor/twig/twig/.travis.yml index d70399ca1..0293aa846 100644 --- a/vendor/twig/twig/.travis.yml +++ b/vendor/twig/twig/.travis.yml @@ -14,6 +14,7 @@ php: - 7.0 - 7.1 - 7.2 + - 7.3 - nightly env: @@ -30,22 +31,11 @@ before_script: - if [ "$TWIG_EXT" == "yes" ]; then sh -c "cd ext/twig && phpize && ./configure --enable-twig && make && make install"; fi - if [ "$TWIG_EXT" == "yes" ]; then echo "extension=twig.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`; fi -script: | - if [[ $TRAVIS_PHP_VERSION = 7.* || $TRAVIS_PHP_VERSION = nightly ]]; then - SYMFONY_PHPUNIT_VERSION=6.1 ./vendor/bin/simple-phpunit - else - ./vendor/bin/simple-phpunit - fi +script: ./vendor/bin/simple-phpunit matrix: fast_finish: true include: - - php: 5.3 - dist: precise - env: TWIG_EXT=yes - - php: 5.3 - dist: precise - env: TWIG_EXT=no - php: 5.4 env: TWIG_EXT=yes - php: 5.5 diff --git a/vendor/twig/twig/CHANGELOG b/vendor/twig/twig/CHANGELOG index f35edc3c3..64bacc0fe 100644 --- a/vendor/twig/twig/CHANGELOG +++ b/vendor/twig/twig/CHANGELOG @@ -1,3 +1,27 @@ +* 1.37.1 (2019-01-14) + + * fixed regression (key exists check for non ArrayObject objects) + * fixed logic in TemplateWrapper + +* 1.37.0 (2019-01-14) + + * fixed ArrayObject access with a null value + * fixed embedded templates starting with a BOM + * fixed using a Twig_TemplateWrapper instance as an argument to extends + * switched generated code to use the PHP short array notation + * dropped PHP 5.3 support + * fixed float representation in compiled templates + * added a second argument to the join filter (last separator configuration) + +* 1.36.0 (2018-12-16) + + * made sure twig_include returns a string + * fixed multi-byte UFT-8 in escape('html_attr') + * added the "deprecated" tag + * added support for dynamically named tests + * fixed GlobalsInterface extended class + * fixed filesystem loader throwing an exception instead of returning false + * 1.35.4 (2018-07-13) * ensured that syntax errors are triggered with the right line diff --git a/vendor/twig/twig/LICENSE b/vendor/twig/twig/LICENSE index e401cb971..d06ced2a3 100644 --- a/vendor/twig/twig/LICENSE +++ b/vendor/twig/twig/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2009-2018 by the Twig Team. +Copyright (c) 2009-2019 by the Twig Team. Some rights reserved. diff --git a/vendor/twig/twig/composer.json b/vendor/twig/twig/composer.json index 0a1728f8e..4db7e34f3 100644 --- a/vendor/twig/twig/composer.json +++ b/vendor/twig/twig/composer.json @@ -27,11 +27,11 @@ "forum": "https://groups.google.com/forum/#!forum/twig-users" }, "require": { - "php": ">=5.3.3", + "php": ">=5.4.0", "symfony/polyfill-ctype": "^1.8" }, "require-dev": { - "symfony/phpunit-bridge": "^3.3", + "symfony/phpunit-bridge": "^3.4.19|^4.1.8", "symfony/debug": "^2.7", "psr/container": "^1.0" }, @@ -45,7 +45,7 @@ }, "extra": { "branch-alias": { - "dev-master": "1.35-dev" + "dev-master": "1.37-dev" } } } diff --git a/vendor/twig/twig/doc/advanced.rst b/vendor/twig/twig/doc/advanced.rst index 2715cc57d..add8fe6dc 100644 --- a/vendor/twig/twig/doc/advanced.rst +++ b/vendor/twig/twig/doc/advanced.rst @@ -137,13 +137,13 @@ Creating a filter is as simple as associating a name with a PHP callable:: $filter = new Twig_SimpleFilter('rot13', 'str_rot13'); // or a class static method - $filter = new Twig_SimpleFilter('rot13', array('SomeClass', 'rot13Filter')); + $filter = new Twig_SimpleFilter('rot13', ['SomeClass', 'rot13Filter']); $filter = new Twig_SimpleFilter('rot13', 'SomeClass::rot13Filter'); // or a class method - $filter = new Twig_SimpleFilter('rot13', array($this, 'rot13Filter')); + $filter = new Twig_SimpleFilter('rot13', [$this, 'rot13Filter']); // the one below needs a runtime implementation (see below for more information) - $filter = new Twig_SimpleFilter('rot13', array('SomeClass', 'rot13Filter')); + $filter = new Twig_SimpleFilter('rot13', ['SomeClass', 'rot13Filter']); The first argument passed to the ``Twig_SimpleFilter`` constructor is the name of the filter you will use in templates and the second one is the PHP callable @@ -195,7 +195,7 @@ environment as the first argument to the filter call:: $charset = $env->getCharset(); return str_rot13($string); - }, array('needs_environment' => true)); + }, ['needs_environment' => true]); Context-aware Filters ~~~~~~~~~~~~~~~~~~~~~ @@ -207,11 +207,11 @@ the first argument to the filter call (or the second one if $filter = new Twig_SimpleFilter('rot13', function ($context, $string) { // ... - }, array('needs_context' => true)); + }, ['needs_context' => true]); $filter = new Twig_SimpleFilter('rot13', function (Twig_Environment $env, $context, $string) { // ... - }, array('needs_context' => true, 'needs_environment' => true)); + }, ['needs_context' => true, 'needs_environment' => true]); Automatic Escaping ~~~~~~~~~~~~~~~~~~ @@ -221,14 +221,14 @@ before printing. If your filter acts as an escaper (or explicitly outputs HTML or JavaScript code), you will want the raw output to be printed. In such a case, set the ``is_safe`` option:: - $filter = new Twig_SimpleFilter('nl2br', 'nl2br', array('is_safe' => array('html'))); + $filter = new Twig_SimpleFilter('nl2br', 'nl2br', ['is_safe' => ['html']]); Some filters may need to work on input that is already escaped or safe, for example when adding (safe) HTML tags to originally unsafe output. In such a case, set the ``pre_escape`` option to escape the input data before it is run through your filter:: - $filter = new Twig_SimpleFilter('somefilter', 'somefilter', array('pre_escape' => 'html', 'is_safe' => array('html'))); + $filter = new Twig_SimpleFilter('somefilter', 'somefilter', ['pre_escape' => 'html', 'is_safe' => ['html']]); Variadic Filters ~~~~~~~~~~~~~~~~ @@ -240,9 +240,9 @@ When a filter should accept an arbitrary number of arguments, set the ``is_variadic`` option to ``true``; Twig will pass the extra arguments as the last argument to the filter call as an array:: - $filter = new Twig_SimpleFilter('thumbnail', function ($file, array $options = array()) { + $filter = new Twig_SimpleFilter('thumbnail', function ($file, array $options = []) { // ... - }, array('is_variadic' => true)); + }, ['is_variadic' => true]); Be warned that named arguments passed to a variadic filter cannot be checked for validity as they will automatically end up in the option array. @@ -285,7 +285,7 @@ deprecated one when that makes sense:: $filter = new Twig_SimpleFilter('obsolete', function () { // ... - }, array('deprecated' => true, 'alternative' => 'new_one')); + }, ['deprecated' => true, 'alternative' => 'new_one']); When a filter is deprecated, Twig emits a deprecation notice when compiling a template using it. See :ref:`deprecation-notices` for more information. @@ -343,7 +343,7 @@ This is used by many of the tests built into Twig:: $test = new Twig_SimpleTest( 'odd', null, - array('node_class' => 'Twig_Node_Expression_Test_Odd')); + ['node_class' => 'Twig_Node_Expression_Test_Odd']); $twig->addTest($test); class Twig_Node_Expression_Test_Odd extends Twig_Node_Expression_Test @@ -371,9 +371,12 @@ The ``node`` sub-node will contain an expression of ``my_value``. Node-based tests also have access to the ``arguments`` node. This node will contain the various other arguments that have been provided to your test. +.. versionadded:: 1.36 + Dynamic tests support was added in Twig 1.36. + If you want to pass a variable number of positional or named arguments to the -test, set the ``is_variadic`` option to ``true``. Tests also support dynamic -name feature as filters and functions. +test, set the ``is_variadic`` option to ``true``. Tests support dynamic +names (see dynamic filters and functions for the syntax). Tags ---- @@ -483,7 +486,7 @@ The ``Project_Set_Node`` class itself is rather simple:: { public function __construct($name, Twig_Node_Expression $value, $line, $tag = null) { - parent::__construct(array('value' => $value), array('name' => $name), $line, $tag); + parent::__construct(['value' => $value], ['name' => $name], $line, $tag); } public function compile(Twig_Compiler $compiler) @@ -658,9 +661,9 @@ method:: { public function getGlobals() { - return array( + return [ 'text' => new Text(), - ); + ]; } // ... @@ -676,9 +679,9 @@ method:: { public function getFunctions() { - return array( + return [ new Twig_SimpleFunction('lipsum', 'generate_lipsum'), - ); + ]; } // ... @@ -695,9 +698,9 @@ environment:: { public function getFilters() { - return array( + return [ new Twig_SimpleFilter('rot13', 'str_rot13'), - ); + ]; } // ... @@ -714,7 +717,7 @@ to the Twig environment:: { public function getTokenParsers() { - return array(new Project_Set_TokenParser()); + return [new Project_Set_TokenParser()]; } // ... @@ -734,15 +737,15 @@ The ``getOperators()`` methods lets you add new operators. Here is how to add { public function getOperators() { - return array( - array( - '!' => array('precedence' => 50, 'class' => 'Twig_Node_Expression_Unary_Not'), - ), - array( - '||' => array('precedence' => 10, 'class' => 'Twig_Node_Expression_Binary_Or', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), - '&&' => array('precedence' => 15, 'class' => 'Twig_Node_Expression_Binary_And', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), - ), - ); + return [ + [ + '!' => ['precedence' => 50, 'class' => 'Twig_Node_Expression_Unary_Not'], + ], + [ + '||' => ['precedence' => 10, 'class' => 'Twig_Node_Expression_Binary_Or', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT], + '&&' => ['precedence' => 15, 'class' => 'Twig_Node_Expression_Binary_And', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT], + ], + ]; } // ... @@ -757,9 +760,9 @@ The ``getTests()`` method lets you add new test functions:: { public function getTests() { - return array( + return [ new Twig_SimpleTest('even', 'twig_test_even'), - ); + ]; } // ... @@ -793,9 +796,9 @@ The simplest way to use methods is to define them on the extension itself:: public function getFunctions() { - return array( - new Twig_SimpleFunction('rot13', array($this, 'rot13')), - ); + return [ + new Twig_SimpleFunction('rot13', [$this, 'rot13']), + ]; } public function rot13($value) @@ -857,11 +860,11 @@ It is now possible to move the runtime logic to a new { public function getFunctions() { - return array( - new Twig_SimpleFunction('rot13', array('Project_Twig_RuntimeExtension', 'rot13')), + return [ + new Twig_SimpleFunction('rot13', ['Project_Twig_RuntimeExtension', 'rot13']), // or new Twig_SimpleFunction('rot13', 'Project_Twig_RuntimeExtension::rot13'), - ); + ]; } } @@ -876,9 +879,9 @@ possible** (order matters):: { public function getFilters() { - return array( - new Twig_SimpleFilter('date', array($this, 'dateFilter')), - ); + return [ + new Twig_SimpleFilter('date', [$this, 'dateFilter']), + ]; } public function dateFilter($timestamp, $format = 'F j, Y H:i') @@ -935,10 +938,10 @@ The ``IntegrationTest.php`` file should look like this:: { public function getExtensions() { - return array( + return [ new Project_Twig_Extension1(), new Project_Twig_Extension2(), - ); + ]; } public function getFixturesDir() diff --git a/vendor/twig/twig/doc/advanced_legacy.rst b/vendor/twig/twig/doc/advanced_legacy.rst index 857fe4fd6..3fb8297e0 100644 --- a/vendor/twig/twig/doc/advanced_legacy.rst +++ b/vendor/twig/twig/doc/advanced_legacy.rst @@ -227,7 +227,7 @@ The ``Twig_Filter`` classes take options as their last argument. For instance, if you want access to the current environment instance in your filter, set the ``needs_environment`` option to ``true``:: - $filter = new Twig_Filter_Function('str_rot13', array('needs_environment' => true)); + $filter = new Twig_Filter_Function('str_rot13', ['needs_environment' => true]); Twig will then pass the current environment as the first argument to the filter call:: @@ -248,14 +248,14 @@ before printing. If your filter acts as an escaper (or explicitly outputs HTML or JavaScript code), you will want the raw output to be printed. In such a case, set the ``is_safe`` option:: - $filter = new Twig_Filter_Function('nl2br', array('is_safe' => array('html'))); + $filter = new Twig_Filter_Function('nl2br', ['is_safe' => ['html']]); Some filters may need to work on input that is already escaped or safe, for example when adding (safe) HTML tags to originally unsafe output. In such a case, set the ``pre_escape`` option to escape the input data before it is run through your filter:: - $filter = new Twig_Filter_Function('somefilter', array('pre_escape' => 'html', 'is_safe' => array('html'))); + $filter = new Twig_Filter_Function('somefilter', ['pre_escape' => 'html', 'is_safe' => ['html']]); Dynamic Filters ~~~~~~~~~~~~~~~ @@ -465,7 +465,7 @@ The ``Project_Set_Node`` class itself is rather simple:: { public function __construct($name, Twig_Node_Expression $value, $lineno, $tag = null) { - parent::__construct(array('value' => $value), array('name' => $name), $lineno, $tag); + parent::__construct(['value' => $value], ['name' => $name], $lineno, $tag); } public function compile(Twig_Compiler $compiler) @@ -648,9 +648,9 @@ method:: { public function getGlobals() { - return array( + return [ 'text' => new Text(), - ); + ]; } // ... @@ -666,9 +666,9 @@ method:: { public function getFunctions() { - return array( + return [ 'lipsum' => new Twig_Function_Function('generate_lipsum'), - ); + ]; } // ... @@ -685,9 +685,9 @@ environment:: { public function getFilters() { - return array( + return [ 'rot13' => new Twig_Filter_Function('str_rot13'), - ); + ]; } // ... @@ -709,9 +709,9 @@ when defining a filter to use a method:: { public function getFilters() { - return array( + return [ 'rot13' => new Twig_Filter_Method($this, 'rot13Filter'), - ); + ]; } public function rot13Filter($string) @@ -741,10 +741,10 @@ want to override:: { public function getFilters() { - return array( + return [ 'date' => new Twig_Filter_Method($this, 'dateFilter'), // ... - ); + ]; } public function dateFilter($timestamp, $format = 'F j, Y H:i') @@ -776,7 +776,7 @@ to the Twig environment:: { public function getTokenParsers() { - return array(new Project_Set_TokenParser()); + return [new Project_Set_TokenParser()]; } // ... @@ -796,15 +796,15 @@ The ``getOperators()`` methods allows to add new operators. Here is how to add { public function getOperators() { - return array( - array( - '!' => array('precedence' => 50, 'class' => 'Twig_Node_Expression_Unary_Not'), + return [ + [ + '!' => ['precedence' => 50, 'class' => 'Twig_Node_Expression_Unary_Not'], ), - array( - '||' => array('precedence' => 10, 'class' => 'Twig_Node_Expression_Binary_Or', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), - '&&' => array('precedence' => 15, 'class' => 'Twig_Node_Expression_Binary_And', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), - ), - ); + [ + '||' => ['precedence' => 10, 'class' => 'Twig_Node_Expression_Binary_Or', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT], + '&&' => ['precedence' => 15, 'class' => 'Twig_Node_Expression_Binary_And', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT], + ], + ]; } // ... @@ -819,9 +819,9 @@ The ``getTests()`` methods allows to add new test functions:: { public function getTests() { - return array( + return [ 'even' => new Twig_Test_Function('twig_test_even'), - ); + ]; } // ... @@ -857,10 +857,10 @@ The ``IntegrationTest.php`` file should look like this:: { public function getExtensions() { - return array( + return [ new Project_Twig_Extension1(), new Project_Twig_Extension2(), - ); + ]; } public function getFixturesDir() diff --git a/vendor/twig/twig/doc/api.rst b/vendor/twig/twig/doc/api.rst index 8be2b8af8..12e14b525 100644 --- a/vendor/twig/twig/doc/api.rst +++ b/vendor/twig/twig/doc/api.rst @@ -25,9 +25,9 @@ looks roughly like this:: Twig_Autoloader::register(); $loader = new Twig_Loader_Filesystem('/path/to/templates'); - $twig = new Twig_Environment($loader, array( + $twig = new Twig_Environment($loader, [ 'cache' => '/path/to/compilation_cache', - )); + ]); This will create a template environment with the default settings and a loader that looks up the templates in the ``/path/to/templates/`` folder. Different @@ -58,7 +58,7 @@ returns a ``Twig_TemplateWrapper`` instance:: To render the template with some variables, call the ``render()`` method:: - echo $template->render(array('the' => 'variables', 'go' => 'here')); + echo $template->render(['the' => 'variables', 'go' => 'here']); .. note:: @@ -66,7 +66,7 @@ To render the template with some variables, call the ``render()`` method:: You can also load and render the template in one fell swoop:: - echo $twig->render('index.html', array('the' => 'variables', 'go' => 'here')); + echo $twig->render('index.html', ['the' => 'variables', 'go' => 'here']); .. versionadded:: 1.28 The possibility to render blocks from the API was added in Twig 1.28. @@ -74,7 +74,7 @@ You can also load and render the template in one fell swoop:: If a template defines blocks, they can be rendered individually via the ``renderBlock()`` call:: - echo $template->renderBlock('block_name', array('the' => 'variables', 'go' => 'here')); + echo $template->renderBlock('block_name', ['the' => 'variables', 'go' => 'here']); .. _environment_options: @@ -84,7 +84,7 @@ Environment Options When creating a new ``Twig_Environment`` instance, you can pass an array of options as the constructor second argument:: - $twig = new Twig_Environment($loader, array('debug' => true)); + $twig = new Twig_Environment($loader, ['debug' => true]); The following options are available: @@ -183,7 +183,7 @@ load them:: It can also look for templates in an array of directories:: - $loader = new Twig_Loader_Filesystem(array($templateDir1, $templateDir2)); + $loader = new Twig_Loader_Filesystem([$templateDir1, $templateDir2]); With such a configuration, Twig will first look for templates in ``$templateDir1`` and if they do not exist, it will fallback to look for them @@ -207,7 +207,7 @@ methods act on the "main" namespace):: Namespaced templates can be accessed via the special ``@namespace_name/template_path`` notation:: - $twig->render('@admin/index.html', array()); + $twig->render('@admin/index.html', []); ``Twig_Loader_Filesystem`` support absolute and relative paths. Using relative paths is preferred as it makes the cache keys independent of the project root @@ -227,12 +227,12 @@ the directory might be different from the one used on production servers):: ``Twig_Loader_Array`` loads a template from a PHP array. It's passed an array of strings bound to template names:: - $loader = new Twig_Loader_Array(array( + $loader = new Twig_Loader_Array([ 'index.html' => 'Hello {{ name }}!', - )); + ]); $twig = new Twig_Environment($loader); - echo $twig->render('index.html', array('name' => 'Fabien')); + echo $twig->render('index.html', ['name' => 'Fabien']); This loader is very useful for unit testing. It can also be used for small projects where storing all templates in a single PHP file might make sense. @@ -250,15 +250,15 @@ projects where storing all templates in a single PHP file might make sense. ``Twig_Loader_Chain`` delegates the loading of templates to other loaders:: - $loader1 = new Twig_Loader_Array(array( + $loader1 = new Twig_Loader_Array([ 'base.html' => '{% block content %}{% endblock %}', - )); - $loader2 = new Twig_Loader_Array(array( + ]); + $loader2 = new Twig_Loader_Array([ 'index.html' => '{% extends "base.html" %}{% block content %}Hello {{ name }}{% endblock %}', 'base.html' => 'Will never be loaded', - )); + ]); - $loader = new Twig_Loader_Chain(array($loader1, $loader2)); + $loader = new Twig_Loader_Chain([$loader1, $loader2]); $twig = new Twig_Environment($loader); @@ -476,15 +476,15 @@ by a policy instance. By default, Twig comes with one policy class: ``Twig_Sandbox_SecurityPolicy``. This class allows you to white-list some tags, filters, properties, and methods:: - $tags = array('if'); - $filters = array('upper'); - $methods = array( - 'Article' => array('getTitle', 'getBody'), - ); - $properties = array( - 'Article' => array('title', 'body'), - ); - $functions = array('range'); + $tags = ['if']; + $filters = ['upper']; + $methods = [ + 'Article' => ['getTitle', 'getBody'], + ]; + $properties = [ + 'Article' => ['title', 'body'], + ]; + $functions = ['range']; $policy = new Twig_Sandbox_SecurityPolicy($tags, $filters, $methods, $properties, $functions); With the previous configuration, the security policy will only allow usage of diff --git a/vendor/twig/twig/doc/filters/join.rst b/vendor/twig/twig/doc/filters/join.rst index 2fab94528..4d1473814 100644 --- a/vendor/twig/twig/doc/filters/join.rst +++ b/vendor/twig/twig/doc/filters/join.rst @@ -1,6 +1,9 @@ ``join`` ======== +.. versionadded:: 1.36.1 + The ``and`` argument was added in Twig 1.36.1. + The ``join`` filter returns a string which is the concatenation of the items of a sequence: @@ -16,8 +19,17 @@ define it with the optional first parameter: {{ [1, 2, 3]|join('|') }} {# outputs 1|2|3 #} + +A second parameter can also be provided that will be the separator used between +the last two items of the sequence: +.. code-block:: jinja + + {{ [1, 2, 3]|join(', ', ' and ') }} + {# outputs 1, 2 and 3 #} + Arguments --------- * ``glue``: The separator +* ``and``: The separator for the last pair of input items diff --git a/vendor/twig/twig/doc/filters/json_encode.rst b/vendor/twig/twig/doc/filters/json_encode.rst index 7ff53d291..f02a7a89a 100644 --- a/vendor/twig/twig/doc/filters/json_encode.rst +++ b/vendor/twig/twig/doc/filters/json_encode.rst @@ -14,8 +14,10 @@ The ``json_encode`` filter returns the JSON representation of a value: Arguments --------- -* ``options``: A bitmask of `json_encode options`_ (``{{ - data|json_encode(constant('JSON_PRETTY_PRINT')) }}``) +* ``options``: A bitmask of `json_encode options`_: ``{{ + data|json_encode(constant('JSON_PRETTY_PRINT')) }}``. + Combine constants using :ref:`bitwise operators`: + ``{{ data|json_encode(constant('JSON_PRETTY_PRINT') b-or constant('JSON_HEX_QUOT') }}`` .. _`json_encode`: https://secure.php.net/json_encode .. _`json_encode options`: https://secure.php.net/manual/en/json.constants.php diff --git a/vendor/twig/twig/doc/functions/dump.rst b/vendor/twig/twig/doc/functions/dump.rst index 611b97901..e2476e1e9 100644 --- a/vendor/twig/twig/doc/functions/dump.rst +++ b/vendor/twig/twig/doc/functions/dump.rst @@ -18,10 +18,10 @@ introspecting its variables: ``Twig_Extension_Debug`` extension explicitly when creating your Twig environment:: - $twig = new Twig_Environment($loader, array( + $twig = new Twig_Environment($loader, [ 'debug' => true, // ... - )); + ]); $twig->addExtension(new Twig_Extension_Debug()); Even when enabled, the ``dump`` function won't display anything if the diff --git a/vendor/twig/twig/doc/functions/include.rst b/vendor/twig/twig/doc/functions/include.rst index 2f88ed776..2d76b8f7c 100644 --- a/vendor/twig/twig/doc/functions/include.rst +++ b/vendor/twig/twig/doc/functions/include.rst @@ -48,7 +48,7 @@ And if the expression evaluates to a ``Twig_Template`` or a // as of Twig 1.28 $template = $twig->load('some_template.twig'); - $twig->display('template.twig', array('template' => $template)); + $twig->display('template.twig', ['template' => $template]); When you set the ``ignore_missing`` flag, Twig will return an empty string if the template does not exist: diff --git a/vendor/twig/twig/doc/installation.rst b/vendor/twig/twig/doc/installation.rst index 860f261a8..31a280552 100644 --- a/vendor/twig/twig/doc/installation.rst +++ b/vendor/twig/twig/doc/installation.rst @@ -55,6 +55,7 @@ Installing the C extension improvements. Note that the extension is not a replacement for the PHP code; it only implements a small part of the PHP code to improve the performance at runtime; you must still install the regular PHP code. + The C extension is only compatible and useful for **PHP5**. Twig comes with a C extension that enhances the performance of the Twig runtime engine; install it like any other PHP extensions: diff --git a/vendor/twig/twig/doc/internals.rst b/vendor/twig/twig/doc/internals.rst index fec65e00e..d81237973 100644 --- a/vendor/twig/twig/doc/internals.rst +++ b/vendor/twig/twig/doc/internals.rst @@ -124,7 +124,7 @@ using):: /* Hello {{ name }} */ class __TwigTemplate_1121b6f109fe93ebe8c6e22e3712bceb extends Twig_Template { - protected function doDisplay(array $context, array $blocks = array()) + protected function doDisplay(array $context, array $blocks = []) { // line 1 echo "Hello "; diff --git a/vendor/twig/twig/doc/intro.rst b/vendor/twig/twig/doc/intro.rst index d631430f7..5264c5469 100644 --- a/vendor/twig/twig/doc/intro.rst +++ b/vendor/twig/twig/doc/intro.rst @@ -55,12 +55,12 @@ This section gives you a brief introduction to the PHP API for Twig. require_once '/path/to/vendor/autoload.php'; - $loader = new Twig_Loader_Array(array( + $loader = new Twig_Loader_Array([ 'index' => 'Hello {{ name }}!', - )); + ]); $twig = new Twig_Environment($loader); - echo $twig->render('index', array('name' => 'Fabien')); + echo $twig->render('index', ['name' => 'Fabien']); Twig uses a loader (``Twig_Loader_Array``) to locate templates, and an environment (``Twig_Environment``) to store the configuration. @@ -72,11 +72,11 @@ As templates are generally stored on the filesystem, Twig also comes with a filesystem loader:: $loader = new Twig_Loader_Filesystem('/path/to/templates'); - $twig = new Twig_Environment($loader, array( + $twig = new Twig_Environment($loader, [ 'cache' => '/path/to/compilation_cache', - )); + ]); - echo $twig->render('index.html', array('name' => 'Fabien')); + echo $twig->render('index.html', ['name' => 'Fabien']); .. tip:: diff --git a/vendor/twig/twig/doc/recipes.rst b/vendor/twig/twig/doc/recipes.rst index 8f46da50e..e62eee27e 100644 --- a/vendor/twig/twig/doc/recipes.rst +++ b/vendor/twig/twig/doc/recipes.rst @@ -38,7 +38,7 @@ However, this code won't find all deprecations (like using deprecated some Twig classes). To catch all notices, register a custom error handler like the one below:: - $deprecations = array(); + $deprecations = []; set_error_handler(function ($type, $msg) use (&$deprecations) { if (E_USER_DEPRECATED === $type) { $deprecations[] = $msg; @@ -163,37 +163,37 @@ To change the block delimiters, you need to create your own lexer object:: $twig = new Twig_Environment(); - $lexer = new Twig_Lexer($twig, array( - 'tag_comment' => array('{#', '#}'), - 'tag_block' => array('{%', '%}'), - 'tag_variable' => array('{{', '}}'), - 'interpolation' => array('#{', '}'), - )); + $lexer = new Twig_Lexer($twig, [ + 'tag_comment' => ['{#', '#}'], + 'tag_block' => ['{%', '%}'], + 'tag_variable' => ['{{', '}}'], + 'interpolation' => ['#{', '}'], + ]); $twig->setLexer($lexer); Here are some configuration example that simulates some other template engines syntax:: // Ruby erb syntax - $lexer = new Twig_Lexer($twig, array( - 'tag_comment' => array('<%#', '%>'), - 'tag_block' => array('<%', '%>'), - 'tag_variable' => array('<%=', '%>'), - )); + $lexer = new Twig_Lexer($twig, [ + 'tag_comment' => ['<%#', '%>'], + 'tag_block' => ['<%', '%>'], + 'tag_variable' => ['<%=', '%>'], + ]); // SGML Comment Syntax - $lexer = new Twig_Lexer($twig, array( - 'tag_comment' => array(''), - 'tag_block' => array(''), - 'tag_variable' => array('${', '}'), - )); + $lexer = new Twig_Lexer($twig, [ + 'tag_comment' => [''], + 'tag_block' => [''], + 'tag_variable' => ['${', '}'], + ]); // Smarty like - $lexer = new Twig_Lexer($twig, array( - 'tag_comment' => array('{*', '*}'), - 'tag_block' => array('{', '}'), - 'tag_variable' => array('{$', '}'), - )); + $lexer = new Twig_Lexer($twig, [ + 'tag_comment' => ['{*', '*}'], + 'tag_block' => ['{', '}'], + 'tag_variable' => ['{$', '}'], + ]); Using dynamic Object Properties ------------------------------- @@ -233,12 +233,12 @@ Sometimes, when using nested loops, you need to access the parent context. The parent context is always accessible via the ``loop.parent`` variable. For instance, if you have the following template data:: - $data = array( - 'topics' => array( - 'topic1' => array('Message 1 of topic 1', 'Message 2 of topic 1'), - 'topic2' => array('Message 1 of topic 2', 'Message 2 of topic 2'), - ), - ); + $data = [ + 'topics' => [ + 'topic1' => ['Message 1 of topic 1', 'Message 2 of topic 1'], + 'topic2' => ['Message 1 of topic 2', 'Message 2 of topic 2'], + ], + ]; And the following template to display all messages in all topics: @@ -345,10 +345,10 @@ cache won't update the cache. To get around this, force Twig to invalidate the bytecode cache:: - $twig = new Twig_Environment($loader, array( + $twig = new Twig_Environment($loader, [ 'cache' => new Twig_Cache_Filesystem('/some/cache/path', Twig_Cache_Filesystem::FORCE_BYTECODE_INVALIDATION), // ... - )); + ]); .. note:: @@ -378,13 +378,13 @@ around, you probably want to reset it when visiting a new template. This can be easily achieved with the following code:: - protected $someTemplateState = array(); + protected $someTemplateState = []; public function enterNode(Twig_NodeInterface $node, Twig_Environment $env) { if ($node instanceof Twig_Node_Module) { // reset the state as we are entering a new template - $this->someTemplateState = array(); + $this->someTemplateState = []; } // ... @@ -468,7 +468,7 @@ Now, let's define a loader able to use this database:: protected function getValue($column, $name) { $sth = $this->dbh->prepare('SELECT '.$column.' FROM templates WHERE name = :name'); - $sth->execute(array(':name' => (string) $name)); + $sth->execute([':name' => (string) $name]); return $sth->fetchColumn(); } @@ -479,7 +479,7 @@ Finally, here is an example on how you can use it:: $loader = new DatabaseTwigLoader($dbh); $twig = new Twig_Environment($loader); - echo $twig->render('index.twig', array('name' => 'Fabien')); + echo $twig->render('index.twig', ['name' => 'Fabien']); Using different Template Sources -------------------------------- @@ -496,14 +496,14 @@ filesystem, or any other loader for that matter: the template name should be a logical name, and not the path from the filesystem:: $loader1 = new DatabaseTwigLoader($dbh); - $loader2 = new Twig_Loader_Array(array( + $loader2 = new Twig_Loader_Array([ 'base.twig' => '{% block content %}{% endblock %}', - )); - $loader = new Twig_Loader_Chain(array($loader1, $loader2)); + ]); + $loader = new Twig_Loader_Chain([$loader1, $loader2]); $twig = new Twig_Environment($loader); - echo $twig->render('index.twig', array('name' => 'Fabien')); + echo $twig->render('index.twig', ['name' => 'Fabien']); Now that the ``base.twig`` templates is defined in an array loader, you can remove it from the database, and everything else will still work as before. @@ -523,7 +523,7 @@ From PHP, it's also possible to load a template stored in a string via ``Twig_Environment::createTemplate()`` (available as of Twig 1.18):: $template = $twig->createTemplate('hello {{ name }}'); - echo $template->render(array('name' => 'Fabien')); + echo $template->render(['name' => 'Fabien']); .. note:: @@ -561,8 +561,8 @@ include in your templates: .. code-block:: php - $env->setLexer(new Twig_Lexer($env, array( - 'tag_variable' => array('{[', ']}'), - ))); + $env->setLexer(new Twig_Lexer($env, [ + 'tag_variable' => ['{[', ']}'], + ])); .. _callback: https://secure.php.net/manual/en/function.is-callable.php diff --git a/vendor/twig/twig/doc/tags/deprecated.rst b/vendor/twig/twig/doc/tags/deprecated.rst new file mode 100644 index 000000000..f36743f08 --- /dev/null +++ b/vendor/twig/twig/doc/tags/deprecated.rst @@ -0,0 +1,30 @@ +``deprecated`` +============== + +.. versionadded:: 1.36 and 2.6 + The ``deprecated`` tag was added in Twig 1.36 and 2.6. + +Twig generates a deprecation notice (via a call to the ``trigger_error()`` +PHP function) where the ``deprecated`` tag is used in a template: + +.. code-block:: jinja + + {# base.twig #} + {% deprecated 'The "base.twig" template is deprecated, use "layout.twig" instead.' %} + {% extends 'layout.twig' %} + +Also you can deprecate a block in the following way: + +.. code-block:: jinja + + {% block hey %} + {% deprecated 'The "hey" block is deprecated, use "greet" instead.' %} + {{ block('greet') }} + {% endblock %} + + {% block greet %} + Hey you! + {% endblock %} + +Note that by default, the deprecation notices are silenced and never displayed nor logged. +See :ref:`deprecation-notices` to learn how to handle them. diff --git a/vendor/twig/twig/doc/tags/extends.rst b/vendor/twig/twig/doc/tags/extends.rst index 8bf29c4f9..0fe4a31e2 100644 --- a/vendor/twig/twig/doc/tags/extends.rst +++ b/vendor/twig/twig/doc/tags/extends.rst @@ -164,7 +164,7 @@ instance, Twig will use it as the parent template:: // as of Twig 1.28 $layout = $twig->load('some_layout_template.twig'); - $twig->display('template.twig', array('layout' => $layout)); + $twig->display('template.twig', ['layout' => $layout]); .. versionadded:: 1.2 The possibility to pass an array of templates has been added in Twig 1.2. diff --git a/vendor/twig/twig/doc/tags/if.rst b/vendor/twig/twig/doc/tags/if.rst index 17e2df6f4..225246e90 100644 --- a/vendor/twig/twig/doc/tags/if.rst +++ b/vendor/twig/twig/doc/tags/if.rst @@ -50,12 +50,12 @@ use more complex ``expressions`` there too: .. code-block:: jinja - {% if kenny.sick %} - Kenny is sick. - {% elseif kenny.dead %} - You killed Kenny! You bastard!!! + {% if product.stock > 10 %} + Available + {% elseif product.stock > 0 %} + Only {{ product.stock }} left! {% else %} - Kenny looks okay --- so far + Sold-out! {% endif %} .. note:: diff --git a/vendor/twig/twig/doc/tags/include.rst b/vendor/twig/twig/doc/tags/include.rst index 24ff24db6..1dc4a0167 100644 --- a/vendor/twig/twig/doc/tags/include.rst +++ b/vendor/twig/twig/doc/tags/include.rst @@ -61,7 +61,7 @@ And if the expression evaluates to a ``Twig_Template`` or a // as of Twig 1.28 $template = $twig->load('some_template.twig'); - $twig->display('template.twig', array('template' => $template)); + $twig->display('template.twig', ['template' => $template]); .. versionadded:: 1.2 The ``ignore missing`` feature has been added in Twig 1.2. diff --git a/vendor/twig/twig/doc/tags/index.rst b/vendor/twig/twig/doc/tags/index.rst index dbe2459e3..373cf6e65 100644 --- a/vendor/twig/twig/doc/tags/index.rst +++ b/vendor/twig/twig/doc/tags/index.rst @@ -23,3 +23,4 @@ Tags use verbatim with + deprecated diff --git a/vendor/twig/twig/doc/templates.rst b/vendor/twig/twig/doc/templates.rst index bbce18747..87a153e84 100644 --- a/vendor/twig/twig/doc/templates.rst +++ b/vendor/twig/twig/doc/templates.rst @@ -555,11 +555,12 @@ even if you're not working with PHP you should feel comfortable with it. .. note:: - The operator precedence is as follows, with the lowest-precedence - operators listed first: ``b-and``, ``b-xor``, ``b-or``, ``or``, ``and``, - ``==``, ``!=``, ``<``, ``>``, ``>=``, ``<=``, ``in``, ``matches``, - ``starts with``, ``ends with``, ``..``, ``+``, ``-``, ``~``, ``*``, ``/``, - ``//``, ``%``, ``is``, ``**``, ``|``, ``[]``, and ``.``: + The operator precedence is as follows, with the lowest-precedence operators + listed first: ``?:`` (ternary operator), ``b-and``, ``b-xor``, ``b-or``, + ``or``, ``and``, ``==``, ``!=``, ``<``, ``>``, ``>=``, ``<=``, ``in``, + ``matches``, ``starts with``, ``ends with``, ``..``, ``+``, ``-``, ``~``, + ``*``, ``/``, ``//``, ``%``, ``is`` (tests), ``**``, ``??``, ``|`` + (filters), ``[]``, and ``.``. .. code-block:: jinja @@ -659,6 +660,8 @@ but exists for completeness' sake. The following operators are supported: * ``**``: Raises the left operand to the power of the right operand. ``{{ 2 ** 3 }}`` would return ``8``. +.. _template_logic: + Logic ~~~~~ @@ -674,7 +677,7 @@ You can combine multiple expressions with the following operators: .. note:: - Twig also support bitwise operators (``b-and``, ``b-xor``, and ``b-or``). + Twig also supports bitwise operators (``b-and``, ``b-xor``, and ``b-or``). .. note:: diff --git a/vendor/twig/twig/ext/twig/php_twig.h b/vendor/twig/twig/ext/twig/php_twig.h index e99703f2e..26151f0c0 100644 --- a/vendor/twig/twig/ext/twig/php_twig.h +++ b/vendor/twig/twig/ext/twig/php_twig.h @@ -15,7 +15,7 @@ #ifndef PHP_TWIG_H #define PHP_TWIG_H -#define PHP_TWIG_VERSION "1.35.4-DEV" +#define PHP_TWIG_VERSION "1.37.1" #include "php.h" diff --git a/vendor/twig/twig/ext/twig/twig.c b/vendor/twig/twig/ext/twig/twig.c index b81d8ce3c..ed86d902e 100644 --- a/vendor/twig/twig/ext/twig/twig.c +++ b/vendor/twig/twig/ext/twig/twig.c @@ -959,7 +959,7 @@ PHP_FUNCTION(twig_template_get_attributes) if (!isset(self::$cache[$class]['methods'])) { if ($object instanceof self) { $ref = new ReflectionClass($class); - $methods = array(); + $methods = []; foreach ($ref->getMethods(ReflectionMethod::IS_PUBLIC) as $refMethod) { $methodName = strtolower($refMethod->name); @@ -1081,7 +1081,7 @@ PHP_FUNCTION(twig_template_get_attributes) // Some objects throw exceptions when they have __call, and the method we try // to call is not supported. If ignoreStrictCheck is true, we should return null. try { - $ret = call_user_func_array(array($object, $method), $arguments); + $ret = call_user_func_array([$object, $method], $arguments); } catch (BadMethodCallException $e) { if ($call && ($ignoreStrictCheck || !$this->env->isStrictVariables())) { return null; diff --git a/vendor/twig/twig/lib/Twig/Autoloader.php b/vendor/twig/twig/lib/Twig/Autoloader.php index 212af5445..6a2bf4a60 100644 --- a/vendor/twig/twig/lib/Twig/Autoloader.php +++ b/vendor/twig/twig/lib/Twig/Autoloader.php @@ -29,11 +29,7 @@ class Twig_Autoloader { @trigger_error('Using Twig_Autoloader is deprecated since version 1.21. Use Composer instead.', E_USER_DEPRECATED); - if (PHP_VERSION_ID < 50300) { - spl_autoload_register(array(__CLASS__, 'autoload')); - } else { - spl_autoload_register(array(__CLASS__, 'autoload'), true, $prepend); - } + spl_autoload_register([__CLASS__, 'autoload'], true, $prepend); } /** @@ -47,7 +43,7 @@ class Twig_Autoloader return; } - if (is_file($file = dirname(__FILE__).'/../'.str_replace(array('_', "\0"), array('/', ''), $class).'.php')) { + if (is_file($file = dirname(__FILE__).'/../'.str_replace(['_', "\0"], ['/', ''], $class).'.php')) { require $file; } } diff --git a/vendor/twig/twig/lib/Twig/Cache/Filesystem.php b/vendor/twig/twig/lib/Twig/Cache/Filesystem.php index 65976282b..5b0acc073 100644 --- a/vendor/twig/twig/lib/Twig/Cache/Filesystem.php +++ b/vendor/twig/twig/lib/Twig/Cache/Filesystem.php @@ -50,9 +50,7 @@ class Twig_Cache_Filesystem implements Twig_CacheInterface $dir = dirname($key); if (!is_dir($dir)) { if (false === @mkdir($dir, 0777, true)) { - if (PHP_VERSION_ID >= 50300) { - clearstatcache(true, $dir); - } + clearstatcache(true, $dir); if (!is_dir($dir)) { throw new RuntimeException(sprintf('Unable to create the cache directory (%s).', $dir)); } diff --git a/vendor/twig/twig/lib/Twig/Compiler.php b/vendor/twig/twig/lib/Twig/Compiler.php index 803eb8962..a5a603010 100644 --- a/vendor/twig/twig/lib/Twig/Compiler.php +++ b/vendor/twig/twig/lib/Twig/Compiler.php @@ -21,7 +21,7 @@ class Twig_Compiler implements Twig_CompilerInterface protected $source; protected $indentation; protected $env; - protected $debugInfo = array(); + protected $debugInfo = []; protected $sourceOffset; protected $sourceLine; protected $filename; @@ -74,7 +74,7 @@ class Twig_Compiler implements Twig_CompilerInterface { $this->lastLine = null; $this->source = ''; - $this->debugInfo = array(); + $this->debugInfo = []; $this->sourceOffset = 0; // source code starts at 1 (as we then increment it when we encounter new lines) $this->sourceLine = 1; @@ -175,7 +175,7 @@ class Twig_Compiler implements Twig_CompilerInterface setlocale(LC_NUMERIC, 'C'); } - $this->raw($value); + $this->raw(var_export($value, true)); if (false !== $locale) { setlocale(LC_NUMERIC, $locale); @@ -185,7 +185,7 @@ class Twig_Compiler implements Twig_CompilerInterface } elseif (is_bool($value)) { $this->raw($value ? 'true' : 'false'); } elseif (is_array($value)) { - $this->raw('array('); + $this->raw('['); $first = true; foreach ($value as $key => $v) { if (!$first) { @@ -196,7 +196,7 @@ class Twig_Compiler implements Twig_CompilerInterface $this->raw(' => '); $this->repr($v); } - $this->raw(')'); + $this->raw(']'); } else { $this->string($value); } diff --git a/vendor/twig/twig/lib/Twig/Environment.php b/vendor/twig/twig/lib/Twig/Environment.php index 9b610f759..2a051b90b 100644 --- a/vendor/twig/twig/lib/Twig/Environment.php +++ b/vendor/twig/twig/lib/Twig/Environment.php @@ -16,11 +16,11 @@ */ class Twig_Environment { - const VERSION = '1.35.4'; - const VERSION_ID = 13504; + const VERSION = '1.37.1'; + const VERSION_ID = 13701; const MAJOR_VERSION = 1; - const MINOR_VERSION = 35; - const RELEASE_VERSION = 4; + const MINOR_VERSION = 37; + const RELEASE_VERSION = 1; const EXTRA_VERSION = ''; protected $charset; @@ -46,19 +46,19 @@ class Twig_Environment protected $unaryOperators; protected $binaryOperators; protected $templateClassPrefix = '__TwigTemplate_'; - protected $functionCallbacks = array(); - protected $filterCallbacks = array(); + protected $functionCallbacks = []; + protected $filterCallbacks = []; protected $staging; private $originalCache; private $bcWriteCacheFile = false; private $bcGetCacheFilename = false; private $lastModifiedExtension = 0; - private $extensionsByClass = array(); - private $runtimeLoaders = array(); - private $runtimes = array(); + private $extensionsByClass = []; + private $runtimeLoaders = []; + private $runtimes = []; private $optionsHash; - private $loading = array(); + private $loading = []; /** * Constructor. @@ -98,7 +98,7 @@ class Twig_Environment * @param Twig_LoaderInterface $loader * @param array $options An array of options */ - public function __construct(Twig_LoaderInterface $loader = null, $options = array()) + public function __construct(Twig_LoaderInterface $loader = null, $options = []) { if (null !== $loader) { $this->setLoader($loader); @@ -106,7 +106,7 @@ class Twig_Environment @trigger_error('Not passing a Twig_LoaderInterface as the first constructor argument of Twig_Environment is deprecated since version 1.21.', E_USER_DEPRECATED); } - $options = array_merge(array( + $options = array_merge([ 'debug' => false, 'charset' => 'UTF-8', 'base_template_class' => 'Twig_Template', @@ -115,7 +115,7 @@ class Twig_Environment 'cache' => false, 'auto_reload' => null, 'optimizations' => -1, - ), $options); + ], $options); $this->debug = (bool) $options['debug']; $this->charset = strtoupper($options['charset']); @@ -358,7 +358,7 @@ class Twig_Environment * @throws Twig_Error_Syntax When an error occurred during compilation * @throws Twig_Error_Runtime When an error occurred during rendering */ - public function render($name, array $context = array()) + public function render($name, array $context = []) { return $this->loadTemplate($name)->render($context); } @@ -373,7 +373,7 @@ class Twig_Environment * @throws Twig_Error_Syntax When an error occurred during compilation * @throws Twig_Error_Runtime When an error occurred during rendering */ - public function display($name, array $context = array()) + public function display($name, array $context = []) { $this->loadTemplate($name)->display($context); } @@ -478,7 +478,7 @@ class Twig_Environment } if (isset($this->loading[$cls])) { - throw new Twig_Error_Runtime(sprintf('Circular reference detected for Twig template "%s", path: %s.', $name, implode(' -> ', array_merge($this->loading, array($name))))); + throw new Twig_Error_Runtime(sprintf('Circular reference detected for Twig template "%s", path: %s.', $name, implode(' -> ', array_merge($this->loading, [$name])))); } $this->loading[$cls] = $name; @@ -511,10 +511,10 @@ class Twig_Environment { $name = sprintf('__string_template__%s', hash('sha256', $template, false)); - $loader = new Twig_Loader_Chain(array( - new Twig_Loader_Array(array($name => $template)), + $loader = new Twig_Loader_Chain([ + new Twig_Loader_Array([$name => $template]), $current = $this->getLoader(), - )); + ]); $this->setLoader($loader); try { @@ -575,7 +575,7 @@ class Twig_Environment public function resolveTemplate($names) { if (!is_array($names)) { - $names = array($names); + $names = [$names]; } foreach ($names as $name) { @@ -609,7 +609,7 @@ class Twig_Environment { @trigger_error(sprintf('The %s method is deprecated since version 1.18.3 and will be removed in Twig 2.0.', __METHOD__), E_USER_DEPRECATED); - $this->loadedTemplates = array(); + $this->loadedTemplates = []; } /** @@ -1049,7 +1049,7 @@ class Twig_Environment */ public function getTags() { - $tags = array(); + $tags = []; foreach ($this->getTokenParsers()->getParsers() as $parser) { if ($parser instanceof Twig_TokenParserInterface) { $tags[$parser->getTag()] = $parser; @@ -1240,6 +1240,19 @@ class Twig_Environment return $this->tests[$name]; } + foreach ($this->tests as $pattern => $test) { + $pattern = str_replace('\\*', '(.*?)', preg_quote($pattern, '#'), $count); + + if ($count) { + if (preg_match('#^'.$pattern.'$#', $name, $matches)) { + array_shift($matches); + $test->setArguments($matches); + + return $test; + } + } + } + return false; } @@ -1456,7 +1469,7 @@ class Twig_Environment */ protected function initGlobals() { - $globals = array(); + $globals = []; foreach ($this->extensions as $name => $extension) { if (!$extension instanceof Twig_Extension_GlobalsInterface) { $m = new ReflectionMethod($extension, 'getGlobals'); @@ -1488,13 +1501,13 @@ class Twig_Environment return; } - $this->parsers = new Twig_TokenParserBroker(array(), array(), false); - $this->filters = array(); - $this->functions = array(); - $this->tests = array(); - $this->visitors = array(); - $this->unaryOperators = array(); - $this->binaryOperators = array(); + $this->parsers = new Twig_TokenParserBroker([], [], false); + $this->filters = []; + $this->functions = []; + $this->tests = []; + $this->visitors = []; + $this->unaryOperators = []; + $this->binaryOperators = []; foreach ($this->extensions as $extension) { $this->initExtension($extension); @@ -1587,7 +1600,7 @@ class Twig_Environment { $hashParts = array_merge( array_keys($this->extensions), - array( + [ (int) function_exists('twig_template_get_attributes'), PHP_MAJOR_VERSION, PHP_MINOR_VERSION, @@ -1595,7 +1608,7 @@ class Twig_Environment (int) $this->debug, $this->baseTemplateClass, (int) $this->strictVariables, - ) + ] ); $this->optionsHash = implode(':', $hashParts); } diff --git a/vendor/twig/twig/lib/Twig/Error.php b/vendor/twig/twig/lib/Twig/Error.php index 787e0d095..569c2feab 100644 --- a/vendor/twig/twig/lib/Twig/Error.php +++ b/vendor/twig/twig/lib/Twig/Error.php @@ -37,7 +37,6 @@ class Twig_Error extends Exception // to be renamed to name in 2.0 protected $filename; protected $rawMessage; - protected $previous; private $sourcePath; private $sourceCode; @@ -71,12 +70,7 @@ class Twig_Error extends Exception $this->sourceCode = $source->getCode(); $this->sourcePath = $source->getPath(); } - if (PHP_VERSION_ID < 50300) { - $this->previous = $previous; - parent::__construct(''); - } else { - parent::__construct('', 0, $previous); - } + parent::__construct('', 0, $previous); $this->lineno = $lineno; $this->filename = $name; @@ -215,25 +209,6 @@ class Twig_Error extends Exception $this->updateRepr(); } - /** - * For PHP < 5.3.0, provides access to the getPrevious() method. - * - * @param string $method The method name - * @param array $arguments The parameters to be passed to the method - * - * @return Exception The previous exception or null - * - * @throws BadMethodCallException - */ - public function __call($method, $arguments) - { - if ('getprevious' == strtolower($method)) { - return $this->previous; - } - - throw new BadMethodCallException(sprintf('Method "Twig_Error::%s()" does not exist.', $method)); - } - public function appendMessage($rawMessage) { $this->rawMessage .= $rawMessage; @@ -296,12 +271,7 @@ class Twig_Error extends Exception $template = null; $templateClass = null; - if (PHP_VERSION_ID >= 50306) { - $backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS | DEBUG_BACKTRACE_PROVIDE_OBJECT); - } else { - $backtrace = debug_backtrace(); - } - + $backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS | DEBUG_BACKTRACE_PROVIDE_OBJECT); foreach ($backtrace as $trace) { if (isset($trace['object']) && $trace['object'] instanceof Twig_Template && 'Twig_Template' !== get_class($trace['object'])) { $currentClass = get_class($trace['object']); @@ -332,14 +302,14 @@ class Twig_Error extends Exception $r = new ReflectionObject($template); $file = $r->getFileName(); - $exceptions = array($e = $this); - while (($e instanceof self || method_exists($e, 'getPrevious')) && $e = $e->getPrevious()) { + $exceptions = [$e = $this]; + while ($e instanceof self && $e = $e->getPrevious()) { $exceptions[] = $e; } while ($e = array_pop($exceptions)) { $traces = $e->getTrace(); - array_unshift($traces, array('file' => $e->getFile(), 'line' => $e->getLine())); + array_unshift($traces, ['file' => $e->getFile(), 'line' => $e->getLine()]); while ($trace = array_shift($traces)) { if (!isset($trace['file']) || !isset($trace['line']) || $file != $trace['file']) { diff --git a/vendor/twig/twig/lib/Twig/Error/Loader.php b/vendor/twig/twig/lib/Twig/Error/Loader.php index df566dd78..2ef0480e3 100644 --- a/vendor/twig/twig/lib/Twig/Error/Loader.php +++ b/vendor/twig/twig/lib/Twig/Error/Loader.php @@ -26,12 +26,8 @@ class Twig_Error_Loader extends Twig_Error { public function __construct($message, $lineno = -1, $source = null, Exception $previous = null) { - if (PHP_VERSION_ID < 50300) { - $this->previous = $previous; - Exception::__construct(''); - } else { - Exception::__construct('', 0, $previous); - } + Exception::__construct('', 0, $previous); + $this->appendMessage($message); $this->setTemplateLine(false); } diff --git a/vendor/twig/twig/lib/Twig/Error/Syntax.php b/vendor/twig/twig/lib/Twig/Error/Syntax.php index 9d09f2179..c889dc644 100644 --- a/vendor/twig/twig/lib/Twig/Error/Syntax.php +++ b/vendor/twig/twig/lib/Twig/Error/Syntax.php @@ -39,7 +39,7 @@ class Twig_Error_Syntax extends Twig_Error */ public static function computeAlternatives($name, $items) { - $alternatives = array(); + $alternatives = []; foreach ($items as $item) { $lev = levenshtein($name, $item); if ($lev <= strlen($name) / 3 || false !== strpos($item, $name)) { diff --git a/vendor/twig/twig/lib/Twig/ExpressionParser.php b/vendor/twig/twig/lib/Twig/ExpressionParser.php index fe4a9b4aa..eaaafb169 100644 --- a/vendor/twig/twig/lib/Twig/ExpressionParser.php +++ b/vendor/twig/twig/lib/Twig/ExpressionParser.php @@ -188,7 +188,7 @@ class Twig_ExpressionParser $ref = new ReflectionClass($class); $negClass = 'Twig_Node_Expression_Unary_Neg'; $posClass = 'Twig_Node_Expression_Unary_Pos'; - if (!(in_array($ref->getName(), array($negClass, $posClass)) || $ref->isSubclassOf($negClass) || $ref->isSubclassOf($posClass))) { + if (!(in_array($ref->getName(), [$negClass, $posClass]) || $ref->isSubclassOf($negClass) || $ref->isSubclassOf($posClass))) { throw new Twig_Error_Syntax(sprintf('Unexpected unary operator "%s".', $token->getValue()), $token->getLine(), $this->parser->getStream()->getSourceContext()); } @@ -219,7 +219,7 @@ class Twig_ExpressionParser { $stream = $this->parser->getStream(); - $nodes = array(); + $nodes = []; // a string cannot be followed by another string in a single expression $nextCanBeString = true; while (true) { @@ -248,7 +248,7 @@ class Twig_ExpressionParser $stream = $this->parser->getStream(); $stream->expect(Twig_Token::PUNCTUATION_TYPE, '[', 'An array element was expected'); - $node = new Twig_Node_Expression_Array(array(), $stream->getCurrent()->getLine()); + $node = new Twig_Node_Expression_Array([], $stream->getCurrent()->getLine()); $first = true; while (!$stream->test(Twig_Token::PUNCTUATION_TYPE, ']')) { if (!$first) { @@ -273,7 +273,7 @@ class Twig_ExpressionParser $stream = $this->parser->getStream(); $stream->expect(Twig_Token::PUNCTUATION_TYPE, '{', 'A hash element was expected'); - $node = new Twig_Node_Expression_Array(array(), $stream->getCurrent()->getLine()); + $node = new Twig_Node_Expression_Array([], $stream->getCurrent()->getLine()); $first = true; while (!$stream->test(Twig_Token::PUNCTUATION_TYPE, '}')) { if (!$first) { @@ -362,7 +362,7 @@ class Twig_ExpressionParser return new Twig_Node_Expression_GetAttr($args->getNode(0), $args->getNode(1), count($args) > 2 ? $args->getNode(2) : null, Twig_Template::ANY_CALL, $line); default: if (null !== $alias = $this->parser->getImportedSymbol('function', $name)) { - $arguments = new Twig_Node_Expression_Array(array(), $line); + $arguments = new Twig_Node_Expression_Array([], $line); foreach ($this->parseArguments() as $n) { $arguments->addElement($n); } @@ -385,7 +385,7 @@ class Twig_ExpressionParser $stream = $this->parser->getStream(); $token = $stream->next(); $lineno = $token->getLine(); - $arguments = new Twig_Node_Expression_Array(array(), $lineno); + $arguments = new Twig_Node_Expression_Array([], $lineno); $type = Twig_Template::ANY_CALL; if ('.' == $token->getValue()) { $token = $stream->next(); @@ -448,7 +448,7 @@ class Twig_ExpressionParser } $class = $this->getFilterNodeClass('slice', $token->getLine()); - $arguments = new Twig_Node(array($arg, $length)); + $arguments = new Twig_Node([$arg, $length]); $filter = new $class($node, new Twig_Node_Expression_Constant('slice', $token->getLine()), $arguments, $token->getLine()); $stream->expect(Twig_Token::PUNCTUATION_TYPE, ']'); @@ -507,7 +507,7 @@ class Twig_ExpressionParser */ public function parseArguments($namedArguments = false, $definition = false) { - $args = array(); + $args = []; $stream = $this->parser->getStream(); $stream->expect(Twig_Token::PUNCTUATION_TYPE, '(', 'A list of arguments must begin with an opening parenthesis'); @@ -563,11 +563,11 @@ class Twig_ExpressionParser public function parseAssignmentExpression() { $stream = $this->parser->getStream(); - $targets = array(); + $targets = []; while (true) { $token = $stream->expect(Twig_Token::NAME_TYPE, null, 'Only variables can be assigned to'); $value = $token->getValue(); - if (in_array(strtolower($value), array('true', 'false', 'none', 'null'))) { + if (in_array(strtolower($value), ['true', 'false', 'none', 'null'])) { throw new Twig_Error_Syntax(sprintf('You cannot assign a value to "%s".', $value), $token->getLine(), $stream->getSourceContext()); } $targets[] = new Twig_Node_Expression_AssignName($value, $token->getLine()); @@ -582,7 +582,7 @@ class Twig_ExpressionParser public function parseMultitargetExpression() { - $targets = array(); + $targets = []; while (true) { $targets[] = $this->parseExpression(); if (!$this->parser->getStream()->nextIf(Twig_Token::PUNCTUATION_TYPE, ',')) { @@ -618,7 +618,7 @@ class Twig_ExpressionParser $name = $stream->expect(Twig_Token::NAME_TYPE)->getValue(); if ($test = $this->env->getTest($name)) { - return array($name, $test); + return [$name, $test]; } if ($stream->test(Twig_Token::NAME_TYPE)) { @@ -628,7 +628,7 @@ class Twig_ExpressionParser if ($test = $this->env->getTest($name)) { $stream->next(); - return array($name, $test); + return [$name, $test]; } } diff --git a/vendor/twig/twig/lib/Twig/Extension.php b/vendor/twig/twig/lib/Twig/Extension.php index 38084495f..de93ca610 100644 --- a/vendor/twig/twig/lib/Twig/Extension.php +++ b/vendor/twig/twig/lib/Twig/Extension.php @@ -20,32 +20,32 @@ abstract class Twig_Extension implements Twig_ExtensionInterface public function getTokenParsers() { - return array(); + return []; } public function getNodeVisitors() { - return array(); + return []; } public function getFilters() { - return array(); + return []; } public function getTests() { - return array(); + return []; } public function getFunctions() { - return array(); + return []; } public function getOperators() { - return array(); + return []; } /** @@ -53,7 +53,7 @@ abstract class Twig_Extension implements Twig_ExtensionInterface */ public function getGlobals() { - return array(); + return []; } /** diff --git a/vendor/twig/twig/lib/Twig/Extension/Core.php b/vendor/twig/twig/lib/Twig/Extension/Core.php index 6fa78e131..9babcfc6e 100644 --- a/vendor/twig/twig/lib/Twig/Extension/Core.php +++ b/vendor/twig/twig/lib/Twig/Extension/Core.php @@ -18,10 +18,10 @@ if (!defined('ENT_SUBSTITUTE')) { */ class Twig_Extension_Core extends Twig_Extension { - protected $dateFormats = array('F j, Y H:i', '%d days'); - protected $numberFormat = array(0, '.', ','); + protected $dateFormats = ['F j, Y H:i', '%d days']; + protected $numberFormat = [0, '.', ',']; protected $timezone = null; - protected $escapers = array(); + protected $escapers = []; /** * Defines a new escaper to be used via the escape filter. @@ -104,7 +104,7 @@ class Twig_Extension_Core extends Twig_Extension */ public function setNumberFormat($decimal, $decimalPoint, $thousandSep) { - $this->numberFormat = array($decimal, $decimalPoint, $thousandSep); + $this->numberFormat = [$decimal, $decimalPoint, $thousandSep]; } /** @@ -119,7 +119,7 @@ class Twig_Extension_Core extends Twig_Extension public function getTokenParsers() { - return array( + return [ new Twig_TokenParser_For(), new Twig_TokenParser_If(), new Twig_TokenParser_Extends(), @@ -136,18 +136,19 @@ class Twig_Extension_Core extends Twig_Extension new Twig_TokenParser_Do(), new Twig_TokenParser_Embed(), new Twig_TokenParser_With(), - ); + new Twig_TokenParser_Deprecated(), + ]; } public function getFilters() { - $filters = array( + $filters = [ // formatting filters - new Twig_SimpleFilter('date', 'twig_date_format_filter', array('needs_environment' => true)), - new Twig_SimpleFilter('date_modify', 'twig_date_modify_filter', array('needs_environment' => true)), + new Twig_SimpleFilter('date', 'twig_date_format_filter', ['needs_environment' => true]), + new Twig_SimpleFilter('date_modify', 'twig_date_modify_filter', ['needs_environment' => true]), new Twig_SimpleFilter('format', 'sprintf'), new Twig_SimpleFilter('replace', 'twig_replace_filter'), - new Twig_SimpleFilter('number_format', 'twig_number_format_filter', array('needs_environment' => true)), + new Twig_SimpleFilter('number_format', 'twig_number_format_filter', ['needs_environment' => true]), new Twig_SimpleFilter('abs', 'abs'), new Twig_SimpleFilter('round', 'twig_round'), @@ -157,40 +158,40 @@ class Twig_Extension_Core extends Twig_Extension new Twig_SimpleFilter('convert_encoding', 'twig_convert_encoding'), // string filters - new Twig_SimpleFilter('title', 'twig_title_string_filter', array('needs_environment' => true)), - new Twig_SimpleFilter('capitalize', 'twig_capitalize_string_filter', array('needs_environment' => true)), + new Twig_SimpleFilter('title', 'twig_title_string_filter', ['needs_environment' => true]), + new Twig_SimpleFilter('capitalize', 'twig_capitalize_string_filter', ['needs_environment' => true]), new Twig_SimpleFilter('upper', 'strtoupper'), new Twig_SimpleFilter('lower', 'strtolower'), new Twig_SimpleFilter('striptags', 'strip_tags'), new Twig_SimpleFilter('trim', 'twig_trim_filter'), - new Twig_SimpleFilter('nl2br', 'nl2br', array('pre_escape' => 'html', 'is_safe' => array('html'))), + new Twig_SimpleFilter('nl2br', 'nl2br', ['pre_escape' => 'html', 'is_safe' => ['html']]), // array helpers new Twig_SimpleFilter('join', 'twig_join_filter'), - new Twig_SimpleFilter('split', 'twig_split_filter', array('needs_environment' => true)), + new Twig_SimpleFilter('split', 'twig_split_filter', ['needs_environment' => true]), new Twig_SimpleFilter('sort', 'twig_sort_filter'), new Twig_SimpleFilter('merge', 'twig_array_merge'), new Twig_SimpleFilter('batch', 'twig_array_batch'), // string/array filters - new Twig_SimpleFilter('reverse', 'twig_reverse_filter', array('needs_environment' => true)), - new Twig_SimpleFilter('length', 'twig_length_filter', array('needs_environment' => true)), - new Twig_SimpleFilter('slice', 'twig_slice', array('needs_environment' => true)), - new Twig_SimpleFilter('first', 'twig_first', array('needs_environment' => true)), - new Twig_SimpleFilter('last', 'twig_last', array('needs_environment' => true)), + new Twig_SimpleFilter('reverse', 'twig_reverse_filter', ['needs_environment' => true]), + new Twig_SimpleFilter('length', 'twig_length_filter', ['needs_environment' => true]), + new Twig_SimpleFilter('slice', 'twig_slice', ['needs_environment' => true]), + new Twig_SimpleFilter('first', 'twig_first', ['needs_environment' => true]), + new Twig_SimpleFilter('last', 'twig_last', ['needs_environment' => true]), // iteration and runtime - new Twig_SimpleFilter('default', '_twig_default_filter', array('node_class' => 'Twig_Node_Expression_Filter_Default')), + new Twig_SimpleFilter('default', '_twig_default_filter', ['node_class' => 'Twig_Node_Expression_Filter_Default']), new Twig_SimpleFilter('keys', 'twig_get_array_keys_filter'), // escaping - new Twig_SimpleFilter('escape', 'twig_escape_filter', array('needs_environment' => true, 'is_safe_callback' => 'twig_escape_filter_is_safe')), - new Twig_SimpleFilter('e', 'twig_escape_filter', array('needs_environment' => true, 'is_safe_callback' => 'twig_escape_filter_is_safe')), - ); + new Twig_SimpleFilter('escape', 'twig_escape_filter', ['needs_environment' => true, 'is_safe_callback' => 'twig_escape_filter_is_safe']), + new Twig_SimpleFilter('e', 'twig_escape_filter', ['needs_environment' => true, 'is_safe_callback' => 'twig_escape_filter_is_safe']), + ]; if (function_exists('mb_get_info')) { - $filters[] = new Twig_SimpleFilter('upper', 'twig_upper_filter', array('needs_environment' => true)); - $filters[] = new Twig_SimpleFilter('lower', 'twig_lower_filter', array('needs_environment' => true)); + $filters[] = new Twig_SimpleFilter('upper', 'twig_upper_filter', ['needs_environment' => true]); + $filters[] = new Twig_SimpleFilter('lower', 'twig_lower_filter', ['needs_environment' => true]); } return $filters; @@ -198,76 +199,76 @@ class Twig_Extension_Core extends Twig_Extension public function getFunctions() { - return array( + return [ new Twig_SimpleFunction('max', 'max'), new Twig_SimpleFunction('min', 'min'), new Twig_SimpleFunction('range', 'range'), new Twig_SimpleFunction('constant', 'twig_constant'), new Twig_SimpleFunction('cycle', 'twig_cycle'), - new Twig_SimpleFunction('random', 'twig_random', array('needs_environment' => true)), - new Twig_SimpleFunction('date', 'twig_date_converter', array('needs_environment' => true)), - new Twig_SimpleFunction('include', 'twig_include', array('needs_environment' => true, 'needs_context' => true, 'is_safe' => array('all'))), - new Twig_SimpleFunction('source', 'twig_source', array('needs_environment' => true, 'is_safe' => array('all'))), - ); + new Twig_SimpleFunction('random', 'twig_random', ['needs_environment' => true]), + new Twig_SimpleFunction('date', 'twig_date_converter', ['needs_environment' => true]), + new Twig_SimpleFunction('include', 'twig_include', ['needs_environment' => true, 'needs_context' => true, 'is_safe' => ['all']]), + new Twig_SimpleFunction('source', 'twig_source', ['needs_environment' => true, 'is_safe' => ['all']]), + ]; } public function getTests() { - return array( - new Twig_SimpleTest('even', null, array('node_class' => 'Twig_Node_Expression_Test_Even')), - new Twig_SimpleTest('odd', null, array('node_class' => 'Twig_Node_Expression_Test_Odd')), - new Twig_SimpleTest('defined', null, array('node_class' => 'Twig_Node_Expression_Test_Defined')), - new Twig_SimpleTest('sameas', null, array('node_class' => 'Twig_Node_Expression_Test_Sameas', 'deprecated' => '1.21', 'alternative' => 'same as')), - new Twig_SimpleTest('same as', null, array('node_class' => 'Twig_Node_Expression_Test_Sameas')), - new Twig_SimpleTest('none', null, array('node_class' => 'Twig_Node_Expression_Test_Null')), - new Twig_SimpleTest('null', null, array('node_class' => 'Twig_Node_Expression_Test_Null')), - new Twig_SimpleTest('divisibleby', null, array('node_class' => 'Twig_Node_Expression_Test_Divisibleby', 'deprecated' => '1.21', 'alternative' => 'divisible by')), - new Twig_SimpleTest('divisible by', null, array('node_class' => 'Twig_Node_Expression_Test_Divisibleby')), - new Twig_SimpleTest('constant', null, array('node_class' => 'Twig_Node_Expression_Test_Constant')), + return [ + new Twig_SimpleTest('even', null, ['node_class' => 'Twig_Node_Expression_Test_Even']), + new Twig_SimpleTest('odd', null, ['node_class' => 'Twig_Node_Expression_Test_Odd']), + new Twig_SimpleTest('defined', null, ['node_class' => 'Twig_Node_Expression_Test_Defined']), + new Twig_SimpleTest('sameas', null, ['node_class' => 'Twig_Node_Expression_Test_Sameas', 'deprecated' => '1.21', 'alternative' => 'same as']), + new Twig_SimpleTest('same as', null, ['node_class' => 'Twig_Node_Expression_Test_Sameas']), + new Twig_SimpleTest('none', null, ['node_class' => 'Twig_Node_Expression_Test_Null']), + new Twig_SimpleTest('null', null, ['node_class' => 'Twig_Node_Expression_Test_Null']), + new Twig_SimpleTest('divisibleby', null, ['node_class' => 'Twig_Node_Expression_Test_Divisibleby', 'deprecated' => '1.21', 'alternative' => 'divisible by']), + new Twig_SimpleTest('divisible by', null, ['node_class' => 'Twig_Node_Expression_Test_Divisibleby']), + new Twig_SimpleTest('constant', null, ['node_class' => 'Twig_Node_Expression_Test_Constant']), new Twig_SimpleTest('empty', 'twig_test_empty'), new Twig_SimpleTest('iterable', 'twig_test_iterable'), - ); + ]; } public function getOperators() { - return array( - array( - 'not' => array('precedence' => 50, 'class' => 'Twig_Node_Expression_Unary_Not'), - '-' => array('precedence' => 500, 'class' => 'Twig_Node_Expression_Unary_Neg'), - '+' => array('precedence' => 500, 'class' => 'Twig_Node_Expression_Unary_Pos'), - ), - array( - 'or' => array('precedence' => 10, 'class' => 'Twig_Node_Expression_Binary_Or', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), - 'and' => array('precedence' => 15, 'class' => 'Twig_Node_Expression_Binary_And', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), - 'b-or' => array('precedence' => 16, 'class' => 'Twig_Node_Expression_Binary_BitwiseOr', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), - 'b-xor' => array('precedence' => 17, 'class' => 'Twig_Node_Expression_Binary_BitwiseXor', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), - 'b-and' => array('precedence' => 18, 'class' => 'Twig_Node_Expression_Binary_BitwiseAnd', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), - '==' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_Equal', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), - '!=' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_NotEqual', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), - '<' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_Less', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), - '>' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_Greater', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), - '>=' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_GreaterEqual', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), - '<=' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_LessEqual', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), - 'not in' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_NotIn', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), - 'in' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_In', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), - 'matches' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_Matches', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), - 'starts with' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_StartsWith', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), - 'ends with' => array('precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_EndsWith', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), - '..' => array('precedence' => 25, 'class' => 'Twig_Node_Expression_Binary_Range', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), - '+' => array('precedence' => 30, 'class' => 'Twig_Node_Expression_Binary_Add', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), - '-' => array('precedence' => 30, 'class' => 'Twig_Node_Expression_Binary_Sub', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), - '~' => array('precedence' => 40, 'class' => 'Twig_Node_Expression_Binary_Concat', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), - '*' => array('precedence' => 60, 'class' => 'Twig_Node_Expression_Binary_Mul', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), - '/' => array('precedence' => 60, 'class' => 'Twig_Node_Expression_Binary_Div', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), - '//' => array('precedence' => 60, 'class' => 'Twig_Node_Expression_Binary_FloorDiv', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), - '%' => array('precedence' => 60, 'class' => 'Twig_Node_Expression_Binary_Mod', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), - 'is' => array('precedence' => 100, 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), - 'is not' => array('precedence' => 100, 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT), - '**' => array('precedence' => 200, 'class' => 'Twig_Node_Expression_Binary_Power', 'associativity' => Twig_ExpressionParser::OPERATOR_RIGHT), - '??' => array('precedence' => 300, 'class' => 'Twig_Node_Expression_NullCoalesce', 'associativity' => Twig_ExpressionParser::OPERATOR_RIGHT), - ), - ); + return [ + [ + 'not' => ['precedence' => 50, 'class' => 'Twig_Node_Expression_Unary_Not'], + '-' => ['precedence' => 500, 'class' => 'Twig_Node_Expression_Unary_Neg'], + '+' => ['precedence' => 500, 'class' => 'Twig_Node_Expression_Unary_Pos'], + ], + [ + 'or' => ['precedence' => 10, 'class' => 'Twig_Node_Expression_Binary_Or', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT], + 'and' => ['precedence' => 15, 'class' => 'Twig_Node_Expression_Binary_And', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT], + 'b-or' => ['precedence' => 16, 'class' => 'Twig_Node_Expression_Binary_BitwiseOr', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT], + 'b-xor' => ['precedence' => 17, 'class' => 'Twig_Node_Expression_Binary_BitwiseXor', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT], + 'b-and' => ['precedence' => 18, 'class' => 'Twig_Node_Expression_Binary_BitwiseAnd', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT], + '==' => ['precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_Equal', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT], + '!=' => ['precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_NotEqual', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT], + '<' => ['precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_Less', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT], + '>' => ['precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_Greater', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT], + '>=' => ['precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_GreaterEqual', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT], + '<=' => ['precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_LessEqual', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT], + 'not in' => ['precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_NotIn', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT], + 'in' => ['precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_In', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT], + 'matches' => ['precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_Matches', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT], + 'starts with' => ['precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_StartsWith', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT], + 'ends with' => ['precedence' => 20, 'class' => 'Twig_Node_Expression_Binary_EndsWith', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT], + '..' => ['precedence' => 25, 'class' => 'Twig_Node_Expression_Binary_Range', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT], + '+' => ['precedence' => 30, 'class' => 'Twig_Node_Expression_Binary_Add', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT], + '-' => ['precedence' => 30, 'class' => 'Twig_Node_Expression_Binary_Sub', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT], + '~' => ['precedence' => 40, 'class' => 'Twig_Node_Expression_Binary_Concat', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT], + '*' => ['precedence' => 60, 'class' => 'Twig_Node_Expression_Binary_Mul', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT], + '/' => ['precedence' => 60, 'class' => 'Twig_Node_Expression_Binary_Div', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT], + '//' => ['precedence' => 60, 'class' => 'Twig_Node_Expression_Binary_FloorDiv', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT], + '%' => ['precedence' => 60, 'class' => 'Twig_Node_Expression_Binary_Mod', 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT], + 'is' => ['precedence' => 100, 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT], + 'is not' => ['precedence' => 100, 'associativity' => Twig_ExpressionParser::OPERATOR_LEFT], + '**' => ['precedence' => 200, 'class' => 'Twig_Node_Expression_Binary_Power', 'associativity' => Twig_ExpressionParser::OPERATOR_RIGHT], + '??' => ['precedence' => 300, 'class' => 'Twig_Node_Expression_NullCoalesce', 'associativity' => Twig_ExpressionParser::OPERATOR_RIGHT], + ], + ]; } public function getName() @@ -362,7 +363,7 @@ function twig_random(Twig_Environment $env, $values = null) * @param Twig_Environment $env * @param DateTime|DateTimeInterface|DateInterval|string $date A date * @param string|null $format The target format, null to use the default - * @param DateTimeZone|string|null|false $timezone The target timezone, null to use the default, false to leave unchanged + * @param DateTimeZone|string|false|null $timezone The target timezone, null to use the default, false to leave unchanged * * @return string The formatted date */ @@ -415,7 +416,7 @@ function twig_date_modify_filter(Twig_Environment $env, $date, $modifier) * * @param Twig_Environment $env * @param DateTime|DateTimeInterface|string|null $date A date - * @param DateTimeZone|string|null|false $timezone The target timezone, null to use the default, false to leave unchanged + * @param DateTimeZone|string|false|null $timezone The target timezone, null to use the default, false to leave unchanged * * @return DateTime A DateTime instance */ @@ -561,44 +562,23 @@ function twig_urlencode_filter($url) return rawurlencode($url); } -if (PHP_VERSION_ID < 50300) { - /** - * JSON encodes a variable. - * - * @param mixed $value the value to encode - * @param int $options Not used on PHP 5.2.x - * - * @return mixed The JSON encoded value - */ - function twig_jsonencode_filter($value, $options = 0) - { - if ($value instanceof Twig_Markup) { - $value = (string) $value; - } elseif (is_array($value)) { - array_walk_recursive($value, '_twig_markup2string'); - } - - return json_encode($value); +/** + * JSON encodes a variable. + * + * @param mixed $value the value to encode + * @param int $options Bitmask consisting of JSON_HEX_QUOT, JSON_HEX_TAG, JSON_HEX_AMP, JSON_HEX_APOS, JSON_NUMERIC_CHECK, JSON_PRETTY_PRINT, JSON_UNESCAPED_SLASHES, JSON_FORCE_OBJECT + * + * @return mixed The JSON encoded value + */ +function twig_jsonencode_filter($value, $options = 0) +{ + if ($value instanceof Twig_Markup) { + $value = (string) $value; + } elseif (is_array($value)) { + array_walk_recursive($value, '_twig_markup2string'); } -} else { - /** - * JSON encodes a variable. - * - * @param mixed $value the value to encode - * @param int $options Bitmask consisting of JSON_HEX_QUOT, JSON_HEX_TAG, JSON_HEX_AMP, JSON_HEX_APOS, JSON_NUMERIC_CHECK, JSON_PRETTY_PRINT, JSON_UNESCAPED_SLASHES, JSON_FORCE_OBJECT - * - * @return mixed The JSON encoded value - */ - function twig_jsonencode_filter($value, $options = 0) - { - if ($value instanceof Twig_Markup) { - $value = (string) $value; - } elseif (is_array($value)) { - array_walk_recursive($value, '_twig_markup2string'); - } - return json_encode($value, $options); - } + return json_encode($value, $options); } function _twig_markup2string(&$value) @@ -663,7 +643,7 @@ function twig_slice(Twig_Environment $env, $item, $start, $length = null, $prese try { return iterator_to_array(new LimitIterator($item, $start, null === $length ? -1 : $length), $preserveKeys); } catch (OutOfBoundsException $exception) { - return array(); + return []; } } @@ -716,9 +696,12 @@ function twig_last(Twig_Environment $env, $item) /** * Joins the values to a string. * - * The separator between elements is an empty string per default, you can define it with the optional parameter. + * The separators between elements are empty strings per default, you can define them with the optional parameters. * *
+ *  {{ [1, 2, 3]|join(', ', ' and ') }}
+ *  {# returns 1, 2 and 3 #}
+ *
  *  {{ [1, 2, 3]|join('|') }}
  *  {# returns 1|2|3 #}
  *
@@ -726,18 +709,34 @@ function twig_last(Twig_Environment $env, $item)
  *  {# returns 123 #}
  * 
* - * @param array $value An array - * @param string $glue The separator + * @param array $value An array + * @param string $glue The separator + * @param string|null $and The separator for the last pair * * @return string The concatenated string */ -function twig_join_filter($value, $glue = '') +function twig_join_filter($value, $glue = '', $and = null) { if ($value instanceof Traversable) { $value = iterator_to_array($value, false); + } else { + $value = (array) $value; } - return implode($glue, (array) $value); + if (0 === count($value)) { + return ''; + } + + if (null === $and || $and === $glue) { + return implode($glue, $value); + } + + $v = array_values($value); + if (1 === count($v)) { + return $v[0]; + } + + return implode($glue, array_slice($value, 0, -1)).$and.$v[count($v) - 1]; } /** @@ -780,10 +779,10 @@ function twig_split_filter(Twig_Environment $env, $value, $delimiter, $limit = n $length = mb_strlen($value, $charset); if ($length < $limit) { - return array($value); + return [$value]; } - $r = array(); + $r = []; for ($i = 0; $i < $length; $i += $limit) { $r[] = mb_substr($value, $i, $limit, $charset); } @@ -829,7 +828,7 @@ function twig_get_array_keys_filter($array) } if ($array instanceof Iterator) { - $keys = array(); + $keys = []; $array->rewind(); while ($array->valid()) { $keys[] = $array->key(); @@ -839,7 +838,7 @@ function twig_get_array_keys_filter($array) return $keys; } - $keys = array(); + $keys = []; foreach ($array as $key => $item) { $keys[] = $key; } @@ -848,7 +847,7 @@ function twig_get_array_keys_filter($array) } if (!is_array($array)) { - return array(); + return []; } return array_keys($array); @@ -989,11 +988,15 @@ function twig_escape_filter(Twig_Environment $env, $string, $strategy = 'html', if (!is_string($string)) { if (is_object($string) && method_exists($string, '__toString')) { $string = (string) $string; - } elseif (in_array($strategy, array('html', 'js', 'css', 'html_attr', 'url'))) { + } elseif (in_array($strategy, ['html', 'js', 'css', 'html_attr', 'url'])) { return $string; } } + if ('' === $string) { + return ''; + } + if (null === $charset) { $charset = $env->getCharset(); } @@ -1005,7 +1008,7 @@ function twig_escape_filter(Twig_Environment $env, $string, $strategy = 'html', // Using a static variable to avoid initializing the array // each time the function is called. Moving the declaration on the // top of the function slow downs other escaping strategies. - static $htmlspecialcharsCharsets = array( + static $htmlspecialcharsCharsets = [ 'ISO-8859-1' => true, 'ISO8859-1' => true, 'ISO-8859-15' => true, 'ISO8859-15' => true, 'utf-8' => true, 'UTF-8' => true, @@ -1020,7 +1023,7 @@ function twig_escape_filter(Twig_Environment $env, $string, $strategy = 'html', 'SHIFT_JIS' => true, 'SJIS' => true, '932' => true, 'EUC-JP' => true, 'EUCJP' => true, 'ISO8859-5' => true, 'ISO-8859-5' => true, 'MACROMAN' => true, - ); + ]; if (isset($htmlspecialcharsCharsets[$charset])) { return htmlspecialchars($string, ENT_QUOTES | ENT_SUBSTITUTE, $charset); @@ -1045,7 +1048,7 @@ function twig_escape_filter(Twig_Environment $env, $string, $strategy = 'html', $string = twig_convert_encoding($string, 'UTF-8', $charset); } - if (0 == strlen($string) ? false : 1 !== preg_match('/^./su', $string)) { + if (!preg_match('//u', $string)) { throw new Twig_Error_Runtime('The string to escape is not a valid UTF-8 string.'); } @@ -1062,7 +1065,7 @@ function twig_escape_filter(Twig_Environment $env, $string, $strategy = 'html', $string = twig_convert_encoding($string, 'UTF-8', $charset); } - if (0 == strlen($string) ? false : 1 !== preg_match('/^./su', $string)) { + if (!preg_match('//u', $string)) { throw new Twig_Error_Runtime('The string to escape is not a valid UTF-8 string.'); } @@ -1079,7 +1082,7 @@ function twig_escape_filter(Twig_Environment $env, $string, $strategy = 'html', $string = twig_convert_encoding($string, 'UTF-8', $charset); } - if (0 == strlen($string) ? false : 1 !== preg_match('/^./su', $string)) { + if (!preg_match('//u', $string)) { throw new Twig_Error_Runtime('The string to escape is not a valid UTF-8 string.'); } @@ -1092,10 +1095,6 @@ function twig_escape_filter(Twig_Environment $env, $string, $strategy = 'html', return $string; case 'url': - if (PHP_VERSION_ID < 50300) { - return str_replace('%7E', '~', rawurlencode($string)); - } - return rawurlencode($string); default: @@ -1109,7 +1108,7 @@ function twig_escape_filter(Twig_Environment $env, $string, $strategy = 'html', return call_user_func($escapers[$strategy], $env, $string, $charset); } - $validStrategies = implode(', ', array_merge(array('html', 'js', 'url', 'css', 'html_attr'), array_keys($escapers))); + $validStrategies = implode(', ', array_merge(['html', 'js', 'url', 'css', 'html_attr'], array_keys($escapers))); throw new Twig_Error_Runtime(sprintf('Invalid escaping strategy "%s" (valid ones: %s).', $strategy, $validStrategies)); } @@ -1122,13 +1121,13 @@ function twig_escape_filter_is_safe(Twig_Node $filterArgs) { foreach ($filterArgs as $arg) { if ($arg instanceof Twig_Node_Expression_Constant) { - return array($arg->getAttribute('value')); + return [$arg->getAttribute('value')]; } - return array(); + return []; } - return array('html'); + return ['html']; } if (function_exists('mb_convert_encoding')) { @@ -1148,6 +1147,29 @@ if (function_exists('mb_convert_encoding')) { } } +if (function_exists('mb_ord')) { + function twig_ord($string) + { + return mb_ord($string, 'UTF-8'); + } +} else { + function twig_ord($string) + { + $code = ($string = unpack('C*', substr($string, 0, 4))) ? $string[1] : 0; + if (0xF0 <= $code) { + return (($code - 0xF0) << 18) + (($string[2] - 0x80) << 12) + (($string[3] - 0x80) << 6) + $string[4] - 0x80; + } + if (0xE0 <= $code) { + return (($code - 0xE0) << 12) + (($string[2] - 0x80) << 6) + $string[3] - 0x80; + } + if (0xC0 <= $code) { + return (($code - 0xC0) << 6) + $string[2] - 0x80; + } + + return $code; + } +} + function _twig_escape_js_callback($matches) { $char = $matches[0]; @@ -1157,7 +1179,7 @@ function _twig_escape_js_callback($matches) * Escape sequences supported only by JavaScript, not JSON, are ommitted. * \" is also supported but omitted, because the resulting string is not HTML safe. */ - static $shortMap = array( + static $shortMap = [ '\\' => '\\\\', '/' => '\\/', "\x08" => '\b', @@ -1165,7 +1187,7 @@ function _twig_escape_js_callback($matches) "\x0A" => '\n', "\x0D" => '\r', "\x09" => '\t', - ); + ]; if (isset($shortMap[$char])) { return $shortMap[$char]; @@ -1186,20 +1208,7 @@ function _twig_escape_css_callback($matches) { $char = $matches[0]; - // \xHH - if (!isset($char[1])) { - $hex = ltrim(strtoupper(bin2hex($char)), '0'); - if (0 === strlen($hex)) { - $hex = '0'; - } - - return '\\'.$hex.' '; - } - - // \uHHHH - $char = twig_convert_encoding($char, 'UTF-16BE', 'UTF-8'); - - return '\\'.ltrim(strtoupper(bin2hex($char)), '0').' '; + return sprintf('\\%X ', 1 === strlen($char) ? ord($char) : twig_ord($char)); } /** @@ -1210,19 +1219,6 @@ function _twig_escape_css_callback($matches) */ function _twig_escape_html_attr_callback($matches) { - /* - * While HTML supports far more named entities, the lowest common denominator - * has become HTML5's XML Serialisation which is restricted to the those named - * entities that XML supports. Using HTML entities would result in this error: - * XML Parsing Error: undefined entity - */ - static $entityMap = array( - 34 => 'quot', /* quotation mark */ - 38 => 'amp', /* ampersand */ - 60 => 'lt', /* less-than sign */ - 62 => 'gt', /* greater-than sign */ - ); - $chr = $matches[0]; $ord = ord($chr); @@ -1239,22 +1235,31 @@ function _twig_escape_html_attr_callback($matches) * replace it with while grabbing the hex value of the character. */ if (1 == strlen($chr)) { - $hex = strtoupper(substr('00'.bin2hex($chr), -2)); - } else { - $chr = twig_convert_encoding($chr, 'UTF-16BE', 'UTF-8'); - $hex = strtoupper(substr('0000'.bin2hex($chr), -4)); - } + /* + * While HTML supports far more named entities, the lowest common denominator + * has become HTML5's XML Serialisation which is restricted to the those named + * entities that XML supports. Using HTML entities would result in this error: + * XML Parsing Error: undefined entity + */ + static $entityMap = [ + 34 => '"', /* quotation mark */ + 38 => '&', /* ampersand */ + 60 => '<', /* less-than sign */ + 62 => '>', /* greater-than sign */ + ]; - $int = hexdec($hex); - if (array_key_exists($int, $entityMap)) { - return sprintf('&%s;', $entityMap[$int]); + if (isset($entityMap[$ord])) { + return $entityMap[$ord]; + } + + return sprintf('&#x%02X;', $ord); } /* * Per OWASP recommendations, we'll use hex entities for any other * characters where a named entity does not exist. */ - return sprintf('&#x%s;', $hex); + return sprintf('&#x%04X;', twig_ord($chr)); } // add multibyte extensions if possible @@ -1439,7 +1444,7 @@ function twig_ensure_traversable($seq) return $seq; } - return array(); + return []; } /** @@ -1466,7 +1471,7 @@ function twig_test_empty($value) return '' === (string) $value; } - return '' === $value || false === $value || null === $value || array() === $value; + return '' === $value || false === $value || null === $value || [] === $value; } /** @@ -1501,7 +1506,7 @@ function twig_test_iterable($value) * * @return string The rendered template */ -function twig_include(Twig_Environment $env, $context, $template, $variables = array(), $withContext = true, $ignoreMissing = false, $sandboxed = false) +function twig_include(Twig_Environment $env, $context, $template, $variables = [], $withContext = true, $ignoreMissing = false, $sandboxed = false) { $alreadySandboxed = false; $sandbox = null; @@ -1516,7 +1521,7 @@ function twig_include(Twig_Environment $env, $context, $template, $variables = a } } - $result = null; + $result = ''; try { $result = $env->resolveTemplate($template)->render($variables); } catch (Twig_Error_Loader $e) { @@ -1577,7 +1582,7 @@ function twig_source(Twig_Environment $env, $name, $ignoreMissing = false) * Provides the ability to get constants from instances as well as class/global constants. * * @param string $constant The name of the constant - * @param null|object $object The object to get the constant from + * @param object|null $object The object to get the constant from * * @return string */ @@ -1594,7 +1599,7 @@ function twig_constant($constant, $object = null) * Checks if a constant exists. * * @param string $constant The name of the constant - * @param null|object $object The object to get the constant from + * @param object|null $object The object to get the constant from * * @return bool */ diff --git a/vendor/twig/twig/lib/Twig/Extension/Debug.php b/vendor/twig/twig/lib/Twig/Extension/Debug.php index d0cd1962b..87f47d65b 100644 --- a/vendor/twig/twig/lib/Twig/Extension/Debug.php +++ b/vendor/twig/twig/lib/Twig/Extension/Debug.php @@ -26,9 +26,9 @@ class Twig_Extension_Debug extends Twig_Extension || 'cli' === PHP_SAPI ; - return array( - new Twig_SimpleFunction('dump', 'twig_var_dump', array('is_safe' => $isDumpOutputHtmlSafe ? array('html') : array(), 'needs_context' => true, 'needs_environment' => true)), - ); + return [ + new Twig_SimpleFunction('dump', 'twig_var_dump', ['is_safe' => $isDumpOutputHtmlSafe ? ['html'] : [], 'needs_context' => true, 'needs_environment' => true]), + ]; } public function getName() @@ -47,7 +47,7 @@ function twig_var_dump(Twig_Environment $env, $context) $count = func_num_args(); if (2 === $count) { - $vars = array(); + $vars = []; foreach ($context as $key => $value) { if (!$value instanceof Twig_Template) { $vars[$key] = $value; diff --git a/vendor/twig/twig/lib/Twig/Extension/Escaper.php b/vendor/twig/twig/lib/Twig/Extension/Escaper.php index 46c2d84b6..74f0e997c 100644 --- a/vendor/twig/twig/lib/Twig/Extension/Escaper.php +++ b/vendor/twig/twig/lib/Twig/Extension/Escaper.php @@ -28,19 +28,19 @@ class Twig_Extension_Escaper extends Twig_Extension public function getTokenParsers() { - return array(new Twig_TokenParser_AutoEscape()); + return [new Twig_TokenParser_AutoEscape()]; } public function getNodeVisitors() { - return array(new Twig_NodeVisitor_Escaper()); + return [new Twig_NodeVisitor_Escaper()]; } public function getFilters() { - return array( - new Twig_SimpleFilter('raw', 'twig_raw_filter', array('is_safe' => array('all'))), - ); + return [ + new Twig_SimpleFilter('raw', 'twig_raw_filter', ['is_safe' => ['all']]), + ]; } /** @@ -67,7 +67,7 @@ class Twig_Extension_Escaper extends Twig_Extension } if ('name' === $defaultStrategy) { - $defaultStrategy = array('Twig_FileExtensionEscapingStrategy', 'guess'); + $defaultStrategy = ['Twig_FileExtensionEscapingStrategy', 'guess']; } $this->defaultStrategy = $defaultStrategy; diff --git a/vendor/twig/twig/lib/Twig/Extension/Optimizer.php b/vendor/twig/twig/lib/Twig/Extension/Optimizer.php index 6c62e3efc..70a64be3e 100644 --- a/vendor/twig/twig/lib/Twig/Extension/Optimizer.php +++ b/vendor/twig/twig/lib/Twig/Extension/Optimizer.php @@ -23,7 +23,7 @@ class Twig_Extension_Optimizer extends Twig_Extension public function getNodeVisitors() { - return array(new Twig_NodeVisitor_Optimizer($this->optimizers)); + return [new Twig_NodeVisitor_Optimizer($this->optimizers)]; } public function getName() diff --git a/vendor/twig/twig/lib/Twig/Extension/Profiler.php b/vendor/twig/twig/lib/Twig/Extension/Profiler.php index fcfc002ba..d7faef863 100644 --- a/vendor/twig/twig/lib/Twig/Extension/Profiler.php +++ b/vendor/twig/twig/lib/Twig/Extension/Profiler.php @@ -11,7 +11,7 @@ class Twig_Extension_Profiler extends Twig_Extension { - private $actives = array(); + private $actives = []; public function __construct(Twig_Profiler_Profile $profile) { @@ -36,7 +36,7 @@ class Twig_Extension_Profiler extends Twig_Extension public function getNodeVisitors() { - return array(new Twig_Profiler_NodeVisitor_Profiler(get_class($this))); + return [new Twig_Profiler_NodeVisitor_Profiler(get_class($this))]; } public function getName() diff --git a/vendor/twig/twig/lib/Twig/Extension/Sandbox.php b/vendor/twig/twig/lib/Twig/Extension/Sandbox.php index 5cb80a717..cacde630d 100644 --- a/vendor/twig/twig/lib/Twig/Extension/Sandbox.php +++ b/vendor/twig/twig/lib/Twig/Extension/Sandbox.php @@ -26,12 +26,12 @@ class Twig_Extension_Sandbox extends Twig_Extension public function getTokenParsers() { - return array(new Twig_TokenParser_Sandbox()); + return [new Twig_TokenParser_Sandbox()]; } public function getNodeVisitors() { - return array(new Twig_NodeVisitor_Sandbox()); + return [new Twig_NodeVisitor_Sandbox()]; } public function enableSandbox() diff --git a/vendor/twig/twig/lib/Twig/Extension/Staging.php b/vendor/twig/twig/lib/Twig/Extension/Staging.php index d3a0f9c94..897b3794c 100644 --- a/vendor/twig/twig/lib/Twig/Extension/Staging.php +++ b/vendor/twig/twig/lib/Twig/Extension/Staging.php @@ -20,12 +20,12 @@ */ class Twig_Extension_Staging extends Twig_Extension { - protected $functions = array(); - protected $filters = array(); - protected $visitors = array(); - protected $tokenParsers = array(); - protected $globals = array(); - protected $tests = array(); + protected $functions = []; + protected $filters = []; + protected $visitors = []; + protected $tokenParsers = []; + protected $globals = []; + protected $tests = []; public function addFunction($name, $function) { diff --git a/vendor/twig/twig/lib/Twig/Extension/StringLoader.php b/vendor/twig/twig/lib/Twig/Extension/StringLoader.php index 2ce3c9924..58b731c65 100644 --- a/vendor/twig/twig/lib/Twig/Extension/StringLoader.php +++ b/vendor/twig/twig/lib/Twig/Extension/StringLoader.php @@ -16,9 +16,9 @@ class Twig_Extension_StringLoader extends Twig_Extension { public function getFunctions() { - return array( - new Twig_SimpleFunction('template_from_string', 'twig_template_from_string', array('needs_environment' => true)), - ); + return [ + new Twig_SimpleFunction('template_from_string', 'twig_template_from_string', ['needs_environment' => true]), + ]; } public function getName() diff --git a/vendor/twig/twig/lib/Twig/FactoryRuntimeLoader.php b/vendor/twig/twig/lib/Twig/FactoryRuntimeLoader.php index 2cdaded1d..2a8671224 100644 --- a/vendor/twig/twig/lib/Twig/FactoryRuntimeLoader.php +++ b/vendor/twig/twig/lib/Twig/FactoryRuntimeLoader.php @@ -21,7 +21,7 @@ class Twig_FactoryRuntimeLoader implements Twig_RuntimeLoaderInterface /** * @param array $map An array where keys are class names and values factory callables */ - public function __construct($map = array()) + public function __construct($map = []) { $this->map = $map; } diff --git a/vendor/twig/twig/lib/Twig/FileExtensionEscapingStrategy.php b/vendor/twig/twig/lib/Twig/FileExtensionEscapingStrategy.php index 8f8cd2ee5..6b13c7213 100644 --- a/vendor/twig/twig/lib/Twig/FileExtensionEscapingStrategy.php +++ b/vendor/twig/twig/lib/Twig/FileExtensionEscapingStrategy.php @@ -31,7 +31,7 @@ class Twig_FileExtensionEscapingStrategy */ public static function guess($name) { - if (in_array(substr($name, -1), array('/', '\\'))) { + if (in_array(substr($name, -1), ['/', '\\'])) { return 'html'; // return html for directories } diff --git a/vendor/twig/twig/lib/Twig/Filter.php b/vendor/twig/twig/lib/Twig/Filter.php index 893d75d10..9191c5473 100644 --- a/vendor/twig/twig/lib/Twig/Filter.php +++ b/vendor/twig/twig/lib/Twig/Filter.php @@ -23,17 +23,17 @@ abstract class Twig_Filter implements Twig_FilterInterface, Twig_FilterCallableInterface { protected $options; - protected $arguments = array(); + protected $arguments = []; - public function __construct(array $options = array()) + public function __construct(array $options = []) { - $this->options = array_merge(array( + $this->options = array_merge([ 'needs_environment' => false, 'needs_context' => false, 'pre_escape' => null, 'preserves_safety' => null, 'callable' => null, - ), $options); + ], $options); } public function setArguments($arguments) diff --git a/vendor/twig/twig/lib/Twig/Filter/Function.php b/vendor/twig/twig/lib/Twig/Filter/Function.php index 71b16554e..04231026a 100644 --- a/vendor/twig/twig/lib/Twig/Filter/Function.php +++ b/vendor/twig/twig/lib/Twig/Filter/Function.php @@ -24,7 +24,7 @@ class Twig_Filter_Function extends Twig_Filter { protected $function; - public function __construct($function, array $options = array()) + public function __construct($function, array $options = []) { $options['callable'] = $function; diff --git a/vendor/twig/twig/lib/Twig/Filter/Method.php b/vendor/twig/twig/lib/Twig/Filter/Method.php index 1b75676c5..2dc39b613 100644 --- a/vendor/twig/twig/lib/Twig/Filter/Method.php +++ b/vendor/twig/twig/lib/Twig/Filter/Method.php @@ -25,9 +25,9 @@ class Twig_Filter_Method extends Twig_Filter protected $extension; protected $method; - public function __construct(Twig_ExtensionInterface $extension, $method, array $options = array()) + public function __construct(Twig_ExtensionInterface $extension, $method, array $options = []) { - $options['callable'] = array($extension, $method); + $options['callable'] = [$extension, $method]; parent::__construct($options); diff --git a/vendor/twig/twig/lib/Twig/Filter/Node.php b/vendor/twig/twig/lib/Twig/Filter/Node.php index 3e6b12eff..0d96081da 100644 --- a/vendor/twig/twig/lib/Twig/Filter/Node.php +++ b/vendor/twig/twig/lib/Twig/Filter/Node.php @@ -24,7 +24,7 @@ class Twig_Filter_Node extends Twig_Filter { protected $class; - public function __construct($class, array $options = array()) + public function __construct($class, array $options = []) { parent::__construct($options); diff --git a/vendor/twig/twig/lib/Twig/Function.php b/vendor/twig/twig/lib/Twig/Function.php index 9dc16e908..a829eeeab 100644 --- a/vendor/twig/twig/lib/Twig/Function.php +++ b/vendor/twig/twig/lib/Twig/Function.php @@ -23,15 +23,15 @@ abstract class Twig_Function implements Twig_FunctionInterface, Twig_FunctionCallableInterface { protected $options; - protected $arguments = array(); + protected $arguments = []; - public function __construct(array $options = array()) + public function __construct(array $options = []) { - $this->options = array_merge(array( + $this->options = array_merge([ 'needs_environment' => false, 'needs_context' => false, 'callable' => null, - ), $options); + ], $options); } public function setArguments($arguments) @@ -64,7 +64,7 @@ abstract class Twig_Function implements Twig_FunctionInterface, Twig_FunctionCal return call_user_func($this->options['is_safe_callback'], $functionArgs); } - return array(); + return []; } public function getCallable() diff --git a/vendor/twig/twig/lib/Twig/Function/Function.php b/vendor/twig/twig/lib/Twig/Function/Function.php index 97c0eb77f..86f853b94 100644 --- a/vendor/twig/twig/lib/Twig/Function/Function.php +++ b/vendor/twig/twig/lib/Twig/Function/Function.php @@ -25,7 +25,7 @@ class Twig_Function_Function extends Twig_Function { protected $function; - public function __construct($function, array $options = array()) + public function __construct($function, array $options = []) { $options['callable'] = $function; diff --git a/vendor/twig/twig/lib/Twig/Function/Method.php b/vendor/twig/twig/lib/Twig/Function/Method.php index 4299e1181..4806a4306 100644 --- a/vendor/twig/twig/lib/Twig/Function/Method.php +++ b/vendor/twig/twig/lib/Twig/Function/Method.php @@ -26,9 +26,9 @@ class Twig_Function_Method extends Twig_Function protected $extension; protected $method; - public function __construct(Twig_ExtensionInterface $extension, $method, array $options = array()) + public function __construct(Twig_ExtensionInterface $extension, $method, array $options = []) { - $options['callable'] = array($extension, $method); + $options['callable'] = [$extension, $method]; parent::__construct($options); diff --git a/vendor/twig/twig/lib/Twig/Function/Node.php b/vendor/twig/twig/lib/Twig/Function/Node.php index 0adc5d937..68688c70b 100644 --- a/vendor/twig/twig/lib/Twig/Function/Node.php +++ b/vendor/twig/twig/lib/Twig/Function/Node.php @@ -24,7 +24,7 @@ class Twig_Function_Node extends Twig_Function { protected $class; - public function __construct($class, array $options = array()) + public function __construct($class, array $options = []) { parent::__construct($options); diff --git a/vendor/twig/twig/lib/Twig/Lexer.php b/vendor/twig/twig/lib/Twig/Lexer.php index 41211eb28..eea2d0fc5 100644 --- a/vendor/twig/twig/lib/Twig/Lexer.php +++ b/vendor/twig/twig/lib/Twig/Lexer.php @@ -49,19 +49,19 @@ class Twig_Lexer implements Twig_LexerInterface const REGEX_DQ_STRING_PART = '/[^#"\\\\]*(?:(?:\\\\.|#(?!\{))[^#"\\\\]*)*/As'; const PUNCTUATION = '()[]{}?:.,|'; - public function __construct(Twig_Environment $env, array $options = array()) + public function __construct(Twig_Environment $env, array $options = []) { $this->env = $env; - $this->options = array_merge(array( - 'tag_comment' => array('{#', '#}'), - 'tag_block' => array('{%', '%}'), - 'tag_variable' => array('{{', '}}'), + $this->options = array_merge([ + 'tag_comment' => ['{#', '#}'], + 'tag_block' => ['{%', '%}'], + 'tag_variable' => ['{{', '}}'], 'whitespace_trim' => '-', - 'interpolation' => array('#{', '}'), - ), $options); + 'interpolation' => ['#{', '}'], + ], $options); - $this->regexes = array( + $this->regexes = [ 'lex_var' => '/\s*'.preg_quote($this->options['whitespace_trim'].$this->options['tag_variable'][1], '/').'\s*|\s*'.preg_quote($this->options['tag_variable'][1], '/').'/A', 'lex_block' => '/\s*(?:'.preg_quote($this->options['whitespace_trim'].$this->options['tag_block'][1], '/').'\s*|\s*'.preg_quote($this->options['tag_block'][1], '/').')\n?/A', 'lex_raw_data' => '/('.preg_quote($this->options['tag_block'][0].$this->options['whitespace_trim'], '/').'|'.preg_quote($this->options['tag_block'][0], '/').')\s*(?:end%s)\s*(?:'.preg_quote($this->options['whitespace_trim'].$this->options['tag_block'][1], '/').'\s*|\s*'.preg_quote($this->options['tag_block'][1], '/').')/s', @@ -72,7 +72,7 @@ class Twig_Lexer implements Twig_LexerInterface 'lex_tokens_start' => '/('.preg_quote($this->options['tag_variable'][0], '/').'|'.preg_quote($this->options['tag_block'][0], '/').'|'.preg_quote($this->options['tag_comment'][0], '/').')('.preg_quote($this->options['whitespace_trim'], '/').')?/s', 'interpolation_start' => '/'.preg_quote($this->options['interpolation'][0], '/').'\s*/A', 'interpolation_end' => '/\s*'.preg_quote($this->options['interpolation'][1], '/').'/A', - ); + ]; } public function tokenize($code, $name = null) @@ -95,15 +95,15 @@ class Twig_Lexer implements Twig_LexerInterface $mbEncoding = null; } - $this->code = str_replace(array("\r\n", "\r"), "\n", $this->source->getCode()); + $this->code = str_replace(["\r\n", "\r"], "\n", $this->source->getCode()); $this->filename = $this->source->getName(); $this->cursor = 0; $this->lineno = 1; $this->end = strlen($this->code); - $this->tokens = array(); + $this->tokens = []; $this->state = self::STATE_DATA; - $this->states = array(); - $this->brackets = array(); + $this->states = []; + $this->brackets = []; $this->position = -1; // find all token starts in one go @@ -262,7 +262,7 @@ class Twig_Lexer implements Twig_LexerInterface elseif (false !== strpos(self::PUNCTUATION, $this->code[$this->cursor])) { // opening bracket if (false !== strpos('([{', $this->code[$this->cursor])) { - $this->brackets[] = array($this->code[$this->cursor], $this->lineno); + $this->brackets[] = [$this->code[$this->cursor], $this->lineno]; } // closing bracket elseif (false !== strpos(')]}', $this->code[$this->cursor])) { @@ -286,7 +286,7 @@ class Twig_Lexer implements Twig_LexerInterface } // opening double quoted string elseif (preg_match(self::REGEX_DQ_STRING_DELIM, $this->code, $match, null, $this->cursor)) { - $this->brackets[] = array('"', $this->lineno); + $this->brackets[] = ['"', $this->lineno]; $this->pushState(self::STATE_STRING); $this->moveCursor($match[0]); } @@ -328,7 +328,7 @@ class Twig_Lexer implements Twig_LexerInterface protected function lexString() { if (preg_match($this->regexes['interpolation_start'], $this->code, $match, null, $this->cursor)) { - $this->brackets[] = array($this->options['interpolation'][0], $this->lineno); + $this->brackets[] = [$this->options['interpolation'][0], $this->lineno]; $this->pushToken(Twig_Token::INTERPOLATION_START_TYPE); $this->moveCursor($match[0]); $this->pushState(self::STATE_INTERPOLATION); @@ -381,7 +381,7 @@ class Twig_Lexer implements Twig_LexerInterface protected function getOperatorRegex() { $operators = array_merge( - array('='), + ['='], array_keys($this->env->getUnaryOperators()), array_keys($this->env->getBinaryOperators()) ); @@ -389,7 +389,7 @@ class Twig_Lexer implements Twig_LexerInterface $operators = array_combine($operators, array_map('strlen', $operators)); arsort($operators); - $regex = array(); + $regex = []; foreach ($operators as $operator => $length) { // an operator that ends with a character must be followed by // a whitespace or a parenthesis diff --git a/vendor/twig/twig/lib/Twig/Loader/Array.php b/vendor/twig/twig/lib/Twig/Loader/Array.php index 0aac76900..7c5131790 100644 --- a/vendor/twig/twig/lib/Twig/Loader/Array.php +++ b/vendor/twig/twig/lib/Twig/Loader/Array.php @@ -25,12 +25,12 @@ */ class Twig_Loader_Array implements Twig_LoaderInterface, Twig_ExistsLoaderInterface, Twig_SourceContextLoaderInterface { - protected $templates = array(); + protected $templates = []; /** * @param array $templates An array of templates (keys are the names, and values are the source code) */ - public function __construct(array $templates = array()) + public function __construct(array $templates = []) { $this->templates = $templates; } diff --git a/vendor/twig/twig/lib/Twig/Loader/Chain.php b/vendor/twig/twig/lib/Twig/Loader/Chain.php index 59a337969..8ccf8c9cf 100644 --- a/vendor/twig/twig/lib/Twig/Loader/Chain.php +++ b/vendor/twig/twig/lib/Twig/Loader/Chain.php @@ -18,13 +18,13 @@ */ class Twig_Loader_Chain implements Twig_LoaderInterface, Twig_ExistsLoaderInterface, Twig_SourceContextLoaderInterface { - private $hasSourceCache = array(); - protected $loaders = array(); + private $hasSourceCache = []; + protected $loaders = []; /** * @param Twig_LoaderInterface[] $loaders */ - public function __construct(array $loaders = array()) + public function __construct(array $loaders = []) { foreach ($loaders as $loader) { $this->addLoader($loader); @@ -34,14 +34,14 @@ class Twig_Loader_Chain implements Twig_LoaderInterface, Twig_ExistsLoaderInterf public function addLoader(Twig_LoaderInterface $loader) { $this->loaders[] = $loader; - $this->hasSourceCache = array(); + $this->hasSourceCache = []; } public function getSource($name) { @trigger_error(sprintf('Calling "getSource" on "%s" is deprecated since 1.27. Use getSourceContext() instead.', get_class($this)), E_USER_DEPRECATED); - $exceptions = array(); + $exceptions = []; foreach ($this->loaders as $loader) { if ($loader instanceof Twig_ExistsLoaderInterface && !$loader->exists($name)) { continue; @@ -59,7 +59,7 @@ class Twig_Loader_Chain implements Twig_LoaderInterface, Twig_ExistsLoaderInterf public function getSourceContext($name) { - $exceptions = array(); + $exceptions = []; foreach ($this->loaders as $loader) { if ($loader instanceof Twig_ExistsLoaderInterface && !$loader->exists($name)) { continue; @@ -113,7 +113,7 @@ class Twig_Loader_Chain implements Twig_LoaderInterface, Twig_ExistsLoaderInterf public function getCacheKey($name) { - $exceptions = array(); + $exceptions = []; foreach ($this->loaders as $loader) { if ($loader instanceof Twig_ExistsLoaderInterface && !$loader->exists($name)) { continue; @@ -131,7 +131,7 @@ class Twig_Loader_Chain implements Twig_LoaderInterface, Twig_ExistsLoaderInterf public function isFresh($name, $time) { - $exceptions = array(); + $exceptions = []; foreach ($this->loaders as $loader) { if ($loader instanceof Twig_ExistsLoaderInterface && !$loader->exists($name)) { continue; diff --git a/vendor/twig/twig/lib/Twig/Loader/Filesystem.php b/vendor/twig/twig/lib/Twig/Loader/Filesystem.php index 4e8be0d53..1263dc4ff 100644 --- a/vendor/twig/twig/lib/Twig/Loader/Filesystem.php +++ b/vendor/twig/twig/lib/Twig/Loader/Filesystem.php @@ -19,9 +19,9 @@ class Twig_Loader_Filesystem implements Twig_LoaderInterface, Twig_ExistsLoaderI /** Identifier of the main namespace. */ const MAIN_NAMESPACE = '__main__'; - protected $paths = array(); - protected $cache = array(); - protected $errorCache = array(); + protected $paths = []; + protected $cache = []; + protected $errorCache = []; private $rootPath; @@ -29,7 +29,7 @@ class Twig_Loader_Filesystem implements Twig_LoaderInterface, Twig_ExistsLoaderI * @param string|array $paths A path or an array of paths where to look for templates * @param string|null $rootPath The root path common to all relative paths (null for getcwd()) */ - public function __construct($paths = array(), $rootPath = null) + public function __construct($paths = [], $rootPath = null) { $this->rootPath = (null === $rootPath ? getcwd() : $rootPath).DIRECTORY_SEPARATOR; if (false !== $realPath = realpath($rootPath)) { @@ -50,7 +50,7 @@ class Twig_Loader_Filesystem implements Twig_LoaderInterface, Twig_ExistsLoaderI */ public function getPaths($namespace = self::MAIN_NAMESPACE) { - return isset($this->paths[$namespace]) ? $this->paths[$namespace] : array(); + return isset($this->paths[$namespace]) ? $this->paths[$namespace] : []; } /** @@ -74,10 +74,10 @@ class Twig_Loader_Filesystem implements Twig_LoaderInterface, Twig_ExistsLoaderI public function setPaths($paths, $namespace = self::MAIN_NAMESPACE) { if (!is_array($paths)) { - $paths = array($paths); + $paths = [$paths]; } - $this->paths[$namespace] = array(); + $this->paths[$namespace] = []; foreach ($paths as $path) { $this->addPath($path, $namespace); } @@ -94,7 +94,7 @@ class Twig_Loader_Filesystem implements Twig_LoaderInterface, Twig_ExistsLoaderI public function addPath($path, $namespace = self::MAIN_NAMESPACE) { // invalidate the cache - $this->cache = $this->errorCache = array(); + $this->cache = $this->errorCache = []; $checkPath = $this->isAbsolutePath($path) ? $path : $this->rootPath.$path; if (!is_dir($checkPath)) { @@ -115,7 +115,7 @@ class Twig_Loader_Filesystem implements Twig_LoaderInterface, Twig_ExistsLoaderI public function prependPath($path, $namespace = self::MAIN_NAMESPACE) { // invalidate the cache - $this->cache = $this->errorCache = array(); + $this->cache = $this->errorCache = []; $checkPath = $this->isAbsolutePath($path) ? $path : $this->rootPath.$path; if (!is_dir($checkPath)) { @@ -195,9 +195,17 @@ class Twig_Loader_Filesystem implements Twig_LoaderInterface, Twig_ExistsLoaderI throw new Twig_Error_Loader($this->errorCache[$name]); } - $this->validateName($name); + try { + $this->validateName($name); - list($namespace, $shortname) = $this->parseName($name); + list($namespace, $shortname) = $this->parseName($name); + } catch (Twig_Error_Loader $e) { + if (!$throw) { + return false; + } + + throw $e; + } if (!isset($this->paths[$namespace])) { $this->errorCache[$name] = sprintf('There are no registered paths for namespace "%s".', $namespace); @@ -242,10 +250,10 @@ class Twig_Loader_Filesystem implements Twig_LoaderInterface, Twig_ExistsLoaderI $namespace = substr($name, 1, $pos - 1); $shortname = substr($name, $pos + 1); - return array($namespace, $shortname); + return [$namespace, $shortname]; } - return array($default, $name); + return [$default, $name]; } protected function normalizeName($name) diff --git a/vendor/twig/twig/lib/Twig/Node.php b/vendor/twig/twig/lib/Twig/Node.php index 89ada1449..bdc9ec29b 100644 --- a/vendor/twig/twig/lib/Twig/Node.php +++ b/vendor/twig/twig/lib/Twig/Node.php @@ -35,7 +35,7 @@ class Twig_Node implements Twig_NodeInterface * @param int $lineno The line number * @param string $tag The tag name associated with the Node */ - public function __construct(array $nodes = array(), array $attributes = array(), $lineno = 0, $tag = null) + public function __construct(array $nodes = [], array $attributes = [], $lineno = 0, $tag = null) { foreach ($nodes as $name => $node) { if (!$node instanceof Twig_NodeInterface) { @@ -50,17 +50,17 @@ class Twig_Node implements Twig_NodeInterface public function __toString() { - $attributes = array(); + $attributes = []; foreach ($this->attributes as $name => $value) { $attributes[] = sprintf('%s: %s', $name, str_replace("\n", '', var_export($value, true))); } - $repr = array(get_class($this).'('.implode(', ', $attributes)); + $repr = [get_class($this).'('.implode(', ', $attributes)]; if (count($this->nodes)) { foreach ($this->nodes as $name => $node) { $len = strlen($name) + 4; - $noderepr = array(); + $noderepr = []; foreach (explode("\n", (string) $node) as $line) { $noderepr[] = str_repeat(' ', $len).$line; } diff --git a/vendor/twig/twig/lib/Twig/Node/AutoEscape.php b/vendor/twig/twig/lib/Twig/Node/AutoEscape.php index 17e4e3813..62e0961be 100644 --- a/vendor/twig/twig/lib/Twig/Node/AutoEscape.php +++ b/vendor/twig/twig/lib/Twig/Node/AutoEscape.php @@ -24,7 +24,7 @@ class Twig_Node_AutoEscape extends Twig_Node { public function __construct($value, Twig_NodeInterface $body, $lineno, $tag = 'autoescape') { - parent::__construct(array('body' => $body), array('value' => $value), $lineno, $tag); + parent::__construct(['body' => $body], ['value' => $value], $lineno, $tag); } public function compile(Twig_Compiler $compiler) diff --git a/vendor/twig/twig/lib/Twig/Node/Block.php b/vendor/twig/twig/lib/Twig/Node/Block.php index 91752ad27..2d0300ba1 100644 --- a/vendor/twig/twig/lib/Twig/Node/Block.php +++ b/vendor/twig/twig/lib/Twig/Node/Block.php @@ -19,14 +19,14 @@ class Twig_Node_Block extends Twig_Node { public function __construct($name, Twig_NodeInterface $body, $lineno, $tag = null) { - parent::__construct(array('body' => $body), array('name' => $name), $lineno, $tag); + parent::__construct(['body' => $body], ['name' => $name], $lineno, $tag); } public function compile(Twig_Compiler $compiler) { $compiler ->addDebugInfo($this) - ->write(sprintf("public function block_%s(\$context, array \$blocks = array())\n", $this->getAttribute('name')), "{\n") + ->write(sprintf("public function block_%s(\$context, array \$blocks = [])\n", $this->getAttribute('name')), "{\n") ->indent() ; diff --git a/vendor/twig/twig/lib/Twig/Node/BlockReference.php b/vendor/twig/twig/lib/Twig/Node/BlockReference.php index 92a9f398a..0b0f7b363 100644 --- a/vendor/twig/twig/lib/Twig/Node/BlockReference.php +++ b/vendor/twig/twig/lib/Twig/Node/BlockReference.php @@ -19,7 +19,7 @@ class Twig_Node_BlockReference extends Twig_Node implements Twig_NodeOutputInter { public function __construct($name, $lineno, $tag = null) { - parent::__construct(array(), array('name' => $name), $lineno, $tag); + parent::__construct([], ['name' => $name], $lineno, $tag); } public function compile(Twig_Compiler $compiler) diff --git a/vendor/twig/twig/lib/Twig/Node/CheckSecurity.php b/vendor/twig/twig/lib/Twig/Node/CheckSecurity.php index 7258acb6a..aecdb8322 100644 --- a/vendor/twig/twig/lib/Twig/Node/CheckSecurity.php +++ b/vendor/twig/twig/lib/Twig/Node/CheckSecurity.php @@ -29,8 +29,8 @@ class Twig_Node_CheckSecurity extends Twig_Node public function compile(Twig_Compiler $compiler) { - $tags = $filters = $functions = array(); - foreach (array('tags', 'filters', 'functions') as $type) { + $tags = $filters = $functions = []; + foreach (['tags', 'filters', 'functions'] as $type) { foreach ($this->{'used'.ucfirst($type)} as $name => $node) { if ($node instanceof Twig_Node) { ${$type}[$name] = $node->getTemplateLine(); @@ -48,9 +48,9 @@ class Twig_Node_CheckSecurity extends Twig_Node ->indent() ->write("\$this->env->getExtension('Twig_Extension_Sandbox')->checkSecurity(\n") ->indent() - ->write(!$tags ? "array(),\n" : "array('".implode("', '", array_keys($tags))."'),\n") - ->write(!$filters ? "array(),\n" : "array('".implode("', '", array_keys($filters))."'),\n") - ->write(!$functions ? "array()\n" : "array('".implode("', '", array_keys($functions))."')\n") + ->write(!$tags ? "[],\n" : "['".implode("', '", array_keys($tags))."'],\n") + ->write(!$filters ? "[],\n" : "['".implode("', '", array_keys($filters))."'],\n") + ->write(!$functions ? "[]\n" : "['".implode("', '", array_keys($functions))."']\n") ->outdent() ->write(");\n") ->outdent() diff --git a/vendor/twig/twig/lib/Twig/Node/Deprecated.php b/vendor/twig/twig/lib/Twig/Node/Deprecated.php new file mode 100644 index 000000000..fc4c39238 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/Node/Deprecated.php @@ -0,0 +1,49 @@ + + */ +class Twig_Node_Deprecated extends Twig_Node +{ + public function __construct(Twig_Node_Expression $expr, $lineno, $tag = null) + { + parent::__construct(['expr' => $expr], [], $lineno, $tag); + } + + public function compile(Twig_Compiler $compiler) + { + $compiler->addDebugInfo($this); + + $expr = $this->getNode('expr'); + + if ($expr instanceof Twig_Node_Expression_Constant) { + $compiler->write('@trigger_error(') + ->subcompile($expr); + } else { + $varName = $compiler->getVarName(); + $compiler->write(sprintf('$%s = ', $varName)) + ->subcompile($expr) + ->raw(";\n") + ->write(sprintf('@trigger_error($%s', $varName)); + } + + $compiler + ->raw('.') + ->string(sprintf(' ("%s" at line %d).', $this->getTemplateName(), $this->getTemplateLine())) + ->raw(", E_USER_DEPRECATED);\n") + ; + } +} + +class_alias('Twig_Node_Deprecated', 'Twig\Node\DeprecatedNode', false); diff --git a/vendor/twig/twig/lib/Twig/Node/Do.php b/vendor/twig/twig/lib/Twig/Node/Do.php index cdd7e77a4..13350454f 100644 --- a/vendor/twig/twig/lib/Twig/Node/Do.php +++ b/vendor/twig/twig/lib/Twig/Node/Do.php @@ -18,7 +18,7 @@ class Twig_Node_Do extends Twig_Node { public function __construct(Twig_Node_Expression $expr, $lineno, $tag = null) { - parent::__construct(array('expr' => $expr), array(), $lineno, $tag); + parent::__construct(['expr' => $expr], [], $lineno, $tag); } public function compile(Twig_Compiler $compiler) diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Array.php b/vendor/twig/twig/lib/Twig/Node/Expression/Array.php index 0e77bb08b..61e0d9619 100644 --- a/vendor/twig/twig/lib/Twig/Node/Expression/Array.php +++ b/vendor/twig/twig/lib/Twig/Node/Expression/Array.php @@ -14,7 +14,7 @@ class Twig_Node_Expression_Array extends Twig_Node_Expression public function __construct(array $elements, $lineno) { - parent::__construct($elements, array(), $lineno); + parent::__construct($elements, [], $lineno); $this->index = -1; foreach ($this->getKeyValuePairs() as $pair) { @@ -26,13 +26,13 @@ class Twig_Node_Expression_Array extends Twig_Node_Expression public function getKeyValuePairs() { - $pairs = array(); + $pairs = []; foreach (array_chunk($this->nodes, 2) as $pair) { - $pairs[] = array( + $pairs[] = [ 'key' => $pair[0], 'value' => $pair[1], - ); + ]; } return $pairs; @@ -62,7 +62,7 @@ class Twig_Node_Expression_Array extends Twig_Node_Expression public function compile(Twig_Compiler $compiler) { - $compiler->raw('array('); + $compiler->raw('['); $first = true; foreach ($this->getKeyValuePairs() as $pair) { if (!$first) { @@ -76,7 +76,7 @@ class Twig_Node_Expression_Array extends Twig_Node_Expression ->subcompile($pair['value']) ; } - $compiler->raw(')'); + $compiler->raw(']'); } } diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Binary.php b/vendor/twig/twig/lib/Twig/Node/Expression/Binary.php index 2b545d984..e9155dd50 100644 --- a/vendor/twig/twig/lib/Twig/Node/Expression/Binary.php +++ b/vendor/twig/twig/lib/Twig/Node/Expression/Binary.php @@ -13,7 +13,7 @@ abstract class Twig_Node_Expression_Binary extends Twig_Node_Expression { public function __construct(Twig_NodeInterface $left, Twig_NodeInterface $right, $lineno) { - parent::__construct(array('left' => $left, 'right' => $right), array(), $lineno); + parent::__construct(['left' => $left, 'right' => $right], [], $lineno); } public function compile(Twig_Compiler $compiler) diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/BlockReference.php b/vendor/twig/twig/lib/Twig/Node/Expression/BlockReference.php index 37a3983d6..4beb13aa4 100644 --- a/vendor/twig/twig/lib/Twig/Node/Expression/BlockReference.php +++ b/vendor/twig/twig/lib/Twig/Node/Expression/BlockReference.php @@ -28,12 +28,12 @@ class Twig_Node_Expression_BlockReference extends Twig_Node_Expression $template = null; } - $nodes = array('name' => $name); + $nodes = ['name' => $name]; if (null !== $template) { $nodes['template'] = $template; } - parent::__construct($nodes, array('is_defined_test' => false, 'output' => false), $lineno, $tag); + parent::__construct($nodes, ['is_defined_test' => false, 'output' => false], $lineno, $tag); } public function compile(Twig_Compiler $compiler) diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Call.php b/vendor/twig/twig/lib/Twig/Node/Expression/Call.php index ec2034844..d1d30259f 100644 --- a/vendor/twig/twig/lib/Twig/Node/Expression/Call.php +++ b/vendor/twig/twig/lib/Twig/Node/Expression/Call.php @@ -15,6 +15,7 @@ abstract class Twig_Node_Expression_Call extends Twig_Node_Expression protected function compileCallable(Twig_Compiler $compiler) { $closingParenthesis = false; + $isArray = false; if ($this->hasAttribute('callable') && $callable = $this->getAttribute('callable')) { if (is_string($callable) && false === strpos($callable, '::')) { $compiler->raw($callable); @@ -30,24 +31,25 @@ abstract class Twig_Node_Expression_Call extends Twig_Node_Expression $compiler->raw(sprintf('$this->env->getExtension(\'%s\')->%s', get_class($callable[0]), $callable[1])); } else { $type = ucfirst($this->getAttribute('type')); - $compiler->raw(sprintf('call_user_func_array($this->env->get%s(\'%s\')->getCallable(), array', $type, $this->getAttribute('name'))); + $compiler->raw(sprintf('call_user_func_array($this->env->get%s(\'%s\')->getCallable(), ', $type, $this->getAttribute('name'))); $closingParenthesis = true; + $isArray = true; } } } else { $compiler->raw($this->getAttribute('thing')->compile()); } - $this->compileArguments($compiler); + $this->compileArguments($compiler, $isArray); if ($closingParenthesis) { $compiler->raw(')'); } } - protected function compileArguments(Twig_Compiler $compiler) + protected function compileArguments(Twig_Compiler $compiler, $isArray = false) { - $compiler->raw('('); + $compiler->raw($isArray ? '[' : '('); $first = true; @@ -96,7 +98,7 @@ abstract class Twig_Node_Expression_Call extends Twig_Node_Expression } } - $compiler->raw(')'); + $compiler->raw($isArray ? ']' : ')'); } protected function getArguments($callable, $arguments) @@ -104,7 +106,7 @@ abstract class Twig_Node_Expression_Call extends Twig_Node_Expression $callType = $this->getAttribute('type'); $callName = $this->getAttribute('name'); - $parameters = array(); + $parameters = []; $named = false; foreach ($arguments as $name => $node) { if (!is_int($name)) { @@ -133,10 +135,10 @@ abstract class Twig_Node_Expression_Call extends Twig_Node_Expression } $callableParameters = $this->getCallableParameters($callable, $isVariadic); - $arguments = array(); - $names = array(); - $missingArguments = array(); - $optionalArguments = array(); + $arguments = []; + $names = []; + $missingArguments = []; + $optionalArguments = []; $pos = 0; foreach ($callableParameters as $callableParameter) { $names[] = $name = $this->normalizeName($callableParameter->name); @@ -156,12 +158,12 @@ abstract class Twig_Node_Expression_Call extends Twig_Node_Expression $arguments = array_merge($arguments, $optionalArguments); $arguments[] = $parameters[$name]; unset($parameters[$name]); - $optionalArguments = array(); + $optionalArguments = []; } elseif (array_key_exists($pos, $parameters)) { $arguments = array_merge($arguments, $optionalArguments); $arguments[] = $parameters[$pos]; unset($parameters[$pos]); - $optionalArguments = array(); + $optionalArguments = []; ++$pos; } elseif ($callableParameter->isDefaultValueAvailable()) { $optionalArguments[] = new Twig_Node_Expression_Constant($callableParameter->getDefaultValue(), -1); @@ -177,7 +179,7 @@ abstract class Twig_Node_Expression_Call extends Twig_Node_Expression } if ($isVariadic) { - $arbitraryArguments = new Twig_Node_Expression_Array(array(), -1); + $arbitraryArguments = new Twig_Node_Expression_Array([], -1); foreach ($parameters as $key => $value) { if (is_int($key)) { $arbitraryArguments->addElement($value); @@ -213,14 +215,14 @@ abstract class Twig_Node_Expression_Call extends Twig_Node_Expression protected function normalizeName($name) { - return strtolower(preg_replace(array('/([A-Z]+)([A-Z][a-z])/', '/([a-z\d])([A-Z])/'), array('\\1_\\2', '\\1_\\2'), $name)); + return strtolower(preg_replace(['/([A-Z]+)([A-Z][a-z])/', '/([a-z\d])([A-Z])/'], ['\\1_\\2', '\\1_\\2'], $name)); } private function getCallableParameters($callable, $isVariadic) { list($r) = $this->reflectCallable($callable); if (null === $r) { - return array(); + return []; } $parameters = $r->getParameters(); @@ -240,7 +242,7 @@ abstract class Twig_Node_Expression_Call extends Twig_Node_Expression } if ($isVariadic) { $argument = end($parameters); - if ($argument && $argument->isArray() && $argument->isDefaultValueAvailable() && array() === $argument->getDefaultValue()) { + if ($argument && $argument->isArray() && $argument->isDefaultValueAvailable() && [] === $argument->getDefaultValue()) { array_pop($parameters); } else { $callableName = $r->name; @@ -248,7 +250,7 @@ abstract class Twig_Node_Expression_Call extends Twig_Node_Expression $callableName = $r->getDeclaringClass()->name.'::'.$callableName; } - throw new LogicException(sprintf('The last parameter of "%s" for %s "%s" must be an array with default value, eg. "array $arg = array()".', $callableName, $this->getAttribute('type'), $this->getAttribute('name'))); + throw new LogicException(sprintf('The last parameter of "%s" for %s "%s" must be an array with default value, eg. "array $arg = []".', $callableName, $this->getAttribute('type'), $this->getAttribute('name'))); } } @@ -264,27 +266,27 @@ abstract class Twig_Node_Expression_Call extends Twig_Node_Expression if (is_array($callable)) { if (!method_exists($callable[0], $callable[1])) { // __call() - return array(null, array()); + return [null, []]; } $r = new ReflectionMethod($callable[0], $callable[1]); } elseif (is_object($callable) && !$callable instanceof Closure) { $r = new ReflectionObject($callable); $r = $r->getMethod('__invoke'); - $callable = array($callable, '__invoke'); + $callable = [$callable, '__invoke']; } elseif (is_string($callable) && false !== $pos = strpos($callable, '::')) { $class = substr($callable, 0, $pos); $method = substr($callable, $pos + 2); if (!method_exists($class, $method)) { // __staticCall() - return array(null, array()); + return [null, []]; } $r = new ReflectionMethod($callable); - $callable = array($class, $method); + $callable = [$class, $method]; } else { $r = new ReflectionFunction($callable); } - return $this->reflector = array($r, $callable); + return $this->reflector = [$r, $callable]; } } diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Conditional.php b/vendor/twig/twig/lib/Twig/Node/Expression/Conditional.php index c339d773c..996772a05 100644 --- a/vendor/twig/twig/lib/Twig/Node/Expression/Conditional.php +++ b/vendor/twig/twig/lib/Twig/Node/Expression/Conditional.php @@ -13,7 +13,7 @@ class Twig_Node_Expression_Conditional extends Twig_Node_Expression { public function __construct(Twig_Node_Expression $expr1, Twig_Node_Expression $expr2, Twig_Node_Expression $expr3, $lineno) { - parent::__construct(array('expr1' => $expr1, 'expr2' => $expr2, 'expr3' => $expr3), array(), $lineno); + parent::__construct(['expr1' => $expr1, 'expr2' => $expr2, 'expr3' => $expr3], [], $lineno); } public function compile(Twig_Compiler $compiler) diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Constant.php b/vendor/twig/twig/lib/Twig/Node/Expression/Constant.php index bf4d031cf..7304e8c3b 100644 --- a/vendor/twig/twig/lib/Twig/Node/Expression/Constant.php +++ b/vendor/twig/twig/lib/Twig/Node/Expression/Constant.php @@ -13,7 +13,7 @@ class Twig_Node_Expression_Constant extends Twig_Node_Expression { public function __construct($value, $lineno) { - parent::__construct(array(), array('value' => $value), $lineno); + parent::__construct([], ['value' => $value], $lineno); } public function compile(Twig_Compiler $compiler) diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/ExtensionReference.php b/vendor/twig/twig/lib/Twig/Node/Expression/ExtensionReference.php index 114b5cd97..7bcc078ca 100644 --- a/vendor/twig/twig/lib/Twig/Node/Expression/ExtensionReference.php +++ b/vendor/twig/twig/lib/Twig/Node/Expression/ExtensionReference.php @@ -22,7 +22,7 @@ class Twig_Node_Expression_ExtensionReference extends Twig_Node_Expression { public function __construct($name, $lineno, $tag = null) { - parent::__construct(array(), array('name' => $name), $lineno, $tag); + parent::__construct([], ['name' => $name], $lineno, $tag); } public function compile(Twig_Compiler $compiler) diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Filter.php b/vendor/twig/twig/lib/Twig/Node/Expression/Filter.php index 12da1d676..7b5952fb1 100644 --- a/vendor/twig/twig/lib/Twig/Node/Expression/Filter.php +++ b/vendor/twig/twig/lib/Twig/Node/Expression/Filter.php @@ -13,7 +13,7 @@ class Twig_Node_Expression_Filter extends Twig_Node_Expression_Call { public function __construct(Twig_NodeInterface $node, Twig_Node_Expression_Constant $filterName, Twig_NodeInterface $arguments, $lineno, $tag = null) { - parent::__construct(array('node' => $node, 'filter' => $filterName, 'arguments' => $arguments), array(), $lineno, $tag); + parent::__construct(['node' => $node, 'filter' => $filterName, 'arguments' => $arguments], [], $lineno, $tag); } public function compile(Twig_Compiler $compiler) diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Function.php b/vendor/twig/twig/lib/Twig/Node/Expression/Function.php index cdee7c972..c19633f18 100644 --- a/vendor/twig/twig/lib/Twig/Node/Expression/Function.php +++ b/vendor/twig/twig/lib/Twig/Node/Expression/Function.php @@ -12,7 +12,7 @@ class Twig_Node_Expression_Function extends Twig_Node_Expression_Call { public function __construct($name, Twig_NodeInterface $arguments, $lineno) { - parent::__construct(array('arguments' => $arguments), array('name' => $name, 'is_defined_test' => false), $lineno); + parent::__construct(['arguments' => $arguments], ['name' => $name, 'is_defined_test' => false], $lineno); } public function compile(Twig_Compiler $compiler) diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/GetAttr.php b/vendor/twig/twig/lib/Twig/Node/Expression/GetAttr.php index b7823accb..897691508 100644 --- a/vendor/twig/twig/lib/Twig/Node/Expression/GetAttr.php +++ b/vendor/twig/twig/lib/Twig/Node/Expression/GetAttr.php @@ -13,12 +13,12 @@ class Twig_Node_Expression_GetAttr extends Twig_Node_Expression { public function __construct(Twig_Node_Expression $node, Twig_Node_Expression $attribute, Twig_Node_Expression $arguments = null, $type, $lineno) { - $nodes = array('node' => $node, 'attribute' => $attribute); + $nodes = ['node' => $node, 'attribute' => $attribute]; if (null !== $arguments) { $nodes['arguments'] = $arguments; } - parent::__construct($nodes, array('type' => $type, 'is_defined_test' => false, 'ignore_strict_check' => false, 'disable_c_ext' => false), $lineno); + parent::__construct($nodes, ['type' => $type, 'is_defined_test' => false, 'ignore_strict_check' => false, 'disable_c_ext' => false], $lineno); } public function compile(Twig_Compiler $compiler) @@ -51,7 +51,7 @@ class Twig_Node_Expression_GetAttr extends Twig_Node_Expression if ($this->hasNode('arguments')) { $compiler->raw(', ')->subcompile($this->getNode('arguments')); } else { - $compiler->raw(', array()'); + $compiler->raw(', []'); } } diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/MethodCall.php b/vendor/twig/twig/lib/Twig/Node/Expression/MethodCall.php index 709016eb2..b8a83450a 100644 --- a/vendor/twig/twig/lib/Twig/Node/Expression/MethodCall.php +++ b/vendor/twig/twig/lib/Twig/Node/Expression/MethodCall.php @@ -12,7 +12,7 @@ class Twig_Node_Expression_MethodCall extends Twig_Node_Expression { public function __construct(Twig_Node_Expression $node, $method, Twig_Node_Expression_Array $arguments, $lineno) { - parent::__construct(array('node' => $node, 'arguments' => $arguments), array('method' => $method, 'safe' => false), $lineno); + parent::__construct(['node' => $node, 'arguments' => $arguments], ['method' => $method, 'safe' => false], $lineno); if ($node instanceof Twig_Node_Expression_Name) { $node->setAttribute('always_defined', true); diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Name.php b/vendor/twig/twig/lib/Twig/Node/Expression/Name.php index 7d3d6220e..2d1d3d1c2 100644 --- a/vendor/twig/twig/lib/Twig/Node/Expression/Name.php +++ b/vendor/twig/twig/lib/Twig/Node/Expression/Name.php @@ -11,15 +11,15 @@ */ class Twig_Node_Expression_Name extends Twig_Node_Expression { - protected $specialVars = array( + protected $specialVars = [ '_self' => '$this', '_context' => '$context', '_charset' => '$this->env->getCharset()', - ); + ]; public function __construct($name, $lineno) { - parent::__construct(array(), array('name' => $name, 'is_defined_test' => false, 'ignore_strict_check' => false, 'always_defined' => false), $lineno); + parent::__construct([], ['name' => $name, 'is_defined_test' => false, 'ignore_strict_check' => false, 'always_defined' => false], $lineno); } public function compile(Twig_Compiler $compiler) diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Parent.php b/vendor/twig/twig/lib/Twig/Node/Expression/Parent.php index 78692db29..862368528 100644 --- a/vendor/twig/twig/lib/Twig/Node/Expression/Parent.php +++ b/vendor/twig/twig/lib/Twig/Node/Expression/Parent.php @@ -19,7 +19,7 @@ class Twig_Node_Expression_Parent extends Twig_Node_Expression { public function __construct($name, $lineno, $tag = null) { - parent::__construct(array(), array('output' => false, 'name' => $name), $lineno, $tag); + parent::__construct([], ['output' => false, 'name' => $name], $lineno, $tag); } public function compile(Twig_Compiler $compiler) diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/TempName.php b/vendor/twig/twig/lib/Twig/Node/Expression/TempName.php index 0a86e003d..4be1cc2c2 100644 --- a/vendor/twig/twig/lib/Twig/Node/Expression/TempName.php +++ b/vendor/twig/twig/lib/Twig/Node/Expression/TempName.php @@ -12,7 +12,7 @@ class Twig_Node_Expression_TempName extends Twig_Node_Expression { public function __construct($name, $lineno) { - parent::__construct(array(), array('name' => $name), $lineno); + parent::__construct([], ['name' => $name], $lineno); } public function compile(Twig_Compiler $compiler) diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Test.php b/vendor/twig/twig/lib/Twig/Node/Expression/Test.php index ad102ba60..a543ec55d 100644 --- a/vendor/twig/twig/lib/Twig/Node/Expression/Test.php +++ b/vendor/twig/twig/lib/Twig/Node/Expression/Test.php @@ -12,12 +12,12 @@ class Twig_Node_Expression_Test extends Twig_Node_Expression_Call { public function __construct(Twig_NodeInterface $node, $name, Twig_NodeInterface $arguments = null, $lineno) { - $nodes = array('node' => $node); + $nodes = ['node' => $node]; if (null !== $arguments) { $nodes['arguments'] = $arguments; } - parent::__construct($nodes, array('name' => $name), $lineno); + parent::__construct($nodes, ['name' => $name], $lineno); } public function compile(Twig_Compiler $compiler) @@ -28,6 +28,9 @@ class Twig_Node_Expression_Test extends Twig_Node_Expression_Call $this->setAttribute('name', $name); $this->setAttribute('type', 'test'); $this->setAttribute('thing', $test); + if ($test instanceof Twig_SimpleTest) { + $this->setAttribute('arguments', $test->getArguments()); + } if ($test instanceof Twig_TestCallableInterface || $test instanceof Twig_SimpleTest) { $this->setAttribute('callable', $test->getCallable()); } diff --git a/vendor/twig/twig/lib/Twig/Node/Expression/Unary.php b/vendor/twig/twig/lib/Twig/Node/Expression/Unary.php index 5804485e3..abf191a38 100644 --- a/vendor/twig/twig/lib/Twig/Node/Expression/Unary.php +++ b/vendor/twig/twig/lib/Twig/Node/Expression/Unary.php @@ -13,7 +13,7 @@ abstract class Twig_Node_Expression_Unary extends Twig_Node_Expression { public function __construct(Twig_NodeInterface $node, $lineno) { - parent::__construct(array('node' => $node), array(), $lineno); + parent::__construct(['node' => $node], [], $lineno); } public function compile(Twig_Compiler $compiler) diff --git a/vendor/twig/twig/lib/Twig/Node/Flush.php b/vendor/twig/twig/lib/Twig/Node/Flush.php index fcc461ac0..5d3ffd52d 100644 --- a/vendor/twig/twig/lib/Twig/Node/Flush.php +++ b/vendor/twig/twig/lib/Twig/Node/Flush.php @@ -18,7 +18,7 @@ class Twig_Node_Flush extends Twig_Node { public function __construct($lineno, $tag) { - parent::__construct(array(), array(), $lineno, $tag); + parent::__construct([], [], $lineno, $tag); } public function compile(Twig_Compiler $compiler) diff --git a/vendor/twig/twig/lib/Twig/Node/For.php b/vendor/twig/twig/lib/Twig/Node/For.php index 914b70c98..765194579 100644 --- a/vendor/twig/twig/lib/Twig/Node/For.php +++ b/vendor/twig/twig/lib/Twig/Node/For.php @@ -21,18 +21,18 @@ class Twig_Node_For extends Twig_Node public function __construct(Twig_Node_Expression_AssignName $keyTarget, Twig_Node_Expression_AssignName $valueTarget, Twig_Node_Expression $seq, Twig_Node_Expression $ifexpr = null, Twig_NodeInterface $body, Twig_NodeInterface $else = null, $lineno, $tag = null) { - $body = new Twig_Node(array($body, $this->loop = new Twig_Node_ForLoop($lineno, $tag))); + $body = new Twig_Node([$body, $this->loop = new Twig_Node_ForLoop($lineno, $tag)]); if (null !== $ifexpr) { - $body = new Twig_Node_If(new Twig_Node(array($ifexpr, $body)), null, $lineno, $tag); + $body = new Twig_Node_If(new Twig_Node([$ifexpr, $body]), null, $lineno, $tag); } - $nodes = array('key_target' => $keyTarget, 'value_target' => $valueTarget, 'seq' => $seq, 'body' => $body); + $nodes = ['key_target' => $keyTarget, 'value_target' => $valueTarget, 'seq' => $seq, 'body' => $body]; if (null !== $else) { $nodes['else'] = $else; } - parent::__construct($nodes, array('with_loop' => true, 'ifexpr' => null !== $ifexpr), $lineno, $tag); + parent::__construct($nodes, ['with_loop' => true, 'ifexpr' => null !== $ifexpr], $lineno, $tag); } public function compile(Twig_Compiler $compiler) @@ -51,12 +51,12 @@ class Twig_Node_For extends Twig_Node if ($this->getAttribute('with_loop')) { $compiler - ->write("\$context['loop'] = array(\n") + ->write("\$context['loop'] = [\n") ->write(" 'parent' => \$context['_parent'],\n") ->write(" 'index0' => 0,\n") ->write(" 'index' => 1,\n") ->write(" 'first' => true,\n") - ->write(");\n") + ->write("];\n") ; if (!$this->getAttribute('ifexpr')) { diff --git a/vendor/twig/twig/lib/Twig/Node/ForLoop.php b/vendor/twig/twig/lib/Twig/Node/ForLoop.php index 06477cf1f..31f282d79 100644 --- a/vendor/twig/twig/lib/Twig/Node/ForLoop.php +++ b/vendor/twig/twig/lib/Twig/Node/ForLoop.php @@ -18,7 +18,7 @@ class Twig_Node_ForLoop extends Twig_Node { public function __construct($lineno, $tag = null) { - parent::__construct(array(), array('with_loop' => false, 'ifexpr' => false, 'else' => false), $lineno, $tag); + parent::__construct([], ['with_loop' => false, 'ifexpr' => false, 'else' => false], $lineno, $tag); } public function compile(Twig_Compiler $compiler) diff --git a/vendor/twig/twig/lib/Twig/Node/If.php b/vendor/twig/twig/lib/Twig/Node/If.php index d82edec77..b096cd4e9 100644 --- a/vendor/twig/twig/lib/Twig/Node/If.php +++ b/vendor/twig/twig/lib/Twig/Node/If.php @@ -19,12 +19,12 @@ class Twig_Node_If extends Twig_Node { public function __construct(Twig_NodeInterface $tests, Twig_NodeInterface $else = null, $lineno, $tag = null) { - $nodes = array('tests' => $tests); + $nodes = ['tests' => $tests]; if (null !== $else) { $nodes['else'] = $else; } - parent::__construct($nodes, array(), $lineno, $tag); + parent::__construct($nodes, [], $lineno, $tag); } public function compile(Twig_Compiler $compiler) diff --git a/vendor/twig/twig/lib/Twig/Node/Import.php b/vendor/twig/twig/lib/Twig/Node/Import.php index c77e320b7..44b2131e2 100644 --- a/vendor/twig/twig/lib/Twig/Node/Import.php +++ b/vendor/twig/twig/lib/Twig/Node/Import.php @@ -18,7 +18,7 @@ class Twig_Node_Import extends Twig_Node { public function __construct(Twig_Node_Expression $expr, Twig_Node_Expression $var, $lineno, $tag = null) { - parent::__construct(array('expr' => $expr, 'var' => $var), array(), $lineno, $tag); + parent::__construct(['expr' => $expr, 'var' => $var], [], $lineno, $tag); } public function compile(Twig_Compiler $compiler) diff --git a/vendor/twig/twig/lib/Twig/Node/Include.php b/vendor/twig/twig/lib/Twig/Node/Include.php index 2a5114cb8..4b263819f 100644 --- a/vendor/twig/twig/lib/Twig/Node/Include.php +++ b/vendor/twig/twig/lib/Twig/Node/Include.php @@ -19,12 +19,12 @@ class Twig_Node_Include extends Twig_Node implements Twig_NodeOutputInterface { public function __construct(Twig_Node_Expression $expr, Twig_Node_Expression $variables = null, $only = false, $ignoreMissing = false, $lineno, $tag = null) { - $nodes = array('expr' => $expr); + $nodes = ['expr' => $expr]; if (null !== $variables) { $nodes['variables'] = $variables; } - parent::__construct($nodes, array('only' => (bool) $only, 'ignore_missing' => (bool) $ignoreMissing), $lineno, $tag); + parent::__construct($nodes, ['only' => (bool) $only, 'ignore_missing' => (bool) $ignoreMissing], $lineno, $tag); } public function compile(Twig_Compiler $compiler) @@ -74,7 +74,7 @@ class Twig_Node_Include extends Twig_Node implements Twig_NodeOutputInterface protected function addTemplateArguments(Twig_Compiler $compiler) { if (!$this->hasNode('variables')) { - $compiler->raw(false === $this->getAttribute('only') ? '$context' : 'array()'); + $compiler->raw(false === $this->getAttribute('only') ? '$context' : '[]'); } elseif (false === $this->getAttribute('only')) { $compiler ->raw('array_merge($context, ') diff --git a/vendor/twig/twig/lib/Twig/Node/Macro.php b/vendor/twig/twig/lib/Twig/Node/Macro.php index 3cf549770..0c4f9286a 100644 --- a/vendor/twig/twig/lib/Twig/Node/Macro.php +++ b/vendor/twig/twig/lib/Twig/Node/Macro.php @@ -26,7 +26,7 @@ class Twig_Node_Macro extends Twig_Node } } - parent::__construct(array('body' => $body, 'arguments' => $arguments), array('name' => $name), $lineno, $tag); + parent::__construct(['body' => $body, 'arguments' => $arguments], ['name' => $name], $lineno, $tag); } public function compile(Twig_Compiler $compiler) @@ -64,7 +64,7 @@ class Twig_Node_Macro extends Twig_Node ; $compiler - ->write("\$context = \$this->env->mergeGlobals(array(\n") + ->write("\$context = \$this->env->mergeGlobals([\n") ->indent() ; @@ -91,14 +91,14 @@ class Twig_Node_Macro extends Twig_Node ->repr($count) ->raw(' ? array_slice(func_get_args(), ') ->repr($count) - ->raw(") : array(),\n") + ->raw(") : [],\n") ; } $compiler ->outdent() - ->write("));\n\n") - ->write("\$blocks = array();\n\n") + ->write("]);\n\n") + ->write("\$blocks = [];\n\n") ->write("ob_start();\n") ->write("try {\n") ->indent() diff --git a/vendor/twig/twig/lib/Twig/Node/Module.php b/vendor/twig/twig/lib/Twig/Node/Module.php index 5cd8d0502..c33bbe157 100644 --- a/vendor/twig/twig/lib/Twig/Node/Module.php +++ b/vendor/twig/twig/lib/Twig/Node/Module.php @@ -32,7 +32,7 @@ class Twig_Node_Module extends Twig_Node $this->source = $name; } - $nodes = array( + $nodes = [ 'body' => $body, 'blocks' => $blocks, 'macros' => $macros, @@ -42,20 +42,20 @@ class Twig_Node_Module extends Twig_Node 'constructor_start' => new Twig_Node(), 'constructor_end' => new Twig_Node(), 'class_end' => new Twig_Node(), - ); + ]; if (null !== $parent) { $nodes['parent'] = $parent; } // embedded templates are set as attributes so that they are only visited once by the visitors - parent::__construct($nodes, array( + parent::__construct($nodes, [ // source to be remove in 2.0 'source' => $this->source->getCode(), // filename to be remove in 2.0 (use getTemplateName() instead) 'filename' => $this->source->getName(), 'index' => null, 'embedded_templates' => $embeddedTemplates, - ), 1); + ], 1); // populate the template name of all node children $this->setTemplateName($this->source->getName()); @@ -257,11 +257,11 @@ class Twig_Node_Module extends Twig_Node ->write("\$this->blocks = array_merge(\n") ->indent() ->write("\$this->traits,\n") - ->write("array(\n") + ->write("[\n") ; } else { $compiler - ->write("\$this->blocks = array(\n") + ->write("\$this->blocks = [\n") ; } @@ -272,20 +272,25 @@ class Twig_Node_Module extends Twig_Node foreach ($this->getNode('blocks') as $name => $node) { $compiler - ->write(sprintf("'%s' => array(\$this, 'block_%s'),\n", $name, $name)) + ->write(sprintf("'%s' => [\$this, 'block_%s'],\n", $name, $name)) ; } if ($countTraits) { $compiler ->outdent() - ->write(")\n") + ->write("]\n") + ->outdent() + ->write(");\n") + ; + } else { + $compiler + ->outdent() + ->write("];\n") ; } $compiler - ->outdent() - ->write(");\n") ->outdent() ->subcompile($this->getNode('constructor_end')) ->write("}\n\n") @@ -295,7 +300,7 @@ class Twig_Node_Module extends Twig_Node protected function compileDisplay(Twig_Compiler $compiler) { $compiler - ->write("protected function doDisplay(array \$context, array \$blocks = array())\n", "{\n") + ->write("protected function doDisplay(array \$context, array \$blocks = [])\n", "{\n") ->indent() ->subcompile($this->getNode('display_start')) ->subcompile($this->getNode('body')) @@ -364,7 +369,7 @@ class Twig_Node_Module extends Twig_Node } if (!count($nodes)) { - $nodes = new Twig_Node(array($nodes)); + $nodes = new Twig_Node([$nodes]); } foreach ($nodes as $node) { diff --git a/vendor/twig/twig/lib/Twig/Node/Print.php b/vendor/twig/twig/lib/Twig/Node/Print.php index 374db89b7..215d712ad 100644 --- a/vendor/twig/twig/lib/Twig/Node/Print.php +++ b/vendor/twig/twig/lib/Twig/Node/Print.php @@ -19,7 +19,7 @@ class Twig_Node_Print extends Twig_Node implements Twig_NodeOutputInterface { public function __construct(Twig_Node_Expression $expr, $lineno, $tag = null) { - parent::__construct(array('expr' => $expr), array(), $lineno, $tag); + parent::__construct(['expr' => $expr], [], $lineno, $tag); } public function compile(Twig_Compiler $compiler) diff --git a/vendor/twig/twig/lib/Twig/Node/Sandbox.php b/vendor/twig/twig/lib/Twig/Node/Sandbox.php index 44b30ab9c..e06f332be 100644 --- a/vendor/twig/twig/lib/Twig/Node/Sandbox.php +++ b/vendor/twig/twig/lib/Twig/Node/Sandbox.php @@ -18,7 +18,7 @@ class Twig_Node_Sandbox extends Twig_Node { public function __construct(Twig_NodeInterface $body, $lineno, $tag = null) { - parent::__construct(array('body' => $body), array(), $lineno, $tag); + parent::__construct(['body' => $body], [], $lineno, $tag); } public function compile(Twig_Compiler $compiler) diff --git a/vendor/twig/twig/lib/Twig/Node/Set.php b/vendor/twig/twig/lib/Twig/Node/Set.php index 6c6743eeb..155cc4843 100644 --- a/vendor/twig/twig/lib/Twig/Node/Set.php +++ b/vendor/twig/twig/lib/Twig/Node/Set.php @@ -18,7 +18,7 @@ class Twig_Node_Set extends Twig_Node implements Twig_NodeCaptureInterface { public function __construct($capture, Twig_NodeInterface $names, Twig_NodeInterface $values, $lineno, $tag = null) { - parent::__construct(array('names' => $names, 'values' => $values), array('capture' => $capture, 'safe' => false), $lineno, $tag); + parent::__construct(['names' => $names, 'values' => $values], ['capture' => $capture, 'safe' => false], $lineno, $tag); /* * Optimizes the node when capture is used for a large block of text. @@ -69,7 +69,7 @@ class Twig_Node_Set extends Twig_Node implements Twig_NodeCaptureInterface $compiler->raw(' = '); if (count($this->getNode('names')) > 1) { - $compiler->write('array('); + $compiler->write('['); foreach ($this->getNode('values') as $idx => $value) { if ($idx) { $compiler->raw(', '); @@ -77,7 +77,7 @@ class Twig_Node_Set extends Twig_Node implements Twig_NodeCaptureInterface $compiler->subcompile($value); } - $compiler->raw(')'); + $compiler->raw(']'); } else { if ($this->getAttribute('safe')) { $compiler diff --git a/vendor/twig/twig/lib/Twig/Node/SetTemp.php b/vendor/twig/twig/lib/Twig/Node/SetTemp.php index 996fdcde7..c04ff4548 100644 --- a/vendor/twig/twig/lib/Twig/Node/SetTemp.php +++ b/vendor/twig/twig/lib/Twig/Node/SetTemp.php @@ -16,7 +16,7 @@ class Twig_Node_SetTemp extends Twig_Node { public function __construct($name, $lineno) { - parent::__construct(array(), array('name' => $name), $lineno); + parent::__construct([], ['name' => $name], $lineno); } public function compile(Twig_Compiler $compiler) diff --git a/vendor/twig/twig/lib/Twig/Node/Spaceless.php b/vendor/twig/twig/lib/Twig/Node/Spaceless.php index 76f90cde5..43e907af2 100644 --- a/vendor/twig/twig/lib/Twig/Node/Spaceless.php +++ b/vendor/twig/twig/lib/Twig/Node/Spaceless.php @@ -20,7 +20,7 @@ class Twig_Node_Spaceless extends Twig_Node { public function __construct(Twig_NodeInterface $body, $lineno, $tag = 'spaceless') { - parent::__construct(array('body' => $body), array(), $lineno, $tag); + parent::__construct(['body' => $body], [], $lineno, $tag); } public function compile(Twig_Compiler $compiler) diff --git a/vendor/twig/twig/lib/Twig/Node/Text.php b/vendor/twig/twig/lib/Twig/Node/Text.php index f4577fee2..ab24d7196 100644 --- a/vendor/twig/twig/lib/Twig/Node/Text.php +++ b/vendor/twig/twig/lib/Twig/Node/Text.php @@ -19,7 +19,7 @@ class Twig_Node_Text extends Twig_Node implements Twig_NodeOutputInterface { public function __construct($data, $lineno) { - parent::__construct(array(), array('data' => $data), $lineno); + parent::__construct([], ['data' => $data], $lineno); } public function compile(Twig_Compiler $compiler) diff --git a/vendor/twig/twig/lib/Twig/Node/With.php b/vendor/twig/twig/lib/Twig/Node/With.php index 2ab0ea5d7..422cc8122 100644 --- a/vendor/twig/twig/lib/Twig/Node/With.php +++ b/vendor/twig/twig/lib/Twig/Node/With.php @@ -18,12 +18,12 @@ class Twig_Node_With extends Twig_Node { public function __construct(Twig_Node $body, Twig_Node $variables = null, $only = false, $lineno, $tag = null) { - $nodes = array('body' => $body); + $nodes = ['body' => $body]; if (null !== $variables) { $nodes['variables'] = $variables; } - parent::__construct($nodes, array('only' => (bool) $only), $lineno, $tag); + parent::__construct($nodes, ['only' => (bool) $only], $lineno, $tag); } public function compile(Twig_Compiler $compiler) @@ -44,7 +44,7 @@ class Twig_Node_With extends Twig_Node ; if ($this->getAttribute('only')) { - $compiler->write("\$context = array('_parent' => \$context);\n"); + $compiler->write("\$context = ['_parent' => \$context];\n"); } else { $compiler->write("\$context['_parent'] = \$context;\n"); } diff --git a/vendor/twig/twig/lib/Twig/NodeTraverser.php b/vendor/twig/twig/lib/Twig/NodeTraverser.php index f00a0bf5c..7f80e76b9 100644 --- a/vendor/twig/twig/lib/Twig/NodeTraverser.php +++ b/vendor/twig/twig/lib/Twig/NodeTraverser.php @@ -21,13 +21,13 @@ class Twig_NodeTraverser { protected $env; - protected $visitors = array(); + protected $visitors = []; /** * @param Twig_Environment $env * @param Twig_NodeVisitorInterface[] $visitors */ - public function __construct(Twig_Environment $env, array $visitors = array()) + public function __construct(Twig_Environment $env, array $visitors = []) { $this->env = $env; foreach ($visitors as $visitor) { @@ -38,7 +38,7 @@ class Twig_NodeTraverser public function addVisitor(Twig_NodeVisitorInterface $visitor) { if (!isset($this->visitors[$visitor->getPriority()])) { - $this->visitors[$visitor->getPriority()] = array(); + $this->visitors[$visitor->getPriority()] = []; } $this->visitors[$visitor->getPriority()][] = $visitor; diff --git a/vendor/twig/twig/lib/Twig/NodeVisitor/Escaper.php b/vendor/twig/twig/lib/Twig/NodeVisitor/Escaper.php index 1a1ae66f7..5eb32ea1e 100644 --- a/vendor/twig/twig/lib/Twig/NodeVisitor/Escaper.php +++ b/vendor/twig/twig/lib/Twig/NodeVisitor/Escaper.php @@ -18,12 +18,12 @@ */ class Twig_NodeVisitor_Escaper extends Twig_BaseNodeVisitor { - protected $statusStack = array(); - protected $blocks = array(); + protected $statusStack = []; + protected $blocks = []; protected $safeAnalysis; protected $traverser; protected $defaultStrategy = false; - protected $safeVars = array(); + protected $safeVars = []; public function __construct() { @@ -36,8 +36,8 @@ class Twig_NodeVisitor_Escaper extends Twig_BaseNodeVisitor if ($env->hasExtension('Twig_Extension_Escaper') && $defaultStrategy = $env->getExtension('Twig_Extension_Escaper')->getDefaultStrategy($node->getTemplateName())) { $this->defaultStrategy = $defaultStrategy; } - $this->safeVars = array(); - $this->blocks = array(); + $this->safeVars = []; + $this->blocks = []; } elseif ($node instanceof Twig_Node_AutoEscape) { $this->statusStack[] = $node->getAttribute('value'); } elseif ($node instanceof Twig_Node_Block) { @@ -53,8 +53,8 @@ class Twig_NodeVisitor_Escaper extends Twig_BaseNodeVisitor { if ($node instanceof Twig_Node_Module) { $this->defaultStrategy = false; - $this->safeVars = array(); - $this->blocks = array(); + $this->safeVars = []; + $this->blocks = []; } elseif ($node instanceof Twig_Node_Expression_Filter) { return $this->preEscapeFilterNode($node, $env); } elseif ($node instanceof Twig_Node_Print) { @@ -115,7 +115,7 @@ class Twig_NodeVisitor_Escaper extends Twig_BaseNodeVisitor if (null === $safe) { if (null === $this->traverser) { - $this->traverser = new Twig_NodeTraverser($env, array($this->safeAnalysis)); + $this->traverser = new Twig_NodeTraverser($env, [$this->safeAnalysis]); } $this->safeAnalysis->setSafeVars($this->safeVars); @@ -140,7 +140,7 @@ class Twig_NodeVisitor_Escaper extends Twig_BaseNodeVisitor { $line = $node->getTemplateLine(); $name = new Twig_Node_Expression_Constant('escape', $line); - $args = new Twig_Node(array(new Twig_Node_Expression_Constant((string) $type, $line), new Twig_Node_Expression_Constant(null, $line), new Twig_Node_Expression_Constant(true, $line))); + $args = new Twig_Node([new Twig_Node_Expression_Constant((string) $type, $line), new Twig_Node_Expression_Constant(null, $line), new Twig_Node_Expression_Constant(true, $line)]); return new Twig_Node_Expression_Filter($node, $name, $args, $line); } diff --git a/vendor/twig/twig/lib/Twig/NodeVisitor/Optimizer.php b/vendor/twig/twig/lib/Twig/NodeVisitor/Optimizer.php index c55e40ff7..f97ea56f1 100644 --- a/vendor/twig/twig/lib/Twig/NodeVisitor/Optimizer.php +++ b/vendor/twig/twig/lib/Twig/NodeVisitor/Optimizer.php @@ -29,10 +29,10 @@ class Twig_NodeVisitor_Optimizer extends Twig_BaseNodeVisitor const OPTIMIZE_RAW_FILTER = 4; const OPTIMIZE_VAR_ACCESS = 8; - protected $loops = array(); - protected $loopsTargets = array(); + protected $loops = []; + protected $loopsTargets = []; protected $optimizers; - protected $prependedNodes = array(); + protected $prependedNodes = []; protected $inABody = false; /** @@ -57,7 +57,7 @@ class Twig_NodeVisitor_Optimizer extends Twig_BaseNodeVisitor if ($this->inABody) { if (!$node instanceof Twig_Node_Expression) { if ('Twig_Node' !== get_class($node)) { - array_unshift($this->prependedNodes, array()); + array_unshift($this->prependedNodes, []); } } else { $node = $this->optimizeVariables($node, $env); @@ -89,7 +89,7 @@ class Twig_NodeVisitor_Optimizer extends Twig_BaseNodeVisitor $this->inABody = false; } elseif ($this->inABody) { if (!$expression && 'Twig_Node' !== get_class($node) && $prependedNodes = array_shift($this->prependedNodes)) { - $nodes = array(); + $nodes = []; foreach (array_unique($prependedNodes) as $name) { $nodes[] = new Twig_Node_SetTemp($name, $node->getTemplateLine()); } diff --git a/vendor/twig/twig/lib/Twig/NodeVisitor/SafeAnalysis.php b/vendor/twig/twig/lib/Twig/NodeVisitor/SafeAnalysis.php index ca31c8fc7..eff855b49 100644 --- a/vendor/twig/twig/lib/Twig/NodeVisitor/SafeAnalysis.php +++ b/vendor/twig/twig/lib/Twig/NodeVisitor/SafeAnalysis.php @@ -14,8 +14,8 @@ */ class Twig_NodeVisitor_SafeAnalysis extends Twig_BaseNodeVisitor { - protected $data = array(); - protected $safeVars = array(); + protected $data = []; + protected $safeVars = []; public function setSafeVars($safeVars) { @@ -54,10 +54,10 @@ class Twig_NodeVisitor_SafeAnalysis extends Twig_BaseNodeVisitor } } } - $this->data[$hash][] = array( + $this->data[$hash][] = [ 'key' => $node, 'value' => $safe, - ); + ]; } protected function doEnterNode(Twig_Node $node, Twig_Environment $env) @@ -69,13 +69,13 @@ class Twig_NodeVisitor_SafeAnalysis extends Twig_BaseNodeVisitor { if ($node instanceof Twig_Node_Expression_Constant) { // constants are marked safe for all - $this->setSafe($node, array('all')); + $this->setSafe($node, ['all']); } elseif ($node instanceof Twig_Node_Expression_BlockReference) { // blocks are safe by definition - $this->setSafe($node, array('all')); + $this->setSafe($node, ['all']); } elseif ($node instanceof Twig_Node_Expression_Parent) { // parent block is safe by definition - $this->setSafe($node, array('all')); + $this->setSafe($node, ['all']); } elseif ($node instanceof Twig_Node_Expression_Conditional) { // intersect safeness of both operands $safe = $this->intersectSafe($this->getSafe($node->getNode('expr2')), $this->getSafe($node->getNode('expr3'))); @@ -91,7 +91,7 @@ class Twig_NodeVisitor_SafeAnalysis extends Twig_BaseNodeVisitor } $this->setSafe($node, $safe); } else { - $this->setSafe($node, array()); + $this->setSafe($node, []); } } elseif ($node instanceof Twig_Node_Expression_Function) { // function expression is safe when the function is safe @@ -101,24 +101,24 @@ class Twig_NodeVisitor_SafeAnalysis extends Twig_BaseNodeVisitor if (false !== $function) { $this->setSafe($node, $function->getSafe($args)); } else { - $this->setSafe($node, array()); + $this->setSafe($node, []); } } elseif ($node instanceof Twig_Node_Expression_MethodCall) { if ($node->getAttribute('safe')) { - $this->setSafe($node, array('all')); + $this->setSafe($node, ['all']); } else { - $this->setSafe($node, array()); + $this->setSafe($node, []); } } elseif ($node instanceof Twig_Node_Expression_GetAttr && $node->getNode('node') instanceof Twig_Node_Expression_Name) { $name = $node->getNode('node')->getAttribute('name'); // attributes on template instances are safe if ('_self' == $name || in_array($name, $this->safeVars)) { - $this->setSafe($node, array('all')); + $this->setSafe($node, ['all']); } else { - $this->setSafe($node, array()); + $this->setSafe($node, []); } } else { - $this->setSafe($node, array()); + $this->setSafe($node, []); } return $node; @@ -127,7 +127,7 @@ class Twig_NodeVisitor_SafeAnalysis extends Twig_BaseNodeVisitor protected function intersectSafe(array $a = null, array $b = null) { if (null === $a || null === $b) { - return array(); + return []; } if (in_array('all', $a)) { diff --git a/vendor/twig/twig/lib/Twig/NodeVisitor/Sandbox.php b/vendor/twig/twig/lib/Twig/NodeVisitor/Sandbox.php index 71aa4f029..894cc1a07 100644 --- a/vendor/twig/twig/lib/Twig/NodeVisitor/Sandbox.php +++ b/vendor/twig/twig/lib/Twig/NodeVisitor/Sandbox.php @@ -27,9 +27,9 @@ class Twig_NodeVisitor_Sandbox extends Twig_BaseNodeVisitor { if ($node instanceof Twig_Node_Module) { $this->inAModule = true; - $this->tags = array(); - $this->filters = array(); - $this->functions = array(); + $this->tags = []; + $this->filters = []; + $this->functions = []; return $node; } elseif ($this->inAModule) { @@ -67,7 +67,7 @@ class Twig_NodeVisitor_Sandbox extends Twig_BaseNodeVisitor if ($node instanceof Twig_Node_Module) { $this->inAModule = false; - $node->setNode('display_start', new Twig_Node(array(new Twig_Node_CheckSecurity($this->filters, $this->tags, $this->functions), $node->getNode('display_start')))); + $node->setNode('display_start', new Twig_Node([new Twig_Node_CheckSecurity($this->filters, $this->tags, $this->functions), $node->getNode('display_start')])); } return $node; diff --git a/vendor/twig/twig/lib/Twig/Parser.php b/vendor/twig/twig/lib/Twig/Parser.php index 6de879a58..ff4440116 100644 --- a/vendor/twig/twig/lib/Twig/Parser.php +++ b/vendor/twig/twig/lib/Twig/Parser.php @@ -17,7 +17,7 @@ */ class Twig_Parser implements Twig_ParserInterface { - protected $stack = array(); + protected $stack = []; protected $stream; protected $parent; protected $handlers; @@ -30,7 +30,7 @@ class Twig_Parser implements Twig_ParserInterface protected $reservedMacroNames; protected $importedSymbols; protected $traits; - protected $embeddedTemplates = array(); + protected $embeddedTemplates = []; private $varNameSalt = 0; public function __construct(Twig_Environment $env) @@ -68,7 +68,7 @@ class Twig_Parser implements Twig_ParserInterface // push all variables into the stack to keep the current state of the parser // using get_object_vars() instead of foreach would lead to https://bugs.php.net/71336 // This hack can be removed when min version if PHP 7.0 - $vars = array(); + $vars = []; foreach ($this as $k => $v) { $vars[$k] = $v; } @@ -93,12 +93,12 @@ class Twig_Parser implements Twig_ParserInterface $this->stream = $stream; $this->parent = null; - $this->blocks = array(); - $this->macros = array(); - $this->traits = array(); - $this->blockStack = array(); - $this->importedSymbols = array(array()); - $this->embeddedTemplates = array(); + $this->blocks = []; + $this->macros = []; + $this->traits = []; + $this->blockStack = []; + $this->importedSymbols = [[]]; + $this->embeddedTemplates = []; $this->varNameSalt = 0; try { @@ -119,7 +119,7 @@ class Twig_Parser implements Twig_ParserInterface throw $e; } - $node = new Twig_Node_Module(new Twig_Node_Body(array($body)), $this->parent, new Twig_Node($this->blocks), new Twig_Node($this->macros), new Twig_Node($this->traits), $this->embeddedTemplates, $stream->getSourceContext()); + $node = new Twig_Node_Module(new Twig_Node_Body([$body]), $this->parent, new Twig_Node($this->blocks), new Twig_Node($this->macros), new Twig_Node($this->traits), $this->embeddedTemplates, $stream->getSourceContext()); $traverser = new Twig_NodeTraverser($this->env, $this->visitors); @@ -136,7 +136,7 @@ class Twig_Parser implements Twig_ParserInterface public function subparse($test, $dropNeedle = false) { $lineno = $this->getCurrentToken()->getLine(); - $rv = array(); + $rv = []; while (!$this->stream->isEOF()) { switch ($this->getCurrentToken()->getType()) { case Twig_Token::TEXT_TYPE: @@ -168,7 +168,7 @@ class Twig_Parser implements Twig_ParserInterface return $rv[0]; } - return new Twig_Node($rv, array(), $lineno); + return new Twig_Node($rv, [], $lineno); } $subparser = $this->handlers->getTokenParser($token->getValue()); @@ -204,7 +204,7 @@ class Twig_Parser implements Twig_ParserInterface return $rv[0]; } - return new Twig_Node($rv, array(), $lineno); + return new Twig_Node($rv, [], $lineno); } /** @@ -259,7 +259,7 @@ class Twig_Parser implements Twig_ParserInterface public function setBlock($name, Twig_Node_Block $value) { - $this->blocks[$name] = new Twig_Node_Body(array($value), array(), $value->getTemplateLine()); + $this->blocks[$name] = new Twig_Node_Body([$value], [], $value->getTemplateLine()); } public function hasMacro($name) @@ -279,7 +279,7 @@ class Twig_Parser implements Twig_ParserInterface public function isReservedMacroName($name) { if (null === $this->reservedMacroNames) { - $this->reservedMacroNames = array(); + $this->reservedMacroNames = []; $r = new ReflectionClass($this->env->getBaseTemplateClass()); foreach ($r->getMethods() as $method) { $methodName = strtolower($method->getName()); @@ -312,7 +312,7 @@ class Twig_Parser implements Twig_ParserInterface public function addImportedSymbol($type, $alias, $name = null, Twig_Node_Expression $node = null) { - $this->importedSymbols[0][$type][$alias] = array('name' => $name, 'node' => $node); + $this->importedSymbols[0][$type][$alias] = ['name' => $name, 'node' => $node]; } public function getImportedSymbol($type, $alias) @@ -331,7 +331,7 @@ class Twig_Parser implements Twig_ParserInterface public function pushLocalScope() { - array_unshift($this->importedSymbols, array()); + array_unshift($this->importedSymbols, []); } public function popLocalScope() @@ -382,7 +382,11 @@ class Twig_Parser implements Twig_ParserInterface (!$node instanceof Twig_Node_Text && !$node instanceof Twig_Node_BlockReference && $node instanceof Twig_NodeOutputInterface) ) { if (false !== strpos((string) $node, chr(0xEF).chr(0xBB).chr(0xBF))) { - throw new Twig_Error_Syntax('A template that extends another one cannot start with a byte order mark (BOM); it must be removed.', $node->getTemplateLine(), $this->stream->getSourceContext()); + $t = substr($node->getAttribute('data'), 3); + if ('' === $t || ctype_space($t)) { + // bypass empty nodes starting with a BOM + return; + } } throw new Twig_Error_Syntax('A template that extends another one cannot include content outside Twig blocks. Did you forget to put the content inside a {% block %} tag?', $node->getTemplateLine(), $this->stream->getSourceContext()); diff --git a/vendor/twig/twig/lib/Twig/Profiler/Dumper/Blackfire.php b/vendor/twig/twig/lib/Twig/Profiler/Dumper/Blackfire.php index 7a33baf2d..4ebb0d0ff 100644 --- a/vendor/twig/twig/lib/Twig/Profiler/Dumper/Blackfire.php +++ b/vendor/twig/twig/lib/Twig/Profiler/Dumper/Blackfire.php @@ -18,7 +18,7 @@ class Twig_Profiler_Dumper_Blackfire { public function dump(Twig_Profiler_Profile $profile) { - $data = array(); + $data = []; $this->dumpProfile('main()', $profile, $data); $this->dumpChildren('main()', $profile, $data); @@ -54,17 +54,17 @@ EOF; private function dumpProfile($edge, Twig_Profiler_Profile $profile, &$data) { if (isset($data[$edge])) { - $data[$edge]['ct'] += 1; + ++$data[$edge]['ct']; $data[$edge]['wt'] += floor($profile->getDuration() * 1000000); $data[$edge]['mu'] += $profile->getMemoryUsage(); $data[$edge]['pmu'] += $profile->getPeakMemoryUsage(); } else { - $data[$edge] = array( + $data[$edge] = [ 'ct' => 1, 'wt' => floor($profile->getDuration() * 1000000), 'mu' => $profile->getMemoryUsage(), 'pmu' => $profile->getPeakMemoryUsage(), - ); + ]; } } } diff --git a/vendor/twig/twig/lib/Twig/Profiler/Dumper/Html.php b/vendor/twig/twig/lib/Twig/Profiler/Dumper/Html.php index b57a25517..974b52168 100644 --- a/vendor/twig/twig/lib/Twig/Profiler/Dumper/Html.php +++ b/vendor/twig/twig/lib/Twig/Profiler/Dumper/Html.php @@ -16,12 +16,12 @@ */ class Twig_Profiler_Dumper_Html extends Twig_Profiler_Dumper_Base { - private static $colors = array( + private static $colors = [ 'block' => '#dfd', 'macro' => '#ddf', 'template' => '#ffd', 'big' => '#d44', - ); + ]; public function dump(Twig_Profiler_Profile $profile) { diff --git a/vendor/twig/twig/lib/Twig/Profiler/Node/EnterProfile.php b/vendor/twig/twig/lib/Twig/Profiler/Node/EnterProfile.php index 69c8f7970..b29ec9b7f 100644 --- a/vendor/twig/twig/lib/Twig/Profiler/Node/EnterProfile.php +++ b/vendor/twig/twig/lib/Twig/Profiler/Node/EnterProfile.php @@ -18,7 +18,7 @@ class Twig_Profiler_Node_EnterProfile extends Twig_Node { public function __construct($extensionName, $type, $name, $varName) { - parent::__construct(array(), array('extension_name' => $extensionName, 'name' => $name, 'type' => $type, 'var_name' => $varName)); + parent::__construct([], ['extension_name' => $extensionName, 'name' => $name, 'type' => $type, 'var_name' => $varName]); } public function compile(Twig_Compiler $compiler) diff --git a/vendor/twig/twig/lib/Twig/Profiler/Node/LeaveProfile.php b/vendor/twig/twig/lib/Twig/Profiler/Node/LeaveProfile.php index d1d6a7cc1..bcb912dd8 100644 --- a/vendor/twig/twig/lib/Twig/Profiler/Node/LeaveProfile.php +++ b/vendor/twig/twig/lib/Twig/Profiler/Node/LeaveProfile.php @@ -18,7 +18,7 @@ class Twig_Profiler_Node_LeaveProfile extends Twig_Node { public function __construct($varName) { - parent::__construct(array(), array('var_name' => $varName)); + parent::__construct([], ['var_name' => $varName]); } public function compile(Twig_Compiler $compiler) diff --git a/vendor/twig/twig/lib/Twig/Profiler/NodeVisitor/Profiler.php b/vendor/twig/twig/lib/Twig/Profiler/NodeVisitor/Profiler.php index 5db41fea7..6cf5bb0e5 100644 --- a/vendor/twig/twig/lib/Twig/Profiler/NodeVisitor/Profiler.php +++ b/vendor/twig/twig/lib/Twig/Profiler/NodeVisitor/Profiler.php @@ -32,22 +32,22 @@ class Twig_Profiler_NodeVisitor_Profiler extends Twig_BaseNodeVisitor { if ($node instanceof Twig_Node_Module) { $varName = $this->getVarName(); - $node->setNode('display_start', new Twig_Node(array(new Twig_Profiler_Node_EnterProfile($this->extensionName, Twig_Profiler_Profile::TEMPLATE, $node->getTemplateName(), $varName), $node->getNode('display_start')))); - $node->setNode('display_end', new Twig_Node(array(new Twig_Profiler_Node_LeaveProfile($varName), $node->getNode('display_end')))); + $node->setNode('display_start', new Twig_Node([new Twig_Profiler_Node_EnterProfile($this->extensionName, Twig_Profiler_Profile::TEMPLATE, $node->getTemplateName(), $varName), $node->getNode('display_start')])); + $node->setNode('display_end', new Twig_Node([new Twig_Profiler_Node_LeaveProfile($varName), $node->getNode('display_end')])); } elseif ($node instanceof Twig_Node_Block) { $varName = $this->getVarName(); - $node->setNode('body', new Twig_Node_Body(array( + $node->setNode('body', new Twig_Node_Body([ new Twig_Profiler_Node_EnterProfile($this->extensionName, Twig_Profiler_Profile::BLOCK, $node->getAttribute('name'), $varName), $node->getNode('body'), new Twig_Profiler_Node_LeaveProfile($varName), - ))); + ])); } elseif ($node instanceof Twig_Node_Macro) { $varName = $this->getVarName(); - $node->setNode('body', new Twig_Node_Body(array( + $node->setNode('body', new Twig_Node_Body([ new Twig_Profiler_Node_EnterProfile($this->extensionName, Twig_Profiler_Profile::MACRO, $node->getAttribute('name'), $varName), $node->getNode('body'), new Twig_Profiler_Node_LeaveProfile($varName), - ))); + ])); } return $node; diff --git a/vendor/twig/twig/lib/Twig/Profiler/Profile.php b/vendor/twig/twig/lib/Twig/Profiler/Profile.php index 3fdc1a8ae..8ba1c4cc9 100644 --- a/vendor/twig/twig/lib/Twig/Profiler/Profile.php +++ b/vendor/twig/twig/lib/Twig/Profiler/Profile.php @@ -24,9 +24,9 @@ class Twig_Profiler_Profile implements IteratorAggregate, Serializable private $template; private $name; private $type; - private $starts = array(); - private $ends = array(); - private $profiles = array(); + private $starts = []; + private $ends = []; + private $profiles = []; public function __construct($template = 'main', $type = self::ROOT, $name = 'main') { @@ -76,7 +76,7 @@ class Twig_Profiler_Profile implements IteratorAggregate, Serializable return $this->profiles; } - public function addProfile(Twig_Profiler_Profile $profile) + public function addProfile(self $profile) { $this->profiles[] = $profile; } @@ -126,11 +126,11 @@ class Twig_Profiler_Profile implements IteratorAggregate, Serializable */ public function enter() { - $this->starts = array( + $this->starts = [ 'wt' => microtime(true), 'mu' => memory_get_usage(), 'pmu' => memory_get_peak_usage(), - ); + ]; } /** @@ -138,16 +138,16 @@ class Twig_Profiler_Profile implements IteratorAggregate, Serializable */ public function leave() { - $this->ends = array( + $this->ends = [ 'wt' => microtime(true), 'mu' => memory_get_usage(), 'pmu' => memory_get_peak_usage(), - ); + ]; } public function reset() { - $this->starts = $this->ends = $this->profiles = array(); + $this->starts = $this->ends = $this->profiles = []; $this->enter(); } @@ -158,7 +158,7 @@ class Twig_Profiler_Profile implements IteratorAggregate, Serializable public function serialize() { - return serialize(array($this->template, $this->name, $this->type, $this->starts, $this->ends, $this->profiles)); + return serialize([$this->template, $this->name, $this->type, $this->starts, $this->ends, $this->profiles]); } public function unserialize($data) diff --git a/vendor/twig/twig/lib/Twig/Sandbox/SecurityPolicy.php b/vendor/twig/twig/lib/Twig/Sandbox/SecurityPolicy.php index dca0b82b5..cf59117b9 100644 --- a/vendor/twig/twig/lib/Twig/Sandbox/SecurityPolicy.php +++ b/vendor/twig/twig/lib/Twig/Sandbox/SecurityPolicy.php @@ -24,7 +24,7 @@ class Twig_Sandbox_SecurityPolicy implements Twig_Sandbox_SecurityPolicyInterfac protected $allowedProperties; protected $allowedFunctions; - public function __construct(array $allowedTags = array(), array $allowedFilters = array(), array $allowedMethods = array(), array $allowedProperties = array(), array $allowedFunctions = array()) + public function __construct(array $allowedTags = [], array $allowedFilters = [], array $allowedMethods = [], array $allowedProperties = [], array $allowedFunctions = []) { $this->allowedTags = $allowedTags; $this->allowedFilters = $allowedFilters; @@ -45,9 +45,9 @@ class Twig_Sandbox_SecurityPolicy implements Twig_Sandbox_SecurityPolicyInterfac public function setAllowedMethods(array $methods) { - $this->allowedMethods = array(); + $this->allowedMethods = []; foreach ($methods as $class => $m) { - $this->allowedMethods[$class] = array_map('strtolower', is_array($m) ? $m : array($m)); + $this->allowedMethods[$class] = array_map('strtolower', is_array($m) ? $m : [$m]); } } @@ -109,7 +109,7 @@ class Twig_Sandbox_SecurityPolicy implements Twig_Sandbox_SecurityPolicyInterfac $allowed = false; foreach ($this->allowedProperties as $class => $properties) { if ($obj instanceof $class) { - $allowed = in_array($property, is_array($properties) ? $properties : array($properties)); + $allowed = in_array($property, is_array($properties) ? $properties : [$properties]); break; } diff --git a/vendor/twig/twig/lib/Twig/SimpleFilter.php b/vendor/twig/twig/lib/Twig/SimpleFilter.php index ee4c0aebf..5c4cfc567 100644 --- a/vendor/twig/twig/lib/Twig/SimpleFilter.php +++ b/vendor/twig/twig/lib/Twig/SimpleFilter.php @@ -21,13 +21,13 @@ class Twig_SimpleFilter protected $name; protected $callable; protected $options; - protected $arguments = array(); + protected $arguments = []; - public function __construct($name, $callable, array $options = array()) + public function __construct($name, $callable, array $options = []) { $this->name = $name; $this->callable = $callable; - $this->options = array_merge(array( + $this->options = array_merge([ 'needs_environment' => false, 'needs_context' => false, 'is_variadic' => false, @@ -38,7 +38,7 @@ class Twig_SimpleFilter 'node_class' => 'Twig_Node_Expression_Filter', 'deprecated' => false, 'alternative' => null, - ), $options); + ], $options); } public function getName() diff --git a/vendor/twig/twig/lib/Twig/SimpleFunction.php b/vendor/twig/twig/lib/Twig/SimpleFunction.php index a6aa7ca74..fbe06b991 100644 --- a/vendor/twig/twig/lib/Twig/SimpleFunction.php +++ b/vendor/twig/twig/lib/Twig/SimpleFunction.php @@ -21,13 +21,13 @@ class Twig_SimpleFunction protected $name; protected $callable; protected $options; - protected $arguments = array(); + protected $arguments = []; - public function __construct($name, $callable, array $options = array()) + public function __construct($name, $callable, array $options = []) { $this->name = $name; $this->callable = $callable; - $this->options = array_merge(array( + $this->options = array_merge([ 'needs_environment' => false, 'needs_context' => false, 'is_variadic' => false, @@ -36,7 +36,7 @@ class Twig_SimpleFunction 'node_class' => 'Twig_Node_Expression_Function', 'deprecated' => false, 'alternative' => null, - ), $options); + ], $options); } public function getName() @@ -84,7 +84,7 @@ class Twig_SimpleFunction return call_user_func($this->options['is_safe_callback'], $functionArgs); } - return array(); + return []; } public function isVariadic() diff --git a/vendor/twig/twig/lib/Twig/SimpleTest.php b/vendor/twig/twig/lib/Twig/SimpleTest.php index fee5778b3..393fad1e0 100644 --- a/vendor/twig/twig/lib/Twig/SimpleTest.php +++ b/vendor/twig/twig/lib/Twig/SimpleTest.php @@ -22,16 +22,18 @@ class Twig_SimpleTest protected $callable; protected $options; - public function __construct($name, $callable, array $options = array()) + private $arguments = []; + + public function __construct($name, $callable, array $options = []) { $this->name = $name; $this->callable = $callable; - $this->options = array_merge(array( + $this->options = array_merge([ 'is_variadic' => false, 'node_class' => 'Twig_Node_Expression_Test', 'deprecated' => false, 'alternative' => null, - ), $options); + ], $options); } public function getName() @@ -68,6 +70,16 @@ class Twig_SimpleTest { return $this->options['alternative']; } + + public function setArguments($arguments) + { + $this->arguments = $arguments; + } + + public function getArguments() + { + return $this->arguments; + } } class_alias('Twig_SimpleTest', 'Twig\TwigTest', false); diff --git a/vendor/twig/twig/lib/Twig/Template.php b/vendor/twig/twig/lib/Twig/Template.php index 3709232af..78a57383f 100644 --- a/vendor/twig/twig/lib/Twig/Template.php +++ b/vendor/twig/twig/lib/Twig/Template.php @@ -26,13 +26,13 @@ abstract class Twig_Template implements Twig_TemplateInterface /** * @internal */ - protected static $cache = array(); + protected static $cache = []; protected $parent; - protected $parents = array(); + protected $parents = []; protected $env; - protected $blocks = array(); - protected $traits = array(); + protected $blocks = []; + protected $traits = []; public function __construct(Twig_Environment $env) { @@ -63,7 +63,7 @@ abstract class Twig_Template implements Twig_TemplateInterface */ public function getDebugInfo() { - return array(); + return []; } /** @@ -108,7 +108,7 @@ abstract class Twig_Template implements Twig_TemplateInterface * * @param array $context * - * @return Twig_TemplateInterface|false The parent template or false if there is no parent + * @return Twig_TemplateInterface|Twig_TemplateWrapper|false The parent template or false if there is no parent * * @internal */ @@ -125,8 +125,8 @@ abstract class Twig_Template implements Twig_TemplateInterface return false; } - if ($parent instanceof self) { - return $this->parents[$parent->getTemplateName()] = $parent; + if ($parent instanceof self || $parent instanceof Twig_TemplateWrapper) { + return $this->parents[$parent->getSourceContext()->getName()] = $parent; } if (!isset($this->parents[$parent])) { @@ -164,7 +164,7 @@ abstract class Twig_Template implements Twig_TemplateInterface * * @internal */ - public function displayParentBlock($name, array $context, array $blocks = array()) + public function displayParentBlock($name, array $context, array $blocks = []) { $name = (string) $name; @@ -190,7 +190,7 @@ abstract class Twig_Template implements Twig_TemplateInterface * * @internal */ - public function displayBlock($name, array $context, array $blocks = array(), $useBlocks = true) + public function displayBlock($name, array $context, array $blocks = [], $useBlocks = true) { $name = (string) $name; @@ -250,7 +250,7 @@ abstract class Twig_Template implements Twig_TemplateInterface * * @internal */ - public function renderParentBlock($name, array $context, array $blocks = array()) + public function renderParentBlock($name, array $context, array $blocks = []) { ob_start(); $this->displayParentBlock($name, $context, $blocks); @@ -273,7 +273,7 @@ abstract class Twig_Template implements Twig_TemplateInterface * * @internal */ - public function renderBlock($name, array $context, array $blocks = array(), $useBlocks = true) + public function renderBlock($name, array $context, array $blocks = [], $useBlocks = true) { ob_start(); $this->displayBlock($name, $context, $blocks, $useBlocks); @@ -295,7 +295,7 @@ abstract class Twig_Template implements Twig_TemplateInterface * * @internal */ - public function hasBlock($name, array $context = null, array $blocks = array()) + public function hasBlock($name, array $context = null, array $blocks = []) { if (null === $context) { @trigger_error('The '.__METHOD__.' method is internal and should never be called; calling it directly is deprecated since version 1.28 and won\'t be possible anymore in 2.0.', E_USER_DEPRECATED); @@ -331,7 +331,7 @@ abstract class Twig_Template implements Twig_TemplateInterface * * @internal */ - public function getBlockNames(array $context = null, array $blocks = array()) + public function getBlockNames(array $context = null, array $blocks = []) { if (null === $context) { @trigger_error('The '.__METHOD__.' method is internal and should never be called; calling it directly is deprecated since version 1.28 and won\'t be possible anymore in 2.0.', E_USER_DEPRECATED); @@ -355,11 +355,7 @@ abstract class Twig_Template implements Twig_TemplateInterface return $this->env->resolveTemplate($template); } - if ($template instanceof self) { - return $template; - } - - if ($template instanceof Twig_TemplateWrapper) { + if ($template instanceof self || $template instanceof Twig_TemplateWrapper) { return $template; } @@ -398,7 +394,7 @@ abstract class Twig_Template implements Twig_TemplateInterface return $this->blocks; } - public function display(array $context, array $blocks = array()) + public function display(array $context, array $blocks = []) { $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks)); } @@ -426,7 +422,7 @@ abstract class Twig_Template implements Twig_TemplateInterface return ob_get_clean(); } - protected function displayWithErrorHandling(array $context, array $blocks = array()) + protected function displayWithErrorHandling(array $context, array $blocks = []) { try { $this->doDisplay($context, $blocks); @@ -454,7 +450,7 @@ abstract class Twig_Template implements Twig_TemplateInterface * @param array $context An array of parameters to pass to the template * @param array $blocks An array of blocks to pass to the template */ - abstract protected function doDisplay(array $context, array $blocks = array()); + abstract protected function doDisplay(array $context, array $blocks = []); /** * Returns a variable from the context. @@ -506,13 +502,13 @@ abstract class Twig_Template implements Twig_TemplateInterface * * @internal */ - protected function getAttribute($object, $item, array $arguments = array(), $type = self::ANY_CALL, $isDefinedTest = false, $ignoreStrictCheck = false) + protected function getAttribute($object, $item, array $arguments = [], $type = self::ANY_CALL, $isDefinedTest = false, $ignoreStrictCheck = false) { // array if (self::METHOD_CALL !== $type) { $arrayItem = is_bool($item) || is_float($item) ? (int) $item : $item; - if ((is_array($object) && (isset($object[$arrayItem]) || array_key_exists($arrayItem, $object))) + if (((is_array($object) || $object instanceof ArrayObject) && (isset($object[$arrayItem]) || array_key_exists($arrayItem, $object))) || ($object instanceof ArrayAccess && isset($object[$arrayItem])) ) { if ($isDefinedTest) { @@ -599,7 +595,7 @@ abstract class Twig_Template implements Twig_TemplateInterface // get_class_methods returns all methods accessible in the scope, but we only want public ones to be accessible in templates if ($object instanceof self) { $ref = new ReflectionClass($class); - $methods = array(); + $methods = []; foreach ($ref->getMethods(ReflectionMethod::IS_PUBLIC) as $refMethod) { // Accessing the environment from templates is forbidden to prevent untrusted changes to the environment @@ -613,7 +609,7 @@ abstract class Twig_Template implements Twig_TemplateInterface // sort values to have consistent behavior, so that "get" methods win precedence over "is" methods sort($methods); - $cache = array(); + $cache = []; foreach ($methods as $method) { $cache[$method] = $method; @@ -676,7 +672,7 @@ abstract class Twig_Template implements Twig_TemplateInterface if (!$arguments) { $ret = $object->$method(); } else { - $ret = call_user_func_array(array($object, $method), $arguments); + $ret = call_user_func_array([$object, $method], $arguments); } } catch (BadMethodCallException $e) { if ($call && ($ignoreStrictCheck || !$this->env->isStrictVariables())) { diff --git a/vendor/twig/twig/lib/Twig/TemplateInterface.php b/vendor/twig/twig/lib/Twig/TemplateInterface.php index 457ef7d7b..4ab9c5701 100644 --- a/vendor/twig/twig/lib/Twig/TemplateInterface.php +++ b/vendor/twig/twig/lib/Twig/TemplateInterface.php @@ -37,7 +37,7 @@ interface Twig_TemplateInterface * @param array $context An array of parameters to pass to the template * @param array $blocks An array of blocks to pass to the template */ - public function display(array $context, array $blocks = array()); + public function display(array $context, array $blocks = []); /** * Returns the bound environment for this template. diff --git a/vendor/twig/twig/lib/Twig/TemplateWrapper.php b/vendor/twig/twig/lib/Twig/TemplateWrapper.php index 497f6e980..430e91c56 100644 --- a/vendor/twig/twig/lib/Twig/TemplateWrapper.php +++ b/vendor/twig/twig/lib/Twig/TemplateWrapper.php @@ -38,9 +38,11 @@ final class Twig_TemplateWrapper * * @return string The rendered template */ - public function render($context = array()) + public function render($context = []) { - return $this->template->render($context); + // using func_get_args() allows to not expose the blocks argument + // as it should only be used by internal code + return $this->template->render($context, func_num_args() > 1 ? func_get_arg(1) : []); } /** @@ -48,9 +50,11 @@ final class Twig_TemplateWrapper * * @param array $context An array of parameters to pass to the template */ - public function display($context = array()) + public function display($context = []) { - $this->template->display($context); + // using func_get_args() allows to not expose the blocks argument + // as it should only be used by internal code + $this->template->display($context, func_num_args() >= 1 ? func_get_arg(1) : []); } /** @@ -61,7 +65,7 @@ final class Twig_TemplateWrapper * * @return bool */ - public function hasBlock($name, $context = array()) + public function hasBlock($name, $context = []) { return $this->template->hasBlock($name, $context); } @@ -73,7 +77,7 @@ final class Twig_TemplateWrapper * * @return string[] An array of defined template block names */ - public function getBlockNames($context = array()) + public function getBlockNames($context = []) { return $this->template->getBlockNames($context); } @@ -86,7 +90,7 @@ final class Twig_TemplateWrapper * * @return string The rendered block */ - public function renderBlock($name, $context = array()) + public function renderBlock($name, $context = []) { $context = $this->env->mergeGlobals($context); $level = ob_get_level(); @@ -116,7 +120,7 @@ final class Twig_TemplateWrapper * @param string $name The block name to render * @param array $context An array of parameters to pass to the template */ - public function displayBlock($name, $context = array()) + public function displayBlock($name, $context = []) { $this->template->displayBlock($name, $this->env->mergeGlobals($context)); } diff --git a/vendor/twig/twig/lib/Twig/Test.php b/vendor/twig/twig/lib/Twig/Test.php index b450ec625..539664426 100644 --- a/vendor/twig/twig/lib/Twig/Test.php +++ b/vendor/twig/twig/lib/Twig/Test.php @@ -21,13 +21,13 @@ abstract class Twig_Test implements Twig_TestInterface, Twig_TestCallableInterface { protected $options; - protected $arguments = array(); + protected $arguments = []; - public function __construct(array $options = array()) + public function __construct(array $options = []) { - $this->options = array_merge(array( + $this->options = array_merge([ 'callable' => null, - ), $options); + ], $options); } public function getCallable() diff --git a/vendor/twig/twig/lib/Twig/Test/Function.php b/vendor/twig/twig/lib/Twig/Test/Function.php index 9e83c3f84..f34fb0530 100644 --- a/vendor/twig/twig/lib/Twig/Test/Function.php +++ b/vendor/twig/twig/lib/Twig/Test/Function.php @@ -22,7 +22,7 @@ class Twig_Test_Function extends Twig_Test { protected $function; - public function __construct($function, array $options = array()) + public function __construct($function, array $options = []) { $options['callable'] = $function; diff --git a/vendor/twig/twig/lib/Twig/Test/IntegrationTestCase.php b/vendor/twig/twig/lib/Twig/Test/IntegrationTestCase.php index 382a3f2a2..31db139c6 100644 --- a/vendor/twig/twig/lib/Twig/Test/IntegrationTestCase.php +++ b/vendor/twig/twig/lib/Twig/Test/IntegrationTestCase.php @@ -29,7 +29,7 @@ abstract class Twig_Test_IntegrationTestCase extends TestCase */ protected function getRuntimeLoaders() { - return array(); + return []; } /** @@ -37,7 +37,7 @@ abstract class Twig_Test_IntegrationTestCase extends TestCase */ protected function getExtensions() { - return array(); + return []; } /** @@ -45,7 +45,7 @@ abstract class Twig_Test_IntegrationTestCase extends TestCase */ protected function getTwigFilters() { - return array(); + return []; } /** @@ -53,7 +53,7 @@ abstract class Twig_Test_IntegrationTestCase extends TestCase */ protected function getTwigFunctions() { - return array(); + return []; } /** @@ -61,7 +61,7 @@ abstract class Twig_Test_IntegrationTestCase extends TestCase */ protected function getTwigTests() { - return array(); + return []; } /** @@ -84,7 +84,7 @@ abstract class Twig_Test_IntegrationTestCase extends TestCase public function getTests($name, $legacyTests = false) { $fixturesDir = realpath($this->getFixturesDir()); - $tests = array(); + $tests = []; foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($fixturesDir), RecursiveIteratorIterator::LEAVES_ONLY) as $file) { if (!preg_match('/\.test$/', $file)) { @@ -102,7 +102,7 @@ abstract class Twig_Test_IntegrationTestCase extends TestCase $condition = $match[2]; $templates = self::parseTemplates($match[3]); $exception = $match[5]; - $outputs = array(array(null, $match[4], null, '')); + $outputs = [[null, $match[4], null, '']]; } elseif (preg_match('/--TEST--\s*(.*?)\s*(?:--CONDITION--\s*(.*))?\s*((?:--TEMPLATE(?:\(.*?\))?--(?:.*?))+)--DATA--.*?--EXPECT--.*/s', $test, $match)) { $message = $match[1]; $condition = $match[2]; @@ -113,12 +113,12 @@ abstract class Twig_Test_IntegrationTestCase extends TestCase throw new InvalidArgumentException(sprintf('Test "%s" is not valid.', str_replace($fixturesDir.'/', '', $file))); } - $tests[] = array(str_replace($fixturesDir.'/', '', $file), $message, $condition, $templates, $exception, $outputs); + $tests[] = [str_replace($fixturesDir.'/', '', $file), $message, $condition, $templates, $exception, $outputs]; } if ($legacyTests && empty($tests)) { // add a dummy test to avoid a PHPUnit message - return array(array('not', '-', '', array(), '', array())); + return [['not', '-', '', [], '', []]]; } return $tests; @@ -145,10 +145,10 @@ abstract class Twig_Test_IntegrationTestCase extends TestCase $loader = new Twig_Loader_Array($templates); foreach ($outputs as $i => $match) { - $config = array_merge(array( + $config = array_merge([ 'cache' => false, 'strict_variables' => true, - ), $match[2] ? eval($match[2].';') : array()); + ], $match[2] ? eval($match[2].';') : []); $twig = new Twig_Environment($loader, $config); $twig->addGlobal('global', 'global'); foreach ($this->getRuntimeLoaders() as $runtimeLoader) { @@ -171,13 +171,9 @@ abstract class Twig_Test_IntegrationTestCase extends TestCase $twig->addFunction($function); } - // avoid using the same PHP class name for different cases - // only for PHP 5.2+ - if (PHP_VERSION_ID >= 50300) { - $p = new ReflectionProperty($twig, 'templateClassPrefix'); - $p->setAccessible(true); - $p->setValue($twig, '__TwigTemplate_'.hash('sha256', uniqid(mt_rand(), true), false).'_'); - } + $p = new ReflectionProperty($twig, 'templateClassPrefix'); + $p->setAccessible(true); + $p->setValue($twig, '__TwigTemplate_'.hash('sha256', uniqid(mt_rand(), true), false).'_'); try { $template = $twig->loadTemplate('index.twig'); @@ -236,7 +232,7 @@ abstract class Twig_Test_IntegrationTestCase extends TestCase protected static function parseTemplates($test) { - $templates = array(); + $templates = []; preg_match_all('/--TEMPLATE(?:\((.*?)\))?--(.*?)(?=\-\-TEMPLATE|$)/s', $test, $matches, PREG_SET_ORDER); foreach ($matches as $match) { $templates[($match[1] ? $match[1] : 'index.twig')] = $match[2]; diff --git a/vendor/twig/twig/lib/Twig/Test/Method.php b/vendor/twig/twig/lib/Twig/Test/Method.php index feccd5db3..6949bb23b 100644 --- a/vendor/twig/twig/lib/Twig/Test/Method.php +++ b/vendor/twig/twig/lib/Twig/Test/Method.php @@ -23,9 +23,9 @@ class Twig_Test_Method extends Twig_Test protected $extension; protected $method; - public function __construct(Twig_ExtensionInterface $extension, $method, array $options = array()) + public function __construct(Twig_ExtensionInterface $extension, $method, array $options = []) { - $options['callable'] = array($extension, $method); + $options['callable'] = [$extension, $method]; parent::__construct($options); diff --git a/vendor/twig/twig/lib/Twig/Test/Node.php b/vendor/twig/twig/lib/Twig/Test/Node.php index 6098a5275..6b5de1597 100644 --- a/vendor/twig/twig/lib/Twig/Test/Node.php +++ b/vendor/twig/twig/lib/Twig/Test/Node.php @@ -22,7 +22,7 @@ class Twig_Test_Node extends Twig_Test { protected $class; - public function __construct($class, array $options = array()) + public function __construct($class, array $options = []) { parent::__construct($options); diff --git a/vendor/twig/twig/lib/Twig/Test/NodeTestCase.php b/vendor/twig/twig/lib/Twig/Test/NodeTestCase.php index 479426757..a20fbbacd 100644 --- a/vendor/twig/twig/lib/Twig/Test/NodeTestCase.php +++ b/vendor/twig/twig/lib/Twig/Test/NodeTestCase.php @@ -42,7 +42,7 @@ abstract class Twig_Test_NodeTestCase extends TestCase protected function getEnvironment() { - return new Twig_Environment(new Twig_Loader_Array(array())); + return new Twig_Environment(new Twig_Loader_Array([])); } protected function getVariableGetter($name, $line = false) diff --git a/vendor/twig/twig/lib/Twig/TokenParser/AutoEscape.php b/vendor/twig/twig/lib/Twig/TokenParser/AutoEscape.php index a20dedd18..0a3ba099c 100644 --- a/vendor/twig/twig/lib/Twig/TokenParser/AutoEscape.php +++ b/vendor/twig/twig/lib/Twig/TokenParser/AutoEscape.php @@ -63,7 +63,7 @@ class Twig_TokenParser_AutoEscape extends Twig_TokenParser } $stream->expect(Twig_Token::BLOCK_END_TYPE); - $body = $this->parser->subparse(array($this, 'decideBlockEnd'), true); + $body = $this->parser->subparse([$this, 'decideBlockEnd'], true); $stream->expect(Twig_Token::BLOCK_END_TYPE); return new Twig_Node_AutoEscape($value, $body, $lineno, $this->getTag()); diff --git a/vendor/twig/twig/lib/Twig/TokenParser/Block.php b/vendor/twig/twig/lib/Twig/TokenParser/Block.php index f30f86b58..2f833157a 100644 --- a/vendor/twig/twig/lib/Twig/TokenParser/Block.php +++ b/vendor/twig/twig/lib/Twig/TokenParser/Block.php @@ -32,12 +32,12 @@ class Twig_TokenParser_Block extends Twig_TokenParser if ($this->parser->hasBlock($name)) { throw new Twig_Error_Syntax(sprintf("The block '%s' has already been defined line %d.", $name, $this->parser->getBlock($name)->getTemplateLine()), $stream->getCurrent()->getLine(), $stream->getSourceContext()); } - $this->parser->setBlock($name, $block = new Twig_Node_Block($name, new Twig_Node(array()), $lineno)); + $this->parser->setBlock($name, $block = new Twig_Node_Block($name, new Twig_Node([]), $lineno)); $this->parser->pushLocalScope(); $this->parser->pushBlockStack($name); if ($stream->nextIf(Twig_Token::BLOCK_END_TYPE)) { - $body = $this->parser->subparse(array($this, 'decideBlockEnd'), true); + $body = $this->parser->subparse([$this, 'decideBlockEnd'], true); if ($token = $stream->nextIf(Twig_Token::NAME_TYPE)) { $value = $token->getValue(); @@ -46,9 +46,9 @@ class Twig_TokenParser_Block extends Twig_TokenParser } } } else { - $body = new Twig_Node(array( + $body = new Twig_Node([ new Twig_Node_Print($this->parser->getExpressionParser()->parseExpression(), $lineno), - )); + ]); } $stream->expect(Twig_Token::BLOCK_END_TYPE); diff --git a/vendor/twig/twig/lib/Twig/TokenParser/Deprecated.php b/vendor/twig/twig/lib/Twig/TokenParser/Deprecated.php new file mode 100644 index 000000000..be5d54960 --- /dev/null +++ b/vendor/twig/twig/lib/Twig/TokenParser/Deprecated.php @@ -0,0 +1,42 @@ + + * {% deprecated 'The "base.twig" template is deprecated, use "layout.twig" instead.' %} + * + * {% extends 'layout.html.twig' %} + * + * + * @author Yonel Ceruto + * + * @final + */ +class Twig_TokenParser_Deprecated extends Twig_TokenParser +{ + public function parse(Twig_Token $token) + { + $expr = $this->parser->getExpressionParser()->parseExpression(); + + $this->parser->getStream()->expect(Twig_Token::BLOCK_END_TYPE); + + return new Twig_Node_Deprecated($expr, $token->getLine(), $this->getTag()); + } + + public function getTag() + { + return 'deprecated'; + } +} + +class_alias('Twig_TokenParser_Deprecated', 'Twig\TokenParser\DeprecatedTokenParser', false); diff --git a/vendor/twig/twig/lib/Twig/TokenParser/Embed.php b/vendor/twig/twig/lib/Twig/TokenParser/Embed.php index 44644cc6b..62ad91709 100644 --- a/vendor/twig/twig/lib/Twig/TokenParser/Embed.php +++ b/vendor/twig/twig/lib/Twig/TokenParser/Embed.php @@ -32,14 +32,14 @@ class Twig_TokenParser_Embed extends Twig_TokenParser_Include } // inject a fake parent to make the parent() function work - $stream->injectTokens(array( + $stream->injectTokens([ new Twig_Token(Twig_Token::BLOCK_START_TYPE, '', $token->getLine()), new Twig_Token(Twig_Token::NAME_TYPE, 'extends', $token->getLine()), $parentToken, new Twig_Token(Twig_Token::BLOCK_END_TYPE, '', $token->getLine()), - )); + ]); - $module = $this->parser->parse($stream, array($this, 'decideBlockEnd'), true); + $module = $this->parser->parse($stream, [$this, 'decideBlockEnd'], true); // override the parent with the correct one if ($fakeParentToken === $parentToken) { diff --git a/vendor/twig/twig/lib/Twig/TokenParser/Filter.php b/vendor/twig/twig/lib/Twig/TokenParser/Filter.php index 760178293..e956d04b9 100644 --- a/vendor/twig/twig/lib/Twig/TokenParser/Filter.php +++ b/vendor/twig/twig/lib/Twig/TokenParser/Filter.php @@ -30,7 +30,7 @@ class Twig_TokenParser_Filter extends Twig_TokenParser $filter = $this->parser->getExpressionParser()->parseFilterExpressionRaw($ref, $this->getTag()); $this->parser->getStream()->expect(Twig_Token::BLOCK_END_TYPE); - $body = $this->parser->subparse(array($this, 'decideBlockEnd'), true); + $body = $this->parser->subparse([$this, 'decideBlockEnd'], true); $this->parser->getStream()->expect(Twig_Token::BLOCK_END_TYPE); $block = new Twig_Node_Block($name, $body, $token->getLine()); diff --git a/vendor/twig/twig/lib/Twig/TokenParser/For.php b/vendor/twig/twig/lib/Twig/TokenParser/For.php index 8e737c5fa..fecf58b1e 100644 --- a/vendor/twig/twig/lib/Twig/TokenParser/For.php +++ b/vendor/twig/twig/lib/Twig/TokenParser/For.php @@ -39,10 +39,10 @@ class Twig_TokenParser_For extends Twig_TokenParser } $stream->expect(Twig_Token::BLOCK_END_TYPE); - $body = $this->parser->subparse(array($this, 'decideForFork')); + $body = $this->parser->subparse([$this, 'decideForFork']); if ('else' == $stream->next()->getValue()) { $stream->expect(Twig_Token::BLOCK_END_TYPE); - $else = $this->parser->subparse(array($this, 'decideForEnd'), true); + $else = $this->parser->subparse([$this, 'decideForEnd'], true); } else { $else = null; } @@ -69,7 +69,7 @@ class Twig_TokenParser_For extends Twig_TokenParser public function decideForFork(Twig_Token $token) { - return $token->test(array('else', 'endfor')); + return $token->test(['else', 'endfor']); } public function decideForEnd(Twig_Token $token) @@ -99,7 +99,7 @@ class Twig_TokenParser_For extends Twig_TokenParser { if ($node instanceof Twig_Node_Expression_GetAttr && $node->getNode('node') instanceof Twig_Node_Expression_Name && 'loop' == $node->getNode('node')->getAttribute('name')) { $attribute = $node->getNode('attribute'); - if ($attribute instanceof Twig_Node_Expression_Constant && in_array($attribute->getAttribute('value'), array('length', 'revindex0', 'revindex', 'last'))) { + if ($attribute instanceof Twig_Node_Expression_Constant && in_array($attribute->getAttribute('value'), ['length', 'revindex0', 'revindex', 'last'])) { throw new Twig_Error_Syntax(sprintf('The "loop.%s" variable is not defined when looping with a condition.', $attribute->getAttribute('value')), $node->getTemplateLine(), $stream->getSourceContext()); } } diff --git a/vendor/twig/twig/lib/Twig/TokenParser/From.php b/vendor/twig/twig/lib/Twig/TokenParser/From.php index f3053da4b..234301b0f 100644 --- a/vendor/twig/twig/lib/Twig/TokenParser/From.php +++ b/vendor/twig/twig/lib/Twig/TokenParser/From.php @@ -26,7 +26,7 @@ class Twig_TokenParser_From extends Twig_TokenParser $stream = $this->parser->getStream(); $stream->expect('import'); - $targets = array(); + $targets = []; do { $name = $stream->expect(Twig_Token::NAME_TYPE)->getValue(); diff --git a/vendor/twig/twig/lib/Twig/TokenParser/If.php b/vendor/twig/twig/lib/Twig/TokenParser/If.php index f081df3ab..ba48e27f7 100644 --- a/vendor/twig/twig/lib/Twig/TokenParser/If.php +++ b/vendor/twig/twig/lib/Twig/TokenParser/If.php @@ -33,8 +33,8 @@ class Twig_TokenParser_If extends Twig_TokenParser $expr = $this->parser->getExpressionParser()->parseExpression(); $stream = $this->parser->getStream(); $stream->expect(Twig_Token::BLOCK_END_TYPE); - $body = $this->parser->subparse(array($this, 'decideIfFork')); - $tests = array($expr, $body); + $body = $this->parser->subparse([$this, 'decideIfFork']); + $tests = [$expr, $body]; $else = null; $end = false; @@ -42,13 +42,13 @@ class Twig_TokenParser_If extends Twig_TokenParser switch ($stream->next()->getValue()) { case 'else': $stream->expect(Twig_Token::BLOCK_END_TYPE); - $else = $this->parser->subparse(array($this, 'decideIfEnd')); + $else = $this->parser->subparse([$this, 'decideIfEnd']); break; case 'elseif': $expr = $this->parser->getExpressionParser()->parseExpression(); $stream->expect(Twig_Token::BLOCK_END_TYPE); - $body = $this->parser->subparse(array($this, 'decideIfFork')); + $body = $this->parser->subparse([$this, 'decideIfFork']); $tests[] = $expr; $tests[] = $body; break; @@ -69,12 +69,12 @@ class Twig_TokenParser_If extends Twig_TokenParser public function decideIfFork(Twig_Token $token) { - return $token->test(array('elseif', 'else', 'endif')); + return $token->test(['elseif', 'else', 'endif']); } public function decideIfEnd(Twig_Token $token) { - return $token->test(array('endif')); + return $token->test(['endif']); } public function getTag() diff --git a/vendor/twig/twig/lib/Twig/TokenParser/Include.php b/vendor/twig/twig/lib/Twig/TokenParser/Include.php index 309f11db4..483f10781 100644 --- a/vendor/twig/twig/lib/Twig/TokenParser/Include.php +++ b/vendor/twig/twig/lib/Twig/TokenParser/Include.php @@ -53,7 +53,7 @@ class Twig_TokenParser_Include extends Twig_TokenParser $stream->expect(Twig_Token::BLOCK_END_TYPE); - return array($variables, $only, $ignoreMissing); + return [$variables, $only, $ignoreMissing]; } public function getTag() diff --git a/vendor/twig/twig/lib/Twig/TokenParser/Macro.php b/vendor/twig/twig/lib/Twig/TokenParser/Macro.php index 4287934ba..fa55a7c2f 100644 --- a/vendor/twig/twig/lib/Twig/TokenParser/Macro.php +++ b/vendor/twig/twig/lib/Twig/TokenParser/Macro.php @@ -32,7 +32,7 @@ class Twig_TokenParser_Macro extends Twig_TokenParser $stream->expect(Twig_Token::BLOCK_END_TYPE); $this->parser->pushLocalScope(); - $body = $this->parser->subparse(array($this, 'decideBlockEnd'), true); + $body = $this->parser->subparse([$this, 'decideBlockEnd'], true); if ($token = $stream->nextIf(Twig_Token::NAME_TYPE)) { $value = $token->getValue(); @@ -43,7 +43,7 @@ class Twig_TokenParser_Macro extends Twig_TokenParser $this->parser->popLocalScope(); $stream->expect(Twig_Token::BLOCK_END_TYPE); - $this->parser->setMacro($name, new Twig_Node_Macro($name, new Twig_Node_Body(array($body)), $arguments, $lineno, $this->getTag())); + $this->parser->setMacro($name, new Twig_Node_Macro($name, new Twig_Node_Body([$body]), $arguments, $lineno, $this->getTag())); } public function decideBlockEnd(Twig_Token $token) diff --git a/vendor/twig/twig/lib/Twig/TokenParser/Sandbox.php b/vendor/twig/twig/lib/Twig/TokenParser/Sandbox.php index 7fc70d9a0..5161458a0 100644 --- a/vendor/twig/twig/lib/Twig/TokenParser/Sandbox.php +++ b/vendor/twig/twig/lib/Twig/TokenParser/Sandbox.php @@ -28,7 +28,7 @@ class Twig_TokenParser_Sandbox extends Twig_TokenParser { $stream = $this->parser->getStream(); $stream->expect(Twig_Token::BLOCK_END_TYPE); - $body = $this->parser->subparse(array($this, 'decideBlockEnd'), true); + $body = $this->parser->subparse([$this, 'decideBlockEnd'], true); $stream->expect(Twig_Token::BLOCK_END_TYPE); // in a sandbox tag, only include tags are allowed diff --git a/vendor/twig/twig/lib/Twig/TokenParser/Set.php b/vendor/twig/twig/lib/Twig/TokenParser/Set.php index 48c6b3aeb..a69294780 100644 --- a/vendor/twig/twig/lib/Twig/TokenParser/Set.php +++ b/vendor/twig/twig/lib/Twig/TokenParser/Set.php @@ -54,7 +54,7 @@ class Twig_TokenParser_Set extends Twig_TokenParser $stream->expect(Twig_Token::BLOCK_END_TYPE); - $values = $this->parser->subparse(array($this, 'decideBlockEnd'), true); + $values = $this->parser->subparse([$this, 'decideBlockEnd'], true); $stream->expect(Twig_Token::BLOCK_END_TYPE); } diff --git a/vendor/twig/twig/lib/Twig/TokenParser/Spaceless.php b/vendor/twig/twig/lib/Twig/TokenParser/Spaceless.php index cecf27c67..934717ce1 100644 --- a/vendor/twig/twig/lib/Twig/TokenParser/Spaceless.php +++ b/vendor/twig/twig/lib/Twig/TokenParser/Spaceless.php @@ -31,7 +31,7 @@ class Twig_TokenParser_Spaceless extends Twig_TokenParser $lineno = $token->getLine(); $this->parser->getStream()->expect(Twig_Token::BLOCK_END_TYPE); - $body = $this->parser->subparse(array($this, 'decideSpacelessEnd'), true); + $body = $this->parser->subparse([$this, 'decideSpacelessEnd'], true); $this->parser->getStream()->expect(Twig_Token::BLOCK_END_TYPE); return new Twig_Node_Spaceless($body, $lineno, $this->getTag()); diff --git a/vendor/twig/twig/lib/Twig/TokenParser/Use.php b/vendor/twig/twig/lib/Twig/TokenParser/Use.php index 1ab24e2c6..fc4471f6b 100644 --- a/vendor/twig/twig/lib/Twig/TokenParser/Use.php +++ b/vendor/twig/twig/lib/Twig/TokenParser/Use.php @@ -36,7 +36,7 @@ class Twig_TokenParser_Use extends Twig_TokenParser throw new Twig_Error_Syntax('The template references in a "use" statement must be a string.', $stream->getCurrent()->getLine(), $stream->getSourceContext()); } - $targets = array(); + $targets = []; if ($stream->nextIf('with')) { do { $name = $stream->expect(Twig_Token::NAME_TYPE)->getValue(); @@ -56,7 +56,7 @@ class Twig_TokenParser_Use extends Twig_TokenParser $stream->expect(Twig_Token::BLOCK_END_TYPE); - $this->parser->addTrait(new Twig_Node(array('template' => $template, 'targets' => new Twig_Node($targets)))); + $this->parser->addTrait(new Twig_Node(['template' => $template, 'targets' => new Twig_Node($targets)])); return new Twig_Node(); } diff --git a/vendor/twig/twig/lib/Twig/TokenParser/With.php b/vendor/twig/twig/lib/Twig/TokenParser/With.php index 7a692597c..34a081220 100644 --- a/vendor/twig/twig/lib/Twig/TokenParser/With.php +++ b/vendor/twig/twig/lib/Twig/TokenParser/With.php @@ -31,7 +31,7 @@ class Twig_TokenParser_With extends Twig_TokenParser $stream->expect(Twig_Token::BLOCK_END_TYPE); - $body = $this->parser->subparse(array($this, 'decideWithEnd'), true); + $body = $this->parser->subparse([$this, 'decideWithEnd'], true); $stream->expect(Twig_Token::BLOCK_END_TYPE); diff --git a/vendor/twig/twig/lib/Twig/TokenParserBroker.php b/vendor/twig/twig/lib/Twig/TokenParserBroker.php index 0d7d6e52a..c90a3c6b1 100644 --- a/vendor/twig/twig/lib/Twig/TokenParserBroker.php +++ b/vendor/twig/twig/lib/Twig/TokenParserBroker.php @@ -20,15 +20,15 @@ class Twig_TokenParserBroker implements Twig_TokenParserBrokerInterface { protected $parser; - protected $parsers = array(); - protected $brokers = array(); + protected $parsers = []; + protected $brokers = []; /** * @param array|Traversable $parsers A Traversable of Twig_TokenParserInterface instances * @param array|Traversable $brokers A Traversable of Twig_TokenParserBrokerInterface instances * @param bool $triggerDeprecationError */ - public function __construct($parsers = array(), $brokers = array(), $triggerDeprecationError = true) + public function __construct($parsers = [], $brokers = [], $triggerDeprecationError = true) { if ($triggerDeprecationError) { @trigger_error('The '.__CLASS__.' class is deprecated since version 1.12 and will be removed in 2.0.', E_USER_DEPRECATED); @@ -80,7 +80,7 @@ class Twig_TokenParserBroker implements Twig_TokenParserBrokerInterface * * @param string $tag A tag name * - * @return null|Twig_TokenParserInterface A Twig_TokenParserInterface or null if no suitable TokenParser was found + * @return Twig_TokenParserInterface|null A Twig_TokenParserInterface or null if no suitable TokenParser was found */ public function getTokenParser($tag) { diff --git a/vendor/twig/twig/lib/Twig/TokenParserBrokerInterface.php b/vendor/twig/twig/lib/Twig/TokenParserBrokerInterface.php index 6c93f5ea1..c239c2ec8 100644 --- a/vendor/twig/twig/lib/Twig/TokenParserBrokerInterface.php +++ b/vendor/twig/twig/lib/Twig/TokenParserBrokerInterface.php @@ -38,7 +38,7 @@ interface Twig_TokenParserBrokerInterface /** * Gets the Twig_ParserInterface. * - * @return null|Twig_ParserInterface A Twig_ParserInterface instance or null + * @return Twig_ParserInterface|null A Twig_ParserInterface instance or null */ public function getParser(); } diff --git a/vendor/twig/twig/lib/Twig/Util/DeprecationCollector.php b/vendor/twig/twig/lib/Twig/Util/DeprecationCollector.php index c7bf53be2..b6cccf241 100644 --- a/vendor/twig/twig/lib/Twig/Util/DeprecationCollector.php +++ b/vendor/twig/twig/lib/Twig/Util/DeprecationCollector.php @@ -52,9 +52,9 @@ class Twig_Util_DeprecationCollector */ public function collect(Traversable $iterator) { - $this->deprecations = array(); + $this->deprecations = []; - set_error_handler(array($this, 'errorHandler')); + set_error_handler([$this, 'errorHandler']); foreach ($iterator as $name => $contents) { try { @@ -67,7 +67,7 @@ class Twig_Util_DeprecationCollector restore_error_handler(); $deprecations = $this->deprecations; - $this->deprecations = array(); + $this->deprecations = []; return $deprecations; } diff --git a/vendor/twig/twig/src/Extension/GlobalsInterface.php b/vendor/twig/twig/src/Extension/GlobalsInterface.php index 024f314d9..c170068aa 100644 --- a/vendor/twig/twig/src/Extension/GlobalsInterface.php +++ b/vendor/twig/twig/src/Extension/GlobalsInterface.php @@ -5,7 +5,7 @@ namespace Twig\Extension; class_exists('Twig_Extension_GlobalsInterface'); if (\false) { - interface GlobalsInterface extends \Twig_Extension_ExtensionInterface + interface GlobalsInterface extends \Twig_Extension_GlobalsInterface { } } diff --git a/vendor/twig/twig/src/Node/DeprecatedNode.php b/vendor/twig/twig/src/Node/DeprecatedNode.php new file mode 100644 index 000000000..0c0e1b0a9 --- /dev/null +++ b/vendor/twig/twig/src/Node/DeprecatedNode.php @@ -0,0 +1,11 @@ + $this->classname, - )); + ]); } } diff --git a/vendor/twig/twig/test/Twig/Tests/CompilerTest.php b/vendor/twig/twig/test/Twig/Tests/CompilerTest.php index 4d4b8df9e..62f2c36c8 100644 --- a/vendor/twig/twig/test/Twig/Tests/CompilerTest.php +++ b/vendor/twig/twig/test/Twig/Tests/CompilerTest.php @@ -20,7 +20,7 @@ class Twig_Tests_CompilerTest extends \PHPUnit\Framework\TestCase $this->markTestSkipped('Your platform does not support locales.'); } - $required_locales = array('fr_FR.UTF-8', 'fr_FR.UTF8', 'fr_FR.utf-8', 'fr_FR.utf8', 'French_France.1252'); + $required_locales = ['fr_FR.UTF-8', 'fr_FR.UTF8', 'fr_FR.utf-8', 'fr_FR.utf8', 'French_France.1252']; if (false === setlocale(LC_NUMERIC, $required_locales)) { $this->markTestSkipped('Could not set any of required locales: '.implode(', ', $required_locales)); } diff --git a/vendor/twig/twig/test/Twig/Tests/CustomExtensionTest.php b/vendor/twig/twig/test/Twig/Tests/CustomExtensionTest.php index f9d44fda5..837c5a74e 100644 --- a/vendor/twig/twig/test/Twig/Tests/CustomExtensionTest.php +++ b/vendor/twig/twig/test/Twig/Tests/CustomExtensionTest.php @@ -31,10 +31,10 @@ class CustomExtensionTest extends \PHPUnit\Framework\TestCase public function provideInvalidExtensions() { - return array( - array(new InvalidOperatorExtension(new stdClass()), '"InvalidOperatorExtension::getOperators()" must return an array with operators, got "stdClass".'), - array(new InvalidOperatorExtension(array(1, 2, 3)), '"InvalidOperatorExtension::getOperators()" must return an array of 2 elements, got 3.'), - ); + return [ + [new InvalidOperatorExtension(new stdClass()), '"InvalidOperatorExtension::getOperators()" must return an array with operators, got "stdClass".'], + [new InvalidOperatorExtension([1, 2, 3]), '"InvalidOperatorExtension::getOperators()" must return an array of 2 elements, got 3.'], + ]; } } @@ -53,32 +53,32 @@ class InvalidOperatorExtension implements Twig_ExtensionInterface public function getTokenParsers() { - return array(); + return []; } public function getNodeVisitors() { - return array(); + return []; } public function getFilters() { - return array(); + return []; } public function getTests() { - return array(); + return []; } public function getFunctions() { - return array(); + return []; } public function getGlobals() { - return array(); + return []; } public function getOperators() diff --git a/vendor/twig/twig/test/Twig/Tests/EnvironmentTest.php b/vendor/twig/twig/test/Twig/Tests/EnvironmentTest.php index dd8dac9ad..830d26900 100644 --- a/vendor/twig/twig/test/Twig/Tests/EnvironmentTest.php +++ b/vendor/twig/twig/test/Twig/Tests/EnvironmentTest.php @@ -13,7 +13,7 @@ require_once dirname(__FILE__).'/FilesystemHelper.php'; class Twig_Tests_EnvironmentTest extends \PHPUnit\Framework\TestCase { - private $deprecations = array(); + private $deprecations = []; /** * @group legacy @@ -31,7 +31,7 @@ class Twig_Tests_EnvironmentTest extends \PHPUnit\Framework\TestCase */ public function testLegacyCompileSourceSignature() { - $loader = new Twig_Loader_Array(array('foo' => '{{ foo }}')); + $loader = new Twig_Loader_Array(['foo' => '{{ foo }}']); $env = new Twig_Environment($loader); $this->assertContains('getTemplateName', $env->compileSource('{{ foo }}', 'foo')); } @@ -49,19 +49,19 @@ class Twig_Tests_EnvironmentTest extends \PHPUnit\Framework\TestCase public function testAutoescapeOption() { - $loader = new Twig_Loader_Array(array( + $loader = new Twig_Loader_Array([ 'html' => '{{ foo }} {{ foo }}', 'js' => '{{ bar }} {{ bar }}', - )); + ]); - $twig = new Twig_Environment($loader, array( + $twig = new Twig_Environment($loader, [ 'debug' => true, 'cache' => false, - 'autoescape' => array($this, 'escapingStrategyCallback'), - )); + 'autoescape' => [$this, 'escapingStrategyCallback'], + ]); - $this->assertEquals('foo<br/ > foo<br/ >', $twig->render('html', array('foo' => 'foo
'))); - $this->assertEquals('foo\u003Cbr\/\u0020\u003E foo\u003Cbr\/\u0020\u003E', $twig->render('js', array('bar' => 'foo
'))); + $this->assertEquals('foo<br/ > foo<br/ >', $twig->render('html', ['foo' => 'foo
'])); + $this->assertEquals('foo\u003Cbr\/\u0020\u003E foo\u003Cbr\/\u0020\u003E', $twig->render('js', ['bar' => 'foo
'])); } public function escapingStrategyCallback($name) @@ -73,7 +73,7 @@ class Twig_Tests_EnvironmentTest extends \PHPUnit\Framework\TestCase { // to be removed in 2.0 $loader = $this->getMockBuilder('Twig_EnvironmentTestLoaderInterface')->getMock(); - //$loader = $this->getMockBuilder(array('Twig_LoaderInterface', 'Twig_SourceContextLoaderInterface'))->getMock(); + //$loader = $this->getMockBuilder(['Twig_LoaderInterface', 'Twig_SourceContextLoaderInterface'])->getMock(); $loader->expects($this->any())->method('getSourceContext')->will($this->returnValue(new Twig_Source('', ''))); // globals can be added after calling getGlobals @@ -104,7 +104,7 @@ class Twig_Tests_EnvironmentTest extends \PHPUnit\Framework\TestCase $this->assertEquals('bar', $globals['foo']); // globals can be modified after extensions and a template has been loaded - $arrayLoader = new Twig_Loader_Array(array('index' => '{{foo}}')); + $arrayLoader = new Twig_Loader_Array(['index' => '{{foo}}']); $twig = new Twig_Environment($arrayLoader); $twig->addGlobal('foo', 'foo'); $twig->getGlobals(); @@ -118,7 +118,7 @@ class Twig_Tests_EnvironmentTest extends \PHPUnit\Framework\TestCase $twig->getGlobals(); $twig->addGlobal('foo', 'bar'); $template = $twig->loadTemplate('index'); - $this->assertEquals('bar', $template->render(array())); + $this->assertEquals('bar', $template->render([])); /* to be uncomment in Twig 2.0 // globals cannot be added after a template has been loaded @@ -173,10 +173,10 @@ class Twig_Tests_EnvironmentTest extends \PHPUnit\Framework\TestCase public function testExtensionsAreNotInitializedWhenRenderingACompiledTemplate() { $cache = new Twig_Cache_Filesystem($dir = sys_get_temp_dir().'/twig'); - $options = array('cache' => $cache, 'auto_reload' => false, 'debug' => false); + $options = ['cache' => $cache, 'auto_reload' => false, 'debug' => false]; // force compilation - $twig = new Twig_Environment($loader = new Twig_Loader_Array(array('index' => '{{ foo }}')), $options); + $twig = new Twig_Environment($loader = new Twig_Loader_Array(['index' => '{{ foo }}']), $options); $key = $cache->generateKey('index', $twig->getTemplateClass('index')); $cache->write($key, $twig->compileSource(new Twig_Source('{{ foo }}', 'index'))); @@ -184,15 +184,15 @@ class Twig_Tests_EnvironmentTest extends \PHPUnit\Framework\TestCase // check that extensions won't be initialized when rendering a template that is already in the cache $twig = $this ->getMockBuilder('Twig_Environment') - ->setConstructorArgs(array($loader, $options)) - ->setMethods(array('initExtensions')) + ->setConstructorArgs([$loader, $options]) + ->setMethods(['initExtensions']) ->getMock() ; $twig->expects($this->never())->method('initExtensions'); // render template - $output = $twig->render('index', array('foo' => 'bar')); + $output = $twig->render('index', ['foo' => 'bar']); $this->assertEquals('bar', $output); Twig_Tests_FilesystemHelper::removeDir($dir); @@ -205,7 +205,7 @@ class Twig_Tests_EnvironmentTest extends \PHPUnit\Framework\TestCase $cache = $this->getMockBuilder('Twig_CacheInterface')->getMock(); $loader = $this->getMockLoader($templateName, $templateContent); - $twig = new Twig_Environment($loader, array('cache' => $cache, 'auto_reload' => true, 'debug' => false)); + $twig = new Twig_Environment($loader, ['cache' => $cache, 'auto_reload' => true, 'debug' => false]); // Cache miss: getTimestamp returns 0 and as a result the load() is // skipped. @@ -232,7 +232,7 @@ class Twig_Tests_EnvironmentTest extends \PHPUnit\Framework\TestCase $cache = $this->getMockBuilder('Twig_CacheInterface')->getMock(); $loader = $this->getMockLoader($templateName, $templateContent); - $twig = new Twig_Environment($loader, array('cache' => $cache, 'auto_reload' => true, 'debug' => false)); + $twig = new Twig_Environment($loader, ['cache' => $cache, 'auto_reload' => true, 'debug' => false]); $now = time(); @@ -260,7 +260,7 @@ class Twig_Tests_EnvironmentTest extends \PHPUnit\Framework\TestCase $cache = $this->getMockBuilder('Twig_CacheInterface')->getMock(); $loader = $this->getMockLoader($templateName, $templateContent); - $twig = new Twig_Environment($loader, array('cache' => $cache, 'auto_reload' => true, 'debug' => false)); + $twig = new Twig_Environment($loader, ['cache' => $cache, 'auto_reload' => true, 'debug' => false]); $now = time(); @@ -346,8 +346,8 @@ class Twig_Tests_EnvironmentTest extends \PHPUnit\Framework\TestCase $twig = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock()); $twig->addExtension(new Twig_Tests_EnvironmentTest_Extension_WithGlobals()); - $this->deprecations = array(); - set_error_handler(array($this, 'handleError')); + $this->deprecations = []; + set_error_handler([$this, 'handleError']); $this->assertArrayHasKey('foo_global', $twig->getGlobals()); @@ -388,7 +388,7 @@ EOF ); $extension = new Twig_Tests_EnvironmentTest_ExtensionInEval(); - $loader = new Twig_Loader_Array(array('page' => 'hey')); + $loader = new Twig_Loader_Array(['page' => 'hey']); $twig = new Twig_Environment($loader); $twig->addExtension($extension); @@ -416,8 +416,8 @@ EOF $twig = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock()); $twig->addExtension(new Twig_Tests_EnvironmentTest_ExtensionWithDeprecationInitRuntime()); - $this->deprecations = array(); - set_error_handler(array($this, 'handleError')); + $this->deprecations = []; + set_error_handler([$this, 'handleError']); $twig->initRuntime(); @@ -442,8 +442,8 @@ EOF $twig = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock()); $twig->addExtension(new Twig_Tests_EnvironmentTest_ExtensionWithDeprecationInitRuntime()); - $this->deprecations = array(); - set_error_handler(array($this, 'handleError')); + $this->deprecations = []; + set_error_handler([$this, 'handleError']); $twig->addExtension(new Twig_Tests_EnvironmentTest_Extension_WithDeprecatedName()); $twig->addExtension(new Twig_Tests_EnvironmentTest_Extension_WithDeprecatedName()); @@ -459,14 +459,14 @@ EOF $runtimeLoader = $this->getMockBuilder('Twig_RuntimeLoaderInterface')->getMock(); $runtimeLoader->expects($this->any())->method('load')->will($this->returnValue(new Twig_Tests_EnvironmentTest_Runtime())); - $loader = new Twig_Loader_Array(array( + $loader = new Twig_Loader_Array([ 'func_array' => '{{ from_runtime_array("foo") }}', 'func_array_default' => '{{ from_runtime_array() }}', 'func_array_named_args' => '{{ from_runtime_array(name="foo") }}', 'func_string' => '{{ from_runtime_string("foo") }}', 'func_string_default' => '{{ from_runtime_string() }}', 'func_string_named_args' => '{{ from_runtime_string(name="foo") }}', - )); + ]); $twig = new Twig_Environment($loader); $twig->addExtension(new Twig_Tests_EnvironmentTest_ExtensionWithoutRuntime()); @@ -486,9 +486,9 @@ EOF */ public function testFailLoadTemplateOnCircularReference() { - $twig = new Twig_Environment(new Twig_Loader_Array(array( + $twig = new Twig_Environment(new Twig_Loader_Array([ 'base.html.twig' => '{% extends "base.html.twig" %}', - ))); + ])); $twig->loadTemplate('base.html.twig'); } @@ -499,10 +499,10 @@ EOF */ public function testFailLoadTemplateOnComplexCircularReference() { - $twig = new Twig_Environment(new Twig_Loader_Array(array( + $twig = new Twig_Environment(new Twig_Loader_Array([ 'base1.html.twig' => '{% extends "base2.html.twig" %}', 'base2.html.twig' => '{% extends "base1.html.twig" %}', - ))); + ])); $twig->loadTemplate('base1.html.twig'); } @@ -511,7 +511,7 @@ EOF { // to be removed in 2.0 $loader = $this->getMockBuilder('Twig_EnvironmentTestLoaderInterface')->getMock(); - //$loader = $this->getMockBuilder(array('Twig_LoaderInterface', 'Twig_SourceContextLoaderInterface'))->getMock(); + //$loader = $this->getMockBuilder(['Twig_LoaderInterface', 'Twig_SourceContextLoaderInterface'])->getMock(); $loader->expects($this->any()) ->method('getSourceContext') ->with($templateName) @@ -529,9 +529,9 @@ class Twig_Tests_EnvironmentTest_Extension_WithGlobals extends Twig_Extension { public function getGlobals() { - return array( + return [ 'foo_global' => 'foo_global', - ); + ]; } } @@ -539,52 +539,52 @@ class Twig_Tests_EnvironmentTest_Extension extends Twig_Extension implements Twi { public function getTokenParsers() { - return array( + return [ new Twig_Tests_EnvironmentTest_TokenParser(), - ); + ]; } public function getNodeVisitors() { - return array( + return [ new Twig_Tests_EnvironmentTest_NodeVisitor(), - ); + ]; } public function getFilters() { - return array( + return [ new Twig_SimpleFilter('foo_filter', 'foo_filter'), - ); + ]; } public function getTests() { - return array( + return [ new Twig_SimpleTest('foo_test', 'foo_test'), - ); + ]; } public function getFunctions() { - return array( + return [ new Twig_SimpleFunction('foo_function', 'foo_function'), - ); + ]; } public function getOperators() { - return array( - array('foo_unary' => array()), - array('foo_binary' => array()), - ); + return [ + ['foo_unary' => []], + ['foo_binary' => []], + ]; } public function getGlobals() { - return array( + return [ 'foo_global' => 'foo_global', - ); + ]; } } class_alias('Twig_Tests_EnvironmentTest_Extension', 'Twig\Tests\EnvironmentTest\Extension', false); @@ -660,10 +660,10 @@ class Twig_Tests_EnvironmentTest_ExtensionWithoutRuntime extends Twig_Extension { public function getFunctions() { - return array( - new Twig_SimpleFunction('from_runtime_array', array('Twig_Tests_EnvironmentTest_Runtime', 'fromRuntime')), + return [ + new Twig_SimpleFunction('from_runtime_array', ['Twig_Tests_EnvironmentTest_Runtime', 'fromRuntime']), new Twig_SimpleFunction('from_runtime_string', 'Twig_Tests_EnvironmentTest_Runtime::fromRuntime'), - ); + ]; } public function getName() diff --git a/vendor/twig/twig/test/Twig/Tests/ErrorTest.php b/vendor/twig/twig/test/Twig/Tests/ErrorTest.php index 3ec572ab2..d54412dfe 100644 --- a/vendor/twig/twig/test/Twig/Tests/ErrorTest.php +++ b/vendor/twig/twig/test/Twig/Tests/ErrorTest.php @@ -22,14 +22,14 @@ class Twig_Tests_ErrorTest extends \PHPUnit\Framework\TestCase public function testErrorWithArrayFilename() { $error = new Twig_Error('foo'); - $error->setSourceContext(new Twig_Source('', array('foo' => 'bar'))); + $error->setSourceContext(new Twig_Source('', ['foo' => 'bar'])); $this->assertEquals('foo in {"foo":"bar"}', $error->getMessage()); } public function testTwigExceptionGuessWithMissingVarAndArrayLoader() { - $loader = new Twig_Loader_Array(array( + $loader = new Twig_Loader_Array([ 'base.html' => '{% block content %}{% endblock %}', 'index.html' => << true, 'debug' => true, 'cache' => false)); + ]); + $twig = new Twig_Environment($loader, ['strict_variables' => true, 'debug' => true, 'cache' => false]); $template = $twig->loadTemplate('index.html'); try { - $template->render(array()); + $template->render([]); $this->fail(); } catch (Twig_Error_Runtime $e) { @@ -57,7 +57,7 @@ EOHTML public function testTwigExceptionGuessWithExceptionAndArrayLoader() { - $loader = new Twig_Loader_Array(array( + $loader = new Twig_Loader_Array([ 'base.html' => '{% block content %}{% endblock %}', 'index.html' => << true, 'debug' => true, 'cache' => false)); + ]); + $twig = new Twig_Environment($loader, ['strict_variables' => true, 'debug' => true, 'cache' => false]); $template = $twig->loadTemplate('index.html'); try { - $template->render(array('foo' => new Twig_Tests_ErrorTest_Foo())); + $template->render(['foo' => new Twig_Tests_ErrorTest_Foo()]); $this->fail(); } catch (Twig_Error_Runtime $e) { @@ -86,11 +86,11 @@ EOHTML public function testTwigExceptionGuessWithMissingVarAndFilesystemLoader() { $loader = new Twig_Loader_Filesystem(dirname(__FILE__).'/Fixtures/errors'); - $twig = new Twig_Environment($loader, array('strict_variables' => true, 'debug' => true, 'cache' => false)); + $twig = new Twig_Environment($loader, ['strict_variables' => true, 'debug' => true, 'cache' => false]); $template = $twig->loadTemplate('index.html'); try { - $template->render(array()); + $template->render([]); $this->fail(); } catch (Twig_Error_Runtime $e) { @@ -105,11 +105,11 @@ EOHTML public function testTwigExceptionGuessWithExceptionAndFilesystemLoader() { $loader = new Twig_Loader_Filesystem(dirname(__FILE__).'/Fixtures/errors'); - $twig = new Twig_Environment($loader, array('strict_variables' => true, 'debug' => true, 'cache' => false)); + $twig = new Twig_Environment($loader, ['strict_variables' => true, 'debug' => true, 'cache' => false]); $template = $twig->loadTemplate('index.html'); try { - $template->render(array('foo' => new Twig_Tests_ErrorTest_Foo())); + $template->render(['foo' => new Twig_Tests_ErrorTest_Foo()]); $this->fail(); } catch (Twig_Error_Runtime $e) { @@ -127,12 +127,12 @@ EOHTML public function testTwigExceptionAddsFileAndLine($templates, $name, $line) { $loader = new Twig_Loader_Array($templates); - $twig = new Twig_Environment($loader, array('strict_variables' => true, 'debug' => true, 'cache' => false)); + $twig = new Twig_Environment($loader, ['strict_variables' => true, 'debug' => true, 'cache' => false]); $template = $twig->loadTemplate('index'); try { - $template->render(array()); + $template->render([]); $this->fail(); } catch (Twig_Error_Runtime $e) { @@ -142,7 +142,7 @@ EOHTML } try { - $template->render(array('foo' => new Twig_Tests_ErrorTest_Foo())); + $template->render(['foo' => new Twig_Tests_ErrorTest_Foo()]); $this->fail(); } catch (Twig_Error_Runtime $e) { @@ -154,39 +154,39 @@ EOHTML public function getErroredTemplates() { - return array( + return [ // error occurs in a template - array( - array( + [ + [ 'index' => "\n\n{{ foo.bar }}\n\n\n{{ 'foo' }}", - ), + ], 'index', 3, - ), + ], // error occurs in an included template - array( - array( + [ + [ 'index' => "{% include 'partial' %}", 'partial' => '{{ foo.bar }}', - ), + ], 'partial', 1, - ), + ], // error occurs in a parent block when called via parent() - array( - array( + [ + [ 'index' => "{% extends 'base' %} {% block content %} {{ parent() }} {% endblock %}", 'base' => '{% block content %}{{ foo.bar }}{% endblock %}', - ), + ], 'base', 1, - ), + ], // error occurs in a block from the child - array( - array( + [ + [ 'index' => "{% extends 'base' %} {% block content %} {{ foo.bar }} @@ -195,10 +195,10 @@ EOHTML {{ foo.bar }} {% endblock %}", 'base' => '{% block content %}{% endblock %}', - ), + ], 'index', 3, - ), - ); + ], + ]; } } diff --git a/vendor/twig/twig/test/Twig/Tests/ExpressionParserTest.php b/vendor/twig/twig/test/Twig/Tests/ExpressionParserTest.php index 3a173f035..e5497b63d 100644 --- a/vendor/twig/twig/test/Twig/Tests/ExpressionParserTest.php +++ b/vendor/twig/twig/test/Twig/Tests/ExpressionParserTest.php @@ -17,7 +17,7 @@ class Twig_Tests_ExpressionParserTest extends \PHPUnit\Framework\TestCase */ public function testCanOnlyAssignToNames($template) { - $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), array('cache' => false, 'autoescape' => false)); + $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), ['cache' => false, 'autoescape' => false]); $parser = new Twig_Parser($env); $parser->parse($env->tokenize(new Twig_Source($template, 'index'))); @@ -25,20 +25,20 @@ class Twig_Tests_ExpressionParserTest extends \PHPUnit\Framework\TestCase public function getFailingTestsForAssignment() { - return array( - array('{% set false = "foo" %}'), - array('{% set FALSE = "foo" %}'), - array('{% set true = "foo" %}'), - array('{% set TRUE = "foo" %}'), - array('{% set none = "foo" %}'), - array('{% set NONE = "foo" %}'), - array('{% set null = "foo" %}'), - array('{% set NULL = "foo" %}'), - array('{% set 3 = "foo" %}'), - array('{% set 1 + 2 = "foo" %}'), - array('{% set "bar" = "foo" %}'), - array('{% set %}{% endset %}'), - ); + return [ + ['{% set false = "foo" %}'], + ['{% set FALSE = "foo" %}'], + ['{% set true = "foo" %}'], + ['{% set TRUE = "foo" %}'], + ['{% set none = "foo" %}'], + ['{% set NONE = "foo" %}'], + ['{% set null = "foo" %}'], + ['{% set NULL = "foo" %}'], + ['{% set 3 = "foo" %}'], + ['{% set 1 + 2 = "foo" %}'], + ['{% set "bar" = "foo" %}'], + ['{% set %}{% endset %}'], + ]; } /** @@ -46,7 +46,7 @@ class Twig_Tests_ExpressionParserTest extends \PHPUnit\Framework\TestCase */ public function testArrayExpression($template, $expected) { - $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), array('cache' => false, 'autoescape' => false)); + $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), ['cache' => false, 'autoescape' => false]); $stream = $env->tokenize(new Twig_Source($template, '')); $parser = new Twig_Parser($env); @@ -59,7 +59,7 @@ class Twig_Tests_ExpressionParserTest extends \PHPUnit\Framework\TestCase */ public function testArraySyntaxError($template) { - $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), array('cache' => false, 'autoescape' => false)); + $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), ['cache' => false, 'autoescape' => false]); $parser = new Twig_Parser($env); $parser->parse($env->tokenize(new Twig_Source($template, 'index'))); @@ -67,86 +67,86 @@ class Twig_Tests_ExpressionParserTest extends \PHPUnit\Framework\TestCase public function getFailingTestsForArray() { - return array( - array('{{ [1, "a": "b"] }}'), - array('{{ {"a": "b", 2} }}'), - ); + return [ + ['{{ [1, "a": "b"] }}'], + ['{{ {"a": "b", 2} }}'], + ]; } public function getTestsForArray() { - return array( + return [ // simple array - array('{{ [1, 2] }}', new Twig_Node_Expression_Array(array( + ['{{ [1, 2] }}', new Twig_Node_Expression_Array([ new Twig_Node_Expression_Constant(0, 1), new Twig_Node_Expression_Constant(1, 1), new Twig_Node_Expression_Constant(1, 1), new Twig_Node_Expression_Constant(2, 1), - ), 1), - ), + ], 1), + ], // array with trailing , - array('{{ [1, 2, ] }}', new Twig_Node_Expression_Array(array( + ['{{ [1, 2, ] }}', new Twig_Node_Expression_Array([ new Twig_Node_Expression_Constant(0, 1), new Twig_Node_Expression_Constant(1, 1), new Twig_Node_Expression_Constant(1, 1), new Twig_Node_Expression_Constant(2, 1), - ), 1), - ), + ], 1), + ], // simple hash - array('{{ {"a": "b", "b": "c"} }}', new Twig_Node_Expression_Array(array( + ['{{ {"a": "b", "b": "c"} }}', new Twig_Node_Expression_Array([ new Twig_Node_Expression_Constant('a', 1), new Twig_Node_Expression_Constant('b', 1), new Twig_Node_Expression_Constant('b', 1), new Twig_Node_Expression_Constant('c', 1), - ), 1), - ), + ], 1), + ], // hash with trailing , - array('{{ {"a": "b", "b": "c", } }}', new Twig_Node_Expression_Array(array( + ['{{ {"a": "b", "b": "c", } }}', new Twig_Node_Expression_Array([ new Twig_Node_Expression_Constant('a', 1), new Twig_Node_Expression_Constant('b', 1), new Twig_Node_Expression_Constant('b', 1), new Twig_Node_Expression_Constant('c', 1), - ), 1), - ), + ], 1), + ], // hash in an array - array('{{ [1, {"a": "b", "b": "c"}] }}', new Twig_Node_Expression_Array(array( + ['{{ [1, {"a": "b", "b": "c"}] }}', new Twig_Node_Expression_Array([ new Twig_Node_Expression_Constant(0, 1), new Twig_Node_Expression_Constant(1, 1), new Twig_Node_Expression_Constant(1, 1), - new Twig_Node_Expression_Array(array( + new Twig_Node_Expression_Array([ new Twig_Node_Expression_Constant('a', 1), new Twig_Node_Expression_Constant('b', 1), new Twig_Node_Expression_Constant('b', 1), new Twig_Node_Expression_Constant('c', 1), - ), 1), - ), 1), - ), + ], 1), + ], 1), + ], // array in a hash - array('{{ {"a": [1, 2], "b": "c"} }}', new Twig_Node_Expression_Array(array( + ['{{ {"a": [1, 2], "b": "c"} }}', new Twig_Node_Expression_Array([ new Twig_Node_Expression_Constant('a', 1), - new Twig_Node_Expression_Array(array( + new Twig_Node_Expression_Array([ new Twig_Node_Expression_Constant(0, 1), new Twig_Node_Expression_Constant(1, 1), new Twig_Node_Expression_Constant(1, 1), new Twig_Node_Expression_Constant(2, 1), - ), 1), + ], 1), new Twig_Node_Expression_Constant('b', 1), new Twig_Node_Expression_Constant('c', 1), - ), 1), - ), - ); + ], 1), + ], + ]; } /** @@ -154,7 +154,7 @@ class Twig_Tests_ExpressionParserTest extends \PHPUnit\Framework\TestCase */ public function testStringExpressionDoesNotConcatenateTwoConsecutiveStrings() { - $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), array('cache' => false, 'autoescape' => false, 'optimizations' => 0)); + $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), ['cache' => false, 'autoescape' => false, 'optimizations' => 0]); $stream = $env->tokenize(new Twig_Source('{{ "a" "b" }}', 'index')); $parser = new Twig_Parser($env); @@ -166,7 +166,7 @@ class Twig_Tests_ExpressionParserTest extends \PHPUnit\Framework\TestCase */ public function testStringExpression($template, $expected) { - $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), array('cache' => false, 'autoescape' => false, 'optimizations' => 0)); + $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), ['cache' => false, 'autoescape' => false, 'optimizations' => 0]); $stream = $env->tokenize(new Twig_Source($template, '')); $parser = new Twig_Parser($env); @@ -175,18 +175,18 @@ class Twig_Tests_ExpressionParserTest extends \PHPUnit\Framework\TestCase public function getTestsForString() { - return array( - array( + return [ + [ '{{ "foo" }}', new Twig_Node_Expression_Constant('foo', 1), - ), - array( + ], + [ '{{ "foo #{bar}" }}', new Twig_Node_Expression_Binary_Concat( new Twig_Node_Expression_Constant('foo ', 1), new Twig_Node_Expression_Name('bar', 1), 1 ), - ), - array( + ], + [ '{{ "foo #{bar} baz" }}', new Twig_Node_Expression_Binary_Concat( new Twig_Node_Expression_Binary_Concat( new Twig_Node_Expression_Constant('foo ', 1), @@ -196,9 +196,9 @@ class Twig_Tests_ExpressionParserTest extends \PHPUnit\Framework\TestCase new Twig_Node_Expression_Constant(' baz', 1), 1 ), - ), + ], - array( + [ '{{ "foo #{"foo #{bar} baz"} baz" }}', new Twig_Node_Expression_Binary_Concat( new Twig_Node_Expression_Binary_Concat( new Twig_Node_Expression_Constant('foo ', 1), @@ -216,8 +216,8 @@ class Twig_Tests_ExpressionParserTest extends \PHPUnit\Framework\TestCase new Twig_Node_Expression_Constant(' baz', 1), 1 ), - ), - ); + ], + ]; } /** @@ -225,7 +225,7 @@ class Twig_Tests_ExpressionParserTest extends \PHPUnit\Framework\TestCase */ public function testAttributeCallDoesNotSupportNamedArguments() { - $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), array('cache' => false, 'autoescape' => false)); + $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), ['cache' => false, 'autoescape' => false]); $parser = new Twig_Parser($env); $parser->parse($env->tokenize(new Twig_Source('{{ foo.bar(name="Foo") }}', 'index'))); @@ -236,7 +236,7 @@ class Twig_Tests_ExpressionParserTest extends \PHPUnit\Framework\TestCase */ public function testMacroCallDoesNotSupportNamedArguments() { - $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), array('cache' => false, 'autoescape' => false)); + $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), ['cache' => false, 'autoescape' => false]); $parser = new Twig_Parser($env); $parser->parse($env->tokenize(new Twig_Source('{% from _self import foo %}{% macro foo() %}{% endmacro %}{{ foo(name="Foo") }}', 'index'))); @@ -248,7 +248,7 @@ class Twig_Tests_ExpressionParserTest extends \PHPUnit\Framework\TestCase */ public function testMacroDefinitionDoesNotSupportNonNameVariableName() { - $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), array('cache' => false, 'autoescape' => false)); + $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), ['cache' => false, 'autoescape' => false]); $parser = new Twig_Parser($env); $parser->parse($env->tokenize(new Twig_Source('{% macro foo("a") %}{% endmacro %}', 'index'))); @@ -261,7 +261,7 @@ class Twig_Tests_ExpressionParserTest extends \PHPUnit\Framework\TestCase */ public function testMacroDefinitionDoesNotSupportNonConstantDefaultValues($template) { - $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), array('cache' => false, 'autoescape' => false)); + $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), ['cache' => false, 'autoescape' => false]); $parser = new Twig_Parser($env); $parser->parse($env->tokenize(new Twig_Source($template, 'index'))); @@ -269,10 +269,10 @@ class Twig_Tests_ExpressionParserTest extends \PHPUnit\Framework\TestCase public function getMacroDefinitionDoesNotSupportNonConstantDefaultValues() { - return array( - array('{% macro foo(name = "a #{foo} a") %}{% endmacro %}'), - array('{% macro foo(name = [["b", "a #{foo} a"]]) %}{% endmacro %}'), - ); + return [ + ['{% macro foo(name = "a #{foo} a") %}{% endmacro %}'], + ['{% macro foo(name = [["b", "a #{foo} a"]]) %}{% endmacro %}'], + ]; } /** @@ -280,7 +280,7 @@ class Twig_Tests_ExpressionParserTest extends \PHPUnit\Framework\TestCase */ public function testMacroDefinitionSupportsConstantDefaultValues($template) { - $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), array('cache' => false, 'autoescape' => false)); + $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), ['cache' => false, 'autoescape' => false]); $parser = new Twig_Parser($env); $parser->parse($env->tokenize(new Twig_Source($template, 'index'))); @@ -292,15 +292,15 @@ class Twig_Tests_ExpressionParserTest extends \PHPUnit\Framework\TestCase public function getMacroDefinitionSupportsConstantDefaultValues() { - return array( - array('{% macro foo(name = "aa") %}{% endmacro %}'), - array('{% macro foo(name = 12) %}{% endmacro %}'), - array('{% macro foo(name = true) %}{% endmacro %}'), - array('{% macro foo(name = ["a"]) %}{% endmacro %}'), - array('{% macro foo(name = [["a"]]) %}{% endmacro %}'), - array('{% macro foo(name = {a: "a"}) %}{% endmacro %}'), - array('{% macro foo(name = {a: {b: "a"}}) %}{% endmacro %}'), - ); + return [ + ['{% macro foo(name = "aa") %}{% endmacro %}'], + ['{% macro foo(name = 12) %}{% endmacro %}'], + ['{% macro foo(name = true) %}{% endmacro %}'], + ['{% macro foo(name = ["a"]) %}{% endmacro %}'], + ['{% macro foo(name = [["a"]]) %}{% endmacro %}'], + ['{% macro foo(name = {a: "a"}) %}{% endmacro %}'], + ['{% macro foo(name = {a: {b: "a"}}) %}{% endmacro %}'], + ]; } /** @@ -309,7 +309,7 @@ class Twig_Tests_ExpressionParserTest extends \PHPUnit\Framework\TestCase */ public function testUnknownFunction() { - $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), array('cache' => false, 'autoescape' => false)); + $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), ['cache' => false, 'autoescape' => false]); $parser = new Twig_Parser($env); $parser->parse($env->tokenize(new Twig_Source('{{ cycl() }}', 'index'))); @@ -321,7 +321,7 @@ class Twig_Tests_ExpressionParserTest extends \PHPUnit\Framework\TestCase */ public function testUnknownFunctionWithoutSuggestions() { - $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), array('cache' => false, 'autoescape' => false)); + $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), ['cache' => false, 'autoescape' => false]); $parser = new Twig_Parser($env); $parser->parse($env->tokenize(new Twig_Source('{{ foobar() }}', 'index'))); @@ -333,7 +333,7 @@ class Twig_Tests_ExpressionParserTest extends \PHPUnit\Framework\TestCase */ public function testUnknownFilter() { - $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), array('cache' => false, 'autoescape' => false)); + $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), ['cache' => false, 'autoescape' => false]); $parser = new Twig_Parser($env); $parser->parse($env->tokenize(new Twig_Source('{{ 1|lowe }}', 'index'))); @@ -345,7 +345,7 @@ class Twig_Tests_ExpressionParserTest extends \PHPUnit\Framework\TestCase */ public function testUnknownFilterWithoutSuggestions() { - $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), array('cache' => false, 'autoescape' => false)); + $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), ['cache' => false, 'autoescape' => false]); $parser = new Twig_Parser($env); $parser->parse($env->tokenize(new Twig_Source('{{ 1|foobar }}', 'index'))); @@ -357,7 +357,7 @@ class Twig_Tests_ExpressionParserTest extends \PHPUnit\Framework\TestCase */ public function testUnknownTest() { - $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), array('cache' => false, 'autoescape' => false)); + $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), ['cache' => false, 'autoescape' => false]); $parser = new Twig_Parser($env); $stream = $env->tokenize(new Twig_Source('{{ 1 is nul }}', 'index')); $parser->parse($stream); @@ -369,7 +369,7 @@ class Twig_Tests_ExpressionParserTest extends \PHPUnit\Framework\TestCase */ public function testUnknownTestWithoutSuggestions() { - $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), array('cache' => false, 'autoescape' => false)); + $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), ['cache' => false, 'autoescape' => false]); $parser = new Twig_Parser($env); $parser->parse($env->tokenize(new Twig_Source('{{ 1 is foobar }}', 'index'))); diff --git a/vendor/twig/twig/test/Twig/Tests/Extension/CoreTest.php b/vendor/twig/twig/test/Twig/Tests/Extension/CoreTest.php index ca69b4af6..08bf3b173 100644 --- a/vendor/twig/twig/test/Twig/Tests/Extension/CoreTest.php +++ b/vendor/twig/twig/test/Twig/Tests/Extension/CoreTest.php @@ -25,36 +25,36 @@ class Twig_Tests_Extension_CoreTest extends \PHPUnit\Framework\TestCase public function getRandomFunctionTestData() { - return array( - array(// array - array('apple', 'orange', 'citrus'), - array('apple', 'orange', 'citrus'), - ), - array(// Traversable - new ArrayObject(array('apple', 'orange', 'citrus')), - array('apple', 'orange', 'citrus'), - ), - array(// unicode string + return [ + [// array + ['apple', 'orange', 'citrus'], + ['apple', 'orange', 'citrus'], + ], + [// Traversable + new ArrayObject(['apple', 'orange', 'citrus']), + ['apple', 'orange', 'citrus'], + ], + [// unicode string 'Ä€é', - array('Ä', '€', 'é'), - ), - array(// numeric but string + ['Ä', '€', 'é'], + ], + [// numeric but string '123', - array('1', '2', '3'), - ), - array(// integer + ['1', '2', '3'], + ], + [// integer 5, range(0, 5, 1), - ), - array(// float + ], + [// float 5.9, range(0, 5, 1), - ), - array(// negative + ], + [// negative -2, - array(0, -1, -2), - ), - ); + [0, -1, -2], + ], + ]; } public function testRandomFunctionWithoutParameter() @@ -70,7 +70,7 @@ class Twig_Tests_Extension_CoreTest extends \PHPUnit\Framework\TestCase public function testRandomFunctionReturnsAsIs() { $this->assertSame('', twig_random(new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock()), '')); - $this->assertSame('', twig_random(new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), array('charset' => null)), '')); + $this->assertSame('', twig_random(new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), ['charset' => null]), '')); $instance = new stdClass(); $this->assertSame($instance, twig_random(new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock()), $instance)); @@ -81,7 +81,7 @@ class Twig_Tests_Extension_CoreTest extends \PHPUnit\Framework\TestCase */ public function testRandomFunctionOfEmptyArrayThrowsException() { - twig_random(new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock()), array()); + twig_random(new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock()), []); } public function testRandomFunctionOnNonUTF8String() @@ -96,7 +96,7 @@ class Twig_Tests_Extension_CoreTest extends \PHPUnit\Framework\TestCase $text = twig_convert_encoding('Äé', 'ISO-8859-1', 'UTF-8'); for ($i = 0; $i < 30; ++$i) { $rand = twig_random($twig, $text); - $this->assertTrue(in_array(twig_convert_encoding($rand, 'UTF-8', 'ISO-8859-1'), array('Ä', 'é'), true)); + $this->assertTrue(in_array(twig_convert_encoding($rand, 'UTF-8', 'ISO-8859-1'), ['Ä', 'é'], true)); } } @@ -128,11 +128,11 @@ class Twig_Tests_Extension_CoreTest extends \PHPUnit\Framework\TestCase public function provideCustomEscaperCases() { - return array( - array('fooUTF-8', 'foo', 'foo'), - array('UTF-8', null, 'foo'), - array('42UTF-8', 42, 'foo'), - ); + return [ + ['fooUTF-8', 'foo', 'foo'], + ['UTF-8', null, 'foo'], + ['42UTF-8', 42, 'foo'], + ]; } /** @@ -154,15 +154,15 @@ class Twig_Tests_Extension_CoreTest extends \PHPUnit\Framework\TestCase public function provideTwigFirstCases() { - $i = array(1 => 'a', 2 => 'b', 3 => 'c'); + $i = [1 => 'a', 2 => 'b', 3 => 'c']; - return array( - array('a', 'abc'), - array(1, array(1, 2, 3)), - array('', null), - array('', ''), - array('a', new CoreTestIterator($i, array_keys($i), true, 3)), - ); + return [ + ['a', 'abc'], + [1, [1, 2, 3]], + ['', null], + ['', ''], + ['a', new CoreTestIterator($i, array_keys($i), true, 3)], + ]; } /** @@ -176,15 +176,15 @@ class Twig_Tests_Extension_CoreTest extends \PHPUnit\Framework\TestCase public function provideTwigLastCases() { - $i = array(1 => 'a', 2 => 'b', 3 => 'c'); + $i = [1 => 'a', 2 => 'b', 3 => 'c']; - return array( - array('c', 'abc'), - array(3, array(1, 2, 3)), - array('', null), - array('', ''), - array('c', new CoreTestIterator($i, array_keys($i), true)), - ); + return [ + ['c', 'abc'], + [3, [1, 2, 3]], + ['', null], + ['', ''], + ['c', new CoreTestIterator($i, array_keys($i), true)], + ]; } /** @@ -197,17 +197,17 @@ class Twig_Tests_Extension_CoreTest extends \PHPUnit\Framework\TestCase public function provideArrayKeyCases() { - $array = array('a' => 'a1', 'b' => 'b1', 'c' => 'c1'); + $array = ['a' => 'a1', 'b' => 'b1', 'c' => 'c1']; $keys = array_keys($array); - return array( - array($keys, $array), - array($keys, new CoreTestIterator($array, $keys)), - array($keys, new CoreTestIteratorAggregate($array, $keys)), - array($keys, new CoreTestIteratorAggregateAggregate($array, $keys)), - array(array(), null), - array(array('a'), new SimpleXMLElement('')), - ); + return [ + [$keys, $array], + [$keys, new CoreTestIterator($array, $keys)], + [$keys, new CoreTestIteratorAggregate($array, $keys)], + [$keys, new CoreTestIteratorAggregateAggregate($array, $keys)], + [[], null], + [['a'], new SimpleXMLElement('')], + ]; } /** @@ -220,22 +220,22 @@ class Twig_Tests_Extension_CoreTest extends \PHPUnit\Framework\TestCase public function provideInFilterCases() { - $array = array(1, 2, 'a' => 3, 5, 6, 7); + $array = [1, 2, 'a' => 3, 5, 6, 7]; $keys = array_keys($array); - return array( - array(true, 1, $array), - array(true, '3', $array), - array(true, '3', 'abc3def'), - array(true, 1, new CoreTestIterator($array, $keys, true, 1)), - array(true, '3', new CoreTestIterator($array, $keys, true, 3)), - array(true, '3', new CoreTestIteratorAggregateAggregate($array, $keys, true, 3)), - array(false, 4, $array), - array(false, 4, new CoreTestIterator($array, $keys, true)), - array(false, 4, new CoreTestIteratorAggregateAggregate($array, $keys, true)), - array(false, 1, 1), - array(true, 'b', new SimpleXMLElement('b')), - ); + return [ + [true, 1, $array], + [true, '3', $array], + [true, '3', 'abc3def'], + [true, 1, new CoreTestIterator($array, $keys, true, 1)], + [true, '3', new CoreTestIterator($array, $keys, true, 3)], + [true, '3', new CoreTestIteratorAggregateAggregate($array, $keys, true, 3)], + [false, 4, $array], + [false, 4, new CoreTestIterator($array, $keys, true)], + [false, 4, new CoreTestIteratorAggregateAggregate($array, $keys, true)], + [false, 1, 1], + [true, 'b', new SimpleXMLElement('b')], + ]; } /** @@ -249,23 +249,23 @@ class Twig_Tests_Extension_CoreTest extends \PHPUnit\Framework\TestCase public function provideSliceFilterCases() { - $i = array('a' => 1, 'b' => 2, 'c' => 3, 'd' => 4); + $i = ['a' => 1, 'b' => 2, 'c' => 3, 'd' => 4]; $keys = array_keys($i); - return array( - array(array('a' => 1), $i, 0, 1, true), - array(array('a' => 1), $i, 0, 1, false), - array(array('b' => 2, 'c' => 3), $i, 1, 2), - array(array(1), array(1, 2, 3, 4), 0, 1), - array(array(2, 3), array(1, 2, 3, 4), 1, 2), - array(array(2, 3), new CoreTestIterator($i, $keys, true), 1, 2), - array(array('c' => 3, 'd' => 4), new CoreTestIteratorAggregate($i, $keys, true), 2, null, true), - array($i, new CoreTestIterator($i, $keys, true), 0, count($keys) + 10, true), - array(array(), new CoreTestIterator($i, $keys, true), count($keys) + 10), - array('de', 'abcdef', 3, 2), - array(array(), new SimpleXMLElement('12'), 3), - array(array(), new ArrayIterator(array(1, 2)), 3), - ); + return [ + [['a' => 1], $i, 0, 1, true], + [['a' => 1], $i, 0, 1, false], + [['b' => 2, 'c' => 3], $i, 1, 2], + [[1], [1, 2, 3, 4], 0, 1], + [[2, 3], [1, 2, 3, 4], 1, 2], + [[2, 3], new CoreTestIterator($i, $keys, true), 1, 2], + [['c' => 3, 'd' => 4], new CoreTestIteratorAggregate($i, $keys, true), 2, null, true], + [$i, new CoreTestIterator($i, $keys, true), 0, count($keys) + 10, true], + [[], new CoreTestIterator($i, $keys, true), count($keys) + 10], + ['de', 'abcdef', 3, 2], + [[], new SimpleXMLElement('12'), 3], + [[], new ArrayIterator([1, 2]), 3], + ]; } } diff --git a/vendor/twig/twig/test/Twig/Tests/Extension/SandboxTest.php b/vendor/twig/twig/test/Twig/Tests/Extension/SandboxTest.php index e268115c2..c3b7a6d06 100644 --- a/vendor/twig/twig/test/Twig/Tests/Extension/SandboxTest.php +++ b/vendor/twig/twig/test/Twig/Tests/Extension/SandboxTest.php @@ -16,13 +16,13 @@ class Twig_Tests_Extension_SandboxTest extends \PHPUnit\Framework\TestCase protected function setUp() { - self::$params = array( + self::$params = [ 'name' => 'Fabien', 'obj' => new FooObject(), - 'arr' => array('obj' => new FooObject()), - ); + 'arr' => ['obj' => new FooObject()], + ]; - self::$templates = array( + self::$templates = [ '1_basic1' => '{{ obj.foo }}', '1_basic2' => '{{ name|upper }}', '1_basic3' => '{% if name %}foo{% endif %}', @@ -37,7 +37,7 @@ class Twig_Tests_Extension_SandboxTest extends \PHPUnit\Framework\TestCase '1_child' => "{% extends \"1_layout\" %}\n{% block content %}\n{{ \"a\"|json_encode }}\n{% endblock %}", '1_include' => '{{ include("1_basic1", sandboxed=true) }}', '1_range_operator' => '{{ (1..2)[0] }}', - ); + ]; } /** @@ -46,19 +46,19 @@ class Twig_Tests_Extension_SandboxTest extends \PHPUnit\Framework\TestCase */ public function testSandboxWithInheritance() { - $twig = $this->getEnvironment(true, array(), self::$templates, array('block')); - $twig->loadTemplate('1_child')->render(array()); + $twig = $this->getEnvironment(true, [], self::$templates, ['block']); + $twig->loadTemplate('1_child')->render([]); } public function testSandboxGloballySet() { - $twig = $this->getEnvironment(false, array(), self::$templates); + $twig = $this->getEnvironment(false, [], self::$templates); $this->assertEquals('FOO', $twig->loadTemplate('1_basic')->render(self::$params), 'Sandbox does nothing if it is disabled globally'); } public function testSandboxUnallowedMethodAccessor() { - $twig = $this->getEnvironment(true, array(), self::$templates); + $twig = $this->getEnvironment(true, [], self::$templates); try { $twig->loadTemplate('1_basic1')->render(self::$params); $this->fail('Sandbox throws a SecurityError exception if an unallowed method is called'); @@ -71,7 +71,7 @@ class Twig_Tests_Extension_SandboxTest extends \PHPUnit\Framework\TestCase public function testSandboxUnallowedFilter() { - $twig = $this->getEnvironment(true, array(), self::$templates); + $twig = $this->getEnvironment(true, [], self::$templates); try { $twig->loadTemplate('1_basic2')->render(self::$params); $this->fail('Sandbox throws a SecurityError exception if an unallowed filter is called'); @@ -83,7 +83,7 @@ class Twig_Tests_Extension_SandboxTest extends \PHPUnit\Framework\TestCase public function testSandboxUnallowedTag() { - $twig = $this->getEnvironment(true, array(), self::$templates); + $twig = $this->getEnvironment(true, [], self::$templates); try { $twig->loadTemplate('1_basic3')->render(self::$params); $this->fail('Sandbox throws a SecurityError exception if an unallowed tag is used in the template'); @@ -95,7 +95,7 @@ class Twig_Tests_Extension_SandboxTest extends \PHPUnit\Framework\TestCase public function testSandboxUnallowedProperty() { - $twig = $this->getEnvironment(true, array(), self::$templates); + $twig = $this->getEnvironment(true, [], self::$templates); try { $twig->loadTemplate('1_basic4')->render(self::$params); $this->fail('Sandbox throws a SecurityError exception if an unallowed property is called in the template'); @@ -108,7 +108,7 @@ class Twig_Tests_Extension_SandboxTest extends \PHPUnit\Framework\TestCase public function testSandboxUnallowedToString() { - $twig = $this->getEnvironment(true, array(), self::$templates); + $twig = $this->getEnvironment(true, [], self::$templates); try { $twig->loadTemplate('1_basic5')->render(self::$params); $this->fail('Sandbox throws a SecurityError exception if an unallowed method (__toString()) is called in the template'); @@ -121,7 +121,7 @@ class Twig_Tests_Extension_SandboxTest extends \PHPUnit\Framework\TestCase public function testSandboxUnallowedToStringArray() { - $twig = $this->getEnvironment(true, array(), self::$templates); + $twig = $this->getEnvironment(true, [], self::$templates); try { $twig->loadTemplate('1_basic6')->render(self::$params); $this->fail('Sandbox throws a SecurityError exception if an unallowed method (__toString()) is called in the template'); @@ -134,7 +134,7 @@ class Twig_Tests_Extension_SandboxTest extends \PHPUnit\Framework\TestCase public function testSandboxUnallowedFunction() { - $twig = $this->getEnvironment(true, array(), self::$templates); + $twig = $this->getEnvironment(true, [], self::$templates); try { $twig->loadTemplate('1_basic7')->render(self::$params); $this->fail('Sandbox throws a SecurityError exception if an unallowed function is called in the template'); @@ -146,7 +146,7 @@ class Twig_Tests_Extension_SandboxTest extends \PHPUnit\Framework\TestCase public function testSandboxUnallowedRangeOperator() { - $twig = $this->getEnvironment(true, array(), self::$templates); + $twig = $this->getEnvironment(true, [], self::$templates); try { $twig->loadTemplate('1_range_operator')->render(self::$params); $this->fail('Sandbox throws a SecurityError exception if the unallowed range operator is called'); @@ -158,7 +158,7 @@ class Twig_Tests_Extension_SandboxTest extends \PHPUnit\Framework\TestCase public function testSandboxAllowMethodFoo() { - $twig = $this->getEnvironment(true, array(), self::$templates, array(), array(), array('FooObject' => 'foo')); + $twig = $this->getEnvironment(true, [], self::$templates, [], [], ['FooObject' => 'foo']); FooObject::reset(); $this->assertEquals('foo', $twig->loadTemplate('1_basic1')->render(self::$params), 'Sandbox allow some methods'); $this->assertEquals(1, FooObject::$called['foo'], 'Sandbox only calls method once'); @@ -166,7 +166,7 @@ class Twig_Tests_Extension_SandboxTest extends \PHPUnit\Framework\TestCase public function testSandboxAllowMethodToString() { - $twig = $this->getEnvironment(true, array(), self::$templates, array(), array(), array('FooObject' => '__toString')); + $twig = $this->getEnvironment(true, [], self::$templates, [], [], ['FooObject' => '__toString']); FooObject::reset(); $this->assertEquals('foo', $twig->loadTemplate('1_basic5')->render(self::$params), 'Sandbox allow some methods'); $this->assertEquals(1, FooObject::$called['__toString'], 'Sandbox only calls method once'); @@ -174,7 +174,7 @@ class Twig_Tests_Extension_SandboxTest extends \PHPUnit\Framework\TestCase public function testSandboxAllowMethodToStringDisabled() { - $twig = $this->getEnvironment(false, array(), self::$templates); + $twig = $this->getEnvironment(false, [], self::$templates); FooObject::reset(); $this->assertEquals('foo', $twig->loadTemplate('1_basic5')->render(self::$params), 'Sandbox allows __toString when sandbox disabled'); $this->assertEquals(1, FooObject::$called['__toString'], 'Sandbox only calls method once'); @@ -182,38 +182,38 @@ class Twig_Tests_Extension_SandboxTest extends \PHPUnit\Framework\TestCase public function testSandboxAllowFilter() { - $twig = $this->getEnvironment(true, array(), self::$templates, array(), array('upper')); + $twig = $this->getEnvironment(true, [], self::$templates, [], ['upper']); $this->assertEquals('FABIEN', $twig->loadTemplate('1_basic2')->render(self::$params), 'Sandbox allow some filters'); } public function testSandboxAllowTag() { - $twig = $this->getEnvironment(true, array(), self::$templates, array('if')); + $twig = $this->getEnvironment(true, [], self::$templates, ['if']); $this->assertEquals('foo', $twig->loadTemplate('1_basic3')->render(self::$params), 'Sandbox allow some tags'); } public function testSandboxAllowProperty() { - $twig = $this->getEnvironment(true, array(), self::$templates, array(), array(), array(), array('FooObject' => 'bar')); + $twig = $this->getEnvironment(true, [], self::$templates, [], [], [], ['FooObject' => 'bar']); $this->assertEquals('bar', $twig->loadTemplate('1_basic4')->render(self::$params), 'Sandbox allow some properties'); } public function testSandboxAllowFunction() { - $twig = $this->getEnvironment(true, array(), self::$templates, array(), array(), array(), array(), array('cycle')); + $twig = $this->getEnvironment(true, [], self::$templates, [], [], [], [], ['cycle']); $this->assertEquals('bar', $twig->loadTemplate('1_basic7')->render(self::$params), 'Sandbox allow some functions'); } public function testSandboxAllowRangeOperator() { - $twig = $this->getEnvironment(true, array(), self::$templates, array(), array(), array(), array(), array('range')); + $twig = $this->getEnvironment(true, [], self::$templates, [], [], [], [], ['range']); $this->assertEquals('1', $twig->loadTemplate('1_range_operator')->render(self::$params), 'Sandbox allow the range operator'); } public function testSandboxAllowFunctionsCaseInsensitive() { - foreach (array('getfoobar', 'getFoobar', 'getFooBar') as $name) { - $twig = $this->getEnvironment(true, array(), self::$templates, array(), array(), array('FooObject' => $name)); + foreach (['getfoobar', 'getFoobar', 'getFooBar'] as $name) { + $twig = $this->getEnvironment(true, [], self::$templates, [], [], ['FooObject' => $name]); FooObject::reset(); $this->assertEquals('foobarfoobar', $twig->loadTemplate('1_basic8')->render(self::$params), 'Sandbox allow methods in a case-insensitive way'); $this->assertEquals(2, FooObject::$called['getFooBar'], 'Sandbox only calls method once'); @@ -224,20 +224,20 @@ class Twig_Tests_Extension_SandboxTest extends \PHPUnit\Framework\TestCase public function testSandboxLocallySetForAnInclude() { - self::$templates = array( + self::$templates = [ '2_basic' => '{{ obj.foo }}{% include "2_included" %}{{ obj.foo }}', '2_included' => '{% if obj.foo %}{{ obj.foo|upper }}{% endif %}', - ); + ]; - $twig = $this->getEnvironment(false, array(), self::$templates); + $twig = $this->getEnvironment(false, [], self::$templates); $this->assertEquals('fooFOOfoo', $twig->loadTemplate('2_basic')->render(self::$params), 'Sandbox does nothing if disabled globally and sandboxed not used for the include'); - self::$templates = array( + self::$templates = [ '3_basic' => '{{ obj.foo }}{% sandbox %}{% include "3_included" %}{% endsandbox %}{{ obj.foo }}', '3_included' => '{% if obj.foo %}{{ obj.foo|upper }}{% endif %}', - ); + ]; - $twig = $this->getEnvironment(true, array(), self::$templates); + $twig = $this->getEnvironment(true, [], self::$templates); try { $twig->loadTemplate('3_basic')->render(self::$params); $this->fail('Sandbox throws a SecurityError exception when the included file is sandboxed'); @@ -249,21 +249,21 @@ class Twig_Tests_Extension_SandboxTest extends \PHPUnit\Framework\TestCase public function testMacrosInASandbox() { - $twig = $this->getEnvironment(true, array('autoescape' => 'html'), array('index' => <<getEnvironment(true, ['autoescape' => 'html'], ['index' => <<{{ text }}

{% endmacro %} {{- macros.test('username') }} EOF - ), array('macro', 'import'), array('escape')); + ], ['macro', 'import'], ['escape']); - $this->assertEquals('

username

', $twig->loadTemplate('index')->render(array())); + $this->assertEquals('

username

', $twig->loadTemplate('index')->render([])); } public function testSandboxDisabledAfterIncludeFunctionError() { - $twig = $this->getEnvironment(false, array(), self::$templates); + $twig = $this->getEnvironment(false, [], self::$templates); $e = null; try { @@ -278,10 +278,10 @@ EOF $this->assertFalse($twig->getExtension('Twig_Extension_Sandbox')->isSandboxed(), 'Sandboxed include() function call should not leave Sandbox enabled when an error occurs.'); } - protected function getEnvironment($sandboxed, $options, $templates, $tags = array(), $filters = array(), $methods = array(), $properties = array(), $functions = array()) + protected function getEnvironment($sandboxed, $options, $templates, $tags = [], $filters = [], $methods = [], $properties = [], $functions = []) { $loader = new Twig_Loader_Array($templates); - $twig = new Twig_Environment($loader, array_merge(array('debug' => true, 'cache' => false, 'autoescape' => false), $options)); + $twig = new Twig_Environment($loader, array_merge(['debug' => true, 'cache' => false, 'autoescape' => false], $options)); $policy = new Twig_Sandbox_SecurityPolicy($tags, $filters, $methods, $properties, $functions); $twig->addExtension(new Twig_Extension_Sandbox($policy, $sandboxed)); @@ -291,13 +291,13 @@ EOF class FooObject { - public static $called = array('__toString' => 0, 'foo' => 0, 'getFooBar' => 0); + public static $called = ['__toString' => 0, 'foo' => 0, 'getFooBar' => 0]; public $bar = 'bar'; public static function reset() { - self::$called = array('__toString' => 0, 'foo' => 0, 'getFooBar' => 0); + self::$called = ['__toString' => 0, 'foo' => 0, 'getFooBar' => 0]; } public function __toString() diff --git a/vendor/twig/twig/test/Twig/Tests/FactoryRuntimeLoaderTest.php b/vendor/twig/twig/test/Twig/Tests/FactoryRuntimeLoaderTest.php index f97d30694..e8fc01e2d 100644 --- a/vendor/twig/twig/test/Twig/Tests/FactoryRuntimeLoaderTest.php +++ b/vendor/twig/twig/test/Twig/Tests/FactoryRuntimeLoaderTest.php @@ -13,7 +13,7 @@ class Twig_Tests_FactoryRuntimeLoaderTest extends \PHPUnit\Framework\TestCase { public function testLoad() { - $loader = new Twig_FactoryRuntimeLoader(array('stdClass' => 'getRuntime')); + $loader = new Twig_FactoryRuntimeLoader(['stdClass' => 'getRuntime']); $this->assertInstanceOf('stdClass', $loader->load('stdClass')); } diff --git a/vendor/twig/twig/test/Twig/Tests/FileCachingTest.php b/vendor/twig/twig/test/Twig/Tests/FileCachingTest.php index e8a23eade..d6d341e05 100644 --- a/vendor/twig/twig/test/Twig/Tests/FileCachingTest.php +++ b/vendor/twig/twig/test/Twig/Tests/FileCachingTest.php @@ -27,7 +27,7 @@ class Twig_Tests_FileCachingTest extends \PHPUnit\Framework\TestCase $this->markTestSkipped(sprintf('Unable to run the tests as "%s" is not writable.', $this->tmpDir)); } - $this->env = new Twig_Environment(new Twig_Loader_Array(array('index' => 'index', 'index2' => 'index2')), array('cache' => $this->tmpDir)); + $this->env = new Twig_Environment(new Twig_Loader_Array(['index' => 'index', 'index2' => 'index2']), ['cache' => $this->tmpDir]); } protected function tearDown() diff --git a/vendor/twig/twig/test/Twig/Tests/FileExtensionEscapingStrategyTest.php b/vendor/twig/twig/test/Twig/Tests/FileExtensionEscapingStrategyTest.php index a983a47c8..6cdff00fa 100644 --- a/vendor/twig/twig/test/Twig/Tests/FileExtensionEscapingStrategyTest.php +++ b/vendor/twig/twig/test/Twig/Tests/FileExtensionEscapingStrategyTest.php @@ -21,31 +21,31 @@ class Twig_Tests_FileExtensionEscapingStrategyTest extends \PHPUnit\Framework\Te public function getGuessData() { - return array( + return [ // default - array('html', 'foo.html'), - array('html', 'foo.html.twig'), - array('html', 'foo'), - array('html', 'foo.bar.twig'), - array('html', 'foo.txt/foo'), - array('html', 'foo.txt/foo.js/'), + ['html', 'foo.html'], + ['html', 'foo.html.twig'], + ['html', 'foo'], + ['html', 'foo.bar.twig'], + ['html', 'foo.txt/foo'], + ['html', 'foo.txt/foo.js/'], // css - array('css', 'foo.css'), - array('css', 'foo.css.twig'), - array('css', 'foo.twig.css'), - array('css', 'foo.js.css'), - array('css', 'foo.js.css.twig'), + ['css', 'foo.css'], + ['css', 'foo.css.twig'], + ['css', 'foo.twig.css'], + ['css', 'foo.js.css'], + ['css', 'foo.js.css.twig'], // js - array('js', 'foo.js'), - array('js', 'foo.js.twig'), - array('js', 'foo.txt/foo.js'), - array('js', 'foo.txt.twig/foo.js'), + ['js', 'foo.js'], + ['js', 'foo.js.twig'], + ['js', 'foo.txt/foo.js'], + ['js', 'foo.txt.twig/foo.js'], // txt - array(false, 'foo.txt'), - array(false, 'foo.txt.twig'), - ); + [false, 'foo.txt'], + [false, 'foo.txt.twig'], + ]; } } diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/autoescape/block.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/autoescape/block.test index 1290973a5..a80b80c37 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/autoescape/block.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/autoescape/block.test @@ -14,8 +14,8 @@ blocks and autoescape {% set _content = block('content')|raw %} {{ _content|raw }} --DATA-- -return array('br' => '
') +return ['br' => '
'] --CONFIG-- -return array('autoescape' => 'name') +return ['autoescape' => 'name'] --EXPECT-- <br /> diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/autoescape/name.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/autoescape/name.test index 98e89399a..5ad573cf0 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/autoescape/name.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/autoescape/name.test @@ -12,9 +12,9 @@ --TEMPLATE(index.txt.twig)-- {{ br -}} --DATA-- -return array('br' => '
') +return ['br' => '
'] --CONFIG-- -return array('autoescape' => 'name') +return ['autoescape' => 'name'] --EXPECT-- <br /> \u003Cbr\u0020\/\u003E diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/multiline_array_with_undefined_variable.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/multiline_array_with_undefined_variable.test index 7ff2eedb7..8bb3c5f24 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/multiline_array_with_undefined_variable.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/multiline_array_with_undefined_variable.test @@ -13,6 +13,6 @@ Exception for multiline array with undefined variable foo2: foo2, } %} --DATA-- -return array('foobar' => 'foobar') +return ['foobar' => 'foobar'] --EXCEPTION-- Twig_Error_Runtime: Variable "foo2" does not exist in "index.twig" at line 11. diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/multiline_array_with_undefined_variable_again.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/multiline_array_with_undefined_variable_again.test index c425069bf..5ef5e4900 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/multiline_array_with_undefined_variable_again.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/multiline_array_with_undefined_variable_again.test @@ -13,6 +13,6 @@ Exception for multiline array with undefined variable foo2: foo2, } %} --DATA-- -return array() +return [] --EXCEPTION-- Twig_Error_Runtime: Variable "foobar" does not exist in "index.twig" at line 7. diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/multiline_function_with_undefined_variable.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/multiline_function_with_undefined_variable.test index 2f94a5ee9..07b82c0c4 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/multiline_function_with_undefined_variable.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/multiline_function_with_undefined_variable.test @@ -7,6 +7,6 @@ Exception for multile function with undefined variable --TEMPLATE(foo)-- Foo --DATA-- -return array() +return [] --EXCEPTION-- Twig_Error_Runtime: Variable "with_context" does not exist in "index.twig" at line 3. diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/multiline_tag_with_undefined_variable.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/multiline_tag_with_undefined_variable.test index 7b3b1daf9..74803c095 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/multiline_tag_with_undefined_variable.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/multiline_tag_with_undefined_variable.test @@ -7,6 +7,6 @@ Exception for multiline tag with undefined variable --TEMPLATE(foo)-- Foo --DATA-- -return array() +return [] --EXCEPTION-- Twig_Error_Runtime: Variable "vars" does not exist in "index.twig" at line 3. diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/undefined_template_in_child_template.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/undefined_template_in_child_template.test index 1992510b2..1f23723d1 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/undefined_template_in_child_template.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/exceptions/undefined_template_in_child_template.test @@ -10,6 +10,6 @@ Exception for an undefined template in a child template {% block sidebar %} {% endblock %} --DATA-- -return array() +return [] --EXCEPTION-- Twig_Error_Loader: Template "include.twig" is not defined in "index.twig" at line 5. diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/_self.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/_self.test index 32fed8fd0..fb88f4c85 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/_self.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/_self.test @@ -3,6 +3,6 @@ _self returns the template name --TEMPLATE-- {{ _self }} --DATA-- -return array() +return [] --EXPECT-- index.twig diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/array.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/array.test index c69b1192f..bf6033356 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/array.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/array.test @@ -38,7 +38,7 @@ Twig supports array notation {{ ary|keys|join(',') }} {{ ary|join(',') }} --DATA-- -return array('bar' => 'bar', 'foo' => array('bar' => 'bar')) +return ['bar' => 'bar', 'foo' => ['bar' => 'bar']] --EXPECT-- 1,2 foo,bar diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/array_call.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/array_call.test index f3df328fe..8c7a2ee7c 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/array_call.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/array_call.test @@ -6,7 +6,7 @@ Twig supports method calls {{ items[foo] }} {{ items[items[foo]] }} --DATA-- -return array('foo' => 'bar', 'items' => array('foo' => 'bar', 'bar' => 'foo')) +return ['foo' => 'bar', 'items' => ['foo' => 'bar', 'bar' => 'foo']] --EXPECT-- bar bar diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/binary.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/binary.test index f5e68456d..b4e8be58d 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/binary.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/binary.test @@ -22,7 +22,7 @@ Twig supports binary operations (+, -, *, /, ~, %, and, or) {{ foo ~ bar }} {{ 20 // 7 }} --DATA-- -return array('foo' => 'bar', 'bar' => 'foo') +return ['foo' => 'bar', 'bar' => 'foo'] --EXPECT-- 2 1 diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/bitwise.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/bitwise.test index 74fe6cabb..c2bda1cc6 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/bitwise.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/bitwise.test @@ -6,7 +6,7 @@ Twig supports bitwise operations {{ 1 b-xor 5 }} {{ (1 and 0 b-or 0) is same as(1 and (0 b-or 0)) ? 'ok' : 'ko' }} --DATA-- -return array() +return [] --EXPECT-- 1 5 diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/comparison.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/comparison.test index 726b85075..2811634f7 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/comparison.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/comparison.test @@ -6,7 +6,7 @@ Twig supports comparison operators (==, !=, <, >, >=, <=) {{ 1 == 1 }}/{{ 1 == 2 }} {{ 1 != 1 }}/{{ 1 != 2 }} --DATA-- -return array() +return [] --EXPECT-- ///1 1//1/1 diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/divisibleby.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/divisibleby.test index 238dd2790..f1bf5681e 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/divisibleby.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/divisibleby.test @@ -9,7 +9,7 @@ Twig supports the "divisible by" operator by (3) ? 'OK' }} --DATA-- -return array() +return [] --EXPECT-- OK OK diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/dotdot.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/dotdot.test index 9cd0676ce..0efa93056 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/dotdot.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/dotdot.test @@ -11,7 +11,7 @@ Twig supports the .. operator {% for i in 0 + 1 .. 10 - 1 %}{{ i }} {% endfor %} --DATA-- -return array('foo' => array(1, 10)) +return ['foo' => [1, 10]] --EXPECT-- 0 1 2 3 4 5 6 7 8 9 10 a b c d e f g h i j k l m n o p q r s t u v w x y z diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/ends_with.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/ends_with.test index 9ad5e5e8e..c8086d6d4 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/ends_with.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/ends_with.test @@ -12,7 +12,7 @@ Twig supports the "ends with" operator {{ false ends with false ? 'OK' : 'KO' }} {{ false ends with '' ? 'OK' : 'KO' }} --DATA-- -return array() +return [] --EXPECT-- OK OK diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/floats.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/floats.test new file mode 100644 index 000000000..cf563a032 --- /dev/null +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/floats.test @@ -0,0 +1,16 @@ +--TEST-- +Twig compiles floats properly +--CONDITION-- +version_compare(phpversion(), '7.0.0', '>=') +--TEMPLATE-- +{% set val2 = 0.0 %} + +{{ val is same as (0.0) ? 'Yes' : 'No' }} +{{ val2 is same as (0.0) ? 'Yes' : 'No' }} +{{ val is same as (val2) ? 'Yes' : 'No' }} +--DATA-- +return array('val' => 0.0) +--EXPECT-- +Yes +Yes +Yes diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/grouping.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/grouping.test index 79f8e0b0d..069ebf793 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/grouping.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/grouping.test @@ -3,6 +3,6 @@ Twig supports grouping of expressions --TEMPLATE-- {{ (2 + 2) / 2 }} --DATA-- -return array() +return [] --EXPECT-- 2 diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/literals.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/literals.test index 7ae3bae95..308e8df2a 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/literals.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/literals.test @@ -10,7 +10,7 @@ Twig supports literals 7 {{ null }} 8 {{ NULL }} --DATA-- -return array() +return [] --EXPECT-- 1 1 2 1 diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/magic_call.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/magic_call.test index 1a27a2d6f..60417e04f 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/magic_call.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/magic_call.test @@ -21,7 +21,7 @@ class TestClassForMagicCallAttributes } } -return array('foo' => new TestClassForMagicCallAttributes()) +return ['foo' => new TestClassForMagicCallAttributes()] --EXPECT-- foo_from_call bar_from_getbar diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/matches.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/matches.test index b6c771657..95459c3b0 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/matches.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/matches.test @@ -5,7 +5,7 @@ Twig supports the "matches" operator {{ 'foo' matches '/^fo/' ? 'OK' : 'KO' }} {{ 'foo' matches '/O/i' ? 'OK' : 'KO' }} --DATA-- -return array() +return [] --EXPECT-- OK OK diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/method_call.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/method_call.test index 5f801e635..1826842b6 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/method_call.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/method_call.test @@ -12,9 +12,9 @@ Twig supports method calls {{ items.foo.in }} {{ items.foo.not }} --DATA-- -return array('foo' => 'bar', 'items' => array('foo' => new TwigTestFoo(), 'bar' => 'foo')) +return ['foo' => 'bar', 'items' => ['foo' => new TwigTestFoo(), 'bar' => 'foo']] --CONFIG-- -return array('strict_variables' => false) +return ['strict_variables' => false] --EXPECT-- foo foo diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/negative_numbers.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/negative_numbers.test index 1853b1b06..c2a6e3402 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/negative_numbers.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/negative_numbers.test @@ -8,7 +8,7 @@ Twig manages negative numbers correctly {{ 5 + -1 }} {{ 5 + - 1 }} --DATA-- -return array() +return [] --EXPECT-- -1 -1 diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/operators_as_variables.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/operators_as_variables.test index fe29d08bb..fa9a843c0 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/operators_as_variables.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/operators_as_variables.test @@ -7,7 +7,7 @@ Twig allows to use named operators as variable names {{ in }} {{ is }} --DATA-- -return array('matches' => array(1, 2, 3), 'in' => 'in', 'is' => 'is') +return ['matches' => [1, 2, 3], 'in' => 'in', 'is' => 'is'] --EXPECT-- 1 2 diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/postfix.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/postfix.test index 542c35046..276cbf197 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/postfix.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/postfix.test @@ -12,7 +12,7 @@ Twig parses postfix expressions {{ macros.foo() }} {{ (macros).foo() }} --DATA-- -return array(); +return [] --EXPECT-- a A diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/power.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/power.test index eacc98f86..84fd23692 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/power.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/power.test @@ -9,7 +9,7 @@ Twig parses power expressions {{ b ** a }} {{ b ** b }} --DATA-- -return array('a' => 4, 'b' => -2); +return ['a' => 4, 'b' => -2] --EXPECT-- 8 -8 diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/sameas.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/sameas.test index 601201deb..83f3691f9 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/sameas.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/sameas.test @@ -11,7 +11,7 @@ Twig supports the "same as" operator as (true) ? 'OK' }} --DATA-- -return array() +return [] --EXPECT-- OK OK diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/starts_with.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/starts_with.test index 75d331e90..a78ff1eac 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/starts_with.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/starts_with.test @@ -13,7 +13,7 @@ with 'f' ? 'OK' : 'KO' }} {{ 'a' starts with false ? 'OK' : 'KO' }} {{ false starts with '' ? 'OK' : 'KO' }} --DATA-- -return array() +return [] --EXPECT-- OK OK diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/strings.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/strings.test index a9116613e..f402c8939 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/strings.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/strings.test @@ -4,7 +4,7 @@ Twig supports string interpolation {{ "foo #{"foo #{bar} baz"} baz" }} {{ "foo #{bar}#{bar} baz" }} --DATA-- -return array('bar' => 'BAR'); +return ['bar' => 'BAR'] --EXPECT-- foo foo BAR baz baz foo BARBAR baz diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/ternary_operator.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/ternary_operator.test index 0e6fa96e2..37eccc0f5 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/ternary_operator.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/ternary_operator.test @@ -8,7 +8,7 @@ Twig supports the ternary operator {{ 1 == 1 ? 'foo
':'' }} {{ foo ~ (bar ? ('-' ~ bar) : '') }} --DATA-- -return array('foo' => 'foo', 'bar' => 'bar') +return ['foo' => 'foo', 'bar' => 'bar'] --EXPECT-- YES NO diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/ternary_operator_noelse.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/ternary_operator_noelse.test index fdc660fc5..8b0f7284b 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/ternary_operator_noelse.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/ternary_operator_noelse.test @@ -4,7 +4,7 @@ Twig supports the ternary operator {{ 1 ? 'YES' }} {{ 0 ? 'YES' }} --DATA-- -return array() +return [] --EXPECT-- YES diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/ternary_operator_nothen.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/ternary_operator_nothen.test index 9057e8370..ecd6b7546 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/ternary_operator_nothen.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/ternary_operator_nothen.test @@ -4,7 +4,7 @@ Twig supports the ternary operator {{ 'YES' ?: 'NO' }} {{ 0 ?: 'NO' }} --DATA-- -return array() +return [] --EXPECT-- YES NO diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/two_word_operators_as_variables.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/two_word_operators_as_variables.test index 0eaabb446..ad142918c 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/two_word_operators_as_variables.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/two_word_operators_as_variables.test @@ -3,6 +3,6 @@ Twig does not allow to use two-word named operators as variable names --TEMPLATE-- {{ starts with }} --DATA-- -return array() +return [] --EXCEPTION-- Twig_Error_Syntax: Unexpected token "operator" of value "starts with" in "index.twig" at line 2. diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/unary.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/unary.test index b79219a2a..542253119 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/unary.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/unary.test @@ -5,7 +5,7 @@ Twig supports unary operators (not, -, +) {{ +1 + 1 }}/{{ -1 - 1 }} {{ not (false or true) }} --DATA-- -return array() +return [] --EXPECT-- /1 2/-2 diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/unary_macro_arguments.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/unary_macro_arguments.test index ad84a9c26..27deba3ef 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/unary_macro_arguments.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/unary_macro_arguments.test @@ -13,7 +13,7 @@ Twig manages negative numbers as default parameters {% macro positive_number1(nb = +1) %}{{ nb }}{% endmacro %} {% macro positive_number2(nb = ++1) %}{{ nb }}{% endmacro %} --DATA-- -return array() +return [] --EXPECT-- -1 1 diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/unary_precedence.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/unary_precedence.test index cc6eef8d2..9c56ab12c 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/unary_precedence.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/expressions/unary_precedence.test @@ -6,7 +6,7 @@ Twig unary operators precedence {{ -1 * -1 }} {{ 4 / -1 * 5 }} --DATA-- -return array() +return [] --EXPECT-- -2 0 diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/abs.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/abs.test index 27e93fd63..7518769d4 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/abs.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/abs.test @@ -14,7 +14,7 @@ {{ number5|abs }} {{ number6|abs }} --DATA-- -return array('number1' => -5.5, 'number2' => -5, 'number3' => -0, 'number4' => 0, 'number5' => 5, 'number6' => 5.5) +return ['number1' => -5.5, 'number2' => -5, 'number3' => -0, 'number4' => 0, 'number5' => 5, 'number6' => 5.5] --EXPECT-- 5.5 5 diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch.test index cb6de7f97..0acf25bd6 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch.test @@ -9,7 +9,7 @@
{% endfor %} --DATA-- -return array('items' => array('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j')) +return ['items' => ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j']] --EXPECT--
a
diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_float.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_float.test index e2ec4beb2..dad004ec2 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_float.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_float.test @@ -9,7 +9,7 @@
{% endfor %} --DATA-- -return array('items' => array('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j')) +return ['items' => ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j']] --EXPECT--
a
diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_with_empty_fill.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_with_empty_fill.test index af996f246..411b4fc74 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_with_empty_fill.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_with_empty_fill.test @@ -11,7 +11,7 @@ {% endfor %} --DATA-- -return array('items' => array('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j')) +return ['items' => ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j']] --EXPECT-- diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_with_exact_elements.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_with_exact_elements.test index 72483f4b5..750d1557a 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_with_exact_elements.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_with_exact_elements.test @@ -9,7 +9,7 @@ {% endfor %} --DATA-- -return array('items' => array('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l')) +return ['items' => ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l']] --EXPECT--
a
diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_with_fill.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_with_fill.test index 746295f1b..5d470d005 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_with_fill.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_with_fill.test @@ -11,7 +11,7 @@ {% endfor %}
--DATA-- -return array('items' => array('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j')) +return ['items' => ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j']] --EXPECT-- diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_with_keys.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_with_keys.test index 6015380e2..f3279a636 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_with_keys.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_with_keys.test @@ -4,7 +4,7 @@ {{ {'foo': 'bar', 'key': 'value'}|batch(4)|first|keys|join(',') }} {{ {'foo': 'bar', 'key': 'value'}|batch(4, 'fill')|first|keys|join(',') }} --DATA-- -return array() +return [] --EXPECT-- foo,key foo,key,0,1 diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_with_zero_elements.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_with_zero_elements.test index b9c058d6b..bc303da8a 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_with_zero_elements.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/batch_with_zero_elements.test @@ -4,7 +4,7 @@ {{ []|batch(3)|length }} {{ []|batch(3, 'fill')|length }} --DATA-- -return array() +return [] --EXPECT-- 0 0 diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/convert_encoding.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/convert_encoding.test index 380b04bb8..db8acedef 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/convert_encoding.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/convert_encoding.test @@ -5,6 +5,6 @@ function_exists('iconv') || function_exists('mb_convert_encoding') --TEMPLATE-- {{ "愛していますか?"|convert_encoding('ISO-2022-JP', 'UTF-8')|convert_encoding('UTF-8', 'ISO-2022-JP') }} --DATA-- -return array() +return [] --EXPECT-- 愛していますか? diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date.test index d17e5e2f0..7878fe208 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date.test @@ -40,7 +40,7 @@ {{ '2010-01-28 15:00:00'|date(timezone="Asia/Hong_Kong") }} --DATA-- date_default_timezone_set('Europe/Paris'); -return array( +return [ 'date1' => mktime(13, 45, 0, 10, 4, 2010), 'date2' => new DateTime('2010-10-04 13:45'), 'date3' => '2010-10-04 13:45', @@ -49,7 +49,7 @@ return array( 'date6' => new DateTime('2010-10-04 13:45', new DateTimeZone('America/New_York')), 'date7' => '2010-01-28T15:00:00+04:00', 'timezone1' => new DateTimeZone('America/New_York'), -) +] --EXPECT-- October 4, 2010 13:45 04/10/2010 diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_default_format.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_default_format.test index 6ad504cdf..bd2786368 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_default_format.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_default_format.test @@ -6,9 +6,9 @@ --DATA-- date_default_timezone_set('UTC'); $twig->getExtension('Twig_Extension_Core')->setDateFormat('Y-m-d', '%d days %h hours'); -return array( +return [ 'date1' => mktime(13, 45, 0, 10, 4, 2010), -) +] --EXPECT-- 2010-10-04 04/10/2010 diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_default_format_interval.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_default_format_interval.test index be4a642e7..8e0f26e75 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_default_format_interval.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_default_format_interval.test @@ -8,9 +8,9 @@ version_compare(phpversion(), '5.3.0', '>=') --DATA-- date_default_timezone_set('UTC'); $twig->getExtension('Twig_Extension_Core')->setDateFormat('Y-m-d', '%d days %h hours'); -return array( +return [ 'date2' => new DateInterval('P2D'), -) +] --EXPECT-- 2 days 0 hours 2 days diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_immutable.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_immutable.test index 4e1832562..4192c1aed 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_immutable.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_immutable.test @@ -17,11 +17,11 @@ version_compare(phpversion(), '5.5.0', '>=') {{ date2|date('e', false) }} --DATA-- date_default_timezone_set('Europe/Paris'); -return array( +return [ 'date1' => new DateTimeImmutable('2010-10-04 13:45'), 'date2' => new DateTimeImmutable('2010-10-04 13:45', new DateTimeZone('America/New_York')), 'timezone1' => new DateTimeZone('America/New_York'), -) +] --EXPECT-- October 4, 2010 13:45 04/10/2010 diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_interval.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_interval.test index 0c8c6f1a2..4c9f851a5 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_interval.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_interval.test @@ -8,11 +8,11 @@ version_compare(phpversion(), '5.3.0', '>=') {{ date1|date('%d days %h hours', timezone1) }} --DATA-- date_default_timezone_set('UTC'); -return array( +return [ 'date1' => new DateInterval('P2D'), // This should have no effect on DateInterval formatting 'timezone1' => new DateTimeZone('America/New_York'), -) +] --EXPECT-- 2 days 2 days 0 hours diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_modify.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_modify.test index 53d3a69cd..055ae9719 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_modify.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_modify.test @@ -5,10 +5,10 @@ {{ date2|date_modify('-1day')|date('Y-m-d H:i:s') }} --DATA-- date_default_timezone_set('UTC'); -return array( +return [ 'date1' => '2010-10-04 13:45', 'date2' => new DateTime('2010-10-04 13:45'), -) +] --EXPECT-- 2010-10-03 13:45:00 2010-10-03 13:45:00 diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_namedargs.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_namedargs.test index 4ecde8a18..2d1aa1344 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_namedargs.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/date_namedargs.test @@ -6,7 +6,7 @@ {{ date|date('d/m/Y H:i:s P', timezone='America/Chicago') }} --DATA-- date_default_timezone_set('UTC'); -return array('date' => mktime(13, 45, 0, 10, 4, 2010)) +return ['date' => mktime(13, 45, 0, 10, 4, 2010)] --EXPECT-- 04/10/2010 08:45:00 -05:00 04/10/2010 08:45:00 -05:00 diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/default.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/default.test index b8d1d66f5..058873aae 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/default.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/default.test @@ -39,22 +39,22 @@ Deep nested: {{ object.self.undefinedMethod |default('default') is same as('default') ? 'ok' : 'ko' }} {{ object.undefinedMethod.self |default('default') is same as('default') ? 'ok' : 'ko' }} --DATA-- -return array( +return [ 'definedVar' => 'defined', 'zeroVar' => 0, 'emptyVar' => '', 'nullVar' => null, - 'nested' => array( + 'nested' => [ 'definedVar' => 'defined', 'zeroVar' => 0, 'emptyVar' => '', 'nullVar' => null, - 'definedArray' => array(0), - ), + 'definedArray' => [0], + ], 'object' => new TwigTestFoo(), -) +] --CONFIG-- -return array('strict_variables' => false) +return ['strict_variables' => false] --EXPECT-- Variable: ok @@ -94,22 +94,22 @@ ok ok ok --DATA-- -return array( +return [ 'definedVar' => 'defined', 'zeroVar' => 0, 'emptyVar' => '', 'nullVar' => null, - 'nested' => array( + 'nested' => [ 'definedVar' => 'defined', 'zeroVar' => 0, 'emptyVar' => '', 'nullVar' => null, - 'definedArray' => array(0), - ), + 'definedArray' => [0], + ], 'object' => new TwigTestFoo(), -) +] --CONFIG-- -return array('strict_variables' => true) +return ['strict_variables' => true] --EXPECT-- Variable: ok diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/dynamic_filter.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/dynamic_filter.test index 93c5913f2..27dc8784c 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/dynamic_filter.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/dynamic_filter.test @@ -4,7 +4,7 @@ dynamic filter {{ 'bar'|foo_path }} {{ 'bar'|a_foo_b_bar }} --DATA-- -return array() +return [] --EXPECT-- foo/bar a/b/bar diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/escape.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/escape.test index a606c1065..131f5b4e7 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/escape.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/escape.test @@ -3,6 +3,6 @@ --TEMPLATE-- {{ "foo
"|e }} --DATA-- -return array() +return [] --EXPECT-- foo <br /> diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/escape_html_attr.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/escape_html_attr.test index 009a24532..10e327554 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/escape_html_attr.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/escape_html_attr.test @@ -3,6 +3,6 @@ --TEMPLATE-- {{ '
'|escape('html_attr') }} --DATA-- -return array() +return [] --EXPECT-- <br /> diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/escape_javascript.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/escape_javascript.test index 8e7278119..4c2fb7a36 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/escape_javascript.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/escape_javascript.test @@ -3,6 +3,6 @@ --TEMPLATE-- {{ "é ♜ 𝌆"|e('js') }} --DATA-- -return array() +return [] --EXPECT-- \u00E9\u0020\u265C\u0020\uD834\uDF06 diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/escape_non_supported_charset.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/escape_non_supported_charset.test index bba26a0df..93f34297b 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/escape_non_supported_charset.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/escape_non_supported_charset.test @@ -3,6 +3,6 @@ --TEMPLATE-- {{ "愛していますか?
"|e }} --DATA-- -return array() +return [] --EXPECT-- 愛していますか? <br /> diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/first.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/first.test index aa54645c3..c164e4f67 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/first.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/first.test @@ -8,7 +8,7 @@ {{ 'Ä€é'|first }} {{ ''|first }} --DATA-- -return array('arr' => new ArrayObject(array(1, 2, 3, 4))) +return ['arr' => new ArrayObject([1, 2, 3, 4])] --EXPECT-- 1 1 diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/force_escape.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/force_escape.test index eb9cba7cf..7efbe3200 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/force_escape.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/force_escape.test @@ -11,7 +11,7 @@ {{ foo }} {% endautoescape %} --DATA-- -return array() +return [] --EXPECT-- foo<br /> \u0020\u0020\u0020\u0020foo\u003Cbr\u0020\/\u003E\n diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/format.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/format.test index 97221ff80..efaf8317a 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/format.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/format.test @@ -3,6 +3,6 @@ --TEMPLATE-- {{ string|format(foo, 3) }} --DATA-- -return array('string' => '%s/%d', 'foo' => 'bar') +return ['string' => '%s/%d', 'foo' => 'bar'] --EXPECT-- bar/3 diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/join.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/join.test index b342c174c..1a703e9b4 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/join.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/join.test @@ -4,9 +4,35 @@ {{ ["foo", "bar"]|join(', ') }} {{ foo|join(', ') }} {{ bar|join(', ') }} + +{{ ["foo", "bar"]|join(', ', ' and ') }} +{{ foo|join(', ', ' and ') }} +{{ bar|join(', ', ' and ') }} +{{ ["one", "two", "three"]|join(', ', ' and ') }} +{{ ["a", "b", "c"]|join('','-') }} +{{ ["a", "b", "c"]|join('-','-') }} +{{ ["a", "b", "c"]|join('-','') }} +{{ ["hello"]|join('|','-') }} + +{{ {"a": "w", "b": "x", "c": "y", "d": "z"}|join }} +{{ {"a": "w", "b": "x", "c": "y", "d": "z"}|join(',') }} +{{ {"a": "w", "b": "x", "c": "y", "d": "z"}|join(',','-') }} --DATA-- -return array('foo' => new TwigTestFoo(), 'bar' => new ArrayObject(array(3, 4))) +return ['foo' => new TwigTestFoo(), 'bar' => new ArrayObject([3, 4])] --EXPECT-- foo, bar 1, 2 3, 4 + +foo and bar +1 and 2 +3 and 4 +one, two and three +ab-c +a-b-c +a-bc +hello + +wxyz +w,x,y,z +w,x,y-z diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/json_encode.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/json_encode.test index 1738d40cd..ea45218f6 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/json_encode.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/json_encode.test @@ -5,7 +5,7 @@ {{ foo|json_encode|raw }} {{ [foo, "foo"]|json_encode|raw }} --DATA-- -return array('foo' => new Twig_Markup('foo', 'UTF-8')) +return ['foo' => new Twig_Markup('foo', 'UTF-8')] --EXPECT-- "foo" "foo" diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/last.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/last.test index 1b8031ee8..624e098f5 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/last.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/last.test @@ -8,7 +8,7 @@ {{ 'Ä€é'|last }} {{ ''|last }} --DATA-- -return array('arr' => new ArrayObject(array(1, 2, 3, 4))) +return ['arr' => new ArrayObject([1, 2, 3, 4])] --EXPECT-- 4 4 diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/length.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/length.test index bad5cf56f..67d2f6ac8 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/length.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/length.test @@ -12,18 +12,18 @@ {{ non_countable|length }} {{ simple_xml_element|length }} --DATA-- -return array( - 'array' => array(1, 4), +return [ + 'array' => [1, 4], 'string' => 'foo', 'number' => 1000, 'to_string_able' => new ToStringStub('foobar'), 'countable' => new CountableStub(42), /* also asserts we do *not* call __toString() */ - 'iterator_aggregate' => new IteratorAggregateStub(array('a', 'b', 'c')), /* also asserts we do *not* call __toString() */ + 'iterator_aggregate' => new IteratorAggregateStub(['a', 'b', 'c']), /* also asserts we do *not* call __toString() */ 'null' => null, 'magic' => new MagicCallStub(), /* used to assert we do *not* call __call */ 'non_countable' => new \StdClass(), 'simple_xml_element' => new \SimpleXMLElement(''), -); +] --EXPECT-- 2 3 diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/length_utf8.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/length_utf8.test index 5d5e24361..be2170715 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/length_utf8.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/length_utf8.test @@ -6,7 +6,7 @@ function_exists('mb_get_info') {{ string|length }} {{ markup|length }} --DATA-- -return array('string' => 'été', 'markup' => new Twig_Markup('foo', 'UTF-8')) +return ['string' => 'été', 'markup' => new Twig_Markup('foo', 'UTF-8')] --EXPECT-- 3 3 diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/merge.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/merge.test index 81371a41b..670077abb 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/merge.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/merge.test @@ -8,7 +8,14 @@ {{ numerics|merge([4, 5, 6])|join }} {{ traversable.a|merge(traversable.b)|join }} --DATA-- -return array('items' => array('foo' => 'bar'), 'numerics' => array(1, 2, 3), 'traversable' => array('a' => new ArrayObject(array(0 => 1, 1 => 2, 2 => 3)), 'b' => new ArrayObject(array('a' => 'b')))) +return [ + 'items' => ['foo' => 'bar'], + 'numerics' => [1, 2, 3], + 'traversable' => [ + 'a' => new ArrayObject([0 => 1, 1 => 2, 2 => 3]), + 'b' => new ArrayObject(['a' => 'b']) + ] +] --EXPECT-- barfoo foobar diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/nl2br.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/nl2br.test index 6545a9bb0..524ec45f9 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/nl2br.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/nl2br.test @@ -4,7 +4,7 @@ {{ "I like Twig.\nYou will like it too.\n\nEverybody like it!"|nl2br }} {{ text|nl2br }} --DATA-- -return array('text' => "If you have some HTML\nit will be escaped.") +return ['text' => "If you have some HTML\nit will be escaped."] --EXPECT-- I like Twig.
You will like it too.
diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/number_format.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/number_format.test index 639a8659f..7f1e2e16a 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/number_format.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/number_format.test @@ -8,7 +8,7 @@ {{ 1020.25|number_format(2, ',') }} {{ 1020.25|number_format(2, ',', '.') }} --DATA-- -return array(); +return [] --EXPECT-- 20 20 diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/number_format_default.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/number_format_default.test index 65c1cdb48..c550bb674 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/number_format_default.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/number_format_default.test @@ -10,7 +10,7 @@ {{ 1020.25|number_format(2, ',', '.') }} --DATA-- $twig->getExtension('Twig_Extension_Core')->setNumberFormat(2, '!', '='); -return array(); +return [] --EXPECT-- 20!00 20!25 diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/replace.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/replace.test index 06be7e270..02294da27 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/replace.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/replace.test @@ -5,7 +5,7 @@ {{ 'I like single replace operation only %that%'|replace({'%that%' : '%that%1'}) }} {{ 'I like %this% and %that%.'|replace(traversable) }} --DATA-- -return array('traversable' => new ArrayObject(array('%this%' => 'foo', '%that%' => 'bar'))) +return ['traversable' => new ArrayObject(['%this%' => 'foo', '%that%' => 'bar'])] --EXPECT-- I liké foo and bar. I like single replace operation only %that%1 diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/replace_invalid_arg.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/replace_invalid_arg.test index 2143a8690..393b430c9 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/replace_invalid_arg.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/replace_invalid_arg.test @@ -3,6 +3,6 @@ Exception for invalid argument type in replace call --TEMPLATE-- {{ 'test %foo%'|replace(stdClass) }} --DATA-- -return array('stdClass' => new stdClass()) +return ['stdClass' => new stdClass()] --EXCEPTION-- Twig_Error_Runtime: The "replace" filter expects an array or "Traversable" as replace values, got "stdClass" in "index.twig" at line 2. diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/reverse.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/reverse.test index 7948ac45f..97109f0e1 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/reverse.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/reverse.test @@ -8,7 +8,7 @@ {{ {'a': 'c', 'b': 'a'}|reverse(preserveKeys=true)|join(glue=',') }} {{ {'a': 'c', 'b': 'a'}|reverse(preserve_keys=true)|join(glue=',') }} --DATA-- -return array('arr' => new ArrayObject(array(1, 2, 3, 4))) +return ['arr' => new ArrayObject([1, 2, 3, 4])] --EXPECT-- 4321 tnemenèvé4321 diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/round.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/round.test index 57806b619..709237543 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/round.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/round.test @@ -10,7 +10,7 @@ {{ 21.3|round(-1, 'ceil')}} {{ 21.3|round(-1, 'floor')}} --DATA-- -return array() +return [] --EXPECT-- 3 2 diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/slice.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/slice.test index b49b89fe5..6166ea423 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/slice.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/slice.test @@ -26,7 +26,7 @@ {{ arr[2:]|join('') }} {{ xml|slice(1)|join('')}} --DATA-- -return array('start' => 1, 'length' => 2, 'arr' => new ArrayObject(array(1, 2, 3, 4)), 'xml' => new SimpleXMLElement('12')) +return ['start' => 1, 'length' => 2, 'arr' => new ArrayObject([1, 2, 3, 4]), 'xml' => new SimpleXMLElement('12')] --EXPECT-- 23 23 diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/sort.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/sort.test index c67c18ea9..fbd103166 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/sort.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/sort.test @@ -5,7 +5,7 @@ {{ array2|sort|join }} {{ traversable|sort|join }} --DATA-- -return array('array1' => array(4, 1), 'array2' => array('foo', 'bar'), 'traversable' => new ArrayObject(array(0 => 3, 1 => 2, 2 => 1))) +return ['array1' => [4, 1], 'array2' => ['foo', 'bar'], 'traversable' => new ArrayObject([0 => 3, 1 => 2, 2 => 1])] --EXPECT-- 14 barfoo diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/special_chars.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/special_chars.test index dbaf7dc97..9869ec91c 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/special_chars.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/special_chars.test @@ -3,6 +3,6 @@ --TEMPLATE-- {{ 'foo'|§ }} --DATA-- -return array() +return [] --EXPECT-- §foo§ diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/split.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/split.test index a093ed79b..92dbf0a05 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/split.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/split.test @@ -9,7 +9,7 @@ {{ baz|split('', 2)|join('-') }} {{ foo|split(',', -2)|join('-') }} --DATA-- -return array('foo' => "one,two,three,four,five", 'baz' => '12345',) +return ['foo' => "one,two,three,four,five", 'baz' => '12345',] --EXPECT-- one-two-three-four-five one-two-three-four-five diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/split_utf8.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/split_utf8.test index 305e162fe..bf52e6df7 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/split_utf8.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/split_utf8.test @@ -12,7 +12,7 @@ function_exists('mb_get_info') {{ baz|split('', 1)|join('-') }} {{ baz|split('', 2)|join('-') }} --DATA-- -return array('foo' => 'Ä,é,Äほ', 'baz' => 'éÄßごa',) +return ['foo' => 'Ä,é,Äほ', 'baz' => 'éÄßごa',] --EXPECT-- é Ä-é-Äほ diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/static_calls.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/static_calls.test index 4e17b7726..1626db0c9 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/static_calls.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/static_calls.test @@ -4,7 +4,7 @@ Filters as static method calls {{ 'foo'|static_call_string }} {{ 'foo'|static_call_array }} --DATA-- -return array('foo' => 'foo') +return ['foo' => 'foo'] --EXPECT-- *foo* *foo* diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/trim.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/trim.test index b1ef7b473..432989ff1 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/trim.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/trim.test @@ -11,7 +11,7 @@ {{ "/ foo/"|trim(character_mask="/", side="left") }} {{ " do nothing. "|trim("", "right") }} --DATA-- -return array('text' => " If you have some HTML it will be escaped. ") +return ['text' => " If you have some HTML it will be escaped. "] --EXPECT-- I like Twig. If you have some <strong>HTML</strong> it will be escaped. diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/urlencode.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/urlencode.test index 8726159db..66a682dd3 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/urlencode.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/urlencode.test @@ -8,7 +8,7 @@ defined('PHP_QUERY_RFC3986') {{ {}|url_encode|default("default") }} {{ 'spéßi%le%c0d@dspa ce'|url_encode }} --DATA-- -return array() +return [] --EXPECT-- foo=bar&number=3&sp%C3%A9%C3%9Fi%25l=e%25c0d%40d&spa%20ce= foo=bar&number=3&sp%C3%A9%C3%9Fi%25l=e%25c0d%40d&spa%20ce= diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/urlencode_deprecated.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/urlencode_deprecated.test index 35e50390d..38d726492 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/urlencode_deprecated.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/filters/urlencode_deprecated.test @@ -8,7 +8,7 @@ defined('PHP_QUERY_RFC3986') {{ {}|url_encode|default("default") }} {{ 'spéßi%le%c0d@dspa ce'|url_encode }} --DATA-- -return array() +return [] --EXPECT-- foo=bar&number=3&sp%C3%A9%C3%9Fi%25l=e%25c0d%40d&spa%20ce= foo=bar&number=3&sp%C3%A9%C3%9Fi%25l=e%25c0d%40d&spa%20ce= diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/attribute.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/attribute.test index 71b2038aa..2972bd45e 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/attribute.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/attribute.test @@ -8,7 +8,7 @@ {{ attribute(obj, method) is defined ? 'ok' : 'ko' }} {{ attribute(obj, nonmethod) is defined ? 'ok' : 'ko' }} --DATA-- -return array('obj' => new TwigTestFoo(), 'method' => 'foo', 'array' => array('foo' => 'bar'), 'item' => 'foo', 'nonmethod' => 'xxx', 'arguments' => array('a', 'b')) +return ['obj' => new TwigTestFoo(), 'method' => 'foo', 'array' => ['foo' => 'bar'], 'item' => 'foo', 'nonmethod' => 'xxx', 'arguments' => ['a', 'b']] --EXPECT-- foo bar diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/block.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/block.test index 8e54059ae..1a4fd5492 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/block.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/block.test @@ -7,6 +7,6 @@ {% block foo %}{{ block('bar') }}{% endblock %} {% block bar %}BAR_BASE{% endblock %} --DATA-- -return array() +return [] --EXPECT-- BARBAR diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/block_with_template.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/block_with_template.test index 8305eb67f..3d403d5b7 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/block_with_template.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/block_with_template.test @@ -10,10 +10,10 @@ --TEMPLATE(included.twig)-- {% block foo %}FOO{% endblock %} --DATA-- -return array( +return [ 'included_loaded' => $twig->load('included.twig'), 'included_loaded_internal' => $twig->loadTemplate('included.twig'), -) +] --EXPECT-- FOO FOO diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/block_without_name.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/block_without_name.test index 665cc87e5..0affc9d04 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/block_without_name.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/block_without_name.test @@ -7,6 +7,6 @@ {% block foo %}{{ block() }}{% endblock %} {% block bar %}BAR_BASE{% endblock %} --DATA-- -return array() +return [] --EXCEPTION-- Twig_Error_Syntax: The "block" function takes one argument (the block name) in "base.twig" at line 2. diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/constant.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/constant.test index 63128791f..d3f0e2958 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/constant.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/constant.test @@ -4,7 +4,7 @@ {{ constant('DATE_W3C') == expect ? 'true' : 'false' }} {{ constant('ARRAY_AS_PROPS', object) }} --DATA-- -return array('expect' => DATE_W3C, 'object' => new ArrayObject(array('hi'))); +return ['expect' => DATE_W3C, 'object' => new ArrayObject(['hi'])] --EXPECT-- true 2 diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/cycle.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/cycle.test index 522a63b85..0ac6dccd3 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/cycle.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/cycle.test @@ -5,7 +5,7 @@ {{ cycle(array1, i) }}-{{ cycle(array2, i) }} {% endfor %} --DATA-- -return array('array1' => array('odd', 'even'), 'array2' => array('apple', 'orange', 'citrus')) +return ['array1' => ['odd', 'even'], 'array2' => ['apple', 'orange', 'citrus']] --EXPECT-- odd-apple even-orange diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/date.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/date.test index c9f464468..45697cb1e 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/date.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/date.test @@ -10,13 +10,13 @@ {{ date() > date('-1day') ? 'OK' : 'KO' }} --DATA-- date_default_timezone_set('UTC'); -return array( +return [ 'date1' => mktime(13, 45, 0, 10, 4, 2010), 'date2' => new DateTime('2010-10-04 13:45'), 'date3' => '2010-10-04 13:45', 'date4' => 1286199900, // DateTime::createFromFormat('Y-m-d H:i', '2010-10-04 13:45', new DateTimeZone('UTC'))->getTimestamp() -- A unixtimestamp is always GMT 'date5' => -189291360, // DateTime::createFromFormat('Y-m-d H:i', '1964-01-02 03:04', new DateTimeZone('UTC'))->getTimestamp(), -) +] --EXPECT-- OK OK diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/date_namedargs.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/date_namedargs.test index b9dd9e383..11f60ee8b 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/date_namedargs.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/date_namedargs.test @@ -5,7 +5,7 @@ {{ date(timezone="America/New_York", date=date)|date('d/m/Y H:i:s P', false) }} --DATA-- date_default_timezone_set('UTC'); -return array('date' => mktime(13, 45, 0, 10, 4, 2010)) +return ['date' => mktime(13, 45, 0, 10, 4, 2010)] --EXPECT-- 04/10/2010 09:45:00 -04:00 04/10/2010 09:45:00 -04:00 diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/dump.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/dump.test index f4072375a..691a3abea 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/dump.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/dump.test @@ -6,9 +6,9 @@ {{ dump('foo') }} {{ dump('foo', 'bar') }} --DATA-- -return array('foo' => 'foo', 'bar' => 'bar') +return ['foo' => 'foo', 'bar' => 'bar'] --CONFIG-- -return array('debug' => true, 'autoescape' => false); +return ['debug' => true, 'autoescape' => false] --EXPECT-- string(3) "foo" diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/dump_array.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/dump_array.test index 889b7a922..f33e80ffd 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/dump_array.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/dump_array.test @@ -5,9 +5,9 @@ --TEMPLATE-- {{ dump() }} --DATA-- -return array('foo' => 'foo', 'bar' => 'bar') +return ['foo' => 'foo', 'bar' => 'bar'] --CONFIG-- -return array('debug' => true, 'autoescape' => false); +return ['debug' => true, 'autoescape' => false] --EXPECT-- array(3) { ["foo"]=> diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/dynamic_function.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/dynamic_function.test index 913fbc995..c7b3539c4 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/dynamic_function.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/dynamic_function.test @@ -4,7 +4,7 @@ dynamic function {{ foo_path('bar') }} {{ a_foo_b_bar('bar') }} --DATA-- -return array() +return [] --EXPECT-- foo/bar a/b/bar diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/assignment.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/assignment.test index b7653b4ef..c9ce8123f 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/assignment.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/assignment.test @@ -7,7 +7,7 @@ FOO{{ tmp }}BAR --TEMPLATE(foo.twig)-- FOOBAR --DATA-- -return array() +return [] --EXPECT-- FOO FOOBARBAR diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/autoescaping.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/autoescaping.test index 56f8f3b5a..a3666261f 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/autoescaping.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/autoescaping.test @@ -5,6 +5,6 @@ --TEMPLATE(foo.twig)--

Test

--DATA-- -return array() +return [] --EXPECT--

Test

diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/basic.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/basic.test index a434182a2..f90983c02 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/basic.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/basic.test @@ -8,7 +8,7 @@ BAR --TEMPLATE(foo.twig)-- FOOBAR --DATA-- -return array() +return [] --EXPECT-- FOO diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/expression.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/expression.test index aba30ce3f..c6d3d1c53 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/expression.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/expression.test @@ -8,7 +8,7 @@ BAR --TEMPLATE(foo.twig)-- FOOBAR --DATA-- -return array('foo' => 'foo.twig') +return ['foo' => 'foo.twig'] --EXPECT-- FOO diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/ignore_missing.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/ignore_missing.test index 43a2ccc2c..c05b43e14 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/ignore_missing.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/ignore_missing.test @@ -6,5 +6,5 @@ {{ include("foo.twig", ignore_missing = true, variables = {}) }} {{ include("foo.twig", ignore_missing = true, variables = {}, with_context = true) }} --DATA-- -return array() +return [] --EXPECT-- diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/missing.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/missing.test index 4d2f6cf13..96445ecda 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/missing.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/missing.test @@ -3,6 +3,6 @@ --TEMPLATE-- {{ include("foo.twig") }} --DATA-- -return array(); +return [] --EXCEPTION-- Twig_Error_Loader: Template "foo.twig" is not defined in "index.twig" at line 2. diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/missing_nested.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/missing_nested.test index 78fddc7a6..082ef86c8 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/missing_nested.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/missing_nested.test @@ -11,6 +11,6 @@ {{ include("foo.twig") }} {% endblock %} --DATA-- -return array(); +return [] --EXCEPTION-- Twig_Error_Loader: Template "foo.twig" is not defined in "base.twig" at line 3. diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/sandbox.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/sandbox.test index 7b9ccaca8..af5cbf1a6 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/sandbox.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/sandbox.test @@ -8,6 +8,6 @@ {{ foo|e }} {{ foo|e }} --DATA-- -return array() +return [] --EXCEPTION-- Twig_Sandbox_SecurityNotAllowedFilterError: Filter "e" is not allowed in "foo.twig" at line 4. diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/sandbox_disabling.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/sandbox_disabling.test index 8ffc49225..1206b67fe 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/sandbox_disabling.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/sandbox_disabling.test @@ -8,7 +8,7 @@ foo --TEMPLATE(bar.twig)-- {{ foo|e }} --DATA-- -return array('foo' => 'bar
') +return ['foo' => 'bar
'] --EXPECT-- foo diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/sandbox_disabling_ignore_missing.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/sandbox_disabling_ignore_missing.test index 8bf6e102d..c5be0088a 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/sandbox_disabling_ignore_missing.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/sandbox_disabling_ignore_missing.test @@ -6,7 +6,7 @@ --TEMPLATE(bar.twig)-- {{ foo|e }} --DATA-- -return array('foo' => 'bar
') +return ['foo' => 'bar
'] --EXPECT-- diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/template_instance.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/template_instance.test index 18d405a02..8ba956b89 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/template_instance.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/template_instance.test @@ -5,6 +5,6 @@ --TEMPLATE(foo.twig)-- BAR --DATA-- -return array('foo' => $twig->loadTemplate('foo.twig')) +return ['foo' => $twig->loadTemplate('foo.twig')] --EXPECT-- BAR FOO diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/templates_as_array.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/templates_as_array.test index 1a8100687..21e5bb2ef 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/templates_as_array.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/templates_as_array.test @@ -6,7 +6,7 @@ --TEMPLATE(foo.twig)-- foo --DATA-- -return array() +return [] --EXPECT-- foo foo diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/with_context.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/with_context.test index 35611fbb9..46ac8c79b 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/with_context.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/with_context.test @@ -8,7 +8,7 @@ --TEMPLATE(foo.twig)-- {% for k, v in _context %}{{ k }},{% endfor %} --DATA-- -return array('foo' => 'bar') +return ['foo' => 'bar'] --EXPECT-- foo,global,_parent, global,_parent, diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/with_variables.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/with_variables.test index b2ace940e..0ed98fed0 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/with_variables.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/include/with_variables.test @@ -6,7 +6,7 @@ --TEMPLATE(foo.twig)-- {{ foo }} --DATA-- -return array('vars' => array('foo' => 'bar')) +return ['vars' => ['foo' => 'bar']] --EXPECT-- bar bar diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/magic_call.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/magic_call.test index 933544312..4dd5e2704 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/magic_call.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/magic_call.test @@ -3,6 +3,6 @@ __call calls --TEMPLATE-- {{ 'foo'|magic_call }} --DATA-- -return array() +return [] --EXPECT-- magic_foo diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/magic_call53.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/magic_call53.test index a0f55e116..a7c65bf67 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/magic_call53.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/magic_call53.test @@ -6,7 +6,7 @@ version_compare(phpversion(), '5.3.0', '>=') {{ 'foo'|magic_call_string }} {{ 'foo'|magic_call_array }} --DATA-- -return array() +return [] --EXPECT-- static_magic_foo static_magic_foo diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/max.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/max.test index e6c94af63..6d2de000d 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/max.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/max.test @@ -5,7 +5,7 @@ {{ max(2, 1, 3, 5, 4) }} {{ max({2:"two", 1:"one", 3:"three", 5:"five", 4:"for"}) }} --DATA-- -return array() +return [] --EXPECT-- 5 5 diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/min.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/min.test index 660471c00..1fe5446b7 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/min.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/min.test @@ -5,7 +5,7 @@ {{ min([2, 1, 3, 5, 4]) }} {{ min({2:"two", 1:"one", 3:"three", 5:"five", 4:"for"}) }} --DATA-- -return array() +return [] --EXPECT-- 1 1 diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/range.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/range.test index e0377c8d4..2927333b9 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/range.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/range.test @@ -3,6 +3,6 @@ --TEMPLATE-- {{ range(low=0+1, high=10+0, step=2)|join(',') }} --DATA-- -return array() +return [] --EXPECT-- 1,3,5,7,9 diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/recursive_block_with_inheritance.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/recursive_block_with_inheritance.test index bf0556d24..1c3fffb5d 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/recursive_block_with_inheritance.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/recursive_block_with_inheritance.test @@ -16,6 +16,6 @@ --TEMPLATE(base.twig)-- {{ block('list') }} --DATA-- -return array('item' => array('1', '2', array('3.1', array('3.2.1', '3.2.2'), '3.4'))) +return ['item' => ['1', '2', ['3.1', ['3.2.1', '3.2.2'], '3.4']]] --EXPECT--
  1. "1"
  2. "2"
    1. "3.1"
      1. "3.2.1"
      2. "3.2.2"
    2. "3.4"
diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/source.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/source.test index 0e094c3b2..b691ce7bc 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/source.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/source.test @@ -8,7 +8,7 @@ BAR --TEMPLATE(foo.twig)-- {{ foo }}
--DATA-- -return array() +return [] --EXPECT-- FOO diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/special_chars.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/special_chars.test index 30c3df516..9c9e24945 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/special_chars.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/special_chars.test @@ -3,6 +3,6 @@ --TEMPLATE-- {{ §('foo') }} --DATA-- -return array() +return [] --EXPECT-- §foo§ diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/static_calls.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/static_calls.test index 57e5be392..dd13abb0b 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/static_calls.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/static_calls.test @@ -4,7 +4,7 @@ Functions as static method calls {{ static_call_string('foo') }} {{ static_call_array('foo') }} --DATA-- -return array('foo' => 'foo') +return ['foo' => 'foo'] --EXPECT-- *foo* *foo* diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/template_from_string.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/template_from_string.test index 3d3b95874..33b0e40d7 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/template_from_string.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/functions/template_from_string.test @@ -8,7 +8,7 @@ --TEMPLATE(parent.twig)-- {% block content %}{% endblock %} --DATA-- -return array('name' => 'Fabien', 'template' => "Hello {{ name }}") +return ['name' => 'Fabien', 'template' => "Hello {{ name }}"] --EXPECT-- Hello Fabien Hello Fabien diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/default_values.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/default_values.test index 4ccff7b67..18bba524a 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/default_values.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/default_values.test @@ -10,7 +10,7 @@ macro {{ test('foo') }} {{ test('bar', 'foo') }} --DATA-- -return array(); +return [] --EXPECT-- foobar barfoo diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/nested_calls.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/nested_calls.test index cd2542810..4577286d0 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/nested_calls.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/nested_calls.test @@ -13,6 +13,6 @@ macro {{ macros.foo(macros.bar()) }} --DATA-- -return array(); +return [] --EXPECT--
diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/reserved_variables.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/reserved_variables.test index cbfb921b2..05dd92130 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/reserved_variables.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/reserved_variables.test @@ -9,6 +9,6 @@ macro {{ test(this) }} --DATA-- -return array('this' => 'foo'); +return ['this' => 'foo'] --EXPECT-- foo diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/simple.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/simple.test index 6a366cdf1..8fc6b477f 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/simple.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/simple.test @@ -14,7 +14,7 @@ macro {{ test.test(1, "c") }} {{ test(1, "c") }} --DATA-- -return array(); +return [] --EXPECT-- a
b
a
b
diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/varargs.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/varargs.test index 412c90fae..dd4b5c9f4 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/varargs.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/varargs.test @@ -14,7 +14,7 @@ macro with arbitrary arguments {{ test1("foo", "bar", "foobar") }} {{ test2("foo", "bar", "foobar") }} --DATA-- -return array(); +return [] --EXPECT-- foo: bar, foobar diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/with_filters.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/with_filters.test index 685626f2a..96064ba01 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/with_filters.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/macros/with_filters.test @@ -9,6 +9,6 @@ macro with a filter {{ test.test() }} --DATA-- -return array(); +return [] --EXPECT-- foo<br /> diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/block_names_unicity.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/block_names_unicity.test index 40c067391..df0747072 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/block_names_unicity.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/block_names_unicity.test @@ -13,7 +13,7 @@ Block names are unique per template {% endfilter %} {% block content %}{% endblock %} --DATA-- -return array(); +return [] --EXPECT-- First Second diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/combined_debug_info.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/combined_debug_info.test index ff977ad62..b5281dc5f 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/combined_debug_info.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/combined_debug_info.test @@ -10,6 +10,6 @@ index foo {{ foo.bar }} --DATA-- -return array('foo' => 'foo'); +return ['foo' => 'foo'] --EXCEPTION-- Twig_Error_Runtime: Impossible to access an attribute ("bar") on a string variable ("foo") in "foo" at line 3. diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/empty_token.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/empty_token.test index 65f6cd2b8..25bdc9e40 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/empty_token.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/empty_token.test @@ -3,6 +3,6 @@ Twig outputs 0 nodes correctly --TEMPLATE-- {{ foo }}0{{ foo }} --DATA-- -return array('foo' => 'foo') +return ['foo' => 'foo'] --EXPECT-- foo0foo diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/issue_1143.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/issue_1143.test index ff7c8bb70..e2ab950e1 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/issue_1143.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/issue_1143.test @@ -8,7 +8,7 @@ class House const REGION_S = 1; const REGION_P = 2; - public static $regionChoices = array(self::REGION_S => 'house.region.s', self::REGION_P => 'house.region.p'); + public static $regionChoices = [self::REGION_S => 'house.region.s', self::REGION_P => 'house.region.p']; public function getRegionChoices() { @@ -18,6 +18,6 @@ class House $object = new House(); $object->region = 1; -return array('object' => $object) +return ['object' => $object] --EXPECT-- house.region.s diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/multi_word_tests.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/multi_word_tests.test index 269a30571..96ca5517a 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/multi_word_tests.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/multi_word_tests.test @@ -4,7 +4,7 @@ Twig allows multi-word tests without a custom node class {{ 'foo' is multi word ? 'yes' : 'no' }} {{ 'foo bar' is multi word ? 'yes' : 'no' }} --DATA-- -return array() +return [] --EXPECT-- no yes diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/simple_xml_element.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/simple_xml_element.test index 60c3c51d7..57603ebb9 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/simple_xml_element.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/simple_xml_element.test @@ -10,7 +10,7 @@ Hello '{{ images.image.0.group }}'! - {{ image.group }} {% endfor %} --DATA-- -return array('images' => new SimpleXMLElement('foobar')) +return ['images' => new SimpleXMLElement('foobar')] --EXPECT-- Hello 'foo'! example diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/strings_like_numbers.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/strings_like_numbers.test index e18e11079..62fe88485 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/strings_like_numbers.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/regression/strings_like_numbers.test @@ -3,6 +3,6 @@ Twig does not confuse strings with integers in getAttribute() --TEMPLATE-- {{ hash['2e2'] }} --DATA-- -return array('hash' => array('2e2' => 'works')) +return ['hash' => ['2e2' => 'works']] --EXPECT-- works diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/basic.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/basic.test index 2f6a3e1a0..5979725e3 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/basic.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/basic.test @@ -17,7 +17,7 @@ {{ var }}
{% endautoescape %} --DATA-- -return array('var' => '
') +return ['var' => '
'] --EXPECT-- <br />
<br />
diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/blocks.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/blocks.test index 05ab83ce3..292e1b416 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/blocks.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/blocks.test @@ -7,6 +7,6 @@ {% endblock %} {% endautoescape %} --DATA-- -return array('var' => '
') +return ['var' => '
'] --EXPECT-- <br /> diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/double_escaping.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/double_escaping.test index 9c0972462..1724b4878 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/double_escaping.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/double_escaping.test @@ -5,6 +5,6 @@ {{ var|escape }} {% endautoescape %} --DATA-- -return array('var' => '
') +return ['var' => '
'] --EXPECT-- <br /> diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/functions.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/functions.test index 653c41b8e..170e7074e 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/functions.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/functions.test @@ -44,7 +44,7 @@ safe_br {% endautoescape %} --DATA-- -return array() +return [] --EXPECT-- autoescape false diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/literal.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/literal.test index e389d4dd5..1ed2bf35a 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/literal.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/literal.test @@ -23,7 +23,7 @@ {% endautoescape %} --DATA-- -return array() +return [] --EXPECT-- 1. Simple literal diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/nested.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/nested.test index 798e6feaf..0d88c7e3a 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/nested.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/nested.test @@ -15,7 +15,7 @@ {% endautoescape %} {{ var }} --DATA-- -return array('var' => '
') +return ['var' => '
'] --EXPECT-- <br /> <br /> diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/objects.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/objects.test index e896aa41c..9d959b22b 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/objects.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/objects.test @@ -19,7 +19,7 @@ class UserForAutoEscapeTest return 'Fabien
'; } } -return array('user' => new UserForAutoEscapeTest()) +return ['user' => new UserForAutoEscapeTest()] --EXPECT-- Fabien<br /> fabien<br /> diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/raw.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/raw.test index 9f1cedd3a..187327c80 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/raw.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/raw.test @@ -5,6 +5,6 @@ {{ var|raw }} {% endautoescape %} --DATA-- -return array('var' => '
') +return ['var' => '
'] --EXPECT--
diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/strategy.legacy.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/strategy.legacy.test index c3f8eddfa..289f2b174 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/strategy.legacy.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/strategy.legacy.test @@ -5,7 +5,7 @@ {% autoescape true html %}{{ var }}{% endautoescape %} --DATA-- -return array('var' => '
"') +return ['var' => '
"'] --EXPECT-- \u003Cbr\u0020\/\u003E\u0022 <br />" diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/strategy.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/strategy.test index 5b69449c2..9a0137ee2 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/strategy.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/strategy.test @@ -5,7 +5,7 @@ {% autoescape 'html' %}{{ var }}{% endautoescape %} --DATA-- -return array('var' => '
"') +return ['var' => '
"'] --EXPECT-- \u003Cbr\u0020\/\u003E\u0022 <br />" diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/type.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/type.test index 1250f0db1..9ae8d7bf9 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/type.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/type.test @@ -39,7 +39,7 @@ escape types {% endautoescape %} --DATA-- -return array('msg' => "<>\n'\"") +return ['msg' => "<>\n'\""] --EXPECT-- 1. autoescape 'html' |escape('js') diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/with_filters.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/with_filters.test index 7821a9aaf..f97105bbd 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/with_filters.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/with_filters.test @@ -61,7 +61,7 @@ {% endautoescape %} --DATA-- -return array('var' => "\nTwig") +return ['var' => "\nTwig"] --EXPECT-- (escape_and_nl2br is an escaper filter) diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/with_filters_arguments.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/with_filters_arguments.test index f58a1e09c..50f72d83a 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/with_filters_arguments.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/with_filters_arguments.test @@ -9,7 +9,7 @@ {{ var|nl2br(sep|escape) }} {% endautoescape %} --DATA-- -return array('var' => "\nTwig", 'sep' => '
') +return ['var' => "\nTwig", 'sep' => '
'] --EXPECT-- <Fabien>
Twig diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/with_pre_escape_filters.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/with_pre_escape_filters.test index 134c77ea8..c9c738055 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/with_pre_escape_filters.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/with_pre_escape_filters.test @@ -31,7 +31,7 @@ {% endautoescape %} --DATA-- -return array('var' => "\nTwig") +return ['var' => "\nTwig"] --EXPECT-- (nl2br is pre_escaped for "html" and declared safe for "html") diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/with_preserves_safety_filters.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/with_preserves_safety_filters.test index 32d3943b5..c764d434b 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/with_preserves_safety_filters.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/autoescape/with_preserves_safety_filters.test @@ -23,7 +23,7 @@ {% endautoescape %} --DATA-- -return array('var' => "\nTwig") +return ['var' => "\nTwig"] --EXPECT-- (preserves_safety is preserving safety for "html") diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/block/basic.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/block/basic.test index 360dcf030..988b09ce8 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/block/basic.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/block/basic.test @@ -6,6 +6,6 @@ --TEMPLATE(foo.twig)-- {% block content %}{% endblock %} --DATA-- -return array('foo' => 'bar') +return ['foo' => 'bar'] --EXPECT-- FOObar diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/block/block_unique_name.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/block/block_unique_name.test index bc89ec820..7dac6abbf 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/block/block_unique_name.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/block/block_unique_name.test @@ -6,6 +6,6 @@ {% endblock %} {% endblock %} --DATA-- -return array() +return [] --EXCEPTION-- Twig_Error_Syntax: The block 'content' has already been defined line 2 in "index.twig" at line 3. diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/block/special_chars.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/block/special_chars.test index be17fedf3..e8e240eb7 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/block/special_chars.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/block/special_chars.test @@ -5,6 +5,6 @@ § {% endblock § %} --DATA-- -return array() +return [] --EXPECT-- § diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/deprecated/block.legacy.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/deprecated/block.legacy.test new file mode 100644 index 000000000..53729dd1f --- /dev/null +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/deprecated/block.legacy.test @@ -0,0 +1,20 @@ +--TEST-- +Deprecating a block with "deprecated" tag +--TEMPLATE-- +{% use 'greeting.twig' %} + +{{ block('welcome') }} + +--TEMPLATE(greeting.twig)-- +{% block welcome %} + {% deprecated 'The "welcome" block is deprecated, use "hello" instead.' %} + {{ block('hello') }} +{% endblock %} + +{% block hello %} +Hello Fabien +{% endblock %} +--DATA-- +return [] +--EXPECT-- + Hello Fabien diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/deprecated/macro.legacy.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/deprecated/macro.legacy.test new file mode 100644 index 000000000..5cc48dd87 --- /dev/null +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/deprecated/macro.legacy.test @@ -0,0 +1,21 @@ +--TEST-- +Deprecating a macro with "deprecated" tag +--TEMPLATE-- +{% import 'greeting.twig' as greeting %} + +{{ greeting.welcome('Fabien') }} + +--TEMPLATE(greeting.twig)-- +{% macro welcome(name) %} + {% deprecated 'The "welcome" macro is deprecated, use "hello" instead.' %} + {% import _self as self %} + {{ self.hello(name) }} +{% endmacro %} + +{% macro hello(name) %} +Hello {{ name }} +{% endmacro %} +--DATA-- +return [] +--EXPECT-- + Hello Fabien diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/deprecated/template.legacy.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/deprecated/template.legacy.test new file mode 100644 index 000000000..7f786d57f --- /dev/null +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/deprecated/template.legacy.test @@ -0,0 +1,12 @@ +--TEST-- +Deprecating a template with "deprecated" tag +--TEMPLATE-- +{% extends 'greeting.twig' %} + +{% deprecated 'The "index.twig" template is deprecated, use "greeting.twig" instead.' %} +--TEMPLATE(greeting.twig)-- +Hello Fabien +--DATA-- +return [] +--EXPECT-- +Hello Fabien diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/basic.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/basic.test index f44296ea0..16781e418 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/basic.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/basic.test @@ -21,7 +21,7 @@ B {% endblock %} C --DATA-- -return array() +return [] --EXPECT-- FOO diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/complex_dynamic_parent.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/complex_dynamic_parent.test index de5ea7eea..b799a8c95 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/complex_dynamic_parent.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/complex_dynamic_parent.test @@ -21,7 +21,7 @@ B {% endblock %} C --DATA-- -return array('foo' => 'foo') +return ['foo' => 'foo'] --EXPECT-- FOO diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/dynamic_parent.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/dynamic_parent.test index 2a125e6b5..6f0879e28 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/dynamic_parent.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/dynamic_parent.test @@ -21,7 +21,7 @@ B {% endblock %} C --DATA-- -return array('foo' => 'foo.twig') +return ['foo' => 'foo.twig'] --EXPECT-- FOO diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/error_line.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/error_line.test index 431473707..8677cc371 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/error_line.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/error_line.test @@ -11,6 +11,6 @@ BAR --TEMPLATE(foo.twig)-- {% block c1 %}{% endblock %} --DATA-- -return array() +return [] --EXCEPTION-- Twig_Error_Runtime: Variable "nothing" does not exist in "index.twig" at line 5. diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/multiple.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/multiple.test index da161e6d4..9f7b52f1d 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/multiple.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/multiple.test @@ -28,7 +28,7 @@ B {% endblock %} C --DATA-- -return array() +return [] --EXPECT-- FOO diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/nested.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/nested.test index 81563dcef..9f3372336 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/nested.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/nested.test @@ -24,7 +24,7 @@ B {% endblock %} C --DATA-- -return array() +return [] --EXPECT-- A block1 diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/with_extends.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/with_extends.test index 2c1dd584c..ce726ac00 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/with_extends.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/embed/with_extends.test @@ -39,7 +39,7 @@ B {% endblock %} C --DATA-- -return array() +return [] --EXPECT-- A blockc1base diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/filter/basic.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/filter/basic.test index 82094f2f0..866171ecc 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/filter/basic.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/filter/basic.test @@ -5,6 +5,6 @@ Some text with a {{ var }} {% endfilter %} --DATA-- -return array('var' => 'var') +return ['var' => 'var'] --EXPECT-- SOME TEXT WITH A VAR diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/filter/json_encode.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/filter/json_encode.test index 3e7148bf4..a2562b995 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/filter/json_encode.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/filter/json_encode.test @@ -3,6 +3,6 @@ --TEMPLATE-- {% filter json_encode|raw %}test{% endfilter %} --DATA-- -return array() +return [] --EXPECT-- "test" diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/filter/multiple.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/filter/multiple.test index 75512ef96..8eb3cbdd7 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/filter/multiple.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/filter/multiple.test @@ -5,6 +5,6 @@ {{ var }} {% endfilter %} --DATA-- -return array('var' => 'VAR') +return ['var' => 'VAR'] --EXPECT-- Var diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/filter/nested.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/filter/nested.test index 7e4e4eb33..6d18e1af0 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/filter/nested.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/filter/nested.test @@ -9,7 +9,7 @@ {{ var }} {% endfilter %} --DATA-- -return array('var' => 'var') +return ['var' => 'var'] --EXPECT-- Var Var diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/filter/with_for_tag.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/filter/with_for_tag.test index 22745eadf..d2d87cfda 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/filter/with_for_tag.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/filter/with_for_tag.test @@ -7,7 +7,7 @@ {% endfor %} {% endfilter %} --DATA-- -return array('items' => array('a', 'b')) +return ['items' => ['a', 'b']] --EXPECT-- A B diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/filter/with_if_tag.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/filter/with_if_tag.test index afd95b296..f2e804bfb 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/filter/with_if_tag.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/filter/with_if_tag.test @@ -20,7 +20,7 @@ FOO {% endfilter %} --DATA-- -return array('items' => array('a', 'b')) +return ['items' => ['a', 'b']] --EXPECT-- A, B diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/condition.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/condition.test index 380531f78..b1ad22fd5 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/condition.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/condition.test @@ -5,9 +5,9 @@ {{ loop.index }}.{{ i }}{{ foo.bar }} {% endfor %} --DATA-- -return array('foo' => array('bar' => 'X')) +return ['foo' => ['bar' => 'X']] --CONFIG-- -return array('strict_variables' => false) +return ['strict_variables' => false] --EXPECT-- 1.1X 2.3X diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/context.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/context.test index ddc69307b..3cdd575c8 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/context.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/context.test @@ -8,7 +8,7 @@ * {{ item }} {% endfor %} --DATA-- -return array('items' => array('a', 'b')) +return ['items' => ['a', 'b']] --EXPECT-- * a * b diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/else.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/else.test index 20ccc880c..86ec9c28d 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/else.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/else.test @@ -7,17 +7,17 @@ no item {% endfor %} --DATA-- -return array('items' => array('a', 'b')) +return ['items' => ['a', 'b']] --EXPECT-- * a * b --DATA-- -return array('items' => array()) +return ['items' => []] --EXPECT-- no item --DATA-- -return array() +return [] --CONFIG-- -return array('strict_variables' => false) +return ['strict_variables' => false] --EXPECT-- no item diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/inner_variables.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/inner_variables.test index 49fb9ca6f..e1ad3c735 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/inner_variables.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/inner_variables.test @@ -7,7 +7,7 @@ {% endfor %} {% endfor %} --DATA-- -return array('k' => 0) +return ['k' => 0] --EXPECT-- 0 1 1 1 diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/keys.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/keys.test index 4e22cb473..92135575f 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/keys.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/keys.test @@ -5,7 +5,7 @@ * {{ key }} {% endfor %} --DATA-- -return array('items' => array('a', 'b')) +return ['items' => ['a', 'b']] --EXPECT-- * 0 * 1 diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/keys_and_values.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/keys_and_values.test index 4c211689d..ab39ddf21 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/keys_and_values.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/keys_and_values.test @@ -5,7 +5,7 @@ * {{ key }}/{{ item }} {% endfor %} --DATA-- -return array('items' => array('a', 'b')) +return ['items' => ['a', 'b']] --EXPECT-- * 0/a * 1/b diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/loop_context.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/loop_context.test index 93bc76a1f..56a60c2e6 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/loop_context.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/loop_context.test @@ -8,7 +8,7 @@ {% endfor %} --DATA-- -return array('items' => array('a', 'b')) +return ['items' => ['a', 'b']] --EXPECT-- * 1/0 * 2/1 diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/loop_context_local.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/loop_context_local.test index 58af2c326..58e5a9b34 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/loop_context_local.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/loop_context_local.test @@ -5,6 +5,6 @@ {% endfor %} {% if loop is not defined %}WORKS{% endif %} --DATA-- -return array('items' => array()) +return ['items' => []] --EXPECT-- WORKS diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/loop_not_defined.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/loop_not_defined.test index 6a2af63b6..e155cdfdb 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/loop_not_defined.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/loop_not_defined.test @@ -5,6 +5,6 @@ {{ loop.last }} {% endfor %} --DATA-- -return array('items' => array('a', 'b')) +return ['items' => ['a', 'b']] --EXCEPTION-- Twig_Error_Syntax: The "loop.last" variable is not defined when looping with a condition in "index.twig" at line 3. diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/loop_not_defined_cond.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/loop_not_defined_cond.test index 1e819ca0a..88a40f04a 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/loop_not_defined_cond.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/loop_not_defined_cond.test @@ -4,6 +4,6 @@ {% for i, item in items if loop.last > 0 %} {% endfor %} --DATA-- -return array('items' => array('a', 'b')) +return ['items' => ['a', 'b']] --EXCEPTION-- Twig_Error_Syntax: The "loop" variable cannot be used in a looping condition in "index.twig" at line 2. diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/nested_else.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/nested_else.test index f8b9f6bc1..df1bb07ac 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/nested_else.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/nested_else.test @@ -11,7 +11,7 @@ no item1 {% endfor %} --DATA-- -return array('items' => array('a', 'b'), 'items1' => array()) +return ['items' => ['a', 'b'], 'items1' => []] --EXPECT-- no a no b diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/objects.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/objects.test index 503443792..2ba2d92c2 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/objects.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/objects.test @@ -18,14 +18,14 @@ --DATA-- class ItemsIterator implements Iterator { - protected $values = array('foo' => 'bar', 'bar' => 'foo'); + protected $values = ['foo' => 'bar', 'bar' => 'foo']; public function current() { return current($this->values); } public function key() { return key($this->values); } public function next() { return next($this->values); } public function rewind() { return reset($this->values); } public function valid() { return false !== current($this->values); } } -return array('items' => new ItemsIterator()) +return ['items' => new ItemsIterator()] --EXPECT-- * bar * 1/0 diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/objects_countable.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/objects_countable.test index 4a1ff6119..69150f250 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/objects_countable.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/objects_countable.test @@ -19,7 +19,7 @@ --DATA-- class ItemsIteratorCountable implements Iterator, Countable { - protected $values = array('foo' => 'bar', 'bar' => 'foo'); + protected $values = ['foo' => 'bar', 'bar' => 'foo']; public function current() { return current($this->values); } public function key() { return key($this->values); } public function next() { return next($this->values); } @@ -27,7 +27,7 @@ class ItemsIteratorCountable implements Iterator, Countable public function valid() { return false !== current($this->values); } public function count() { return count($this->values); } } -return array('items' => new ItemsIteratorCountable()) +return ['items' => new ItemsIteratorCountable()] --EXPECT-- * bar * 1/0 diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/recursive.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/recursive.test index 17b2e2223..3b677d60f 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/recursive.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/recursive.test @@ -8,7 +8,7 @@ {% endfor %} {% endfor %} --DATA-- -return array('items' => array('a' => array('a1', 'a2', 'a3'), 'b' => array('b1'))) +return ['items' => ['a' => ['a1', 'a2', 'a3'], 'b' => ['b1']]] --EXPECT-- * a (2): * a1 (3) diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/values.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/values.test index 82f2ae8a4..384c41b28 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/values.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/for/values.test @@ -5,7 +5,7 @@ * {{ item }} {% endfor %} --DATA-- -return array('items' => array('a', 'b')) +return ['items' => ['a', 'b']] --EXPECT-- * a * b diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/from.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/from.test index 5f5da0ec1..1d3c9e2b5 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/from.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/from.test @@ -9,6 +9,6 @@ global variables called foobar {% endmacro %} --DATA-- -return array(); +return [] --EXPECT-- called foobar diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/if/basic.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/if/basic.test index c1c3d2768..a02165e53 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/if/basic.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/if/basic.test @@ -9,14 +9,14 @@ NOTHING {% endif %} --DATA-- -return array('a' => 'a') +return ['a' => 'a'] --EXPECT-- a --DATA-- -return array('b' => 'b') +return ['b' => 'b'] --EXPECT-- b --DATA-- -return array() +return [] --EXPECT-- NOTHING diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/if/expression.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/if/expression.test index edfb73df4..eb65083c6 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/if/expression.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/if/expression.test @@ -9,14 +9,14 @@ A3 {% endif %} --DATA-- -return array('a' => 1) +return ['a' => 1] --EXPECT-- A1 --DATA-- -return array('a' => 12) +return ['a' => 12] --EXPECT-- A2 --DATA-- -return array('a' => 7) +return ['a' => 7] --EXPECT-- A3 diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/basic.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/basic.test index 8fe1a6c13..9982b039d 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/basic.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/basic.test @@ -8,7 +8,7 @@ BAR --TEMPLATE(foo.twig)-- FOOBAR --DATA-- -return array() +return [] --EXPECT-- FOO diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/expression.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/expression.test index eaeeb112e..23db18123 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/expression.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/expression.test @@ -8,7 +8,7 @@ BAR --TEMPLATE(foo.twig)-- FOOBAR --DATA-- -return array('foo' => 'foo.twig') +return ['foo' => 'foo.twig'] --EXPECT-- FOO diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/ignore_missing.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/ignore_missing.test index 24aed06de..6c8bdb1e9 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/ignore_missing.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/ignore_missing.test @@ -6,5 +6,5 @@ {% include "foo.twig" ignore missing with {} %} {% include "foo.twig" ignore missing with {} only %} --DATA-- -return array() +return [] --EXPECT-- diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/missing.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/missing.test index f25e87155..5471e451e 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/missing.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/missing.test @@ -3,6 +3,6 @@ --TEMPLATE-- {% include "foo.twig" %} --DATA-- -return array(); +return [] --EXCEPTION-- Twig_Error_Loader: Template "foo.twig" is not defined in "index.twig" at line 2. diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/missing_nested.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/missing_nested.test index 86c186444..f129e6569 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/missing_nested.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/missing_nested.test @@ -11,6 +11,6 @@ {% include "foo.twig" %} {% endblock %} --DATA-- -return array(); +return [] --EXCEPTION-- Twig_Error_Loader: Template "foo.twig" is not defined in "base.twig" at line 3. diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/only.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/only.test index 77760a09e..d595f8061 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/only.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/only.test @@ -8,7 +8,7 @@ --TEMPLATE(foo.twig)-- {% for k, v in _context %}{{ k }},{% endfor %} --DATA-- -return array('foo' => 'bar') +return ['foo' => 'bar'] --EXPECT-- foo,global,_parent, global,_parent, diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/template_instance.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/template_instance.test index 6ba064a38..4b2285e50 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/template_instance.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/template_instance.test @@ -5,6 +5,6 @@ --TEMPLATE(foo.twig)-- BAR --DATA-- -return array('foo' => $twig->loadTemplate('foo.twig')) +return ['foo' => $twig->loadTemplate('foo.twig')] --EXPECT-- BAR FOO diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/templates_as_array.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/templates_as_array.test index ab670ee06..38063952d 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/templates_as_array.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/templates_as_array.test @@ -6,7 +6,7 @@ --TEMPLATE(foo.twig)-- foo --DATA-- -return array() +return [] --EXPECT-- foo foo diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/with_variables.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/with_variables.test index 41384ac7c..3b192aeb2 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/with_variables.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/include/with_variables.test @@ -6,7 +6,7 @@ --TEMPLATE(foo.twig)-- {{ foo }} --DATA-- -return array('vars' => array('foo' => 'bar')) +return ['vars' => ['foo' => 'bar']] --EXPECT-- bar bar diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/basic.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/basic.test index 0778a4b49..703b61be1 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/basic.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/basic.test @@ -9,6 +9,6 @@ FOO --TEMPLATE(foo.twig)-- {% block content %}{% endblock %} --DATA-- -return array() +return [] --EXPECT-- FOO diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/block_expr.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/block_expr.test index 9a81499ab..b7bef6463 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/block_expr.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/block_expr.test @@ -20,13 +20,13 @@ block_expr {%- endblock %} {% endspaceless %} --DATA-- -return array( - 'item' => array( - 'children' => array( +return [ + 'item' => [ + 'children' => [ null, null, - ) - ) -) + ] + ] +] --EXPECT-- Element:
Element:
Element:
diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/block_expr2.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/block_expr2.test index 3e868c0da..2d22852a7 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/block_expr2.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/block_expr2.test @@ -22,13 +22,13 @@ block_expr2 {%- endblock %} {% endspaceless %} --DATA-- -return array( - 'item' => array( - 'children' => array( +return [ + 'item' => [ + 'children' => [ null, null, - ) - ) -) + ] + ] +] --EXPECT-- Element:
Element:
Element:
diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/conditional.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/conditional.test index 8576e773a..bd28248d1 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/conditional.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/conditional.test @@ -9,6 +9,6 @@ --TEMPLATE(bar.twig)-- {% block content %}BAR{% endblock %} --DATA-- -return array('foo' => 'foo.twig', 'standalone' => true) +return ['foo' => 'foo.twig', 'standalone' => true] --EXPECT-- FOOFOO diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/dynamic.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/dynamic.test index ee06ddce3..e6a0f0172 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/dynamic.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/dynamic.test @@ -9,6 +9,6 @@ FOO --TEMPLATE(foo.twig)-- {% block content %}{% endblock %} --DATA-- -return array('foo' => 'foo.twig') +return ['foo' => 'foo.twig'] --EXPECT-- FOO diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/empty.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/empty.test index 784f35718..ca11bf20d 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/empty.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/empty.test @@ -5,6 +5,6 @@ --TEMPLATE(foo.twig)-- {% block content %}FOO{% endblock %} --DATA-- -return array() +return [] --EXPECT-- FOO diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/extends_as_array.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/extends_as_array.test index a1cb1ce8a..4d2cb6c65 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/extends_as_array.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/extends_as_array.test @@ -7,6 +7,6 @@ foo {% endblock %} --DATA-- -return array() +return [] --EXPECT-- foo diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/extends_as_array_with_empty_name.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/extends_as_array_with_empty_name.test index acc74f6a1..510865110 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/extends_as_array_with_empty_name.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/extends_as_array_with_empty_name.test @@ -7,6 +7,6 @@ foo {% endblock %} --DATA-- -return array() +return [] --EXPECT-- foo diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/extends_as_array_with_null_name.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/extends_as_array_with_null_name.test index cfa648d41..c5ee6f193 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/extends_as_array_with_null_name.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/extends_as_array_with_null_name.test @@ -7,6 +7,6 @@ foo {% endblock %} --DATA-- -return array() +return [] --EXPECT-- foo diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/multiple.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/multiple.test index dfc2b6c49..fc25badd3 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/multiple.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/multiple.test @@ -7,6 +7,6 @@ --TEMPLATE(base.twig)-- {% block content %}base {% endblock %} --DATA-- -return array() +return [] --EXPECT-- base layout index diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/multiple_dynamic.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/multiple_dynamic.test index 1d3e639ca..fa887177b 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/multiple_dynamic.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/multiple_dynamic.test @@ -13,7 +13,7 @@ --TEMPLATE(2_parent.twig)-- {% block content %}2{% endblock %} --DATA-- -return array() +return [] --EXPECT-- 1 parent diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/nested_blocks.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/nested_blocks.test index faca92591..abea2e9d4 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/nested_blocks.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/nested_blocks.test @@ -17,6 +17,6 @@ {% endblock %} {% endblock %} --DATA-- -return array() +return [] --EXPECT-- SUBSUBCONTENT diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/nested_blocks_parent_only.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/nested_blocks_parent_only.test index 0ad11d0c0..20b7848f8 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/nested_blocks_parent_only.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/nested_blocks_parent_only.test @@ -10,6 +10,6 @@ {% endblock %} --TEMPLATE(foo.twig)-- --DATA-- -return array() +return [] --EXPECT-- CONTENTSUBCONTENTENDCONTENT diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/nested_inheritance.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/nested_inheritance.test index 71e3cdfd4..0b585b480 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/nested_inheritance.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/nested_inheritance.test @@ -11,6 +11,6 @@ --TEMPLATE(base.twig)-- {% block body '' %} --DATA-- -return array() +return [] --EXPECT-- INSIDE diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/parent.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/parent.test index 4f975db80..73f4c0ec5 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/parent.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/parent.test @@ -7,6 +7,6 @@ --TEMPLATE(foo.twig)-- {% block content %}BAR{% endblock %} --DATA-- -return array() +return [] --EXPECT-- BARFOOBAR diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/parent_as_template_wrapper.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/parent_as_template_wrapper.test new file mode 100644 index 000000000..1aaed556c --- /dev/null +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/parent_as_template_wrapper.test @@ -0,0 +1,12 @@ +--TEST-- +"extends" tag with a parent as a Twig_TemplateWrapper instance +--TEMPLATE-- +{% extends foo %} + +{% block content %}New{% endblock %} +--TEMPLATE(foo.twig)-- +{% block content %}Default{% endblock %} +--DATA-- +return ['foo' => $twig->load('foo.twig')] +--EXPECT-- +New diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/parent_change.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/parent_change.test index a8bc90cef..01bd544f8 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/parent_change.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/parent_change.test @@ -7,10 +7,10 @@ FOO --TEMPLATE(bar.twig)-- BAR --DATA-- -return array('foo' => true) +return ['foo' => true] --EXPECT-- FOO --DATA-- -return array('foo' => false) +return ['foo' => false] --EXPECT-- BAR diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/parent_isolation.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/parent_isolation.test index 628167135..58a37bd90 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/parent_isolation.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/parent_isolation.test @@ -13,7 +13,7 @@ {% block footer %}Default Footer{% endblock %} --DATA-- -return array() +return [] --EXPECT-- Included Content Default Footer diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/parent_nested.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/parent_nested.test index 71e7c2080..d4347bac4 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/parent_nested.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/parent_nested.test @@ -17,7 +17,7 @@ BAR {% endblock %} --DATA-- -return array() +return [] --EXPECT-- INSIDE OVERRIDDEN diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/parent_without_extends_but_traits.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/parent_without_extends_but_traits.test index 63c730550..39882b8b3 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/parent_without_extends_but_traits.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/parent_without_extends_but_traits.test @@ -9,6 +9,6 @@ --TEMPLATE(foo.twig)-- {% block content %}BAR{% endblock %} --DATA-- -return array() +return [] --EXPECT-- BAR diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/template_instance.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/template_instance.test index d1876a52d..9d62cdba7 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/template_instance.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/template_instance.test @@ -9,6 +9,6 @@ --TEMPLATE(foo.twig)-- {% block content %}BAR{% endblock %} --DATA-- -return array('foo' => $twig->loadTemplate('foo.twig')) +return ['foo' => $twig->loadTemplate('foo.twig')] --EXPECT-- BARFOO diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/use.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/use.test index 8f9ece7ce..4df32ee9d 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/use.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/inheritance/use.test @@ -35,7 +35,7 @@ {% block content_use2 'content_use2' %} {% block content_use2_only 'content_use2_only' %} --DATA-- -return array() +return [] --EXPECT-- content_parent content_use1 diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/basic.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/basic.test index eef0c10d5..ae090f9a0 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/basic.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/basic.test @@ -10,7 +10,7 @@ {% endmacro %} --DATA-- -return array() +return [] --EXPECT-- diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/endmacro_name.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/endmacro_name.test index ae6203bb6..3f3caf777 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/endmacro_name.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/endmacro_name.test @@ -9,7 +9,7 @@ {% macro foo() %}foo{% endmacro %} {% macro bar() %}bar{% endmacro bar %} --DATA-- -return array() +return [] --EXPECT-- foo bar diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/external.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/external.test index 5cd3dae66..b28ca19f0 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/external.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/external.test @@ -10,7 +10,7 @@ {% endmacro %} --DATA-- -return array() +return [] --EXPECT-- diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/from.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/from.test index 205f59182..8b9aae878 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/from.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/from.test @@ -11,7 +11,7 @@ {% macro foo(name) %}foo{{ name }}{% endmacro %} {% macro bar(name) %}bar{{ name }}{% endmacro %} --DATA-- -return array() +return [] --EXPECT-- foofoo foofoo diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/from_with_reserved_name.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/from_with_reserved_name.test index 2de9765ff..eabae94d5 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/from_with_reserved_name.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/from_with_reserved_name.test @@ -4,6 +4,6 @@ {% from 'forms.twig' import templateName %} --TEMPLATE(forms.twig)-- --DATA-- -return array() +return [] --EXCEPTION-- Twig_Error_Syntax: "templateName" cannot be an imported macro as it is a reserved keyword in "index.twig" at line 2. diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/global.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/global.test index 6b371768e..832740eac 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/global.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/global.test @@ -8,7 +8,7 @@ --TEMPLATE(forms.twig)-- {% macro foo(name) %}{{ name|default('foo') }}{{ global }}{% endmacro %} --DATA-- -return array() +return [] --EXPECT-- fooglobal fooglobal diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/import_with_reserved_nam.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/import_with_reserved_nam.test index 7bd93c62d..7fe35ad2f 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/import_with_reserved_nam.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/import_with_reserved_nam.test @@ -6,6 +6,6 @@ {{ macros.parent() }} --TEMPLATE(forms.twig)-- --DATA-- -return array() +return [] --EXCEPTION-- Twig_Error_Syntax: "parent" cannot be called as macro as it is a reserved keyword in "index.twig" at line 4. diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/reserved_name.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/reserved_name.test index f7c102f02..679b38f07 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/reserved_name.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/reserved_name.test @@ -5,6 +5,6 @@ parent {% endmacro %} --DATA-- -return array() +return [] --EXCEPTION-- Twig_Error_Syntax: "parent" cannot be used as a macro name as it is a reserved keyword in "index.twig" at line 2. diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/self_import.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/self_import.test index 17756cb6c..ca3157dd8 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/self_import.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/self_import.test @@ -10,7 +10,7 @@ {% endmacro %} --DATA-- -return array() +return [] --EXPECT-- diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/special_chars.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/special_chars.test index 372177073..491e91e80 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/special_chars.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/special_chars.test @@ -9,6 +9,6 @@ §{{ foo }}§ {% endmacro %} --DATA-- -return array() +return [] --EXPECT-- §foo§ diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/super_globals.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/super_globals.test index 567946281..643697ce2 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/super_globals.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/macro/super_globals.test @@ -9,6 +9,6 @@ Super globals as macro arguments {{ GET }} {% endmacro %} --DATA-- -return array() +return [] --EXPECT-- foo diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/raw/basic.legacy.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/raw/basic.legacy.test index 0445e8530..7875b2af7 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/raw/basic.legacy.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/raw/basic.legacy.test @@ -5,6 +5,6 @@ {{ foo }} {% endraw %} --DATA-- -return array() +return [] --EXPECT-- {{ foo }} diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/raw/mixed_usage_with_raw.legacy.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/raw/mixed_usage_with_raw.legacy.test index 99deefc32..8ccabbf7b 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/raw/mixed_usage_with_raw.legacy.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/raw/mixed_usage_with_raw.legacy.test @@ -5,6 +5,6 @@ {{ foo }} {% endverbatim %} --DATA-- -return array() +return [] --EXCEPTION-- Twig_Error_Syntax: Unexpected end of file: Unclosed "raw" block in "index.twig" at line 2. diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/raw/whitespace_control.legacy.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/raw/whitespace_control.legacy.test index 352bb1876..11f42025e 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/raw/whitespace_control.legacy.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/raw/whitespace_control.legacy.test @@ -37,7 +37,7 @@ 5*** --DATA-- -return array() +return [] --EXPECT-- 1*** {{ 'bla' }} diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/sandbox/simple.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/sandbox/simple.test index de20f3dba..4d232d8bb 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/sandbox/simple.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/sandbox/simple.test @@ -14,7 +14,7 @@ sandbox tag --TEMPLATE(foo.twig)-- foo --DATA-- -return array() +return [] --EXPECT-- foo foo diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/set/basic.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/set/basic.test index a5a9f830e..aae1427e8 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/set/basic.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/set/basic.test @@ -11,7 +11,7 @@ {{ foo }}{{ bar }} --DATA-- -return array() +return [] --EXPECT-- foo foo<br /> diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/set/capture-empty.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/set/capture-empty.test index ec657f005..97fc43cc2 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/set/capture-empty.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/set/capture-empty.test @@ -5,5 +5,5 @@ {% if foo %}FAIL{% endif %} --DATA-- -return array() +return [] --EXPECT-- diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/set/capture.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/set/capture.test index f156a1a7f..c3faf2500 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/set/capture.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/set/capture.test @@ -5,6 +5,6 @@ {{ foo }} --DATA-- -return array() +return [] --EXPECT-- f
o
o diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/set/expression.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/set/expression.test index 8ff434a01..bd472771a 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/set/expression.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/set/expression.test @@ -6,7 +6,7 @@ {{ foo }} {{ bar }} --DATA-- -return array() +return [] --EXPECT-- foobar barfoo diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/spaceless/simple.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/spaceless/simple.test index dd06dec25..98bd27a13 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/spaceless/simple.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/spaceless/simple.test @@ -7,6 +7,6 @@ {% endspaceless %} --DATA-- -return array() +return [] --EXPECT--
foo
diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/special_chars.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/special_chars.test index 789b4ba80..64ffd1d76 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/special_chars.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/special_chars.test @@ -3,6 +3,6 @@ --TEMPLATE-- {% § %} --DATA-- -return array() +return [] --EXPECT-- § diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/trim_block.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/trim_block.test index 1d2273f88..f1a1310ad 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/trim_block.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/trim_block.test @@ -51,7 +51,7 @@ Combined: end --DATA-- -return array('leading' => 'leading space', 'trailing' => 'trailing space', 'both' => 'both') +return ['leading' => 'leading space', 'trailing' => 'trailing space', 'both' => 'both'] --EXPECT-- 15 18 diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/aliases.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/aliases.test index f887006f6..b6b1d5c66 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/aliases.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/aliases.test @@ -7,6 +7,6 @@ --TEMPLATE(blocks.twig)-- {% block content 'foo' %} --DATA-- -return array() +return [] --EXPECT-- foo diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/basic.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/basic.test index 7364d76de..be622a10e 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/basic.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/basic.test @@ -7,6 +7,6 @@ --TEMPLATE(blocks.twig)-- {% block content 'foo' %} --DATA-- -return array() +return [] --EXPECT-- foo diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/deep.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/deep.test index b551a1e60..771ba642b 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/deep.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/deep.test @@ -15,7 +15,7 @@ {% block content 'bar' %} {% block bar 'bar' %} --DATA-- -return array() +return [] --EXPECT-- foo foo diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/deep_empty.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/deep_empty.test index 05cca682e..f14ce83de 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/deep_empty.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/deep_empty.test @@ -6,5 +6,5 @@ {% use "bar.twig" %} --TEMPLATE(bar.twig)-- --DATA-- -return array() +return [] --EXPECT-- diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/inheritance.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/inheritance.test index 0d0d470ee..1edeaa111 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/inheritance.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/inheritance.test @@ -19,7 +19,7 @@
sub_container
{% endblock %} --DATA-- -return array() +return [] --EXPECT--
overridden sub_container
diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/inheritance2.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/inheritance2.test index df95599ce..accec5094 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/inheritance2.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/inheritance2.test @@ -18,7 +18,7 @@
sub_container
{% endblock %} --DATA-- -return array() +return [] --EXPECT--
overridden sub_container
diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/multiple.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/multiple.test index 198be0c5c..85a63958d 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/multiple.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/multiple.test @@ -14,7 +14,7 @@ {% block content 'bar' %} {% block bar 'bar' %} --DATA-- -return array() +return [] --EXPECT-- bar foo diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/multiple_aliases.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/multiple_aliases.test index 8de871a8a..413bdfa4d 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/multiple_aliases.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/multiple_aliases.test @@ -15,7 +15,7 @@ {% block content 'bar' %} {% block bar 'bar' %} --DATA-- -return array() +return [] --EXPECT-- bar foo diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/parent_block.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/parent_block.test index 59db23d95..49328f6e8 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/parent_block.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/parent_block.test @@ -17,7 +17,7 @@ Content of block {% endblock foobar %} --DATA-- -return array() +return [] --EXPECT-- Content of block Content of block (first override) diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/parent_block2.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/parent_block2.test index d3f302df0..274baa821 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/parent_block2.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/parent_block2.test @@ -17,7 +17,7 @@ Content of block {% endblock foobar %} --DATA-- -return array() +return [] --EXPECT-- Content of block Content of block (first override) diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/parent_block3.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/parent_block3.test index 95b55a469..f6f221273 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/parent_block3.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/parent_block3.test @@ -29,7 +29,7 @@ Content of bar {% endblock bar %} --DATA-- -return array() +return [] --EXPECT-- Content of foo Content of foo (first override) diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/use_with_parent.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/use_with_parent.test index 3fe2ad83c..fad9a2d18 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/use_with_parent.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/use/use_with_parent.test @@ -17,7 +17,7 @@ --TEMPLATE(blocks.twig)-- {% block content 'BLOCK' %} --DATA-- -return array() +return [] --EXPECT-- PARENT CHILD diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/verbatim/basic.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/verbatim/basic.test index a95be5572..9b60abc49 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/verbatim/basic.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/verbatim/basic.test @@ -5,6 +5,6 @@ {{ foo }} {% endverbatim %} --DATA-- -return array() +return [] --EXPECT-- {{ foo }} diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/verbatim/mixed_usage_with_raw.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/verbatim/mixed_usage_with_raw.test index 28626a816..aadce8dbd 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/verbatim/mixed_usage_with_raw.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/verbatim/mixed_usage_with_raw.test @@ -5,6 +5,6 @@ {{ foo }} {% endraw %} --DATA-- -return array() +return [] --EXCEPTION-- Twig_Error_Syntax: Unexpected end of file: Unclosed "verbatim" block in "index.twig" at line 2. diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/verbatim/whitespace_control.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/verbatim/whitespace_control.test index eb6104446..501922bdd 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/verbatim/whitespace_control.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/verbatim/whitespace_control.test @@ -37,7 +37,7 @@ 5*** --DATA-- -return array() +return [] --EXPECT-- 1*** {{ 'bla' }} diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/with/basic.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/with/basic.test index 264ca5e7e..7c2abd0f9 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/with/basic.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/with/basic.test @@ -7,7 +7,7 @@ {% endwith %} {{ foo }}{{ bar }} --DATA-- -return array('foo' => 'foo', 'bar' => 'bar') +return ['foo' => 'foo', 'bar' => 'bar'] --EXPECT-- fooBAZ foobar diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/with/expression.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/with/expression.test index 32ed0916c..e4433d44c 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/with/expression.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/with/expression.test @@ -5,6 +5,6 @@ {{ foo }}{{ bar }} {% endwith %} --DATA-- -return array('foo' => 'baz') +return ['foo' => 'baz'] --EXPECT-- fooBAZ diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/with/nested.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/with/nested.test index 98e3aef43..33ca390b2 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/with/nested.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/with/nested.test @@ -9,7 +9,7 @@ nested "with" tags {% endwith %} {{ foo }}{{ bar }} --DATA-- -return array() +return [] --EXPECT-- FOOBAZ foobar diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/with/with_no_hash.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/with/with_no_hash.test index 93689f42c..3e5395c83 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/with/with_no_hash.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/with/with_no_hash.test @@ -5,6 +5,6 @@ {{ foo }}{{ bar }} {% endwith %} --DATA-- -return array('vars' => 'no-hash') +return ['vars' => 'no-hash'] --EXCEPTION-- Twig_Error_Runtime: Variables passed to the "with" tag must be a hash in "index.twig" at line 2. diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/with/with_only.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/with/with_only.test index 6247617e3..dba30bd5c 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/with/with_only.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tags/with/with_only.test @@ -5,6 +5,6 @@ {{ foo }}{{ bar }}{{ baz }} {% endwith %} --DATA-- -return array('foo' => 'baz', 'baz' => 'baz') +return ['foo' => 'baz', 'baz' => 'baz'] --EXCEPTION-- Twig_Error_Runtime: Variable "baz" does not exist in "index.twig" at line 3. diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/array.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/array.test index 1429d3753..7c9a6c80a 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/array.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/array.test @@ -5,15 +5,15 @@ array index test {{ key }} {% endfor %} --DATA-- -return array('days' => array( - 1 => array('money' => 9), - 2 => array('money' => 21), - 3 => array('money' => 38), - 4 => array('money' => 6), - 18 => array('money' => 6), - 19 => array('money' => 3), - 31 => array('money' => 11), -)); +return ['days' => [ + 1 => ['money' => 9], + 2 => ['money' => 21], + 3 => ['money' => 38], + 4 => ['money' => 6], + 18 => ['money' => 6], + 19 => ['money' => 3], + 31 => ['money' => 11], +]] --EXPECT-- 1 2 diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/constant.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/constant.test index 60218ac04..62d7806b6 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/constant.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/constant.test @@ -6,7 +6,7 @@ {{ value is constant('TwigTestFoo::BAR_NAME') ? 'ok' : 'no' }} {{ 2 is constant('ARRAY_AS_PROPS', object) ? 'ok' : 'no' }} --DATA-- -return array('value' => 'bar', 'object' => new ArrayObject(array('hi'))); +return ['value' => 'bar', 'object' => new ArrayObject(['hi'])] --EXPECT-- ok ok diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/defined.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/defined.test index d4e204efa..879c651e1 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/defined.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/defined.test @@ -34,18 +34,18 @@ {{ [1, 2] is defined ? 'ok' : 'ko' }} {{ { foo: "bar" } is defined ? 'ok' : 'ko' }} --DATA-- -return array( +return [ 'definedVar' => 'defined', 'zeroVar' => 0, 'nullVar' => null, - 'nested' => array( + 'nested' => [ 'definedVar' => 'defined', 'zeroVar' => 0, 'nullVar' => null, - 'definedArray' => array(0), - ), + 'definedArray' => [0], + ], 'object' => new TwigTestFoo(), -); +] --EXPECT-- ok ok @@ -80,20 +80,20 @@ ok ok ok --DATA-- -return array( +return [ 'definedVar' => 'defined', 'zeroVar' => 0, 'nullVar' => null, - 'nested' => array( + 'nested' => [ 'definedVar' => 'defined', 'zeroVar' => 0, 'nullVar' => null, - 'definedArray' => array(0), - ), + 'definedArray' => [0], + ], 'object' => new TwigTestFoo(), -); +] --CONFIG-- -return array('strict_variables' => false) +return ['strict_variables' => false] --EXPECT-- ok ok diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/defined_for_attribute.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/defined_for_attribute.test index 4a5b8dcdb..5fd2fe3f2 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/defined_for_attribute.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/defined_for_attribute.test @@ -6,28 +6,28 @@ {{ attribute(nested, definedVarName) is defined ? 'ok' : 'ko' }} {{ attribute(nested, undefinedVarName) is not defined ? 'ok' : 'ko' }} --DATA-- -return array( - 'nested' => array( +return [ + 'nested' => [ 'definedVar' => 'defined', - ), + ], 'definedVarName' => 'definedVar', 'undefinedVarName' => 'undefinedVar', -); +] --EXPECT-- ok ok ok ok --DATA-- -return array( - 'nested' => array( +return [ + 'nested' => [ 'definedVar' => 'defined', - ), + ], 'definedVarName' => 'definedVar', 'undefinedVarName' => 'undefinedVar', -); +] --CONFIG-- -return array('strict_variables' => false) +return ['strict_variables' => false] --EXPECT-- ok ok diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/defined_for_blocks.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/defined_for_blocks.test index 64d7d0431..c8b90f8c9 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/defined_for_blocks.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/defined_for_blocks.test @@ -26,7 +26,7 @@ --TEMPLATE(blocks)-- {% block block1 %}{%endblock %} --DATA-- -return array() +return [] --EXPECT-- ok ko diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/defined_for_blocks_with_template.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/defined_for_blocks_with_template.test index 2c651657e..f713cd236 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/defined_for_blocks_with_template.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/defined_for_blocks_with_template.test @@ -7,10 +7,10 @@ --TEMPLATE(included.twig)-- {% block foo %}FOO{% endblock %} --DATA-- -return array( +return [ 'included_loaded' => $twig->load('included.twig'), 'included_loaded_internal' => $twig->loadTemplate('included.twig'), -) +] --EXPECT-- ok ok diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/defined_for_constants.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/defined_for_constants.test index 2fa9929d3..4a5d4526d 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/defined_for_constants.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/defined_for_constants.test @@ -6,7 +6,7 @@ {{ constant('FOOBAR') is not defined ? 'ok' : 'ko' }} {{ constant('FOOBAR', object) is not defined ? 'ok' : 'ko' }} --DATA-- -return array('expect' => DATE_W3C, 'object' => new ArrayObject(array('hi'))); +return ['expect' => DATE_W3C, 'object' => new ArrayObject(['hi'])] --EXPECT-- ok ok diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/dynamic_test.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/dynamic_test.test new file mode 100644 index 000000000..41625f6af --- /dev/null +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/dynamic_test.test @@ -0,0 +1,14 @@ +--TEST-- +dynamic test +--TEMPLATE-- +{{ 'bar' is test_bar ? '1' :'0' }} +{{ 'foo' is test_foo ? '1' :'0' }} +{{ 'bar' is test_foo ? '1' :'0' }} +{{ 'foo' is test_bar ? '1' :'0' }} +--DATA-- +return [] +--EXPECT-- +1 +1 +0 +0 diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/empty.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/empty.test index 807c0ed4a..f227cda95 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/empty.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/empty.test @@ -16,15 +16,15 @@ {{ markup_empty is empty ? 'ok' : 'ko' }} {{ markup_not_empty is empty ? 'ko' : 'ok' }} --DATA-- -return array( +return [ 'string_empty' => '', 'string_zero' => '0', 'value_null' => null, 'value_false' => false, 'value_int_zero' => 0, - 'array_empty' => array(), 'array_not_empty' => array(1, 2), + 'array_empty' => [], 'array_not_empty' => [1, 2], 'magically_callable' => new MagicCallStub(), - 'countable_empty' => new CountableStub(array()), 'countable_not_empty' => new CountableStub(array(1, 2)), + 'countable_empty' => new CountableStub([]), 'countable_not_empty' => new CountableStub([1, 2]), 'tostring_empty' => new ToStringStub(''), 'tostring_not_empty' => new ToStringStub('0' /* edge case of using "0" as the string */), 'markup_empty' => new Twig_Markup('', 'UTF-8'), 'markup_not_empty' => new Twig_Markup('test', 'UTF-8'), -); +] --EXPECT-- ok ok diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/even.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/even.test index 695b4c2f8..5c73b01e9 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/even.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/even.test @@ -6,7 +6,7 @@ {{ 1 is not even ? 'ok' : 'ko' }} {{ 2 is not even ? 'ko' : 'ok' }} --DATA-- -return array() +return [] --EXPECT-- ok ok diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/in.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/in.test index 545f51f81..52ffec21f 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/in.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/in.test @@ -74,7 +74,7 @@ TRUE {{ 5.5 in '125.5' ? 'TRUE' : 'FALSE' }} {{ '5.5' in 125.5 ? 'TRUE' : 'FALSE' }} --DATA-- -return array('bar' => 'bar', 'foo' => array('bar' => 'bar'), 'dir_object' => new SplFileInfo(dirname(__FILE__)), 'object' => new stdClass(), 'resource' => opendir(dirname(__FILE__))) +return ['bar' => 'bar', 'foo' => ['bar' => 'bar'], 'dir_object' => new SplFileInfo(dirname(__FILE__)), 'object' => new stdClass(), 'resource' => opendir(dirname(__FILE__))] --EXPECT-- TRUE TRUE diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/in_with_objects.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/in_with_objects.test index 8e08061bb..b53eb067b 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/in_with_objects.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/in_with_objects.test @@ -11,9 +11,9 @@ $foo1 = new TwigTestFoo(); $foo->position = $foo1; $foo1->position = $foo; -return array( +return [ 'object' => $foo, - 'object_list' => array($foo1, $foo), -); + 'object_list' => [$foo1, $foo], +] --EXPECT-- TRUE diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/iterable.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/iterable.test index ec5255013..584c38cfd 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/iterable.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/iterable.test @@ -6,12 +6,12 @@ {{ obj is iterable ? 'ok' : 'ko' }} {{ val is iterable ? 'ok' : 'ko' }} --DATA-- -return array( - 'foo' => array(), - 'traversable' => new ArrayIterator(array()), +return [ + 'foo' => [], + 'traversable' => new ArrayIterator([]), 'obj' => new stdClass(), 'val' => 'test', -); +] --EXPECT-- ok ok diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/null_coalesce.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/null_coalesce.test index 3d148c893..7af3255d6 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/null_coalesce.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/null_coalesce.test @@ -14,7 +14,7 @@ Twig supports the ?? operator {{ 1 + nope ?? nada ?? 2 }} {{ 1 + nope ?? 3 + nada ?? 2 }} --DATA-- -return array('bar' => 'OK', 'foo' => array('bar' => 'OK')) +return ['bar' => 'OK', 'foo' => ['bar' => 'OK']] --EXPECT-- OK OK diff --git a/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/odd.test b/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/odd.test index 1b8311e3d..ec88bb519 100644 --- a/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/odd.test +++ b/vendor/twig/twig/test/Twig/Tests/Fixtures/tests/odd.test @@ -4,7 +4,7 @@ {{ 1 is odd ? 'ok' : 'ko' }} {{ 2 is odd ? 'ko' : 'ok' }} --DATA-- -return array() +return [] --EXPECT-- ok ok \ No newline at end of file diff --git a/vendor/twig/twig/test/Twig/Tests/IntegrationTest.php b/vendor/twig/twig/test/Twig/Tests/IntegrationTest.php index 9cbb15904..27c6c7387 100644 --- a/vendor/twig/twig/test/Twig/Tests/IntegrationTest.php +++ b/vendor/twig/twig/test/Twig/Tests/IntegrationTest.php @@ -20,14 +20,14 @@ class Twig_Tests_IntegrationTest extends Twig_Test_IntegrationTestCase { public function getExtensions() { - $policy = new Twig_Sandbox_SecurityPolicy(array(), array(), array(), array(), array()); + $policy = new Twig_Sandbox_SecurityPolicy([], [], [], [], []); - return array( + return [ new Twig_Extension_Debug(), new Twig_Extension_Sandbox($policy, false), new Twig_Extension_StringLoader(), new TwigTestExtension(), - ); + ]; } public function getFixturesDir() @@ -46,7 +46,7 @@ class TwigTestFoo implements Iterator const BAR_NAME = 'bar'; public $position = 0; - public $array = array(1, 2); + public $array = [1, 2]; public function bar($param1 = null, $param2 = null) { @@ -128,47 +128,48 @@ class TwigTestExtension extends Twig_Extension { public function getTokenParsers() { - return array( + return [ new TwigTestTokenParser_§(), - ); + ]; } public function getFilters() { - return array( - new Twig_SimpleFilter('§', array($this, '§Filter')), - new Twig_SimpleFilter('escape_and_nl2br', array($this, 'escape_and_nl2br'), array('needs_environment' => true, 'is_safe' => array('html'))), - new Twig_SimpleFilter('nl2br', array($this, 'nl2br'), array('pre_escape' => 'html', 'is_safe' => array('html'))), - new Twig_SimpleFilter('escape_something', array($this, 'escape_something'), array('is_safe' => array('something'))), - new Twig_SimpleFilter('preserves_safety', array($this, 'preserves_safety'), array('preserves_safety' => array('html'))), + return [ + new Twig_SimpleFilter('§', [$this, '§Filter']), + new Twig_SimpleFilter('escape_and_nl2br', [$this, 'escape_and_nl2br'], ['needs_environment' => true, 'is_safe' => ['html']]), + new Twig_SimpleFilter('nl2br', [$this, 'nl2br'], ['pre_escape' => 'html', 'is_safe' => ['html']]), + new Twig_SimpleFilter('escape_something', [$this, 'escape_something'], ['is_safe' => ['something']]), + new Twig_SimpleFilter('preserves_safety', [$this, 'preserves_safety'], ['preserves_safety' => ['html']]), new Twig_SimpleFilter('static_call_string', 'TwigTestExtension::staticCall'), - new Twig_SimpleFilter('static_call_array', array('TwigTestExtension', 'staticCall')), - new Twig_SimpleFilter('magic_call', array($this, 'magicCall')), + new Twig_SimpleFilter('static_call_array', ['TwigTestExtension', 'staticCall']), + new Twig_SimpleFilter('magic_call', [$this, 'magicCall']), new Twig_SimpleFilter('magic_call_string', 'TwigTestExtension::magicStaticCall'), - new Twig_SimpleFilter('magic_call_array', array('TwigTestExtension', 'magicStaticCall')), - new Twig_SimpleFilter('*_path', array($this, 'dynamic_path')), - new Twig_SimpleFilter('*_foo_*_bar', array($this, 'dynamic_foo')), - ); + new Twig_SimpleFilter('magic_call_array', ['TwigTestExtension', 'magicStaticCall']), + new Twig_SimpleFilter('*_path', [$this, 'dynamic_path']), + new Twig_SimpleFilter('*_foo_*_bar', [$this, 'dynamic_foo']), + ]; } public function getFunctions() { - return array( - new Twig_SimpleFunction('§', array($this, '§Function')), - new Twig_SimpleFunction('safe_br', array($this, 'br'), array('is_safe' => array('html'))), - new Twig_SimpleFunction('unsafe_br', array($this, 'br')), + return [ + new Twig_SimpleFunction('§', [$this, '§Function']), + new Twig_SimpleFunction('safe_br', [$this, 'br'], ['is_safe' => ['html']]), + new Twig_SimpleFunction('unsafe_br', [$this, 'br']), new Twig_SimpleFunction('static_call_string', 'TwigTestExtension::staticCall'), - new Twig_SimpleFunction('static_call_array', array('TwigTestExtension', 'staticCall')), - new Twig_SimpleFunction('*_path', array($this, 'dynamic_path')), - new Twig_SimpleFunction('*_foo_*_bar', array($this, 'dynamic_foo')), - ); + new Twig_SimpleFunction('static_call_array', ['TwigTestExtension', 'staticCall']), + new Twig_SimpleFunction('*_path', [$this, 'dynamic_path']), + new Twig_SimpleFunction('*_foo_*_bar', [$this, 'dynamic_foo']), + ]; } public function getTests() { - return array( - new Twig_SimpleTest('multi word', array($this, 'is_multi_word')), - ); + return [ + new Twig_SimpleTest('multi word', [$this, 'is_multi_word']), + new Twig_SimpleTest('test_*', [$this, 'dynamic_test']), + ]; } public function §Filter($value) @@ -209,6 +210,11 @@ class TwigTestExtension extends Twig_Extension return $foo.'/'.$bar.'/'.$item; } + public function dynamic_test($element, $item) + { + return $element === $item; + } + public function escape_something($value) { return strtoupper($value); diff --git a/vendor/twig/twig/test/Twig/Tests/LegacyFixtures/autoescape/filename.legacy.test b/vendor/twig/twig/test/Twig/Tests/LegacyFixtures/autoescape/filename.legacy.test index b091ad34d..d25f75e8e 100644 --- a/vendor/twig/twig/test/Twig/Tests/LegacyFixtures/autoescape/filename.legacy.test +++ b/vendor/twig/twig/test/Twig/Tests/LegacyFixtures/autoescape/filename.legacy.test @@ -9,9 +9,9 @@ --TEMPLATE(index.txt.twig)-- {{ br -}} --DATA-- -return array('br' => '
') +return ['br' => '
'] --CONFIG-- -return array('autoescape' => 'filename') +return ['autoescape' => 'filename'] --EXPECT-- <br /> <br /> diff --git a/vendor/twig/twig/test/Twig/Tests/LegacyFixtures/functions/undefined_block.legacy.test b/vendor/twig/twig/test/Twig/Tests/LegacyFixtures/functions/undefined_block.legacy.test index 62e24f0f4..e52c3b259 100644 --- a/vendor/twig/twig/test/Twig/Tests/LegacyFixtures/functions/undefined_block.legacy.test +++ b/vendor/twig/twig/test/Twig/Tests/LegacyFixtures/functions/undefined_block.legacy.test @@ -7,6 +7,6 @@ {% block foo %}Foo{% endblock %} {% block bar %}Bar{% endblock %} --DATA-- -return array() +return [] --EXPECT-- FooBarBar diff --git a/vendor/twig/twig/test/Twig/Tests/LegacyFixtures/test.legacy.test b/vendor/twig/twig/test/Twig/Tests/LegacyFixtures/test.legacy.test index d9c1d5085..4bd1f6ac0 100644 --- a/vendor/twig/twig/test/Twig/Tests/LegacyFixtures/test.legacy.test +++ b/vendor/twig/twig/test/Twig/Tests/LegacyFixtures/test.legacy.test @@ -3,6 +3,6 @@ Old test classes usage --TEMPLATE-- {{ 'foo' is multi word ? 'yes' : 'no' }} --DATA-- -return array() +return [] --EXPECT-- no diff --git a/vendor/twig/twig/test/Twig/Tests/LegacyIntegrationTest.php b/vendor/twig/twig/test/Twig/Tests/LegacyIntegrationTest.php index 2ed758038..004d686a8 100644 --- a/vendor/twig/twig/test/Twig/Tests/LegacyIntegrationTest.php +++ b/vendor/twig/twig/test/Twig/Tests/LegacyIntegrationTest.php @@ -13,9 +13,9 @@ class Twig_Tests_LegacyIntegrationTest extends Twig_Test_IntegrationTestCase { public function getExtensions() { - return array( + return [ new LegacyTwigTestExtension(), - ); + ]; } public function getFixturesDir() @@ -26,7 +26,7 @@ class Twig_Tests_LegacyIntegrationTest extends Twig_Test_IntegrationTestCase public function getTests($name, $legacyTests = false) { if (!$legacyTests) { - return array(array('', '', '', array(), '', array())); + return [['', '', '', [], '', []]]; } return parent::getTests($name, true); @@ -37,9 +37,9 @@ class LegacyTwigTestExtension extends Twig_Extension { public function getTests() { - return array( + return [ 'multi word' => new Twig_Test_Method($this, 'is_multi_word'), - ); + ]; } public function is_multi_word($value) diff --git a/vendor/twig/twig/test/Twig/Tests/LexerTest.php b/vendor/twig/twig/test/Twig/Tests/LexerTest.php index ffe9a235b..8cfaaf7fb 100644 --- a/vendor/twig/twig/test/Twig/Tests/LexerTest.php +++ b/vendor/twig/twig/test/Twig/Tests/LexerTest.php @@ -170,10 +170,10 @@ class Twig_Tests_LexerTest extends \PHPUnit\Framework\TestCase public function testStringWithEscapedDelimiter() { - $tests = array( + $tests = [ "{{ 'foo \' bar' }}" => 'foo \' bar', '{{ "foo \" bar" }}' => 'foo " bar', - ); + ]; $lexer = new Twig_Lexer(new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock())); foreach ($tests as $template => $expected) { $stream = $lexer->tokenize(new Twig_Source($template, 'index')); diff --git a/vendor/twig/twig/test/Twig/Tests/Loader/ArrayTest.php b/vendor/twig/twig/test/Twig/Tests/Loader/ArrayTest.php index 593063933..a764e0425 100644 --- a/vendor/twig/twig/test/Twig/Tests/Loader/ArrayTest.php +++ b/vendor/twig/twig/test/Twig/Tests/Loader/ArrayTest.php @@ -16,7 +16,7 @@ class Twig_Tests_Loader_ArrayTest extends \PHPUnit\Framework\TestCase */ public function testGetSource() { - $loader = new Twig_Loader_Array(array('foo' => 'bar')); + $loader = new Twig_Loader_Array(['foo' => 'bar']); $this->assertEquals('bar', $loader->getSource('foo')); } @@ -27,7 +27,7 @@ class Twig_Tests_Loader_ArrayTest extends \PHPUnit\Framework\TestCase */ public function testGetSourceWhenTemplateDoesNotExist() { - $loader = new Twig_Loader_Array(array()); + $loader = new Twig_Loader_Array([]); $loader->getSource('foo'); } @@ -37,24 +37,24 @@ class Twig_Tests_Loader_ArrayTest extends \PHPUnit\Framework\TestCase */ public function testGetSourceContextWhenTemplateDoesNotExist() { - $loader = new Twig_Loader_Array(array()); + $loader = new Twig_Loader_Array([]); $loader->getSourceContext('foo'); } public function testGetCacheKey() { - $loader = new Twig_Loader_Array(array('foo' => 'bar')); + $loader = new Twig_Loader_Array(['foo' => 'bar']); $this->assertEquals('foo:bar', $loader->getCacheKey('foo')); } public function testGetCacheKeyWhenTemplateHasDuplicateContent() { - $loader = new Twig_Loader_Array(array( + $loader = new Twig_Loader_Array([ 'foo' => 'bar', 'baz' => 'bar', - )); + ]); $this->assertEquals('foo:bar', $loader->getCacheKey('foo')); $this->assertEquals('baz:bar', $loader->getCacheKey('baz')); @@ -62,10 +62,10 @@ class Twig_Tests_Loader_ArrayTest extends \PHPUnit\Framework\TestCase public function testGetCacheKeyIsProtectedFromEdgeCollisions() { - $loader = new Twig_Loader_Array(array( + $loader = new Twig_Loader_Array([ 'foo__' => 'bar', 'foo' => '__bar', - )); + ]); $this->assertEquals('foo__:bar', $loader->getCacheKey('foo__')); $this->assertEquals('foo:__bar', $loader->getCacheKey('foo')); @@ -76,14 +76,14 @@ class Twig_Tests_Loader_ArrayTest extends \PHPUnit\Framework\TestCase */ public function testGetCacheKeyWhenTemplateDoesNotExist() { - $loader = new Twig_Loader_Array(array()); + $loader = new Twig_Loader_Array([]); $loader->getCacheKey('foo'); } public function testSetTemplate() { - $loader = new Twig_Loader_Array(array()); + $loader = new Twig_Loader_Array([]); $loader->setTemplate('foo', 'bar'); $this->assertEquals('bar', $loader->getSourceContext('foo')->getCode()); @@ -91,7 +91,7 @@ class Twig_Tests_Loader_ArrayTest extends \PHPUnit\Framework\TestCase public function testIsFresh() { - $loader = new Twig_Loader_Array(array('foo' => 'bar')); + $loader = new Twig_Loader_Array(['foo' => 'bar']); $this->assertTrue($loader->isFresh('foo', time())); } @@ -100,7 +100,7 @@ class Twig_Tests_Loader_ArrayTest extends \PHPUnit\Framework\TestCase */ public function testIsFreshWhenTemplateDoesNotExist() { - $loader = new Twig_Loader_Array(array()); + $loader = new Twig_Loader_Array([]); $loader->isFresh('foo', time()); } @@ -108,7 +108,7 @@ class Twig_Tests_Loader_ArrayTest extends \PHPUnit\Framework\TestCase public function testTemplateReference() { $name = new Twig_Test_Loader_TemplateReference('foo'); - $loader = new Twig_Loader_Array(array('foo' => 'bar')); + $loader = new Twig_Loader_Array(['foo' => 'bar']); $loader->getCacheKey($name); $loader->getSourceContext($name); diff --git a/vendor/twig/twig/test/Twig/Tests/Loader/ChainTest.php b/vendor/twig/twig/test/Twig/Tests/Loader/ChainTest.php index 8a8a84a5a..3b826c3cf 100644 --- a/vendor/twig/twig/test/Twig/Tests/Loader/ChainTest.php +++ b/vendor/twig/twig/test/Twig/Tests/Loader/ChainTest.php @@ -16,10 +16,10 @@ class Twig_Tests_Loader_ChainTest extends \PHPUnit\Framework\TestCase */ public function testGetSource() { - $loader = new Twig_Loader_Chain(array( - new Twig_Loader_Array(array('foo' => 'bar')), - new Twig_Loader_Array(array('foo' => 'foobar', 'bar' => 'foo')), - )); + $loader = new Twig_Loader_Chain([ + new Twig_Loader_Array(['foo' => 'bar']), + new Twig_Loader_Array(['foo' => 'foobar', 'bar' => 'foo']), + ]); $this->assertEquals('bar', $loader->getSource('foo')); $this->assertEquals('foo', $loader->getSource('bar')); @@ -28,11 +28,11 @@ class Twig_Tests_Loader_ChainTest extends \PHPUnit\Framework\TestCase public function testGetSourceContext() { $path = dirname(__FILE__).'/../Fixtures'; - $loader = new Twig_Loader_Chain(array( - new Twig_Loader_Array(array('foo' => 'bar')), - new Twig_Loader_Array(array('errors/index.html' => 'baz')), - new Twig_Loader_Filesystem(array($path)), - )); + $loader = new Twig_Loader_Chain([ + new Twig_Loader_Array(['foo' => 'bar']), + new Twig_Loader_Array(['errors/index.html' => 'baz']), + new Twig_Loader_Filesystem([$path]), + ]); $this->assertEquals('foo', $loader->getSourceContext('foo')->getName()); $this->assertSame('', $loader->getSourceContext('foo')->getPath()); @@ -51,7 +51,7 @@ class Twig_Tests_Loader_ChainTest extends \PHPUnit\Framework\TestCase */ public function testGetSourceContextWhenTemplateDoesNotExist() { - $loader = new Twig_Loader_Chain(array()); + $loader = new Twig_Loader_Chain([]); $loader->getSourceContext('foo'); } @@ -62,17 +62,17 @@ class Twig_Tests_Loader_ChainTest extends \PHPUnit\Framework\TestCase */ public function testGetSourceWhenTemplateDoesNotExist() { - $loader = new Twig_Loader_Chain(array()); + $loader = new Twig_Loader_Chain([]); $loader->getSource('foo'); } public function testGetCacheKey() { - $loader = new Twig_Loader_Chain(array( - new Twig_Loader_Array(array('foo' => 'bar')), - new Twig_Loader_Array(array('foo' => 'foobar', 'bar' => 'foo')), - )); + $loader = new Twig_Loader_Chain([ + new Twig_Loader_Array(['foo' => 'bar']), + new Twig_Loader_Array(['foo' => 'foobar', 'bar' => 'foo']), + ]); $this->assertEquals('foo:bar', $loader->getCacheKey('foo')); $this->assertEquals('bar:foo', $loader->getCacheKey('bar')); @@ -83,7 +83,7 @@ class Twig_Tests_Loader_ChainTest extends \PHPUnit\Framework\TestCase */ public function testGetCacheKeyWhenTemplateDoesNotExist() { - $loader = new Twig_Loader_Chain(array()); + $loader = new Twig_Loader_Chain([]); $loader->getCacheKey('foo'); } @@ -91,7 +91,7 @@ class Twig_Tests_Loader_ChainTest extends \PHPUnit\Framework\TestCase public function testAddLoader() { $loader = new Twig_Loader_Chain(); - $loader->addLoader(new Twig_Loader_Array(array('foo' => 'bar'))); + $loader->addLoader(new Twig_Loader_Array(['foo' => 'bar'])); $this->assertEquals('bar', $loader->getSourceContext('foo')->getCode()); } @@ -104,7 +104,7 @@ class Twig_Tests_Loader_ChainTest extends \PHPUnit\Framework\TestCase // can be removed in 2.0 $loader2 = $this->getMockBuilder('Twig_ChainTestLoaderInterface')->getMock(); - //$loader2 = $this->getMockBuilder(array('Twig_LoaderInterface', 'Twig_SourceContextLoaderInterface'))->getMock(); + //$loader2 = $this->getMockBuilder(['Twig_LoaderInterface', 'Twig_SourceContextLoaderInterface'])->getMock(); $loader2->expects($this->once())->method('getSourceContext')->will($this->returnValue(new Twig_Source('content', 'index'))); $loader = new Twig_Loader_Chain(); diff --git a/vendor/twig/twig/test/Twig/Tests/Loader/FilesystemTest.php b/vendor/twig/twig/test/Twig/Tests/Loader/FilesystemTest.php index bd2acbd75..78758e0b7 100644 --- a/vendor/twig/twig/test/Twig/Tests/Loader/FilesystemTest.php +++ b/vendor/twig/twig/test/Twig/Tests/Loader/FilesystemTest.php @@ -14,7 +14,7 @@ class Twig_Tests_Loader_FilesystemTest extends \PHPUnit\Framework\TestCase public function testGetSourceContext() { $path = dirname(__FILE__).'/../Fixtures'; - $loader = new Twig_Loader_Filesystem(array($path)); + $loader = new Twig_Loader_Filesystem([$path]); $this->assertEquals('errors/index.html', $loader->getSourceContext('errors/index.html')->getName()); $this->assertEquals(realpath($path.'/errors/index.html'), realpath($loader->getSourceContext('errors/index.html')->getPath())); } @@ -24,7 +24,7 @@ class Twig_Tests_Loader_FilesystemTest extends \PHPUnit\Framework\TestCase */ public function testSecurity($template) { - $loader = new Twig_Loader_Filesystem(array(dirname(__FILE__).'/../Fixtures')); + $loader = new Twig_Loader_Filesystem([dirname(__FILE__).'/../Fixtures']); try { $loader->getCacheKey($template); @@ -36,27 +36,27 @@ class Twig_Tests_Loader_FilesystemTest extends \PHPUnit\Framework\TestCase public function getSecurityTests() { - return array( - array("AutoloaderTest\0.php"), - array('..\\AutoloaderTest.php'), - array('..\\\\\\AutoloaderTest.php'), - array('../AutoloaderTest.php'), - array('..////AutoloaderTest.php'), - array('./../AutoloaderTest.php'), - array('.\\..\\AutoloaderTest.php'), - array('././././././../AutoloaderTest.php'), - array('.\\./.\\./.\\./../AutoloaderTest.php'), - array('foo/../../AutoloaderTest.php'), - array('foo\\..\\..\\AutoloaderTest.php'), - array('foo/../bar/../../AutoloaderTest.php'), - array('foo/bar/../../../AutoloaderTest.php'), - array('filters/../../AutoloaderTest.php'), - array('filters//..//..//AutoloaderTest.php'), - array('filters\\..\\..\\AutoloaderTest.php'), - array('filters\\\\..\\\\..\\\\AutoloaderTest.php'), - array('filters\\//../\\/\\..\\AutoloaderTest.php'), - array('/../AutoloaderTest.php'), - ); + return [ + ["AutoloaderTest\0.php"], + ['..\\AutoloaderTest.php'], + ['..\\\\\\AutoloaderTest.php'], + ['../AutoloaderTest.php'], + ['..////AutoloaderTest.php'], + ['./../AutoloaderTest.php'], + ['.\\..\\AutoloaderTest.php'], + ['././././././../AutoloaderTest.php'], + ['.\\./.\\./.\\./../AutoloaderTest.php'], + ['foo/../../AutoloaderTest.php'], + ['foo\\..\\..\\AutoloaderTest.php'], + ['foo/../bar/../../AutoloaderTest.php'], + ['foo/bar/../../../AutoloaderTest.php'], + ['filters/../../AutoloaderTest.php'], + ['filters//..//..//AutoloaderTest.php'], + ['filters\\..\\..\\AutoloaderTest.php'], + ['filters\\\\..\\\\..\\\\AutoloaderTest.php'], + ['filters\\//../\\/\\..\\AutoloaderTest.php'], + ['/../AutoloaderTest.php'], + ]; } /** @@ -64,27 +64,27 @@ class Twig_Tests_Loader_FilesystemTest extends \PHPUnit\Framework\TestCase */ public function testPaths($basePath, $cacheKey, $rootPath) { - $loader = new Twig_Loader_Filesystem(array($basePath.'/normal', $basePath.'/normal_bis'), $rootPath); - $loader->setPaths(array($basePath.'/named', $basePath.'/named_bis'), 'named'); + $loader = new Twig_Loader_Filesystem([$basePath.'/normal', $basePath.'/normal_bis'], $rootPath); + $loader->setPaths([$basePath.'/named', $basePath.'/named_bis'], 'named'); $loader->addPath($basePath.'/named_ter', 'named'); $loader->addPath($basePath.'/normal_ter'); $loader->prependPath($basePath.'/normal_final'); $loader->prependPath($basePath.'/named/../named_quater', 'named'); $loader->prependPath($basePath.'/named_final', 'named'); - $this->assertEquals(array( + $this->assertEquals([ $basePath.'/normal_final', $basePath.'/normal', $basePath.'/normal_bis', $basePath.'/normal_ter', - ), $loader->getPaths()); - $this->assertEquals(array( + ], $loader->getPaths()); + $this->assertEquals([ $basePath.'/named_final', $basePath.'/named/../named_quater', $basePath.'/named', $basePath.'/named_bis', $basePath.'/named_ter', - ), $loader->getPaths('named')); + ], $loader->getPaths('named')); // do not use realpath here as it would make the test unuseful $this->assertEquals($cacheKey, str_replace('\\', '/', $loader->getCacheKey('@named/named_absolute.html'))); @@ -95,55 +95,55 @@ class Twig_Tests_Loader_FilesystemTest extends \PHPUnit\Framework\TestCase public function getBasePaths() { - return array( - array( + return [ + [ dirname(__FILE__).'/Fixtures', 'test/Twig/Tests/Loader/Fixtures/named_quater/named_absolute.html', null, - ), - array( + ], + [ dirname(__FILE__).'/Fixtures/../Fixtures', 'test/Twig/Tests/Loader/Fixtures/named_quater/named_absolute.html', null, - ), - array( + ], + [ 'test/Twig/Tests/Loader/Fixtures', 'test/Twig/Tests/Loader/Fixtures/named_quater/named_absolute.html', getcwd(), - ), - array( + ], + [ 'Fixtures', 'Fixtures/named_quater/named_absolute.html', getcwd().'/test/Twig/Tests/Loader', - ), - array( + ], + [ 'Fixtures', 'Fixtures/named_quater/named_absolute.html', getcwd().'/test/../test/Twig/Tests/Loader', - ), - ); + ], + ]; } public function testEmptyConstructor() { $loader = new Twig_Loader_Filesystem(); - $this->assertEquals(array(), $loader->getPaths()); + $this->assertEquals([], $loader->getPaths()); } public function testGetNamespaces() { $loader = new Twig_Loader_Filesystem(sys_get_temp_dir()); - $this->assertEquals(array(Twig_Loader_Filesystem::MAIN_NAMESPACE), $loader->getNamespaces()); + $this->assertEquals([Twig_Loader_Filesystem::MAIN_NAMESPACE], $loader->getNamespaces()); $loader->addPath(sys_get_temp_dir(), 'named'); - $this->assertEquals(array(Twig_Loader_Filesystem::MAIN_NAMESPACE, 'named'), $loader->getNamespaces()); + $this->assertEquals([Twig_Loader_Filesystem::MAIN_NAMESPACE, 'named'], $loader->getNamespaces()); } public function testFindTemplateExceptionNamespace() { $basePath = dirname(__FILE__).'/Fixtures'; - $loader = new Twig_Loader_Filesystem(array($basePath.'/normal')); + $loader = new Twig_Loader_Filesystem([$basePath.'/normal']); $loader->addPath($basePath.'/named', 'named'); try { @@ -158,7 +158,7 @@ class Twig_Tests_Loader_FilesystemTest extends \PHPUnit\Framework\TestCase { $basePath = dirname(__FILE__).'/Fixtures'; - $loader = new Twig_Loader_Filesystem(array($basePath.'/normal')); + $loader = new Twig_Loader_Filesystem([$basePath.'/normal']); $loader->addPath($basePath.'/named', 'named'); // prime the cache for index.html in the named namespace @@ -171,7 +171,7 @@ class Twig_Tests_Loader_FilesystemTest extends \PHPUnit\Framework\TestCase public function testLoadTemplateAndRenderBlockWithCache() { - $loader = new Twig_Loader_Filesystem(array()); + $loader = new Twig_Loader_Filesystem([]); $loader->addPath(dirname(__FILE__).'/Fixtures/themes/theme2'); $loader->addPath(dirname(__FILE__).'/Fixtures/themes/theme1'); $loader->addPath(dirname(__FILE__).'/Fixtures/themes/theme1', 'default_theme'); @@ -179,20 +179,20 @@ class Twig_Tests_Loader_FilesystemTest extends \PHPUnit\Framework\TestCase $twig = new Twig_Environment($loader); $template = $twig->loadTemplate('blocks.html.twig'); - $this->assertSame('block from theme 1', $template->renderBlock('b1', array())); + $this->assertSame('block from theme 1', $template->renderBlock('b1', [])); $template = $twig->loadTemplate('blocks.html.twig'); - $this->assertSame('block from theme 2', $template->renderBlock('b2', array())); + $this->assertSame('block from theme 2', $template->renderBlock('b2', [])); } public function getArrayInheritanceTests() { - return array( - 'valid array inheritance' => array('array_inheritance_valid_parent.html.twig'), - 'array inheritance with null first template' => array('array_inheritance_null_parent.html.twig'), - 'array inheritance with empty first template' => array('array_inheritance_empty_parent.html.twig'), - 'array inheritance with non-existent first template' => array('array_inheritance_nonexistent_parent.html.twig'), - ); + return [ + 'valid array inheritance' => ['array_inheritance_valid_parent.html.twig'], + 'array inheritance with null first template' => ['array_inheritance_null_parent.html.twig'], + 'array inheritance with empty first template' => ['array_inheritance_empty_parent.html.twig'], + 'array inheritance with non-existent first template' => ['array_inheritance_nonexistent_parent.html.twig'], + ]; } /** @@ -202,13 +202,13 @@ class Twig_Tests_Loader_FilesystemTest extends \PHPUnit\Framework\TestCase */ public function testArrayInheritance($templateName) { - $loader = new Twig_Loader_Filesystem(array()); + $loader = new Twig_Loader_Filesystem([]); $loader->addPath(dirname(__FILE__).'/Fixtures/inheritance'); $twig = new Twig_Environment($loader); $template = $twig->loadTemplate($templateName); - $this->assertSame('VALID Child', $template->renderBlock('body', array())); + $this->assertSame('VALID Child', $template->renderBlock('body', [])); } /** @@ -216,11 +216,26 @@ class Twig_Tests_Loader_FilesystemTest extends \PHPUnit\Framework\TestCase */ public function testLoadTemplateFromPhar() { - $loader = new Twig_Loader_Filesystem(array()); + $loader = new Twig_Loader_Filesystem([]); // phar-sample.phar was created with the following script: // $f = new Phar('phar-test.phar'); // $f->addFromString('hello.twig', 'hello from phar'); $loader->addPath('phar://'.dirname(__FILE__).'/Fixtures/phar/phar-sample.phar'); $this->assertSame('hello from phar', $loader->getSourceContext('hello.twig')->getCode()); } + + public function testTemplateExistsAlwaysReturnsBool() + { + $loader = new Twig_Loader_Filesystem([]); + $this->assertFalse($loader->exists("foo\0.twig")); + $this->assertFalse($loader->exists('../foo.twig')); + $this->assertFalse($loader->exists('@foo')); + $this->assertFalse($loader->exists('foo')); + $this->assertFalse($loader->exists('@foo/bar.twig')); + + $loader->addPath(__DIR__.'/Fixtures/normal'); + $this->assertTrue($loader->exists('index.html')); + $loader->addPath(__DIR__.'/Fixtures/normal', 'foo'); + $this->assertTrue($loader->exists('@foo/index.html')); + } } diff --git a/vendor/twig/twig/test/Twig/Tests/NativeExtensionTest.php b/vendor/twig/twig/test/Twig/Tests/NativeExtensionTest.php index 50736dc22..d7d871755 100644 --- a/vendor/twig/twig/test/Twig/Tests/NativeExtensionTest.php +++ b/vendor/twig/twig/test/Twig/Tests/NativeExtensionTest.php @@ -16,11 +16,15 @@ class Twig_Tests_NativeExtensionTest extends \PHPUnit\Framework\TestCase */ public function testGetProperties() { - $twig = new Twig_Environment(new Twig_Loader_Array(array('index' => '{{ d1.date }}{{ d2.date }}')), array( + if (PHP_VERSION_ID >= 70000) { + $this->markTestSkipped('Extension is not available on PHP 7+'); + } + + $twig = new Twig_Environment(new Twig_Loader_Array(['index' => '{{ d1.date }}{{ d2.date }}']), [ 'debug' => true, 'cache' => false, 'autoescape' => false, - )); + ]); $d1 = new DateTime(); $d2 = new DateTime(); diff --git a/vendor/twig/twig/test/Twig/Tests/Node/AutoEscapeTest.php b/vendor/twig/twig/test/Twig/Tests/Node/AutoEscapeTest.php index 25d16023f..1c9f09393 100644 --- a/vendor/twig/twig/test/Twig/Tests/Node/AutoEscapeTest.php +++ b/vendor/twig/twig/test/Twig/Tests/Node/AutoEscapeTest.php @@ -13,7 +13,7 @@ class Twig_Tests_Node_AutoEscapeTest extends Twig_Test_NodeTestCase { public function testConstructor() { - $body = new Twig_Node(array(new Twig_Node_Text('foo', 1))); + $body = new Twig_Node([new Twig_Node_Text('foo', 1)]); $node = new Twig_Node_AutoEscape(true, $body, 1); $this->assertEquals($body, $node->getNode('body')); @@ -22,11 +22,11 @@ class Twig_Tests_Node_AutoEscapeTest extends Twig_Test_NodeTestCase public function getTests() { - $body = new Twig_Node(array(new Twig_Node_Text('foo', 1))); + $body = new Twig_Node([new Twig_Node_Text('foo', 1)]); $node = new Twig_Node_AutoEscape(true, $body, 1); - return array( - array($node, "// line 1\necho \"foo\";"), - ); + return [ + [$node, "// line 1\necho \"foo\";"], + ]; } } diff --git a/vendor/twig/twig/test/Twig/Tests/Node/BlockReferenceTest.php b/vendor/twig/twig/test/Twig/Tests/Node/BlockReferenceTest.php index 84dac9bfa..0eb60ca01 100644 --- a/vendor/twig/twig/test/Twig/Tests/Node/BlockReferenceTest.php +++ b/vendor/twig/twig/test/Twig/Tests/Node/BlockReferenceTest.php @@ -20,12 +20,12 @@ class Twig_Tests_Node_BlockReferenceTest extends Twig_Test_NodeTestCase public function getTests() { - return array( - array(new Twig_Node_BlockReference('foo', 1), <<displayBlock('foo', \$context, \$blocks); EOF - ), - ); + ], + ]; } } diff --git a/vendor/twig/twig/test/Twig/Tests/Node/BlockTest.php b/vendor/twig/twig/test/Twig/Tests/Node/BlockTest.php index e7246dcc3..0b347df02 100644 --- a/vendor/twig/twig/test/Twig/Tests/Node/BlockTest.php +++ b/vendor/twig/twig/test/Twig/Tests/Node/BlockTest.php @@ -25,15 +25,15 @@ class Twig_Tests_Node_BlockTest extends Twig_Test_NodeTestCase $body = new Twig_Node_Text('foo', 1); $node = new Twig_Node_Block('foo', $body, 1); - return array( - array($node, <<assertEquals($expr, $node->getNode('expr')); + } + + public function getTests() + { + $tests = []; + + $expr = new Twig_Node_Expression_Constant('This section is deprecated', 1); + $node = new Twig_Node_Deprecated($expr, 1, 'deprecated'); + $node->setTemplateName('foo.twig'); + + $tests[] = [$node, <<setTemplateName('foo.twig'); + + $tests[] = [$node, <<getMockBuilder('Twig_LoaderInterface')->getMock()); + $environment->addFunction(new Twig_SimpleFunction('foo', 'foo', [])); + + $expr = new Twig_Node_Expression_Function('foo', new Twig_Node(), 1); + $node = new Twig_Node_Deprecated($expr, 1, 'deprecated'); + $node->setTemplateName('foo.twig'); + + $compiler = $this->getCompiler($environment); + $varName = $compiler->getVarName(); + + $tests[] = [$node, <<assertEquals($foo, $node->getNode(1)); @@ -21,17 +21,17 @@ class Twig_Tests_Node_Expression_ArrayTest extends Twig_Test_NodeTestCase public function getTests() { - $elements = array( + $elements = [ new Twig_Node_Expression_Constant('foo', 1), new Twig_Node_Expression_Constant('bar', 1), new Twig_Node_Expression_Constant('bar', 1), new Twig_Node_Expression_Constant('foo', 1), - ); + ]; $node = new Twig_Node_Expression_Array($elements, 1); - return array( - array($node, 'array("foo" => "bar", "bar" => "foo")'), - ); + return [ + [$node, '["foo" => "bar", "bar" => "foo"]'], + ]; } } diff --git a/vendor/twig/twig/test/Twig/Tests/Node/Expression/AssignNameTest.php b/vendor/twig/twig/test/Twig/Tests/Node/Expression/AssignNameTest.php index bf365de49..a325f0b4a 100644 --- a/vendor/twig/twig/test/Twig/Tests/Node/Expression/AssignNameTest.php +++ b/vendor/twig/twig/test/Twig/Tests/Node/Expression/AssignNameTest.php @@ -22,8 +22,8 @@ class Twig_Tests_Node_Expression_AssignNameTest extends Twig_Test_NodeTestCase { $node = new Twig_Node_Expression_AssignName('foo', 1); - return array( - array($node, '$context["foo"]'), - ); + return [ + [$node, '$context["foo"]'], + ]; } } diff --git a/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/AddTest.php b/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/AddTest.php index 02310a1b0..333b2056a 100644 --- a/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/AddTest.php +++ b/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/AddTest.php @@ -27,8 +27,8 @@ class Twig_Tests_Node_Expression_Binary_AddTest extends Twig_Test_NodeTestCase $right = new Twig_Node_Expression_Constant(2, 1); $node = new Twig_Node_Expression_Binary_Add($left, $right, 1); - return array( - array($node, '(1 + 2)'), - ); + return [ + [$node, '(1 + 2)'], + ]; } } diff --git a/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/AndTest.php b/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/AndTest.php index 2df3c8e45..56c055e7d 100644 --- a/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/AndTest.php +++ b/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/AndTest.php @@ -27,8 +27,8 @@ class Twig_Tests_Node_Expression_Binary_AndTest extends Twig_Test_NodeTestCase $right = new Twig_Node_Expression_Constant(2, 1); $node = new Twig_Node_Expression_Binary_And($left, $right, 1); - return array( - array($node, '(1 && 2)'), - ); + return [ + [$node, '(1 && 2)'], + ]; } } diff --git a/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/ConcatTest.php b/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/ConcatTest.php index 759e48289..e83712e50 100644 --- a/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/ConcatTest.php +++ b/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/ConcatTest.php @@ -27,8 +27,8 @@ class Twig_Tests_Node_Expression_Binary_ConcatTest extends Twig_Test_NodeTestCas $right = new Twig_Node_Expression_Constant(2, 1); $node = new Twig_Node_Expression_Binary_Concat($left, $right, 1); - return array( - array($node, '(1 . 2)'), - ); + return [ + [$node, '(1 . 2)'], + ]; } } diff --git a/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/DivTest.php b/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/DivTest.php index 0e54b10a3..011e7ce4f 100644 --- a/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/DivTest.php +++ b/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/DivTest.php @@ -27,8 +27,8 @@ class Twig_Tests_Node_Expression_Binary_DivTest extends Twig_Test_NodeTestCase $right = new Twig_Node_Expression_Constant(2, 1); $node = new Twig_Node_Expression_Binary_Div($left, $right, 1); - return array( - array($node, '(1 / 2)'), - ); + return [ + [$node, '(1 / 2)'], + ]; } } diff --git a/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/FloorDivTest.php b/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/FloorDivTest.php index 5813dce6e..1131a4e22 100644 --- a/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/FloorDivTest.php +++ b/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/FloorDivTest.php @@ -27,8 +27,8 @@ class Twig_Tests_Node_Expression_Binary_FloorDivTest extends Twig_Test_NodeTestC $right = new Twig_Node_Expression_Constant(2, 1); $node = new Twig_Node_Expression_Binary_FloorDiv($left, $right, 1); - return array( - array($node, '(int) floor((1 / 2))'), - ); + return [ + [$node, '(int) floor((1 / 2))'], + ]; } } diff --git a/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/ModTest.php b/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/ModTest.php index 4c663c787..7c3d00b8a 100644 --- a/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/ModTest.php +++ b/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/ModTest.php @@ -27,8 +27,8 @@ class Twig_Tests_Node_Expression_Binary_ModTest extends Twig_Test_NodeTestCase $right = new Twig_Node_Expression_Constant(2, 1); $node = new Twig_Node_Expression_Binary_Mod($left, $right, 1); - return array( - array($node, '(1 % 2)'), - ); + return [ + [$node, '(1 % 2)'], + ]; } } diff --git a/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/MulTest.php b/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/MulTest.php index e92c95e64..6ed79bc48 100644 --- a/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/MulTest.php +++ b/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/MulTest.php @@ -27,8 +27,8 @@ class Twig_Tests_Node_Expression_Binary_MulTest extends Twig_Test_NodeTestCase $right = new Twig_Node_Expression_Constant(2, 1); $node = new Twig_Node_Expression_Binary_Mul($left, $right, 1); - return array( - array($node, '(1 * 2)'), - ); + return [ + [$node, '(1 * 2)'], + ]; } } diff --git a/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/OrTest.php b/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/OrTest.php index ec37c83eb..fe9acb0c5 100644 --- a/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/OrTest.php +++ b/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/OrTest.php @@ -27,8 +27,8 @@ class Twig_Tests_Node_Expression_Binary_OrTest extends Twig_Test_NodeTestCase $right = new Twig_Node_Expression_Constant(2, 1); $node = new Twig_Node_Expression_Binary_Or($left, $right, 1); - return array( - array($node, '(1 || 2)'), - ); + return [ + [$node, '(1 || 2)'], + ]; } } diff --git a/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/SubTest.php b/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/SubTest.php index 061cb270f..e14201612 100644 --- a/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/SubTest.php +++ b/vendor/twig/twig/test/Twig/Tests/Node/Expression/Binary/SubTest.php @@ -27,8 +27,8 @@ class Twig_Tests_Node_Expression_Binary_SubTest extends Twig_Test_NodeTestCase $right = new Twig_Node_Expression_Constant(2, 1); $node = new Twig_Node_Expression_Binary_Sub($left, $right, 1); - return array( - array($node, '(1 - 2)'), - ); + return [ + [$node, '(1 - 2)'], + ]; } } diff --git a/vendor/twig/twig/test/Twig/Tests/Node/Expression/CallTest.php b/vendor/twig/twig/test/Twig/Tests/Node/Expression/CallTest.php index 883bb6127..d8cf850ed 100644 --- a/vendor/twig/twig/test/Twig/Tests/Node/Expression/CallTest.php +++ b/vendor/twig/twig/test/Twig/Tests/Node/Expression/CallTest.php @@ -13,8 +13,8 @@ class Twig_Tests_Node_Expression_CallTest extends \PHPUnit\Framework\TestCase { public function testGetArguments() { - $node = new Twig_Tests_Node_Expression_Call(array(), array('type' => 'function', 'name' => 'date')); - $this->assertEquals(array('U', null), $node->getArguments('date', array('format' => 'U', 'timestamp' => null))); + $node = new Twig_Tests_Node_Expression_Call([], ['type' => 'function', 'name' => 'date']); + $this->assertEquals(['U', null], $node->getArguments('date', ['format' => 'U', 'timestamp' => null])); } /** @@ -23,8 +23,8 @@ class Twig_Tests_Node_Expression_CallTest extends \PHPUnit\Framework\TestCase */ public function testGetArgumentsWhenPositionalArgumentsAfterNamedArguments() { - $node = new Twig_Tests_Node_Expression_Call(array(), array('type' => 'function', 'name' => 'date')); - $node->getArguments('date', array('timestamp' => 123456, 'Y-m-d')); + $node = new Twig_Tests_Node_Expression_Call([], ['type' => 'function', 'name' => 'date']); + $node->getArguments('date', ['timestamp' => 123456, 'Y-m-d']); } /** @@ -33,8 +33,8 @@ class Twig_Tests_Node_Expression_CallTest extends \PHPUnit\Framework\TestCase */ public function testGetArgumentsWhenArgumentIsDefinedTwice() { - $node = new Twig_Tests_Node_Expression_Call(array(), array('type' => 'function', 'name' => 'date')); - $node->getArguments('date', array('Y-m-d', 'format' => 'U')); + $node = new Twig_Tests_Node_Expression_Call([], ['type' => 'function', 'name' => 'date']); + $node->getArguments('date', ['Y-m-d', 'format' => 'U']); } /** @@ -43,8 +43,8 @@ class Twig_Tests_Node_Expression_CallTest extends \PHPUnit\Framework\TestCase */ public function testGetArgumentsWithWrongNamedArgumentName() { - $node = new Twig_Tests_Node_Expression_Call(array(), array('type' => 'function', 'name' => 'date')); - $node->getArguments('date', array('Y-m-d', 'timestamp' => null, 'unknown' => '')); + $node = new Twig_Tests_Node_Expression_Call([], ['type' => 'function', 'name' => 'date']); + $node->getArguments('date', ['Y-m-d', 'timestamp' => null, 'unknown' => '']); } /** @@ -53,8 +53,8 @@ class Twig_Tests_Node_Expression_CallTest extends \PHPUnit\Framework\TestCase */ public function testGetArgumentsWithWrongNamedArgumentNames() { - $node = new Twig_Tests_Node_Expression_Call(array(), array('type' => 'function', 'name' => 'date')); - $node->getArguments('date', array('Y-m-d', 'timestamp' => null, 'unknown1' => '', 'unknown2' => '')); + $node = new Twig_Tests_Node_Expression_Call([], ['type' => 'function', 'name' => 'date']); + $node->getArguments('date', ['Y-m-d', 'timestamp' => null, 'unknown1' => '', 'unknown2' => '']); } /** @@ -63,38 +63,38 @@ class Twig_Tests_Node_Expression_CallTest extends \PHPUnit\Framework\TestCase */ public function testResolveArgumentsWithMissingValueForOptionalArgument() { - $node = new Twig_Tests_Node_Expression_Call(array(), array('type' => 'function', 'name' => 'substr_compare')); - $node->getArguments('substr_compare', array('abcd', 'bc', 'offset' => 1, 'case_sensitivity' => true)); + $node = new Twig_Tests_Node_Expression_Call([], ['type' => 'function', 'name' => 'substr_compare']); + $node->getArguments('substr_compare', ['abcd', 'bc', 'offset' => 1, 'case_sensitivity' => true]); } public function testResolveArgumentsOnlyNecessaryArgumentsForCustomFunction() { - $node = new Twig_Tests_Node_Expression_Call(array(), array('type' => 'function', 'name' => 'custom_function')); + $node = new Twig_Tests_Node_Expression_Call([], ['type' => 'function', 'name' => 'custom_function']); - $this->assertEquals(array('arg1'), $node->getArguments(array($this, 'customFunction'), array('arg1' => 'arg1'))); + $this->assertEquals(['arg1'], $node->getArguments([$this, 'customFunction'], ['arg1' => 'arg1'])); } public function testGetArgumentsForStaticMethod() { - $node = new Twig_Tests_Node_Expression_Call(array(), array('type' => 'function', 'name' => 'custom_static_function')); - $this->assertEquals(array('arg1'), $node->getArguments(__CLASS__.'::customStaticFunction', array('arg1' => 'arg1'))); + $node = new Twig_Tests_Node_Expression_Call([], ['type' => 'function', 'name' => 'custom_static_function']); + $this->assertEquals(['arg1'], $node->getArguments(__CLASS__.'::customStaticFunction', ['arg1' => 'arg1'])); } /** * @expectedException LogicException - * @expectedExceptionMessage The last parameter of "Twig_Tests_Node_Expression_CallTest::customFunctionWithArbitraryArguments" for function "foo" must be an array with default value, eg. "array $arg = array()". + * @expectedExceptionMessage The last parameter of "Twig_Tests_Node_Expression_CallTest::customFunctionWithArbitraryArguments" for function "foo" must be an array with default value, eg. "array $arg = []". */ public function testResolveArgumentsWithMissingParameterForArbitraryArguments() { - $node = new Twig_Tests_Node_Expression_Call(array(), array('type' => 'function', 'name' => 'foo', 'is_variadic' => true)); - $node->getArguments(array($this, 'customFunctionWithArbitraryArguments'), array()); + $node = new Twig_Tests_Node_Expression_Call([], ['type' => 'function', 'name' => 'foo', 'is_variadic' => true]); + $node->getArguments([$this, 'customFunctionWithArbitraryArguments'], []); } - public static function customStaticFunction($arg1, $arg2 = 'default', $arg3 = array()) + public static function customStaticFunction($arg1, $arg2 = 'default', $arg3 = []) { } - public function customFunction($arg1, $arg2 = 'default', $arg3 = array()) + public function customFunction($arg1, $arg2 = 'default', $arg3 = []) { } @@ -104,22 +104,22 @@ class Twig_Tests_Node_Expression_CallTest extends \PHPUnit\Framework\TestCase /** * @expectedException LogicException - * @expectedExceptionMessageRegExp #^The last parameter of "custom_Twig_Tests_Node_Expression_CallTest_function" for function "foo" must be an array with default value, eg\. "array \$arg \= array\(\)"\.$# + * @expectedExceptionMessageRegExp #^The last parameter of "custom_Twig_Tests_Node_Expression_CallTest_function" for function "foo" must be an array with default value, eg\. "array \$arg \= \[\]"\.$# */ public function testResolveArgumentsWithMissingParameterForArbitraryArgumentsOnFunction() { - $node = new Twig_Tests_Node_Expression_Call(array(), array('type' => 'function', 'name' => 'foo', 'is_variadic' => true)); - $node->getArguments('custom_Twig_Tests_Node_Expression_CallTest_function', array()); + $node = new Twig_Tests_Node_Expression_Call([], ['type' => 'function', 'name' => 'foo', 'is_variadic' => true]); + $node->getArguments('custom_Twig_Tests_Node_Expression_CallTest_function', []); } /** * @expectedException LogicException - * @expectedExceptionMessageRegExp #^The last parameter of "CallableTestClass\:\:__invoke" for function "foo" must be an array with default value, eg\. "array \$arg \= array\(\)"\.$# + * @expectedExceptionMessageRegExp #^The last parameter of "CallableTestClass\:\:__invoke" for function "foo" must be an array with default value, eg\. "array \$arg \= \[\]"\.$# */ public function testResolveArgumentsWithMissingParameterForArbitraryArgumentsOnObject() { - $node = new Twig_Tests_Node_Expression_Call(array(), array('type' => 'function', 'name' => 'foo', 'is_variadic' => true)); - $node->getArguments(new CallableTestClass(), array()); + $node = new Twig_Tests_Node_Expression_Call([], ['type' => 'function', 'name' => 'foo', 'is_variadic' => true]); + $node->getArguments(new CallableTestClass(), []); } } diff --git a/vendor/twig/twig/test/Twig/Tests/Node/Expression/ConditionalTest.php b/vendor/twig/twig/test/Twig/Tests/Node/Expression/ConditionalTest.php index a3e8badff..ff9a5ad48 100644 --- a/vendor/twig/twig/test/Twig/Tests/Node/Expression/ConditionalTest.php +++ b/vendor/twig/twig/test/Twig/Tests/Node/Expression/ConditionalTest.php @@ -25,13 +25,13 @@ class Twig_Tests_Node_Expression_ConditionalTest extends Twig_Test_NodeTestCase public function getTests() { - $tests = array(); + $tests = []; $expr1 = new Twig_Node_Expression_Constant(1, 1); $expr2 = new Twig_Node_Expression_Constant(2, 1); $expr3 = new Twig_Node_Expression_Constant(3, 1); $node = new Twig_Node_Expression_Conditional($expr1, $expr2, $expr3, 1); - $tests[] = array($node, '((1) ? (2) : (3))'); + $tests[] = [$node, '((1) ? (2) : (3))']; return $tests; } diff --git a/vendor/twig/twig/test/Twig/Tests/Node/Expression/ConstantTest.php b/vendor/twig/twig/test/Twig/Tests/Node/Expression/ConstantTest.php index 2ff931822..c43de0020 100644 --- a/vendor/twig/twig/test/Twig/Tests/Node/Expression/ConstantTest.php +++ b/vendor/twig/twig/test/Twig/Tests/Node/Expression/ConstantTest.php @@ -20,10 +20,10 @@ class Twig_Tests_Node_Expression_ConstantTest extends Twig_Test_NodeTestCase public function getTests() { - $tests = array(); + $tests = []; $node = new Twig_Node_Expression_Constant('foo', 1); - $tests[] = array($node, '"foo"'); + $tests[] = [$node, '"foo"']; return $tests; } diff --git a/vendor/twig/twig/test/Twig/Tests/Node/Expression/FilterTest.php b/vendor/twig/twig/test/Twig/Tests/Node/Expression/FilterTest.php index 5f34b1d66..a626db2b9 100644 --- a/vendor/twig/twig/test/Twig/Tests/Node/Expression/FilterTest.php +++ b/vendor/twig/twig/test/Twig/Tests/Node/Expression/FilterTest.php @@ -26,77 +26,77 @@ class Twig_Tests_Node_Expression_FilterTest extends Twig_Test_NodeTestCase public function getTests() { $environment = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock()); - $environment->addFilter(new Twig_SimpleFilter('bar', 'bar', array('needs_environment' => true))); - $environment->addFilter(new Twig_SimpleFilter('barbar', 'twig_tests_filter_barbar', array('needs_context' => true, 'is_variadic' => true))); + $environment->addFilter(new Twig_SimpleFilter('bar', 'bar', ['needs_environment' => true])); + $environment->addFilter(new Twig_SimpleFilter('barbar', 'twig_tests_filter_barbar', ['needs_context' => true, 'is_variadic' => true])); - $tests = array(); + $tests = []; $expr = new Twig_Node_Expression_Constant('foo', 1); $node = $this->createFilter($expr, 'upper'); - $node = $this->createFilter($node, 'number_format', array(new Twig_Node_Expression_Constant(2, 1), new Twig_Node_Expression_Constant('.', 1), new Twig_Node_Expression_Constant(',', 1))); + $node = $this->createFilter($node, 'number_format', [new Twig_Node_Expression_Constant(2, 1), new Twig_Node_Expression_Constant('.', 1), new Twig_Node_Expression_Constant(',', 1)]); if (function_exists('mb_get_info')) { - $tests[] = array($node, 'twig_number_format_filter($this->env, twig_upper_filter($this->env, "foo"), 2, ".", ",")'); + $tests[] = [$node, 'twig_number_format_filter($this->env, twig_upper_filter($this->env, "foo"), 2, ".", ",")']; } else { - $tests[] = array($node, 'twig_number_format_filter($this->env, strtoupper("foo"), 2, ".", ",")'); + $tests[] = [$node, 'twig_number_format_filter($this->env, strtoupper("foo"), 2, ".", ",")']; } // named arguments $date = new Twig_Node_Expression_Constant(0, 1); - $node = $this->createFilter($date, 'date', array( + $node = $this->createFilter($date, 'date', [ 'timezone' => new Twig_Node_Expression_Constant('America/Chicago', 1), 'format' => new Twig_Node_Expression_Constant('d/m/Y H:i:s P', 1), - )); - $tests[] = array($node, 'twig_date_format_filter($this->env, 0, "d/m/Y H:i:s P", "America/Chicago")'); + ]); + $tests[] = [$node, 'twig_date_format_filter($this->env, 0, "d/m/Y H:i:s P", "America/Chicago")']; // skip an optional argument $date = new Twig_Node_Expression_Constant(0, 1); - $node = $this->createFilter($date, 'date', array( + $node = $this->createFilter($date, 'date', [ 'timezone' => new Twig_Node_Expression_Constant('America/Chicago', 1), - )); - $tests[] = array($node, 'twig_date_format_filter($this->env, 0, null, "America/Chicago")'); + ]); + $tests[] = [$node, 'twig_date_format_filter($this->env, 0, null, "America/Chicago")']; // underscores vs camelCase for named arguments $string = new Twig_Node_Expression_Constant('abc', 1); - $node = $this->createFilter($string, 'reverse', array( + $node = $this->createFilter($string, 'reverse', [ 'preserve_keys' => new Twig_Node_Expression_Constant(true, 1), - )); - $tests[] = array($node, 'twig_reverse_filter($this->env, "abc", true)'); - $node = $this->createFilter($string, 'reverse', array( + ]); + $tests[] = [$node, 'twig_reverse_filter($this->env, "abc", true)']; + $node = $this->createFilter($string, 'reverse', [ 'preserveKeys' => new Twig_Node_Expression_Constant(true, 1), - )); - $tests[] = array($node, 'twig_reverse_filter($this->env, "abc", true)'); + ]); + $tests[] = [$node, 'twig_reverse_filter($this->env, "abc", true)']; // filter as an anonymous function if (PHP_VERSION_ID >= 50300) { $node = $this->createFilter(new Twig_Node_Expression_Constant('foo', 1), 'anonymous'); - $tests[] = array($node, 'call_user_func_array($this->env->getFilter(\'anonymous\')->getCallable(), array("foo"))'); + $tests[] = [$node, 'call_user_func_array($this->env->getFilter(\'anonymous\')->getCallable(), ["foo"])']; } // needs environment $node = $this->createFilter($string, 'bar'); - $tests[] = array($node, 'bar($this->env, "abc")', $environment); + $tests[] = [$node, 'bar($this->env, "abc")', $environment]; - $node = $this->createFilter($string, 'bar', array(new Twig_Node_Expression_Constant('bar', 1))); - $tests[] = array($node, 'bar($this->env, "abc", "bar")', $environment); + $node = $this->createFilter($string, 'bar', [new Twig_Node_Expression_Constant('bar', 1)]); + $tests[] = [$node, 'bar($this->env, "abc", "bar")', $environment]; // arbitrary named arguments $node = $this->createFilter($string, 'barbar'); - $tests[] = array($node, 'twig_tests_filter_barbar($context, "abc")', $environment); + $tests[] = [$node, 'twig_tests_filter_barbar($context, "abc")', $environment]; - $node = $this->createFilter($string, 'barbar', array('foo' => new Twig_Node_Expression_Constant('bar', 1))); - $tests[] = array($node, 'twig_tests_filter_barbar($context, "abc", null, null, array("foo" => "bar"))', $environment); + $node = $this->createFilter($string, 'barbar', ['foo' => new Twig_Node_Expression_Constant('bar', 1)]); + $tests[] = [$node, 'twig_tests_filter_barbar($context, "abc", null, null, ["foo" => "bar"])', $environment]; - $node = $this->createFilter($string, 'barbar', array('arg2' => new Twig_Node_Expression_Constant('bar', 1))); - $tests[] = array($node, 'twig_tests_filter_barbar($context, "abc", null, "bar")', $environment); + $node = $this->createFilter($string, 'barbar', ['arg2' => new Twig_Node_Expression_Constant('bar', 1)]); + $tests[] = [$node, 'twig_tests_filter_barbar($context, "abc", null, "bar")', $environment]; - $node = $this->createFilter($string, 'barbar', array( + $node = $this->createFilter($string, 'barbar', [ new Twig_Node_Expression_Constant('1', 1), new Twig_Node_Expression_Constant('2', 1), new Twig_Node_Expression_Constant('3', 1), 'foo' => new Twig_Node_Expression_Constant('bar', 1), - )); - $tests[] = array($node, 'twig_tests_filter_barbar($context, "abc", "1", "2", array(0 => "3", "foo" => "bar"))', $environment); + ]); + $tests[] = [$node, 'twig_tests_filter_barbar($context, "abc", "1", "2", [0 => "3", "foo" => "bar"])', $environment]; return $tests; } @@ -108,9 +108,9 @@ class Twig_Tests_Node_Expression_FilterTest extends Twig_Test_NodeTestCase public function testCompileWithWrongNamedArgumentName() { $date = new Twig_Node_Expression_Constant(0, 1); - $node = $this->createFilter($date, 'date', array( + $node = $this->createFilter($date, 'date', [ 'foobar' => new Twig_Node_Expression_Constant('America/Chicago', 1), - )); + ]); $compiler = $this->getCompiler(); $compiler->compile($node); @@ -123,15 +123,15 @@ class Twig_Tests_Node_Expression_FilterTest extends Twig_Test_NodeTestCase public function testCompileWithMissingNamedArgument() { $value = new Twig_Node_Expression_Constant(0, 1); - $node = $this->createFilter($value, 'replace', array( + $node = $this->createFilter($value, 'replace', [ 'to' => new Twig_Node_Expression_Constant('foo', 1), - )); + ]); $compiler = $this->getCompiler(); $compiler->compile($node); } - protected function createFilter($node, $name, array $arguments = array()) + protected function createFilter($node, $name, array $arguments = []) { $name = new Twig_Node_Expression_Constant($name, 1); $arguments = new Twig_Node($arguments); @@ -149,6 +149,6 @@ class Twig_Tests_Node_Expression_FilterTest extends Twig_Test_NodeTestCase } } -function twig_tests_filter_barbar($context, $string, $arg1 = null, $arg2 = null, array $args = array()) +function twig_tests_filter_barbar($context, $string, $arg1 = null, $arg2 = null, array $args = []) { } diff --git a/vendor/twig/twig/test/Twig/Tests/Node/Expression/FunctionTest.php b/vendor/twig/twig/test/Twig/Tests/Node/Expression/FunctionTest.php index 2e82e2f11..ef1d29cd3 100644 --- a/vendor/twig/twig/test/Twig/Tests/Node/Expression/FunctionTest.php +++ b/vendor/twig/twig/test/Twig/Tests/Node/Expression/FunctionTest.php @@ -24,73 +24,73 @@ class Twig_Tests_Node_Expression_FunctionTest extends Twig_Test_NodeTestCase public function getTests() { $environment = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock()); - $environment->addFunction(new Twig_SimpleFunction('foo', 'foo', array())); - $environment->addFunction(new Twig_SimpleFunction('bar', 'bar', array('needs_environment' => true))); - $environment->addFunction(new Twig_SimpleFunction('foofoo', 'foofoo', array('needs_context' => true))); - $environment->addFunction(new Twig_SimpleFunction('foobar', 'foobar', array('needs_environment' => true, 'needs_context' => true))); - $environment->addFunction(new Twig_SimpleFunction('barbar', 'twig_tests_function_barbar', array('is_variadic' => true))); + $environment->addFunction(new Twig_SimpleFunction('foo', 'foo', [])); + $environment->addFunction(new Twig_SimpleFunction('bar', 'bar', ['needs_environment' => true])); + $environment->addFunction(new Twig_SimpleFunction('foofoo', 'foofoo', ['needs_context' => true])); + $environment->addFunction(new Twig_SimpleFunction('foobar', 'foobar', ['needs_environment' => true, 'needs_context' => true])); + $environment->addFunction(new Twig_SimpleFunction('barbar', 'twig_tests_function_barbar', ['is_variadic' => true])); - $tests = array(); + $tests = []; $node = $this->createFunction('foo'); - $tests[] = array($node, 'foo()', $environment); + $tests[] = [$node, 'foo()', $environment]; - $node = $this->createFunction('foo', array(new Twig_Node_Expression_Constant('bar', 1), new Twig_Node_Expression_Constant('foobar', 1))); - $tests[] = array($node, 'foo("bar", "foobar")', $environment); + $node = $this->createFunction('foo', [new Twig_Node_Expression_Constant('bar', 1), new Twig_Node_Expression_Constant('foobar', 1)]); + $tests[] = [$node, 'foo("bar", "foobar")', $environment]; $node = $this->createFunction('bar'); - $tests[] = array($node, 'bar($this->env)', $environment); + $tests[] = [$node, 'bar($this->env)', $environment]; - $node = $this->createFunction('bar', array(new Twig_Node_Expression_Constant('bar', 1))); - $tests[] = array($node, 'bar($this->env, "bar")', $environment); + $node = $this->createFunction('bar', [new Twig_Node_Expression_Constant('bar', 1)]); + $tests[] = [$node, 'bar($this->env, "bar")', $environment]; $node = $this->createFunction('foofoo'); - $tests[] = array($node, 'foofoo($context)', $environment); + $tests[] = [$node, 'foofoo($context)', $environment]; - $node = $this->createFunction('foofoo', array(new Twig_Node_Expression_Constant('bar', 1))); - $tests[] = array($node, 'foofoo($context, "bar")', $environment); + $node = $this->createFunction('foofoo', [new Twig_Node_Expression_Constant('bar', 1)]); + $tests[] = [$node, 'foofoo($context, "bar")', $environment]; $node = $this->createFunction('foobar'); - $tests[] = array($node, 'foobar($this->env, $context)', $environment); + $tests[] = [$node, 'foobar($this->env, $context)', $environment]; - $node = $this->createFunction('foobar', array(new Twig_Node_Expression_Constant('bar', 1))); - $tests[] = array($node, 'foobar($this->env, $context, "bar")', $environment); + $node = $this->createFunction('foobar', [new Twig_Node_Expression_Constant('bar', 1)]); + $tests[] = [$node, 'foobar($this->env, $context, "bar")', $environment]; // named arguments - $node = $this->createFunction('date', array( + $node = $this->createFunction('date', [ 'timezone' => new Twig_Node_Expression_Constant('America/Chicago', 1), 'date' => new Twig_Node_Expression_Constant(0, 1), - )); - $tests[] = array($node, 'twig_date_converter($this->env, 0, "America/Chicago")'); + ]); + $tests[] = [$node, 'twig_date_converter($this->env, 0, "America/Chicago")']; // arbitrary named arguments $node = $this->createFunction('barbar'); - $tests[] = array($node, 'twig_tests_function_barbar()', $environment); + $tests[] = [$node, 'twig_tests_function_barbar()', $environment]; - $node = $this->createFunction('barbar', array('foo' => new Twig_Node_Expression_Constant('bar', 1))); - $tests[] = array($node, 'twig_tests_function_barbar(null, null, array("foo" => "bar"))', $environment); + $node = $this->createFunction('barbar', ['foo' => new Twig_Node_Expression_Constant('bar', 1)]); + $tests[] = [$node, 'twig_tests_function_barbar(null, null, ["foo" => "bar"])', $environment]; - $node = $this->createFunction('barbar', array('arg2' => new Twig_Node_Expression_Constant('bar', 1))); - $tests[] = array($node, 'twig_tests_function_barbar(null, "bar")', $environment); + $node = $this->createFunction('barbar', ['arg2' => new Twig_Node_Expression_Constant('bar', 1)]); + $tests[] = [$node, 'twig_tests_function_barbar(null, "bar")', $environment]; - $node = $this->createFunction('barbar', array( + $node = $this->createFunction('barbar', [ new Twig_Node_Expression_Constant('1', 1), new Twig_Node_Expression_Constant('2', 1), new Twig_Node_Expression_Constant('3', 1), 'foo' => new Twig_Node_Expression_Constant('bar', 1), - )); - $tests[] = array($node, 'twig_tests_function_barbar("1", "2", array(0 => "3", "foo" => "bar"))', $environment); + ]); + $tests[] = [$node, 'twig_tests_function_barbar("1", "2", [0 => "3", "foo" => "bar"])', $environment]; // function as an anonymous function if (PHP_VERSION_ID >= 50300) { - $node = $this->createFunction('anonymous', array(new Twig_Node_Expression_Constant('foo', 1))); - $tests[] = array($node, 'call_user_func_array($this->env->getFunction(\'anonymous\')->getCallable(), array("foo"))'); + $node = $this->createFunction('anonymous', [new Twig_Node_Expression_Constant('foo', 1)]); + $tests[] = [$node, 'call_user_func_array($this->env->getFunction(\'anonymous\')->getCallable(), ["foo"])']; } return $tests; } - protected function createFunction($name, array $arguments = array()) + protected function createFunction($name, array $arguments = []) { return new Twig_Node_Expression_Function($name, new Twig_Node($arguments), 1); } @@ -105,6 +105,6 @@ class Twig_Tests_Node_Expression_FunctionTest extends Twig_Test_NodeTestCase } } -function twig_tests_function_barbar($arg1 = null, $arg2 = null, array $args = array()) +function twig_tests_function_barbar($arg1 = null, $arg2 = null, array $args = []) { } diff --git a/vendor/twig/twig/test/Twig/Tests/Node/Expression/GetAttrTest.php b/vendor/twig/twig/test/Twig/Tests/Node/Expression/GetAttrTest.php index 2764478c4..1a465509e 100644 --- a/vendor/twig/twig/test/Twig/Tests/Node/Expression/GetAttrTest.php +++ b/vendor/twig/twig/test/Twig/Tests/Node/Expression/GetAttrTest.php @@ -15,7 +15,7 @@ class Twig_Tests_Node_Expression_GetAttrTest extends Twig_Test_NodeTestCase { $expr = new Twig_Node_Expression_Name('foo', 1); $attr = new Twig_Node_Expression_Constant('bar', 1); - $args = new Twig_Node_Expression_Array(array(), 1); + $args = new Twig_Node_Expression_Array([], 1); $args->addElement(new Twig_Node_Expression_Name('foo', 1)); $args->addElement(new Twig_Node_Expression_Constant('bar', 1)); $node = new Twig_Node_Expression_GetAttr($expr, $attr, $args, Twig_Template::ARRAY_CALL, 1); @@ -28,22 +28,22 @@ class Twig_Tests_Node_Expression_GetAttrTest extends Twig_Test_NodeTestCase public function getTests() { - $tests = array(); + $tests = []; $expr = new Twig_Node_Expression_Name('foo', 1); $attr = new Twig_Node_Expression_Constant('bar', 1); - $args = new Twig_Node_Expression_Array(array(), 1); + $args = new Twig_Node_Expression_Array([], 1); $node = new Twig_Node_Expression_GetAttr($expr, $attr, $args, Twig_Template::ANY_CALL, 1); - $tests[] = array($node, sprintf('%s%s, "bar", array())', $this->getAttributeGetter(), $this->getVariableGetter('foo', 1))); + $tests[] = [$node, sprintf('%s%s, "bar", [])', $this->getAttributeGetter(), $this->getVariableGetter('foo', 1))]; $node = new Twig_Node_Expression_GetAttr($expr, $attr, $args, Twig_Template::ARRAY_CALL, 1); - $tests[] = array($node, sprintf('%s%s, "bar", array(), "array")', $this->getAttributeGetter(), $this->getVariableGetter('foo', 1))); + $tests[] = [$node, sprintf('%s%s, "bar", [], "array")', $this->getAttributeGetter(), $this->getVariableGetter('foo', 1))]; - $args = new Twig_Node_Expression_Array(array(), 1); + $args = new Twig_Node_Expression_Array([], 1); $args->addElement(new Twig_Node_Expression_Name('foo', 1)); $args->addElement(new Twig_Node_Expression_Constant('bar', 1)); $node = new Twig_Node_Expression_GetAttr($expr, $attr, $args, Twig_Template::METHOD_CALL, 1); - $tests[] = array($node, sprintf('%s%s, "bar", array(0 => %s, 1 => "bar"), "method")', $this->getAttributeGetter(), $this->getVariableGetter('foo', 1), $this->getVariableGetter('foo'))); + $tests[] = [$node, sprintf('%s%s, "bar", [0 => %s, 1 => "bar"], "method")', $this->getAttributeGetter(), $this->getVariableGetter('foo', 1), $this->getVariableGetter('foo'))]; return $tests; } diff --git a/vendor/twig/twig/test/Twig/Tests/Node/Expression/NameTest.php b/vendor/twig/twig/test/Twig/Tests/Node/Expression/NameTest.php index 70721a8bf..73c050b6a 100644 --- a/vendor/twig/twig/test/Twig/Tests/Node/Expression/NameTest.php +++ b/vendor/twig/twig/test/Twig/Tests/Node/Expression/NameTest.php @@ -23,8 +23,8 @@ class Twig_Tests_Node_Expression_NameTest extends Twig_Test_NodeTestCase $node = new Twig_Node_Expression_Name('foo', 1); $context = new Twig_Node_Expression_Name('_context', 1); - $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), array('strict_variables' => true)); - $env1 = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), array('strict_variables' => false)); + $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), ['strict_variables' => true]); + $env1 = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), ['strict_variables' => false]); if (PHP_VERSION_ID >= 70000) { $output = '($context["foo"] ?? $this->getContext($context, "foo"))'; @@ -34,10 +34,10 @@ class Twig_Tests_Node_Expression_NameTest extends Twig_Test_NodeTestCase $output = '$this->getContext($context, "foo")'; } - return array( - array($node, "// line 1\n".$output, $env), - array($node, $this->getVariableGetter('foo', 1), $env1), - array($context, "// line 1\n\$context"), - ); + return [ + [$node, "// line 1\n".$output, $env], + [$node, $this->getVariableGetter('foo', 1), $env1], + [$context, "// line 1\n\$context"], + ]; } } diff --git a/vendor/twig/twig/test/Twig/Tests/Node/Expression/NullCoalesceTest.php b/vendor/twig/twig/test/Twig/Tests/Node/Expression/NullCoalesceTest.php index e179a9fd9..39b5d704c 100644 --- a/vendor/twig/twig/test/Twig/Tests/Node/Expression/NullCoalesceTest.php +++ b/vendor/twig/twig/test/Twig/Tests/Node/Expression/NullCoalesceTest.php @@ -13,17 +13,17 @@ class Twig_Tests_Node_Expression_NullCoalesceTest extends Twig_Test_NodeTestCase { public function getTests() { - $tests = array(); + $tests = []; $left = new Twig_Node_Expression_Name('foo', 1); $right = new Twig_Node_Expression_Constant(2, 1); $node = new Twig_Node_Expression_NullCoalesce($left, $right, 1); if (PHP_VERSION_ID >= 70000) { - $tests[] = array($node, "((// line 1\n\$context[\"foo\"]) ?? (2))"); + $tests[] = [$node, "((// line 1\n\$context[\"foo\"]) ?? (2))"]; } elseif (PHP_VERSION_ID >= 50400) { - $tests[] = array($node, "(((// line 1\n(isset(\$context[\"foo\"]) || array_key_exists(\"foo\", \$context)) && !(null === (isset(\$context[\"foo\"]) ? \$context[\"foo\"] : null)))) ? ((isset(\$context[\"foo\"]) ? \$context[\"foo\"] : null)) : (2))"); + $tests[] = [$node, "(((// line 1\n(isset(\$context[\"foo\"]) || array_key_exists(\"foo\", \$context)) && !(null === (isset(\$context[\"foo\"]) ? \$context[\"foo\"] : null)))) ? ((isset(\$context[\"foo\"]) ? \$context[\"foo\"] : null)) : (2))"]; } else { - $tests[] = array($node, "(((// line 1\n(isset(\$context[\"foo\"]) || array_key_exists(\"foo\", \$context)) && !(null === \$this->getContext(\$context, \"foo\")))) ? (\$this->getContext(\$context, \"foo\")) : (2))"); + $tests[] = [$node, "(((// line 1\n(isset(\$context[\"foo\"]) || array_key_exists(\"foo\", \$context)) && !(null === \$this->getContext(\$context, \"foo\")))) ? (\$this->getContext(\$context, \"foo\")) : (2))"]; } return $tests; diff --git a/vendor/twig/twig/test/Twig/Tests/Node/Expression/PHP53/FilterInclude.php b/vendor/twig/twig/test/Twig/Tests/Node/Expression/PHP53/FilterInclude.php index b5394bcf4..3a9ff41a6 100644 --- a/vendor/twig/twig/test/Twig/Tests/Node/Expression/PHP53/FilterInclude.php +++ b/vendor/twig/twig/test/Twig/Tests/Node/Expression/PHP53/FilterInclude.php @@ -1,6 +1,6 @@ addFilter(new Twig_SimpleFilter('anonymous', function () {})); return $env; diff --git a/vendor/twig/twig/test/Twig/Tests/Node/Expression/PHP53/FunctionInclude.php b/vendor/twig/twig/test/Twig/Tests/Node/Expression/PHP53/FunctionInclude.php index e8f68c728..57ee62ad3 100644 --- a/vendor/twig/twig/test/Twig/Tests/Node/Expression/PHP53/FunctionInclude.php +++ b/vendor/twig/twig/test/Twig/Tests/Node/Expression/PHP53/FunctionInclude.php @@ -1,6 +1,6 @@ addFunction(new Twig_SimpleFunction('anonymous', function () {})); return $env; diff --git a/vendor/twig/twig/test/Twig/Tests/Node/Expression/PHP53/TestInclude.php b/vendor/twig/twig/test/Twig/Tests/Node/Expression/PHP53/TestInclude.php index 9f818bc41..eba333db1 100644 --- a/vendor/twig/twig/test/Twig/Tests/Node/Expression/PHP53/TestInclude.php +++ b/vendor/twig/twig/test/Twig/Tests/Node/Expression/PHP53/TestInclude.php @@ -1,6 +1,6 @@ addTest(new Twig_SimpleTest('anonymous', function () {})); return $env; diff --git a/vendor/twig/twig/test/Twig/Tests/Node/Expression/ParentTest.php b/vendor/twig/twig/test/Twig/Tests/Node/Expression/ParentTest.php index ab2bbe074..4e25a8bee 100644 --- a/vendor/twig/twig/test/Twig/Tests/Node/Expression/ParentTest.php +++ b/vendor/twig/twig/test/Twig/Tests/Node/Expression/ParentTest.php @@ -20,8 +20,8 @@ class Twig_Tests_Node_Expression_ParentTest extends Twig_Test_NodeTestCase public function getTests() { - $tests = array(); - $tests[] = array(new Twig_Node_Expression_Parent('foo', 1), '$this->renderParentBlock("foo", $context, $blocks)'); + $tests = []; + $tests[] = [new Twig_Node_Expression_Parent('foo', 1), '$this->renderParentBlock("foo", $context, $blocks)']; return $tests; } diff --git a/vendor/twig/twig/test/Twig/Tests/Node/Expression/TestTest.php b/vendor/twig/twig/test/Twig/Tests/Node/Expression/TestTest.php index a5f96d245..28de6cbfd 100644 --- a/vendor/twig/twig/test/Twig/Tests/Node/Expression/TestTest.php +++ b/vendor/twig/twig/test/Twig/Tests/Node/Expression/TestTest.php @@ -26,43 +26,43 @@ class Twig_Tests_Node_Expression_TestTest extends Twig_Test_NodeTestCase public function getTests() { $environment = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock()); - $environment->addTest(new Twig_SimpleTest('barbar', 'twig_tests_test_barbar', array('is_variadic' => true, 'need_context' => true))); + $environment->addTest(new Twig_SimpleTest('barbar', 'twig_tests_test_barbar', ['is_variadic' => true, 'need_context' => true])); - $tests = array(); + $tests = []; $expr = new Twig_Node_Expression_Constant('foo', 1); - $node = new Twig_Node_Expression_Test_Null($expr, 'null', new Twig_Node(array()), 1); - $tests[] = array($node, '(null === "foo")'); + $node = new Twig_Node_Expression_Test_Null($expr, 'null', new Twig_Node([]), 1); + $tests[] = [$node, '(null === "foo")']; // test as an anonymous function if (PHP_VERSION_ID >= 50300) { - $node = $this->createTest(new Twig_Node_Expression_Constant('foo', 1), 'anonymous', array(new Twig_Node_Expression_Constant('foo', 1))); - $tests[] = array($node, 'call_user_func_array($this->env->getTest(\'anonymous\')->getCallable(), array("foo", "foo"))'); + $node = $this->createTest(new Twig_Node_Expression_Constant('foo', 1), 'anonymous', [new Twig_Node_Expression_Constant('foo', 1)]); + $tests[] = [$node, 'call_user_func_array($this->env->getTest(\'anonymous\')->getCallable(), ["foo", "foo"])']; } // arbitrary named arguments $string = new Twig_Node_Expression_Constant('abc', 1); $node = $this->createTest($string, 'barbar'); - $tests[] = array($node, 'twig_tests_test_barbar("abc")', $environment); + $tests[] = [$node, 'twig_tests_test_barbar("abc")', $environment]; - $node = $this->createTest($string, 'barbar', array('foo' => new Twig_Node_Expression_Constant('bar', 1))); - $tests[] = array($node, 'twig_tests_test_barbar("abc", null, null, array("foo" => "bar"))', $environment); + $node = $this->createTest($string, 'barbar', ['foo' => new Twig_Node_Expression_Constant('bar', 1)]); + $tests[] = [$node, 'twig_tests_test_barbar("abc", null, null, ["foo" => "bar"])', $environment]; - $node = $this->createTest($string, 'barbar', array('arg2' => new Twig_Node_Expression_Constant('bar', 1))); - $tests[] = array($node, 'twig_tests_test_barbar("abc", null, "bar")', $environment); + $node = $this->createTest($string, 'barbar', ['arg2' => new Twig_Node_Expression_Constant('bar', 1)]); + $tests[] = [$node, 'twig_tests_test_barbar("abc", null, "bar")', $environment]; - $node = $this->createTest($string, 'barbar', array( + $node = $this->createTest($string, 'barbar', [ new Twig_Node_Expression_Constant('1', 1), new Twig_Node_Expression_Constant('2', 1), new Twig_Node_Expression_Constant('3', 1), 'foo' => new Twig_Node_Expression_Constant('bar', 1), - )); - $tests[] = array($node, 'twig_tests_test_barbar("abc", "1", "2", array(0 => "3", "foo" => "bar"))', $environment); + ]); + $tests[] = [$node, 'twig_tests_test_barbar("abc", "1", "2", [0 => "3", "foo" => "bar"])', $environment]; return $tests; } - protected function createTest($node, $name, array $arguments = array()) + protected function createTest($node, $name, array $arguments = []) { return new Twig_Node_Expression_Test($node, $name, new Twig_Node($arguments), 1); } @@ -77,6 +77,6 @@ class Twig_Tests_Node_Expression_TestTest extends Twig_Test_NodeTestCase } } -function twig_tests_test_barbar($string, $arg1 = null, $arg2 = null, array $args = array()) +function twig_tests_test_barbar($string, $arg1 = null, $arg2 = null, array $args = []) { } diff --git a/vendor/twig/twig/test/Twig/Tests/Node/Expression/Unary/NegTest.php b/vendor/twig/twig/test/Twig/Tests/Node/Expression/Unary/NegTest.php index b63337117..5c058816e 100644 --- a/vendor/twig/twig/test/Twig/Tests/Node/Expression/Unary/NegTest.php +++ b/vendor/twig/twig/test/Twig/Tests/Node/Expression/Unary/NegTest.php @@ -24,9 +24,9 @@ class Twig_Tests_Node_Expression_Unary_NegTest extends Twig_Test_NodeTestCase $node = new Twig_Node_Expression_Constant(1, 1); $node = new Twig_Node_Expression_Unary_Neg($node, 1); - return array( - array($node, '-1'), - array(new Twig_Node_Expression_Unary_Neg($node, 1), '- -1'), - ); + return [ + [$node, '-1'], + [new Twig_Node_Expression_Unary_Neg($node, 1), '- -1'], + ]; } } diff --git a/vendor/twig/twig/test/Twig/Tests/Node/Expression/Unary/NotTest.php b/vendor/twig/twig/test/Twig/Tests/Node/Expression/Unary/NotTest.php index d7c6f85e7..9e45760a4 100644 --- a/vendor/twig/twig/test/Twig/Tests/Node/Expression/Unary/NotTest.php +++ b/vendor/twig/twig/test/Twig/Tests/Node/Expression/Unary/NotTest.php @@ -24,8 +24,8 @@ class Twig_Tests_Node_Expression_Unary_NotTest extends Twig_Test_NodeTestCase $node = new Twig_Node_Expression_Constant(1, 1); $node = new Twig_Node_Expression_Unary_Not($node, 1); - return array( - array($node, '!1'), - ); + return [ + [$node, '!1'], + ]; } } diff --git a/vendor/twig/twig/test/Twig/Tests/Node/Expression/Unary/PosTest.php b/vendor/twig/twig/test/Twig/Tests/Node/Expression/Unary/PosTest.php index 057250f37..bddcc4bf9 100644 --- a/vendor/twig/twig/test/Twig/Tests/Node/Expression/Unary/PosTest.php +++ b/vendor/twig/twig/test/Twig/Tests/Node/Expression/Unary/PosTest.php @@ -24,8 +24,8 @@ class Twig_Tests_Node_Expression_Unary_PosTest extends Twig_Test_NodeTestCase $node = new Twig_Node_Expression_Constant(1, 1); $node = new Twig_Node_Expression_Unary_Pos($node, 1); - return array( - array($node, '+1'), - ); + return [ + [$node, '+1'], + ]; } } diff --git a/vendor/twig/twig/test/Twig/Tests/Node/ForTest.php b/vendor/twig/twig/test/Twig/Tests/Node/ForTest.php index 2bf4c7b43..278aeda3f 100644 --- a/vendor/twig/twig/test/Twig/Tests/Node/ForTest.php +++ b/vendor/twig/twig/test/Twig/Tests/Node/ForTest.php @@ -17,7 +17,7 @@ class Twig_Tests_Node_ForTest extends Twig_Test_NodeTestCase $valueTarget = new Twig_Node_Expression_AssignName('item', 1); $seq = new Twig_Node_Expression_Name('items', 1); $ifexpr = new Twig_Node_Expression_Constant(true, 1); - $body = new Twig_Node(array(new Twig_Node_Print(new Twig_Node_Expression_Name('foo', 1), 1)), array(), 1); + $body = new Twig_Node([new Twig_Node_Print(new Twig_Node_Expression_Name('foo', 1), 1)], [], 1); $else = null; $node = new Twig_Node_For($keyTarget, $valueTarget, $seq, $ifexpr, $body, $else, 1); $node->setAttribute('with_loop', false); @@ -38,18 +38,18 @@ class Twig_Tests_Node_ForTest extends Twig_Test_NodeTestCase public function getTests() { - $tests = array(); + $tests = []; $keyTarget = new Twig_Node_Expression_AssignName('key', 1); $valueTarget = new Twig_Node_Expression_AssignName('item', 1); $seq = new Twig_Node_Expression_Name('items', 1); $ifexpr = null; - $body = new Twig_Node(array(new Twig_Node_Print(new Twig_Node_Expression_Name('foo', 1), 1)), array(), 1); + $body = new Twig_Node([new Twig_Node_Print(new Twig_Node_Expression_Name('foo', 1), 1)], [], 1); $else = null; $node = new Twig_Node_For($keyTarget, $valueTarget, $seq, $ifexpr, $body, $else, 1); $node->setAttribute('with_loop', false); - $tests[] = array($node, <<getVariableGetter('items')}); @@ -60,27 +60,27 @@ foreach (\$context['_seq'] as \$context["key"] => \$context["item"]) { unset(\$context['_seq'], \$context['_iterated'], \$context['key'], \$context['item'], \$context['_parent'], \$context['loop']); \$context = array_intersect_key(\$context, \$_parent) + \$_parent; EOF - ); + ]; $keyTarget = new Twig_Node_Expression_AssignName('k', 1); $valueTarget = new Twig_Node_Expression_AssignName('v', 1); $seq = new Twig_Node_Expression_Name('values', 1); $ifexpr = null; - $body = new Twig_Node(array(new Twig_Node_Print(new Twig_Node_Expression_Name('foo', 1), 1)), array(), 1); + $body = new Twig_Node([new Twig_Node_Print(new Twig_Node_Expression_Name('foo', 1), 1)], [], 1); $else = null; $node = new Twig_Node_For($keyTarget, $valueTarget, $seq, $ifexpr, $body, $else, 1); $node->setAttribute('with_loop', true); - $tests[] = array($node, <<getVariableGetter('values')}); -\$context['loop'] = array( +\$context['loop'] = [ 'parent' => \$context['_parent'], 'index0' => 0, 'index' => 1, 'first' => true, -); +]; if (is_array(\$context['_seq']) || (is_object(\$context['_seq']) && \$context['_seq'] instanceof Countable)) { \$length = count(\$context['_seq']); \$context['loop']['revindex0'] = \$length - 1; @@ -103,27 +103,27 @@ foreach (\$context['_seq'] as \$context["k"] => \$context["v"]) { unset(\$context['_seq'], \$context['_iterated'], \$context['k'], \$context['v'], \$context['_parent'], \$context['loop']); \$context = array_intersect_key(\$context, \$_parent) + \$_parent; EOF - ); + ]; $keyTarget = new Twig_Node_Expression_AssignName('k', 1); $valueTarget = new Twig_Node_Expression_AssignName('v', 1); $seq = new Twig_Node_Expression_Name('values', 1); $ifexpr = new Twig_Node_Expression_Constant(true, 1); - $body = new Twig_Node(array(new Twig_Node_Print(new Twig_Node_Expression_Name('foo', 1), 1)), array(), 1); + $body = new Twig_Node([new Twig_Node_Print(new Twig_Node_Expression_Name('foo', 1), 1)], [], 1); $else = null; $node = new Twig_Node_For($keyTarget, $valueTarget, $seq, $ifexpr, $body, $else, 1); $node->setAttribute('with_loop', true); - $tests[] = array($node, <<getVariableGetter('values')}); -\$context['loop'] = array( +\$context['loop'] = [ 'parent' => \$context['_parent'], 'index0' => 0, 'index' => 1, 'first' => true, -); +]; foreach (\$context['_seq'] as \$context["k"] => \$context["v"]) { if (true) { echo {$this->getVariableGetter('foo')}; @@ -136,28 +136,28 @@ foreach (\$context['_seq'] as \$context["k"] => \$context["v"]) { unset(\$context['_seq'], \$context['_iterated'], \$context['k'], \$context['v'], \$context['_parent'], \$context['loop']); \$context = array_intersect_key(\$context, \$_parent) + \$_parent; EOF - ); + ]; $keyTarget = new Twig_Node_Expression_AssignName('k', 1); $valueTarget = new Twig_Node_Expression_AssignName('v', 1); $seq = new Twig_Node_Expression_Name('values', 1); $ifexpr = null; - $body = new Twig_Node(array(new Twig_Node_Print(new Twig_Node_Expression_Name('foo', 1), 1)), array(), 1); + $body = new Twig_Node([new Twig_Node_Print(new Twig_Node_Expression_Name('foo', 1), 1)], [], 1); $else = new Twig_Node_Print(new Twig_Node_Expression_Name('foo', 1), 1); $node = new Twig_Node_For($keyTarget, $valueTarget, $seq, $ifexpr, $body, $else, 1); $node->setAttribute('with_loop', true); - $tests[] = array($node, <<getVariableGetter('values')}); \$context['_iterated'] = false; -\$context['loop'] = array( +\$context['loop'] = [ 'parent' => \$context['_parent'], 'index0' => 0, 'index' => 1, 'first' => true, -); +]; if (is_array(\$context['_seq']) || (is_object(\$context['_seq']) && \$context['_seq'] instanceof Countable)) { \$length = count(\$context['_seq']); \$context['loop']['revindex0'] = \$length - 1; @@ -184,7 +184,7 @@ if (!\$context['_iterated']) { unset(\$context['_seq'], \$context['_iterated'], \$context['k'], \$context['v'], \$context['_parent'], \$context['loop']); \$context = array_intersect_key(\$context, \$_parent) + \$_parent; EOF - ); + ]; return $tests; } diff --git a/vendor/twig/twig/test/Twig/Tests/Node/IfTest.php b/vendor/twig/twig/test/Twig/Tests/Node/IfTest.php index 4ab0e4cc7..e7b92fc66 100644 --- a/vendor/twig/twig/test/Twig/Tests/Node/IfTest.php +++ b/vendor/twig/twig/test/Twig/Tests/Node/IfTest.php @@ -13,10 +13,10 @@ class Twig_Tests_Node_IfTest extends Twig_Test_NodeTestCase { public function testConstructor() { - $t = new Twig_Node(array( + $t = new Twig_Node([ new Twig_Node_Expression_Constant(true, 1), new Twig_Node_Print(new Twig_Node_Expression_Name('foo', 1), 1), - ), array(), 1); + ], [], 1); $else = null; $node = new Twig_Node_If($t, $else, 1); @@ -30,33 +30,33 @@ class Twig_Tests_Node_IfTest extends Twig_Test_NodeTestCase public function getTests() { - $tests = array(); + $tests = []; - $t = new Twig_Node(array( + $t = new Twig_Node([ new Twig_Node_Expression_Constant(true, 1), new Twig_Node_Print(new Twig_Node_Expression_Name('foo', 1), 1), - ), array(), 1); + ], [], 1); $else = null; $node = new Twig_Node_If($t, $else, 1); - $tests[] = array($node, <<getVariableGetter('foo')}; } EOF - ); + ]; - $t = new Twig_Node(array( + $t = new Twig_Node([ new Twig_Node_Expression_Constant(true, 1), new Twig_Node_Print(new Twig_Node_Expression_Name('foo', 1), 1), new Twig_Node_Expression_Constant(false, 1), new Twig_Node_Print(new Twig_Node_Expression_Name('bar', 1), 1), - ), array(), 1); + ], [], 1); $else = null; $node = new Twig_Node_If($t, $else, 1); - $tests[] = array($node, <<getVariableGetter('foo')}; @@ -64,16 +64,16 @@ if (true) { echo {$this->getVariableGetter('bar')}; } EOF - ); + ]; - $t = new Twig_Node(array( + $t = new Twig_Node([ new Twig_Node_Expression_Constant(true, 1), new Twig_Node_Print(new Twig_Node_Expression_Name('foo', 1), 1), - ), array(), 1); + ], [], 1); $else = new Twig_Node_Print(new Twig_Node_Expression_Name('bar', 1), 1); $node = new Twig_Node_If($t, $else, 1); - $tests[] = array($node, <<getVariableGetter('foo')}; @@ -81,7 +81,7 @@ if (true) { echo {$this->getVariableGetter('bar')}; } EOF - ); + ]; return $tests; } diff --git a/vendor/twig/twig/test/Twig/Tests/Node/ImportTest.php b/vendor/twig/twig/test/Twig/Tests/Node/ImportTest.php index 36525b251..8335de8a3 100644 --- a/vendor/twig/twig/test/Twig/Tests/Node/ImportTest.php +++ b/vendor/twig/twig/test/Twig/Tests/Node/ImportTest.php @@ -23,17 +23,17 @@ class Twig_Tests_Node_ImportTest extends Twig_Test_NodeTestCase public function getTests() { - $tests = array(); + $tests = []; $macro = new Twig_Node_Expression_Constant('foo.twig', 1); $var = new Twig_Node_Expression_AssignName('macro', 1); $node = new Twig_Node_Import($macro, $var, 1); - $tests[] = array($node, <<loadTemplate("foo.twig", null, 1); EOF - ); + ]; return $tests; } diff --git a/vendor/twig/twig/test/Twig/Tests/Node/IncludeTest.php b/vendor/twig/twig/test/Twig/Tests/Node/IncludeTest.php index d801f3387..5dc0d714f 100644 --- a/vendor/twig/twig/test/Twig/Tests/Node/IncludeTest.php +++ b/vendor/twig/twig/test/Twig/Tests/Node/IncludeTest.php @@ -20,7 +20,7 @@ class Twig_Tests_Node_IncludeTest extends Twig_Test_NodeTestCase $this->assertEquals($expr, $node->getNode('expr')); $this->assertFalse($node->getAttribute('only')); - $vars = new Twig_Node_Expression_Array(array(new Twig_Node_Expression_Constant('foo', 1), new Twig_Node_Expression_Constant(true, 1)), 1); + $vars = new Twig_Node_Expression_Array([new Twig_Node_Expression_Constant('foo', 1), new Twig_Node_Expression_Constant(true, 1)], 1); $node = new Twig_Node_Include($expr, $vars, true, false, 1); $this->assertEquals($vars, $node->getNode('variables')); $this->assertTrue($node->getAttribute('only')); @@ -28,15 +28,15 @@ class Twig_Tests_Node_IncludeTest extends Twig_Test_NodeTestCase public function getTests() { - $tests = array(); + $tests = []; $expr = new Twig_Node_Expression_Constant('foo.twig', 1); $node = new Twig_Node_Include($expr, null, false, false, 1); - $tests[] = array($node, <<loadTemplate("foo.twig", null, 1)->display(\$context); EOF - ); + ]; $expr = new Twig_Node_Expression_Conditional( new Twig_Node_Expression_Constant(true, 1), @@ -45,38 +45,38 @@ EOF 0 ); $node = new Twig_Node_Include($expr, null, false, false, 1); - $tests[] = array($node, <<loadTemplate(((true) ? ("foo") : ("foo")), null, 1)->display(\$context); EOF - ); + ]; $expr = new Twig_Node_Expression_Constant('foo.twig', 1); - $vars = new Twig_Node_Expression_Array(array(new Twig_Node_Expression_Constant('foo', 1), new Twig_Node_Expression_Constant(true, 1)), 1); + $vars = new Twig_Node_Expression_Array([new Twig_Node_Expression_Constant('foo', 1), new Twig_Node_Expression_Constant(true, 1)], 1); $node = new Twig_Node_Include($expr, $vars, false, false, 1); - $tests[] = array($node, <<loadTemplate("foo.twig", null, 1)->display(array_merge(\$context, array("foo" => true))); +\$this->loadTemplate("foo.twig", null, 1)->display(array_merge(\$context, ["foo" => true])); EOF - ); + ]; $node = new Twig_Node_Include($expr, $vars, true, false, 1); - $tests[] = array($node, <<loadTemplate("foo.twig", null, 1)->display(array("foo" => true)); +\$this->loadTemplate("foo.twig", null, 1)->display(["foo" => true]); EOF - ); + ]; $node = new Twig_Node_Include($expr, $vars, true, true, 1); - $tests[] = array($node, <<loadTemplate("foo.twig", null, 1)->display(array("foo" => true)); + \$this->loadTemplate("foo.twig", null, 1)->display(["foo" => true]); } catch (Twig_Error_Loader \$e) { // ignore missing template } EOF - ); + ]; return $tests; } diff --git a/vendor/twig/twig/test/Twig/Tests/Node/MacroTest.php b/vendor/twig/twig/test/Twig/Tests/Node/MacroTest.php index c7edfa251..fca11af04 100644 --- a/vendor/twig/twig/test/Twig/Tests/Node/MacroTest.php +++ b/vendor/twig/twig/test/Twig/Tests/Node/MacroTest.php @@ -14,7 +14,7 @@ class Twig_Tests_Node_MacroTest extends Twig_Test_NodeTestCase public function testConstructor() { $body = new Twig_Node_Text('foo', 1); - $arguments = new Twig_Node(array(new Twig_Node_Expression_Name('foo', 1)), array(), 1); + $arguments = new Twig_Node([new Twig_Node_Expression_Name('foo', 1)], [], 1); $node = new Twig_Node_Macro('foo', $body, $arguments, 1); $this->assertEquals($body, $node->getNode('body')); @@ -25,10 +25,10 @@ class Twig_Tests_Node_MacroTest extends Twig_Test_NodeTestCase public function getTests() { $body = new Twig_Node_Text('foo', 1); - $arguments = new Twig_Node(array( + $arguments = new Twig_Node([ 'foo' => new Twig_Node_Expression_Constant(null, 1), 'bar' => new Twig_Node_Expression_Constant('Foo', 1), - ), array(), 1); + ], [], 1); $node = new Twig_Node_Macro('foo', $body, $arguments, 1); if (PHP_VERSION_ID >= 50600) { @@ -36,21 +36,21 @@ class Twig_Tests_Node_MacroTest extends Twig_Test_NodeTestCase $varargs = '$__varargs__'; } else { $declaration = ''; - $varargs = 'func_num_args() > 2 ? array_slice(func_get_args(), 2) : array()'; + $varargs = 'func_num_args() > 2 ? array_slice(func_get_args(), 2) : []'; } - return array( - array($node, <<env->mergeGlobals(array( + \$context = \$this->env->mergeGlobals([ "foo" => \$__foo__, "bar" => \$__bar__, "varargs" => $varargs, - )); + ]); - \$blocks = array(); + \$blocks = []; ob_start(); try { @@ -68,7 +68,7 @@ public function getfoo(\$__foo__ = null, \$__bar__ = "Foo"$declaration) return ('' === \$tmp = ob_get_clean()) ? '' : new Twig_Markup(\$tmp, \$this->env->getCharset()); } EOF - ), - ); + ], + ]; } } diff --git a/vendor/twig/twig/test/Twig/Tests/Node/ModuleTest.php b/vendor/twig/twig/test/Twig/Tests/Node/ModuleTest.php index 54a8989c7..07be19547 100644 --- a/vendor/twig/twig/test/Twig/Tests/Node/ModuleTest.php +++ b/vendor/twig/twig/test/Twig/Tests/Node/ModuleTest.php @@ -19,7 +19,7 @@ class Twig_Tests_Node_ModuleTest extends Twig_Test_NodeTestCase $macros = new Twig_Node(); $traits = new Twig_Node(); $source = new Twig_Source('{{ foo }}', 'foo.twig'); - $node = new Twig_Node_Module($body, $parent, $blocks, $macros, $traits, new Twig_Node(array()), $source); + $node = new Twig_Node_Module($body, $parent, $blocks, $macros, $traits, new Twig_Node([]), $source); $this->assertEquals($body, $node->getNode('body')); $this->assertEquals($blocks, $node->getNode('blocks')); @@ -32,7 +32,7 @@ class Twig_Tests_Node_ModuleTest extends Twig_Test_NodeTestCase { $twig = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock()); - $tests = array(); + $tests = []; $body = new Twig_Node_Text('foo', 1); $extends = null; @@ -41,8 +41,8 @@ class Twig_Tests_Node_ModuleTest extends Twig_Test_NodeTestCase $traits = new Twig_Node(); $source = new Twig_Source('{{ foo }}', 'foo.twig'); - $node = new Twig_Node_Module($body, $extends, $blocks, $macros, $traits, new Twig_Node(array()), $source); - $tests[] = array($node, <<parent = false; - \$this->blocks = array( - ); + \$this->blocks = [ + ]; } - protected function doDisplay(array \$context, array \$blocks = array()) + protected function doDisplay(array \$context, array \$blocks = []) { // line 1 echo "foo"; @@ -88,15 +88,15 @@ class __TwigTemplate_%x extends Twig_Template } } EOF - , $twig, true); + , $twig, true]; $import = new Twig_Node_Import(new Twig_Node_Expression_Constant('foo.twig', 1), new Twig_Node_Expression_AssignName('macro', 1), 2); - $body = new Twig_Node(array($import)); + $body = new Twig_Node([$import]); $extends = new Twig_Node_Expression_Constant('layout.twig', 1); - $node = new Twig_Node_Module($body, $extends, $blocks, $macros, $traits, new Twig_Node(array()), $source); - $tests[] = array($node, <<parent = \$this->loadTemplate("layout.twig", "foo.twig", 1); - \$this->blocks = array( - ); + \$this->blocks = [ + ]; } protected function doGetParent(array \$context) @@ -117,7 +117,7 @@ class __TwigTemplate_%x extends Twig_Template return "layout.twig"; } - protected function doDisplay(array \$context, array \$blocks = array()) + protected function doDisplay(array \$context, array \$blocks = []) { // line 2 \$context["macro"] = \$this->loadTemplate("foo.twig", "foo.twig", 2); @@ -154,10 +154,10 @@ class __TwigTemplate_%x extends Twig_Template } } EOF - , $twig, true); + , $twig, true]; - $set = new Twig_Node_Set(false, new Twig_Node(array(new Twig_Node_Expression_AssignName('foo', 4))), new Twig_Node(array(new Twig_Node_Expression_Constant('foo', 4))), 4); - $body = new Twig_Node(array($set)); + $set = new Twig_Node_Set(false, new Twig_Node([new Twig_Node_Expression_AssignName('foo', 4)]), new Twig_Node([new Twig_Node_Expression_Constant('foo', 4)]), 4); + $body = new Twig_Node([$set]); $extends = new Twig_Node_Expression_Conditional( new Twig_Node_Expression_Constant(true, 2), new Twig_Node_Expression_Constant('foo', 2), @@ -165,9 +165,9 @@ EOF 2 ); - $twig = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), array('debug' => true)); - $node = new Twig_Node_Module($body, $extends, $blocks, $macros, $traits, new Twig_Node(array()), $source); - $tests[] = array($node, <<getMockBuilder('Twig_LoaderInterface')->getMock(), ['debug' => true]); + $node = new Twig_Node_Module($body, $extends, $blocks, $macros, $traits, new Twig_Node([]), $source); + $tests[] = [$node, <<loadTemplate(((true) ? ("foo") : ("foo")), "foo.twig", 2); } - protected function doDisplay(array \$context, array \$blocks = array()) + protected function doDisplay(array \$context, array \$blocks = []) { // line 4 \$context["foo"] = "foo"; @@ -216,7 +216,7 @@ class __TwigTemplate_%x extends Twig_Template } } EOF - , $twig, true); + , $twig, true]; return $tests; } diff --git a/vendor/twig/twig/test/Twig/Tests/Node/PrintTest.php b/vendor/twig/twig/test/Twig/Tests/Node/PrintTest.php index 4e0990fac..075025448 100644 --- a/vendor/twig/twig/test/Twig/Tests/Node/PrintTest.php +++ b/vendor/twig/twig/test/Twig/Tests/Node/PrintTest.php @@ -21,8 +21,8 @@ class Twig_Tests_Node_PrintTest extends Twig_Test_NodeTestCase public function getTests() { - $tests = array(); - $tests[] = array(new Twig_Node_Print(new Twig_Node_Expression_Constant('foo', 1), 1), "// line 1\necho \"foo\";"); + $tests = []; + $tests[] = [new Twig_Node_Print(new Twig_Node_Expression_Constant('foo', 1), 1), "// line 1\necho \"foo\";"]; return $tests; } diff --git a/vendor/twig/twig/test/Twig/Tests/Node/SandboxTest.php b/vendor/twig/twig/test/Twig/Tests/Node/SandboxTest.php index 56f487730..24297da1c 100644 --- a/vendor/twig/twig/test/Twig/Tests/Node/SandboxTest.php +++ b/vendor/twig/twig/test/Twig/Tests/Node/SandboxTest.php @@ -21,12 +21,12 @@ class Twig_Tests_Node_SandboxTest extends Twig_Test_NodeTestCase public function getTests() { - $tests = array(); + $tests = []; $body = new Twig_Node_Text('foo', 1); $node = new Twig_Node_Sandbox($body, 1); - $tests[] = array($node, <<env->getExtension('Twig_Extension_Sandbox'); if (!\$alreadySandboxed = \$sandbox->isSandboxed()) { @@ -37,7 +37,7 @@ if (!\$alreadySandboxed) { \$sandbox->disableSandbox(); } EOF - ); + ]; return $tests; } diff --git a/vendor/twig/twig/test/Twig/Tests/Node/SandboxedPrintTest.php b/vendor/twig/twig/test/Twig/Tests/Node/SandboxedPrintTest.php index 8bc8a755c..61b69b279 100644 --- a/vendor/twig/twig/test/Twig/Tests/Node/SandboxedPrintTest.php +++ b/vendor/twig/twig/test/Twig/Tests/Node/SandboxedPrintTest.php @@ -20,13 +20,13 @@ class Twig_Tests_Node_SandboxedPrintTest extends Twig_Test_NodeTestCase public function getTests() { - $tests = array(); + $tests = []; - $tests[] = array(new Twig_Node_SandboxedPrint(new Twig_Node_Expression_Constant('foo', 1), 1), <<env->getExtension('Twig_Extension_Sandbox')->ensureToStringAllowed("foo"); EOF - ); + ]; return $tests; } diff --git a/vendor/twig/twig/test/Twig/Tests/Node/SetTest.php b/vendor/twig/twig/test/Twig/Tests/Node/SetTest.php index 62ad2803e..e09583f8c 100644 --- a/vendor/twig/twig/test/Twig/Tests/Node/SetTest.php +++ b/vendor/twig/twig/test/Twig/Tests/Node/SetTest.php @@ -13,8 +13,8 @@ class Twig_Tests_Node_SetTest extends Twig_Test_NodeTestCase { public function testConstructor() { - $names = new Twig_Node(array(new Twig_Node_Expression_AssignName('foo', 1)), array(), 1); - $values = new Twig_Node(array(new Twig_Node_Expression_Constant('foo', 1)), array(), 1); + $names = new Twig_Node([new Twig_Node_Expression_AssignName('foo', 1)], [], 1); + $values = new Twig_Node([new Twig_Node_Expression_Constant('foo', 1)], [], 1); $node = new Twig_Node_Set(false, $names, $values, 1); $this->assertEquals($names, $node->getNode('names')); @@ -24,45 +24,45 @@ class Twig_Tests_Node_SetTest extends Twig_Test_NodeTestCase public function getTests() { - $tests = array(); + $tests = []; - $names = new Twig_Node(array(new Twig_Node_Expression_AssignName('foo', 1)), array(), 1); - $values = new Twig_Node(array(new Twig_Node_Expression_Constant('foo', 1)), array(), 1); + $names = new Twig_Node([new Twig_Node_Expression_AssignName('foo', 1)], [], 1); + $values = new Twig_Node([new Twig_Node_Expression_Constant('foo', 1)], [], 1); $node = new Twig_Node_Set(false, $names, $values, 1); - $tests[] = array($node, <<env->getCharset()); EOF - ); + ]; - $names = new Twig_Node(array(new Twig_Node_Expression_AssignName('foo', 1)), array(), 1); + $names = new Twig_Node([new Twig_Node_Expression_AssignName('foo', 1)], [], 1); $values = new Twig_Node_Text('foo', 1); $node = new Twig_Node_Set(true, $names, $values, 1); - $tests[] = array($node, <<env->getCharset()); EOF - ); + ]; - $names = new Twig_Node(array(new Twig_Node_Expression_AssignName('foo', 1), new Twig_Node_Expression_AssignName('bar', 1)), array(), 1); - $values = new Twig_Node(array(new Twig_Node_Expression_Constant('foo', 1), new Twig_Node_Expression_Name('bar', 1)), array(), 1); + $names = new Twig_Node([new Twig_Node_Expression_AssignName('foo', 1), new Twig_Node_Expression_AssignName('bar', 1)], [], 1); + $values = new Twig_Node([new Twig_Node_Expression_Constant('foo', 1), new Twig_Node_Expression_Name('bar', 1)], [], 1); $node = new Twig_Node_Set(false, $names, $values, 1); - $tests[] = array($node, <<getVariableGetter('bar')}); +list(\$context["foo"], \$context["bar"]) = ["foo", {$this->getVariableGetter('bar')}]; EOF - ); + ]; return $tests; } diff --git a/vendor/twig/twig/test/Twig/Tests/Node/SpacelessTest.php b/vendor/twig/twig/test/Twig/Tests/Node/SpacelessTest.php index 222ca0920..c7e5fb656 100644 --- a/vendor/twig/twig/test/Twig/Tests/Node/SpacelessTest.php +++ b/vendor/twig/twig/test/Twig/Tests/Node/SpacelessTest.php @@ -13,7 +13,7 @@ class Twig_Tests_Node_SpacelessTest extends Twig_Test_NodeTestCase { public function testConstructor() { - $body = new Twig_Node(array(new Twig_Node_Text('
foo
', 1))); + $body = new Twig_Node([new Twig_Node_Text('
foo
', 1)]); $node = new Twig_Node_Spaceless($body, 1); $this->assertEquals($body, $node->getNode('body')); @@ -21,17 +21,17 @@ class Twig_Tests_Node_SpacelessTest extends Twig_Test_NodeTestCase public function getTests() { - $body = new Twig_Node(array(new Twig_Node_Text('
foo
', 1))); + $body = new Twig_Node([new Twig_Node_Text('
foo
', 1)]); $node = new Twig_Node_Spaceless($body, 1); - return array( - array($node, <<
foo
"; echo trim(preg_replace('/>\s+<', ob_get_clean())); EOF - ), - ); + ], + ]; } } diff --git a/vendor/twig/twig/test/Twig/Tests/Node/TextTest.php b/vendor/twig/twig/test/Twig/Tests/Node/TextTest.php index ceaf67f4c..f175e4d7d 100644 --- a/vendor/twig/twig/test/Twig/Tests/Node/TextTest.php +++ b/vendor/twig/twig/test/Twig/Tests/Node/TextTest.php @@ -20,8 +20,8 @@ class Twig_Tests_Node_TextTest extends Twig_Test_NodeTestCase public function getTests() { - $tests = array(); - $tests[] = array(new Twig_Node_Text('foo', 1), "// line 1\necho \"foo\";"); + $tests = []; + $tests[] = [new Twig_Node_Text('foo', 1), "// line 1\necho \"foo\";"]; return $tests; } diff --git a/vendor/twig/twig/test/Twig/Tests/NodeVisitor/OptimizerTest.php b/vendor/twig/twig/test/Twig/Tests/NodeVisitor/OptimizerTest.php index 92c0ecac7..1d3a6341f 100644 --- a/vendor/twig/twig/test/Twig/Tests/NodeVisitor/OptimizerTest.php +++ b/vendor/twig/twig/test/Twig/Tests/NodeVisitor/OptimizerTest.php @@ -12,7 +12,7 @@ class Twig_Tests_NodeVisitor_OptimizerTest extends \PHPUnit\Framework\TestCase { public function testRenderBlockOptimizer() { - $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), array('cache' => false, 'autoescape' => false)); + $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), ['cache' => false, 'autoescape' => false]); $stream = $env->parse($env->tokenize(new Twig_Source('{{ block("foo") }}', 'index'))); @@ -24,7 +24,7 @@ class Twig_Tests_NodeVisitor_OptimizerTest extends \PHPUnit\Framework\TestCase public function testRenderParentBlockOptimizer() { - $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), array('cache' => false, 'autoescape' => false)); + $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), ['cache' => false, 'autoescape' => false]); $stream = $env->parse($env->tokenize(new Twig_Source('{% extends "foo" %}{% block content %}{{ parent() }}{% endblock %}', 'index'))); @@ -40,7 +40,7 @@ class Twig_Tests_NodeVisitor_OptimizerTest extends \PHPUnit\Framework\TestCase $this->markTestSkipped('not needed on PHP >= 5.4'); } - $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), array('cache' => false, 'autoescape' => false)); + $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), ['cache' => false, 'autoescape' => false]); $stream = $env->parse($env->tokenize(new Twig_Source('{{ block(name|lower) }}', 'index'))); $node = $stream->getNode('body')->getNode(0)->getNode(1); @@ -54,7 +54,7 @@ class Twig_Tests_NodeVisitor_OptimizerTest extends \PHPUnit\Framework\TestCase */ public function testForOptimizer($template, $expected) { - $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), array('cache' => false)); + $env = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), ['cache' => false]); $stream = $env->parse($env->tokenize(new Twig_Source($template, 'index'))); @@ -65,41 +65,41 @@ class Twig_Tests_NodeVisitor_OptimizerTest extends \PHPUnit\Framework\TestCase public function getTestsForForOptimizer() { - return array( - array('{% for i in foo %}{% endfor %}', array('i' => false)), + return [ + ['{% for i in foo %}{% endfor %}', ['i' => false]], - array('{% for i in foo %}{{ loop.index }}{% endfor %}', array('i' => true)), + ['{% for i in foo %}{{ loop.index }}{% endfor %}', ['i' => true]], - array('{% for i in foo %}{% for j in foo %}{% endfor %}{% endfor %}', array('i' => false, 'j' => false)), + ['{% for i in foo %}{% for j in foo %}{% endfor %}{% endfor %}', ['i' => false, 'j' => false]], - array('{% for i in foo %}{% include "foo" %}{% endfor %}', array('i' => true)), + ['{% for i in foo %}{% include "foo" %}{% endfor %}', ['i' => true]], - array('{% for i in foo %}{% include "foo" only %}{% endfor %}', array('i' => false)), + ['{% for i in foo %}{% include "foo" only %}{% endfor %}', ['i' => false]], - array('{% for i in foo %}{% include "foo" with { "foo": "bar" } only %}{% endfor %}', array('i' => false)), + ['{% for i in foo %}{% include "foo" with { "foo": "bar" } only %}{% endfor %}', ['i' => false]], - array('{% for i in foo %}{% include "foo" with { "foo": loop.index } only %}{% endfor %}', array('i' => true)), + ['{% for i in foo %}{% include "foo" with { "foo": loop.index } only %}{% endfor %}', ['i' => true]], - array('{% for i in foo %}{% for j in foo %}{{ loop.index }}{% endfor %}{% endfor %}', array('i' => false, 'j' => true)), + ['{% for i in foo %}{% for j in foo %}{{ loop.index }}{% endfor %}{% endfor %}', ['i' => false, 'j' => true]], - array('{% for i in foo %}{% for j in foo %}{{ loop.parent.loop.index }}{% endfor %}{% endfor %}', array('i' => true, 'j' => true)), + ['{% for i in foo %}{% for j in foo %}{{ loop.parent.loop.index }}{% endfor %}{% endfor %}', ['i' => true, 'j' => true]], - array('{% for i in foo %}{% set l = loop %}{% for j in foo %}{{ l.index }}{% endfor %}{% endfor %}', array('i' => true, 'j' => false)), + ['{% for i in foo %}{% set l = loop %}{% for j in foo %}{{ l.index }}{% endfor %}{% endfor %}', ['i' => true, 'j' => false]], - array('{% for i in foo %}{% for j in foo %}{{ foo.parent.loop.index }}{% endfor %}{% endfor %}', array('i' => false, 'j' => false)), + ['{% for i in foo %}{% for j in foo %}{{ foo.parent.loop.index }}{% endfor %}{% endfor %}', ['i' => false, 'j' => false]], - array('{% for i in foo %}{% for j in foo %}{{ loop["parent"].loop.index }}{% endfor %}{% endfor %}', array('i' => true, 'j' => true)), + ['{% for i in foo %}{% for j in foo %}{{ loop["parent"].loop.index }}{% endfor %}{% endfor %}', ['i' => true, 'j' => true]], - array('{% for i in foo %}{{ include("foo") }}{% endfor %}', array('i' => true)), + ['{% for i in foo %}{{ include("foo") }}{% endfor %}', ['i' => true]], - array('{% for i in foo %}{{ include("foo", with_context = false) }}{% endfor %}', array('i' => false)), + ['{% for i in foo %}{{ include("foo", with_context = false) }}{% endfor %}', ['i' => false]], - array('{% for i in foo %}{{ include("foo", with_context = true) }}{% endfor %}', array('i' => true)), + ['{% for i in foo %}{{ include("foo", with_context = true) }}{% endfor %}', ['i' => true]], - array('{% for i in foo %}{{ include("foo", { "foo": "bar" }, with_context = false) }}{% endfor %}', array('i' => false)), + ['{% for i in foo %}{{ include("foo", { "foo": "bar" }, with_context = false) }}{% endfor %}', ['i' => false]], - array('{% for i in foo %}{{ include("foo", { "foo": loop.index }, with_context = false) }}{% endfor %}', array('i' => true)), - ); + ['{% for i in foo %}{{ include("foo", { "foo": loop.index }, with_context = false) }}{% endfor %}', ['i' => true]], + ]; } public function checkForConfiguration(Twig_NodeInterface $node = null, $target, $withLoop) diff --git a/vendor/twig/twig/test/Twig/Tests/ParserTest.php b/vendor/twig/twig/test/Twig/Tests/ParserTest.php index 342fb7bab..5134f22b9 100644 --- a/vendor/twig/twig/test/Twig/Tests/ParserTest.php +++ b/vendor/twig/twig/test/Twig/Tests/ParserTest.php @@ -25,12 +25,12 @@ class Twig_Tests_ParserTest extends \PHPUnit\Framework\TestCase */ public function testUnknownTag() { - $stream = new Twig_TokenStream(array( + $stream = new Twig_TokenStream([ new Twig_Token(Twig_Token::BLOCK_START_TYPE, '', 1), new Twig_Token(Twig_Token::NAME_TYPE, 'foo', 1), new Twig_Token(Twig_Token::BLOCK_END_TYPE, '', 1), new Twig_Token(Twig_Token::EOF_TYPE, '', 1), - )); + ]); $parser = new Twig_Parser(new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock())); $parser->parse($stream); } @@ -41,12 +41,12 @@ class Twig_Tests_ParserTest extends \PHPUnit\Framework\TestCase */ public function testUnknownTagWithoutSuggestions() { - $stream = new Twig_TokenStream(array( + $stream = new Twig_TokenStream([ new Twig_Token(Twig_Token::BLOCK_START_TYPE, '', 1), new Twig_Token(Twig_Token::NAME_TYPE, 'foobar', 1), new Twig_Token(Twig_Token::BLOCK_END_TYPE, '', 1), new Twig_Token(Twig_Token::EOF_TYPE, '', 1), - )); + ]); $parser = new Twig_Parser(new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock())); $parser->parse($stream); } @@ -63,20 +63,20 @@ class Twig_Tests_ParserTest extends \PHPUnit\Framework\TestCase public function getFilterBodyNodesData() { - return array( - array( - new Twig_Node(array(new Twig_Node_Text(' ', 1))), - new Twig_Node(array()), - ), - array( - $input = new Twig_Node(array(new Twig_Node_Set(false, new Twig_Node(), new Twig_Node(), 1))), + return [ + [ + new Twig_Node([new Twig_Node_Text(' ', 1)]), + new Twig_Node([]), + ], + [ + $input = new Twig_Node([new Twig_Node_Set(false, new Twig_Node(), new Twig_Node(), 1)]), $input, - ), - array( - $input = new Twig_Node(array(new Twig_Node_Set(true, new Twig_Node(), new Twig_Node(array(new Twig_Node(array(new Twig_Node_Text('foo', 1))))), 1))), + ], + [ + $input = new Twig_Node([new Twig_Node_Set(true, new Twig_Node(), new Twig_Node([new Twig_Node([new Twig_Node_Text('foo', 1)])]), 1)]), $input, - ), - ); + ], + ]; } /** @@ -92,33 +92,41 @@ class Twig_Tests_ParserTest extends \PHPUnit\Framework\TestCase public function getFilterBodyNodesDataThrowsException() { - return array( - array(new Twig_Node_Text('foo', 1)), - array(new Twig_Node(array(new Twig_Node(array(new Twig_Node_Text('foo', 1)))))), - ); + return [ + [new Twig_Node_Text('foo', 1)], + [new Twig_Node([new Twig_Node([new Twig_Node_Text('foo', 1)])])], + ]; } /** - * @expectedException Twig_Error_Syntax - * @expectedExceptionMessage A template that extends another one cannot start with a byte order mark (BOM); it must be removed at line 1 + * @dataProvider getFilterBodyNodesWithBOMData */ - public function testFilterBodyNodesWithBOM() + public function testFilterBodyNodesWithBOM($emptyNode) { - $parser = $this->getParser(); - $parser->filterBodyNodes(new Twig_Node_Text(chr(0xEF).chr(0xBB).chr(0xBF), 1)); + $this->assertNull($this->getParser()->filterBodyNodes(new Twig_Node_Text(chr(0xEF).chr(0xBB).chr(0xBF).$emptyNode, 1))); + } + + public function getFilterBodyNodesWithBOMData() + { + return [ + [' '], + ["\t"], + ["\n"], + ["\n\t\n "], + ]; } public function testParseIsReentrant() { - $twig = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), array( + $twig = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), [ 'autoescape' => false, 'optimizations' => 0, - )); + ]); $twig->addTokenParser(new TestTokenParser()); $parser = new Twig_Parser($twig); - $parser->parse(new Twig_TokenStream(array( + $parser->parse(new Twig_TokenStream([ new Twig_Token(Twig_Token::BLOCK_START_TYPE, '', 1), new Twig_Token(Twig_Token::NAME_TYPE, 'test', 1), new Twig_Token(Twig_Token::BLOCK_END_TYPE, '', 1), @@ -126,17 +134,17 @@ class Twig_Tests_ParserTest extends \PHPUnit\Framework\TestCase new Twig_Token(Twig_Token::NAME_TYPE, 'foo', 1), new Twig_Token(Twig_Token::VAR_END_TYPE, '', 1), new Twig_Token(Twig_Token::EOF_TYPE, '', 1), - ))); + ])); $this->assertNull($parser->getParent()); } public function testGetVarName() { - $twig = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), array( + $twig = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), [ 'autoescape' => false, 'optimizations' => 0, - )); + ]); $twig->parse($twig->tokenize(new Twig_Source(<<getMockBuilder('Twig_LoaderInterface')->getMock())); $parser->setParent(new Twig_Node()); - $parser->stream = new Twig_TokenStream(array()); + $parser->stream = new Twig_TokenStream([]); return $parser; } @@ -178,17 +186,17 @@ class TestTokenParser extends Twig_TokenParser public function parse(Twig_Token $token) { // simulate the parsing of another template right in the middle of the parsing of the current template - $this->parser->parse(new Twig_TokenStream(array( + $this->parser->parse(new Twig_TokenStream([ new Twig_Token(Twig_Token::BLOCK_START_TYPE, '', 1), new Twig_Token(Twig_Token::NAME_TYPE, 'extends', 1), new Twig_Token(Twig_Token::STRING_TYPE, 'base', 1), new Twig_Token(Twig_Token::BLOCK_END_TYPE, '', 1), new Twig_Token(Twig_Token::EOF_TYPE, '', 1), - ))); + ])); $this->parser->getStream()->expect(Twig_Token::BLOCK_END_TYPE); - return new Twig_Node(array()); + return new Twig_Node([]); } public function getTag() diff --git a/vendor/twig/twig/test/Twig/Tests/Profiler/Dumper/AbstractTest.php b/vendor/twig/twig/test/Twig/Tests/Profiler/Dumper/AbstractTest.php index a71b97b97..eead72bb5 100644 --- a/vendor/twig/twig/test/Twig/Tests/Profiler/Dumper/AbstractTest.php +++ b/vendor/twig/twig/test/Twig/Tests/Profiler/Dumper/AbstractTest.php @@ -21,24 +21,24 @@ abstract class Twig_Tests_Profiler_Dumper_AbstractTest extends \PHPUnit\Framewor $profile->expects($this->any())->method('getMemoryUsage')->will($this->returnValue(0)); $profile->expects($this->any())->method('getPeakMemoryUsage')->will($this->returnValue(0)); - $subProfiles = array( + $subProfiles = [ $this->getIndexProfile( - array( + [ $this->getEmbeddedBlockProfile(), $this->getEmbeddedTemplateProfile( - array( + [ $this->getIncludedTemplateProfile(), - ) + ] ), $this->getMacroProfile(), $this->getEmbeddedTemplateProfile( - array( + [ $this->getIncludedTemplateProfile(), - ) + ] ), - ) + ] ), - ); + ]; $profile->expects($this->any())->method('getProfiles')->will($this->returnValue($subProfiles)); $profile->expects($this->any())->method('getIterator')->will($this->returnValue(new ArrayIterator($subProfiles))); @@ -46,27 +46,27 @@ abstract class Twig_Tests_Profiler_Dumper_AbstractTest extends \PHPUnit\Framewor return $profile; } - private function getIndexProfile(array $subProfiles = array()) + private function getIndexProfile(array $subProfiles = []) { return $this->generateProfile('main', 1, true, 'template', 'index.twig', $subProfiles); } - private function getEmbeddedBlockProfile(array $subProfiles = array()) + private function getEmbeddedBlockProfile(array $subProfiles = []) { return $this->generateProfile('body', 0.0001, false, 'block', 'embedded.twig', $subProfiles); } - private function getEmbeddedTemplateProfile(array $subProfiles = array()) + private function getEmbeddedTemplateProfile(array $subProfiles = []) { return $this->generateProfile('main', 0.0001, true, 'template', 'embedded.twig', $subProfiles); } - private function getIncludedTemplateProfile(array $subProfiles = array()) + private function getIncludedTemplateProfile(array $subProfiles = []) { return $this->generateProfile('main', 0.0001, true, 'template', 'included.twig', $subProfiles); } - private function getMacroProfile(array $subProfiles = array()) + private function getMacroProfile(array $subProfiles = []) { return $this->generateProfile('foo', 0.0001, false, 'macro', 'index.twig', $subProfiles); } @@ -81,7 +81,7 @@ abstract class Twig_Tests_Profiler_Dumper_AbstractTest extends \PHPUnit\Framewor * * @return Twig_Profiler_Profile */ - private function generateProfile($name, $duration, $isTemplate, $type, $templateName, array $subProfiles = array()) + private function generateProfile($name, $duration, $isTemplate, $type, $templateName, array $subProfiles = []) { $profile = $this->getMockBuilder('Twig_Profiler_Profile')->disableOriginalConstructor()->getMock(); diff --git a/vendor/twig/twig/test/Twig/Tests/Profiler/ProfileTest.php b/vendor/twig/twig/test/Twig/Tests/Profiler/ProfileTest.php index 08db96a90..cc0aafd54 100644 --- a/vendor/twig/twig/test/Twig/Tests/Profiler/ProfileTest.php +++ b/vendor/twig/twig/test/Twig/Tests/Profiler/ProfileTest.php @@ -62,8 +62,8 @@ class Twig_Tests_Profiler_ProfileTest extends \PHPUnit\Framework\TestCase $profile->addProfile($a = new Twig_Profiler_Profile()); $profile->addProfile($b = new Twig_Profiler_Profile()); - $this->assertSame(array($a, $b), $profile->getProfiles()); - $this->assertSame(array($a, $b), iterator_to_array($profile)); + $this->assertSame([$a, $b], $profile->getProfiles()); + $this->assertSame([$a, $b], iterator_to_array($profile)); } public function testGetDuration() diff --git a/vendor/twig/twig/test/Twig/Tests/TemplateTest.php b/vendor/twig/twig/test/Twig/Tests/TemplateTest.php index 336fc1f56..782cdd32b 100644 --- a/vendor/twig/twig/test/Twig/Tests/TemplateTest.php +++ b/vendor/twig/twig/test/Twig/Tests/TemplateTest.php @@ -15,8 +15,8 @@ class Twig_Tests_TemplateTest extends \PHPUnit\Framework\TestCase */ public function testDisplayBlocksAcceptTemplateOnlyAsBlocks() { - $template = $this->getMockForAbstractClass('Twig_Template', array(), '', false); - $template->displayBlock('foo', array(), array('foo' => array(new stdClass(), 'foo'))); + $template = $this->getMockForAbstractClass('Twig_Template', [], '', false); + $template->displayBlock('foo', [], ['foo' => [new stdClass(), 'foo']]); } /** @@ -24,19 +24,19 @@ class Twig_Tests_TemplateTest extends \PHPUnit\Framework\TestCase */ public function testGetAttributeExceptions($template, $message) { - $templates = array('index' => $template); - $env = new Twig_Environment(new Twig_Loader_Array($templates), array('strict_variables' => true)); + $templates = ['index' => $template]; + $env = new Twig_Environment(new Twig_Loader_Array($templates), ['strict_variables' => true]); $template = $env->loadTemplate('index'); - $context = array( + $context = [ 'string' => 'foo', 'null' => null, - 'empty_array' => array(), - 'array' => array('foo' => 'foo'), + 'empty_array' => [], + 'array' => ['foo' => 'foo'], 'array_access' => new Twig_TemplateArrayAccessObject(), 'magic_exception' => new Twig_TemplateMagicPropertyObjectWithException(), 'object' => new stdClass(), - ); + ]; try { $template->render($context); @@ -48,25 +48,25 @@ class Twig_Tests_TemplateTest extends \PHPUnit\Framework\TestCase public function getAttributeExceptions() { - return array( - array('{{ string["a"] }}', 'Impossible to access a key ("a") on a string variable ("foo") in "%s" at line 1.'), - array('{{ null["a"] }}', 'Impossible to access a key ("a") on a null variable in "%s" at line 1.'), - array('{{ empty_array["a"] }}', 'Key "a" does not exist as the array is empty in "%s" at line 1.'), - array('{{ array["a"] }}', 'Key "a" for array with keys "foo" does not exist in "%s" at line 1.'), - array('{{ array_access["a"] }}', 'Key "a" in object with ArrayAccess of class "Twig_TemplateArrayAccessObject" does not exist in "%s" at line 1.'), - array('{{ string.a }}', 'Impossible to access an attribute ("a") on a string variable ("foo") in "%s" at line 1.'), - array('{{ string.a() }}', 'Impossible to invoke a method ("a") on a string variable ("foo") in "%s" at line 1.'), - array('{{ null.a }}', 'Impossible to access an attribute ("a") on a null variable in "%s" at line 1.'), - array('{{ null.a() }}', 'Impossible to invoke a method ("a") on a null variable in "%s" at line 1.'), - array('{{ array.a() }}', 'Impossible to invoke a method ("a") on an array in "%s" at line 1.'), - array('{{ empty_array.a }}', 'Key "a" does not exist as the array is empty in "%s" at line 1.'), - array('{{ array.a }}', 'Key "a" for array with keys "foo" does not exist in "%s" at line 1.'), - array('{{ attribute(array, -10) }}', 'Key "-10" for array with keys "foo" does not exist in "%s" at line 1.'), - array('{{ array_access.a }}', 'Neither the property "a" nor one of the methods "a()", "geta()"/"isa()" or "__call()" exist and have public access in class "Twig_TemplateArrayAccessObject" in "%s" at line 1.'), - array('{% from _self import foo %}{% macro foo(obj) %}{{ obj.missing_method() }}{% endmacro %}{{ foo(array_access) }}', 'Neither the property "missing_method" nor one of the methods "missing_method()", "getmissing_method()"/"ismissing_method()" or "__call()" exist and have public access in class "Twig_TemplateArrayAccessObject" in "%s" at line 1.'), - array('{{ magic_exception.test }}', 'An exception has been thrown during the rendering of a template ("Hey! Don\'t try to isset me!") in "%s" at line 1.'), - array('{{ object["a"] }}', 'Impossible to access a key "a" on an object of class "stdClass" that does not implement ArrayAccess interface in "%s" at line 1.'), - ); + return [ + ['{{ string["a"] }}', 'Impossible to access a key ("a") on a string variable ("foo") in "%s" at line 1.'], + ['{{ null["a"] }}', 'Impossible to access a key ("a") on a null variable in "%s" at line 1.'], + ['{{ empty_array["a"] }}', 'Key "a" does not exist as the array is empty in "%s" at line 1.'], + ['{{ array["a"] }}', 'Key "a" for array with keys "foo" does not exist in "%s" at line 1.'], + ['{{ array_access["a"] }}', 'Key "a" in object with ArrayAccess of class "Twig_TemplateArrayAccessObject" does not exist in "%s" at line 1.'], + ['{{ string.a }}', 'Impossible to access an attribute ("a") on a string variable ("foo") in "%s" at line 1.'], + ['{{ string.a() }}', 'Impossible to invoke a method ("a") on a string variable ("foo") in "%s" at line 1.'], + ['{{ null.a }}', 'Impossible to access an attribute ("a") on a null variable in "%s" at line 1.'], + ['{{ null.a() }}', 'Impossible to invoke a method ("a") on a null variable in "%s" at line 1.'], + ['{{ array.a() }}', 'Impossible to invoke a method ("a") on an array in "%s" at line 1.'], + ['{{ empty_array.a }}', 'Key "a" does not exist as the array is empty in "%s" at line 1.'], + ['{{ array.a }}', 'Key "a" for array with keys "foo" does not exist in "%s" at line 1.'], + ['{{ attribute(array, -10) }}', 'Key "-10" for array with keys "foo" does not exist in "%s" at line 1.'], + ['{{ array_access.a }}', 'Neither the property "a" nor one of the methods "a()", "geta()"/"isa()" or "__call()" exist and have public access in class "Twig_TemplateArrayAccessObject" in "%s" at line 1.'], + ['{% from _self import foo %}{% macro foo(obj) %}{{ obj.missing_method() }}{% endmacro %}{{ foo(array_access) }}', 'Neither the property "missing_method" nor one of the methods "missing_method()", "getmissing_method()"/"ismissing_method()" or "__call()" exist and have public access in class "Twig_TemplateArrayAccessObject" in "%s" at line 1.'], + ['{{ magic_exception.test }}', 'An exception has been thrown during the rendering of a template ("Hey! Don\'t try to isset me!") in "%s" at line 1.'], + ['{{ object["a"] }}', 'Impossible to access a key "a" on an object of class "stdClass" that does not implement ArrayAccess interface in "%s" at line 1.'], + ]; } /** @@ -75,12 +75,12 @@ class Twig_Tests_TemplateTest extends \PHPUnit\Framework\TestCase public function testGetAttributeWithSandbox($object, $item, $allowed) { $twig = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock()); - $policy = new Twig_Sandbox_SecurityPolicy(array(), array(), array(/*method*/), array(/*prop*/), array()); + $policy = new Twig_Sandbox_SecurityPolicy([], [], [/*method*/], [/*prop*/], []); $twig->addExtension(new Twig_Extension_Sandbox($policy, !$allowed)); $template = new Twig_TemplateTest($twig); try { - $template->getAttribute($object, $item, array(), 'any'); + $template->getAttribute($object, $item, [], 'any'); if (!$allowed) { $this->fail(); @@ -100,12 +100,12 @@ class Twig_Tests_TemplateTest extends \PHPUnit\Framework\TestCase public function getGetAttributeWithSandbox() { - return array( - array(new Twig_TemplatePropertyObject(), 'defined', false), - array(new Twig_TemplatePropertyObject(), 'defined', true), - array(new Twig_TemplateMethodObject(), 'defined', false), - array(new Twig_TemplateMethodObject(), 'defined', true), - ); + return [ + [new Twig_TemplatePropertyObject(), 'defined', false], + [new Twig_TemplatePropertyObject(), 'defined', true], + [new Twig_TemplateMethodObject(), 'defined', false], + [new Twig_TemplateMethodObject(), 'defined', true], + ]; } /** @@ -132,10 +132,10 @@ class Twig_Tests_TemplateTest extends \PHPUnit\Framework\TestCase $this->assertNotInstanceof('Twig_Markup', $template->getAttribute($template1, 'empty')); $this->assertSame('', $template->getAttribute($template1, 'empty')); - $this->assertFalse($template->getAttribute($template1, 'env', array(), Twig_Template::ANY_CALL, true)); - $this->assertFalse($template->getAttribute($template1, 'environment', array(), Twig_Template::ANY_CALL, true)); - $this->assertFalse($template->getAttribute($template1, 'getEnvironment', array(), Twig_Template::METHOD_CALL, true)); - $this->assertFalse($template->getAttribute($template1, 'displayWithErrorHandling', array(), Twig_Template::METHOD_CALL, true)); + $this->assertFalse($template->getAttribute($template1, 'env', [], Twig_Template::ANY_CALL, true)); + $this->assertFalse($template->getAttribute($template1, 'environment', [], Twig_Template::ANY_CALL, true)); + $this->assertFalse($template->getAttribute($template1, 'getEnvironment', [], Twig_Template::METHOD_CALL, true)); + $this->assertFalse($template->getAttribute($template1, 'displayWithErrorHandling', [], Twig_Template::METHOD_CALL, true)); } /** @@ -180,25 +180,25 @@ class Twig_Tests_TemplateTest extends \PHPUnit\Framework\TestCase $this->assertNotInstanceof('Twig_Markup', $template->getAttribute($template1, 'empty')); $this->assertSame('', $template->getAttribute($template1, 'empty')); - $blocks = array('name' => array($template1, 'block_name')); + $blocks = ['name' => [$template1, 'block_name']]; // trigger some deprecation notice messages to check them with @expectedDeprecation - $template->getAttribute($template, 'renderBlock', array('name', array(), $blocks)); - $template->getAttribute($template, 'displayBlock', array('name', array(), $blocks)); - $template->getAttribute($template, 'hasBlock', array('name', array())); - $template->getAttribute($template, 'render', array(array())); - $template->getAttribute($template, 'display', array(array())); + $template->getAttribute($template, 'renderBlock', ['name', [], $blocks]); + $template->getAttribute($template, 'displayBlock', ['name', [], $blocks]); + $template->getAttribute($template, 'hasBlock', ['name', []]); + $template->getAttribute($template, 'render', [[]]); + $template->getAttribute($template, 'display', [[]]); - $template->getAttribute($template1, 'renderBlock', array('name', array(), $blocks)); - $template->getAttribute($template1, 'displayBlock', array('name', array(), $blocks)); - $template->getAttribute($template1, 'hasBlock', array('name', array())); - $template->getAttribute($template1, 'render', array(array())); - $template->getAttribute($template1, 'display', array(array())); + $template->getAttribute($template1, 'renderBlock', ['name', [], $blocks]); + $template->getAttribute($template1, 'displayBlock', ['name', [], $blocks]); + $template->getAttribute($template1, 'hasBlock', ['name', []]); + $template->getAttribute($template1, 'render', [[]]); + $template->getAttribute($template1, 'display', [[]]); - $this->assertFalse($template->getAttribute($template1, 'env', array(), Twig_Template::ANY_CALL, true)); - $this->assertFalse($template->getAttribute($template1, 'environment', array(), Twig_Template::ANY_CALL, true)); - $this->assertFalse($template->getAttribute($template1, 'getEnvironment', array(), Twig_Template::METHOD_CALL, true)); - $this->assertFalse($template->getAttribute($template1, 'displayWithErrorHandling', array(), Twig_Template::METHOD_CALL, true)); + $this->assertFalse($template->getAttribute($template1, 'env', [], Twig_Template::ANY_CALL, true)); + $this->assertFalse($template->getAttribute($template1, 'environment', [], Twig_Template::ANY_CALL, true)); + $this->assertFalse($template->getAttribute($template1, 'getEnvironment', [], Twig_Template::METHOD_CALL, true)); + $this->assertFalse($template->getAttribute($template1, 'displayWithErrorHandling', [], Twig_Template::METHOD_CALL, true)); } /** @@ -211,15 +211,15 @@ class Twig_Tests_TemplateTest extends \PHPUnit\Framework\TestCase $twig = new Twig_Environment($this->getMockBuilder('Twig_TemplateTestLoaderInterface')->getMock()); $template = new Twig_TemplateTest($twig, 'index.twig'); - $template->renderBlock('unknown', array()); - $template->displayBlock('unknown', array()); + $template->renderBlock('unknown', []); + $template->displayBlock('unknown', []); } public function testGetAttributeOnArrayWithConfusableKey() { $template = new Twig_TemplateTest(new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock())); - $array = array('Zero', 'One', -1 => 'MinusOne', '' => 'EmptyString', '1.5' => 'FloatButString', '01' => 'IntegerButStringWithLeadingZeros'); + $array = ['Zero', 'One', -1 => 'MinusOne', '' => 'EmptyString', '1.5' => 'FloatButString', '01' => 'IntegerButStringWithLeadingZeros']; $this->assertSame('Zero', $array[false]); $this->assertSame('One', $array[true]); @@ -255,7 +255,7 @@ class Twig_Tests_TemplateTest extends \PHPUnit\Framework\TestCase */ public function testGetAttributeStrict($defined, $value, $object, $item, $arguments, $type, $exceptionMessage = null) { - $template = new Twig_TemplateTest(new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), array('strict_variables' => true))); + $template = new Twig_TemplateTest(new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), ['strict_variables' => true])); if ($defined) { $this->assertEquals($value, $template->getAttribute($object, $item, $arguments, $type)); @@ -287,7 +287,7 @@ class Twig_Tests_TemplateTest extends \PHPUnit\Framework\TestCase */ public function testGetAttributeDefinedStrict($defined, $value, $object, $item, $arguments, $type) { - $template = new Twig_TemplateTest(new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), array('strict_variables' => true))); + $template = new Twig_TemplateTest(new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), ['strict_variables' => true])); $this->assertEquals($defined, $template->getAttribute($object, $item, $arguments, $type, true)); } @@ -303,7 +303,7 @@ class Twig_Tests_TemplateTest extends \PHPUnit\Framework\TestCase public function getGetAttributeTests() { - $array = array( + $array = [ 'defined' => 'defined', 'zero' => 0, 'null' => null, @@ -312,9 +312,10 @@ class Twig_Tests_TemplateTest extends \PHPUnit\Framework\TestCase 'baz' => 'baz', '09' => '09', '+4' => '+4', - ); + ]; $objectArray = new Twig_TemplateArrayAccessObject(); + $arrayObject = new ArrayObject($array); $stdObject = (object) $array; $magicPropertyObject = new Twig_TemplateMagicPropertyObject(); $propertyObject = new Twig_TemplatePropertyObject(); @@ -328,34 +329,35 @@ class Twig_Tests_TemplateTest extends \PHPUnit\Framework\TestCase $methodType = Twig_Template::METHOD_CALL; $arrayType = Twig_Template::ARRAY_CALL; - $basicTests = array( + $basicTests = [ // array(defined, value, property to fetch) - array(true, 'defined', 'defined'), - array(false, null, 'undefined'), - array(false, null, 'protected'), - array(true, 0, 'zero'), - array(true, 1, 1), - array(true, 1, 1.0), - array(true, null, 'null'), - array(true, true, 'bar'), - array(true, 'baz', 'baz'), - array(true, '09', '09'), - array(true, '+4', '+4'), - ); - $testObjects = array( + [true, 'defined', 'defined'], + [false, null, 'undefined'], + [false, null, 'protected'], + [true, 0, 'zero'], + [true, 1, 1], + [true, 1, 1.0], + [true, null, 'null'], + [true, true, 'bar'], + [true, 'baz', 'baz'], + [true, '09', '09'], + [true, '+4', '+4'], + ]; + $testObjects = [ // array(object, type of fetch) - array($array, $arrayType), - array($objectArray, $arrayType), - array($stdObject, $anyType), - array($magicPropertyObject, $anyType), - array($methodObject, $methodType), - array($methodObject, $anyType), - array($propertyObject, $anyType), - array($propertyObject1, $anyType), - array($propertyObject2, $anyType), - ); + [$array, $arrayType], + [$objectArray, $arrayType], + [$arrayObject, $anyType], + [$stdObject, $anyType], + [$magicPropertyObject, $anyType], + [$methodObject, $methodType], + [$methodObject, $anyType], + [$propertyObject, $anyType], + [$propertyObject1, $anyType], + [$propertyObject2, $anyType], + ]; - $tests = array(); + $tests = []; foreach ($testObjects as $testObject) { foreach ($basicTests as $test) { // properties cannot be numbers @@ -367,27 +369,27 @@ class Twig_Tests_TemplateTest extends \PHPUnit\Framework\TestCase continue; } - $tests[] = array($test[0], $test[1], $testObject[0], $test[2], array(), $testObject[1]); + $tests[] = [$test[0], $test[1], $testObject[0], $test[2], [], $testObject[1]]; } } // additional properties tests - $tests = array_merge($tests, array( - array(true, null, $propertyObject3, 'foo', array(), $anyType), - )); + $tests = array_merge($tests, [ + [true, null, $propertyObject3, 'foo', [], $anyType], + ]); // additional method tests - $tests = array_merge($tests, array( - array(true, 'defined', $methodObject, 'defined', array(), $methodType), - array(true, 'defined', $methodObject, 'DEFINED', array(), $methodType), - array(true, 'defined', $methodObject, 'getDefined', array(), $methodType), - array(true, 'defined', $methodObject, 'GETDEFINED', array(), $methodType), - array(true, 'static', $methodObject, 'static', array(), $methodType), - array(true, 'static', $methodObject, 'getStatic', array(), $methodType), + $tests = array_merge($tests, [ + [true, 'defined', $methodObject, 'defined', [], $methodType], + [true, 'defined', $methodObject, 'DEFINED', [], $methodType], + [true, 'defined', $methodObject, 'getDefined', [], $methodType], + [true, 'defined', $methodObject, 'GETDEFINED', [], $methodType], + [true, 'static', $methodObject, 'static', [], $methodType], + [true, 'static', $methodObject, 'getStatic', [], $methodType], - array(true, '__call_undefined', $magicMethodObject, 'undefined', array(), $methodType), - array(true, '__call_UNDEFINED', $magicMethodObject, 'UNDEFINED', array(), $methodType), - )); + [true, '__call_undefined', $magicMethodObject, 'undefined', [], $methodType], + [true, '__call_UNDEFINED', $magicMethodObject, 'UNDEFINED', [], $methodType], + ]); // add the same tests for the any type foreach ($tests as $test) { @@ -400,28 +402,33 @@ class Twig_Tests_TemplateTest extends \PHPUnit\Framework\TestCase $methodAndPropObject = new Twig_TemplateMethodAndPropObject(); // additional method tests - $tests = array_merge($tests, array( - array(true, 'a', $methodAndPropObject, 'a', array(), $anyType), - array(true, 'a', $methodAndPropObject, 'a', array(), $methodType), - array(false, null, $methodAndPropObject, 'a', array(), $arrayType), + $tests = array_merge($tests, [ + [true, 'a', $methodAndPropObject, 'a', [], $anyType], + [true, 'a', $methodAndPropObject, 'a', [], $methodType], + [false, null, $methodAndPropObject, 'a', [], $arrayType], - array(true, 'b_prop', $methodAndPropObject, 'b', array(), $anyType), - array(true, 'b', $methodAndPropObject, 'B', array(), $anyType), - array(true, 'b', $methodAndPropObject, 'b', array(), $methodType), - array(true, 'b', $methodAndPropObject, 'B', array(), $methodType), - array(false, null, $methodAndPropObject, 'b', array(), $arrayType), + [true, 'b_prop', $methodAndPropObject, 'b', [], $anyType], + [true, 'b', $methodAndPropObject, 'B', [], $anyType], + [true, 'b', $methodAndPropObject, 'b', [], $methodType], + [true, 'b', $methodAndPropObject, 'B', [], $methodType], + [false, null, $methodAndPropObject, 'b', [], $arrayType], - array(false, null, $methodAndPropObject, 'c', array(), $anyType), - array(false, null, $methodAndPropObject, 'c', array(), $methodType), - array(false, null, $methodAndPropObject, 'c', array(), $arrayType), - )); + [false, null, $methodAndPropObject, 'c', [], $anyType], + [false, null, $methodAndPropObject, 'c', [], $methodType], + [false, null, $methodAndPropObject, 'c', [], $arrayType], + ]); + + $arrayAccess = new Twig_TemplateArrayAccess(); + $tests = array_merge($tests, [ + [true, ['foo' => 'bar'], $arrayAccess, 'vars', [], $anyType], + ]); // tests when input is not an array or object - $tests = array_merge($tests, array( - array(false, null, 42, 'a', array(), $anyType, 'Impossible to access an attribute ("a") on a integer variable ("42") in "index.twig".'), - array(false, null, 'string', 'a', array(), $anyType, 'Impossible to access an attribute ("a") on a string variable ("string") in "index.twig".'), - array(false, null, array(), 'a', array(), $anyType, 'Key "a" does not exist as the array is empty in "index.twig".'), - )); + $tests = array_merge($tests, [ + [false, null, 42, 'a', [], $anyType, 'Impossible to access an attribute ("a") on a integer variable ("42") in "index.twig".'], + [false, null, 'string', 'a', [], $anyType, 'Impossible to access an attribute ("a") on a string variable ("string") in "index.twig".'], + [false, null, [], 'a', [], $anyType, 'Key "a" does not exist as the array is empty in "index.twig".'], + ]); return $tests; } @@ -432,7 +439,7 @@ class Twig_Tests_TemplateTest extends \PHPUnit\Framework\TestCase public function testGetIsMethods() { $getIsObject = new Twig_TemplateGetIsMethods(); - $template = new Twig_TemplateTest(new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), array('strict_variables' => true))); + $template = new Twig_TemplateTest(new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock(), ['strict_variables' => true])); // first time should not create a cache for "get" $this->assertNull($template->getAttribute($getIsObject, 'get')); // 0 should be in the method cache now, so this should fail @@ -447,7 +454,7 @@ class Twig_TemplateTest extends Twig_Template public function __construct(Twig_Environment $env, $name = 'index.twig') { parent::__construct($env); - self::$cache = array(); + self::$cache = []; $this->name = $name; } @@ -478,7 +485,7 @@ class Twig_TemplateTest extends Twig_Template public function getDebugInfo() { - return array(); + return []; } protected function doGetParent(array $context) @@ -486,11 +493,11 @@ class Twig_TemplateTest extends Twig_Template return false; } - protected function doDisplay(array $context, array $blocks = array()) + protected function doDisplay(array $context, array $blocks = []) { } - public function getAttribute($object, $item, array $arguments = array(), $type = Twig_Template::ANY_CALL, $isDefinedTest = false, $ignoreStrictCheck = false) + public function getAttribute($object, $item, array $arguments = [], $type = Twig_Template::ANY_CALL, $isDefinedTest = false, $ignoreStrictCheck = false) { if (function_exists('twig_template_get_attributes')) { return twig_template_get_attributes($this, $object, $item, $arguments, $type, $isDefinedTest, $ignoreStrictCheck); @@ -499,7 +506,7 @@ class Twig_TemplateTest extends Twig_Template } } - public function block_name($context, array $blocks = array()) + public function block_name($context, array $blocks = []) { } } @@ -508,7 +515,7 @@ class Twig_TemplateArrayAccessObject implements ArrayAccess { protected $protected = 'protected'; - public $attributes = array( + public $attributes = [ 'defined' => 'defined', 'zero' => 0, 'null' => null, @@ -517,7 +524,7 @@ class Twig_TemplateArrayAccessObject implements ArrayAccess 'baz' => 'baz', '09' => '09', '+4' => '+4', - ); + ]; public function offsetExists($name) { @@ -542,7 +549,7 @@ class Twig_TemplateMagicPropertyObject { public $defined = 'defined'; - public $attributes = array( + public $attributes = [ 'zero' => 0, 'null' => null, '1' => 1, @@ -550,7 +557,7 @@ class Twig_TemplateMagicPropertyObject 'baz' => 'baz', '09' => '09', '+4' => '+4', - ); + ]; protected $protected = 'protected'; @@ -588,19 +595,19 @@ class Twig_TemplatePropertyObjectAndIterator extends Twig_TemplatePropertyObject { public function getIterator() { - return new ArrayIterator(array('foo', 'bar')); + return new ArrayIterator(['foo', 'bar']); } } class Twig_TemplatePropertyObjectAndArrayAccess extends Twig_TemplatePropertyObject implements ArrayAccess { - private $data = array( + private $data = [ 'defined' => 'defined', 'zero' => 0, 'null' => null, 'bar' => true, 'baz' => 'baz', - ); + ]; public function offsetExists($offset) { @@ -718,6 +725,34 @@ class Twig_TemplateMethodAndPropObject } } +class Twig_TemplateArrayAccess implements ArrayAccess +{ + public $vars = [ + 'foo' => 'bar', + ]; + private $children = []; + + public function offsetExists($offset) + { + return array_key_exists($offset, $this->children); + } + + public function offsetGet($offset) + { + return $this->children[$offset]; + } + + public function offsetSet($offset, $value) + { + $this->children[$offset] = $value; + } + + public function offsetUnset($offset) + { + unset($this->children[$offset]); + } +} + class Twig_TemplateMagicMethodObject { public function __call($method, $arguments) diff --git a/vendor/twig/twig/test/Twig/Tests/TemplateWrapperTest.php b/vendor/twig/twig/test/Twig/Tests/TemplateWrapperTest.php index cc71052c4..0e7833ed1 100644 --- a/vendor/twig/twig/test/Twig/Tests/TemplateWrapperTest.php +++ b/vendor/twig/twig/test/Twig/Tests/TemplateWrapperTest.php @@ -12,52 +12,52 @@ class Twig_Tests_TemplateWrapperTest extends \PHPUnit\Framework\TestCase { public function testHasGetBlocks() { - $twig = new Twig_Environment(new Twig_Loader_Array(array( + $twig = new Twig_Environment(new Twig_Loader_Array([ 'index' => '{% block foo %}{% endblock %}', 'index_with_use' => '{% use "imported" %}{% block foo %}{% endblock %}', 'index_with_extends' => '{% extends "extended" %}{% block foo %}{% endblock %}', 'imported' => '{% block imported %}{% endblock %}', 'extended' => '{% block extended %}{% endblock %}', - ))); + ])); $wrapper = new Twig_TemplateWrapper($twig, $twig->loadTemplate('index')); $this->assertTrue($wrapper->hasBlock('foo')); $this->assertFalse($wrapper->hasBlock('bar')); - $this->assertEquals(array('foo'), $wrapper->getBlockNames()); + $this->assertEquals(['foo'], $wrapper->getBlockNames()); $wrapper = new Twig_TemplateWrapper($twig, $twig->loadTemplate('index_with_use')); $this->assertTrue($wrapper->hasBlock('foo')); $this->assertTrue($wrapper->hasBlock('imported')); - $this->assertEquals(array('imported', 'foo'), $wrapper->getBlockNames()); + $this->assertEquals(['imported', 'foo'], $wrapper->getBlockNames()); $wrapper = new Twig_TemplateWrapper($twig, $twig->loadTemplate('index_with_extends')); $this->assertTrue($wrapper->hasBlock('foo')); $this->assertTrue($wrapper->hasBlock('extended')); - $this->assertEquals(array('foo', 'extended'), $wrapper->getBlockNames()); + $this->assertEquals(['foo', 'extended'], $wrapper->getBlockNames()); } public function testRenderBlock() { - $twig = new Twig_Environment(new Twig_Loader_Array(array( + $twig = new Twig_Environment(new Twig_Loader_Array([ 'index' => '{% block foo %}{{ foo }}{{ bar }}{% endblock %}', - ))); + ])); $twig->addGlobal('bar', 'BAR'); $wrapper = new Twig_TemplateWrapper($twig, $twig->loadTemplate('index')); - $this->assertEquals('FOOBAR', $wrapper->renderBlock('foo', array('foo' => 'FOO'))); + $this->assertEquals('FOOBAR', $wrapper->renderBlock('foo', ['foo' => 'FOO'])); } public function testDisplayBlock() { - $twig = new Twig_Environment(new Twig_Loader_Array(array( + $twig = new Twig_Environment(new Twig_Loader_Array([ 'index' => '{% block foo %}{{ foo }}{{ bar }}{% endblock %}', - ))); + ])); $twig->addGlobal('bar', 'BAR'); $wrapper = new Twig_TemplateWrapper($twig, $twig->loadTemplate('index')); ob_start(); - $wrapper->displayBlock('foo', array('foo' => 'FOO')); + $wrapper->displayBlock('foo', ['foo' => 'FOO']); $this->assertEquals('FOOBAR', ob_get_clean()); } diff --git a/vendor/twig/twig/test/Twig/Tests/TokenStreamTest.php b/vendor/twig/twig/test/Twig/Tests/TokenStreamTest.php index f219c9554..59a80fceb 100644 --- a/vendor/twig/twig/test/Twig/Tests/TokenStreamTest.php +++ b/vendor/twig/twig/test/Twig/Tests/TokenStreamTest.php @@ -15,7 +15,7 @@ class Twig_Tests_TokenStreamTest extends \PHPUnit\Framework\TestCase protected function setUp() { - self::$tokens = array( + self::$tokens = [ new Twig_Token(Twig_Token::TEXT_TYPE, 1, 1), new Twig_Token(Twig_Token::TEXT_TYPE, 2, 1), new Twig_Token(Twig_Token::TEXT_TYPE, 3, 1), @@ -24,7 +24,7 @@ class Twig_Tests_TokenStreamTest extends \PHPUnit\Framework\TestCase new Twig_Token(Twig_Token::TEXT_TYPE, 6, 1), new Twig_Token(Twig_Token::TEXT_TYPE, 7, 1), new Twig_Token(Twig_Token::EOF_TYPE, 0, 1), - ); + ]; } /** @@ -32,7 +32,7 @@ class Twig_Tests_TokenStreamTest extends \PHPUnit\Framework\TestCase */ public function testLegacyConstructorSignature() { - $stream = new Twig_TokenStream(array(), 'foo', '{{ foo }}'); + $stream = new Twig_TokenStream([], 'foo', '{{ foo }}'); $this->assertEquals('foo', $stream->getFilename()); $this->assertEquals('{{ foo }}', $stream->getSource()); $this->assertEquals('foo', $stream->getSourceContext()->getName()); @@ -42,7 +42,7 @@ class Twig_Tests_TokenStreamTest extends \PHPUnit\Framework\TestCase public function testNext() { $stream = new Twig_TokenStream(self::$tokens); - $repr = array(); + $repr = []; while (!$stream->isEOF()) { $token = $stream->next(); @@ -57,9 +57,9 @@ class Twig_Tests_TokenStreamTest extends \PHPUnit\Framework\TestCase */ public function testEndOfTemplateNext() { - $stream = new Twig_TokenStream(array( + $stream = new Twig_TokenStream([ new Twig_Token(Twig_Token::BLOCK_START_TYPE, 1, 1), - )); + ]); while (!$stream->isEOF()) { $stream->next(); } @@ -71,9 +71,9 @@ class Twig_Tests_TokenStreamTest extends \PHPUnit\Framework\TestCase */ public function testEndOfTemplateLook() { - $stream = new Twig_TokenStream(array( + $stream = new Twig_TokenStream([ new Twig_Token(Twig_Token::BLOCK_START_TYPE, 1, 1), - )); + ]); while (!$stream->isEOF()) { $stream->look(); $stream->next(); diff --git a/vendor/twig/twig/test/Twig/Tests/Util/DeprecationCollectorTest.php b/vendor/twig/twig/test/Twig/Tests/Util/DeprecationCollectorTest.php index 887a90afa..8542560e2 100644 --- a/vendor/twig/twig/test/Twig/Tests/Util/DeprecationCollectorTest.php +++ b/vendor/twig/twig/test/Twig/Tests/Util/DeprecationCollectorTest.php @@ -17,12 +17,12 @@ class Twig_Tests_Util_DeprecationCollectorTest extends \PHPUnit\Framework\TestCa public function testCollect() { $twig = new Twig_Environment($this->getMockBuilder('Twig_LoaderInterface')->getMock()); - $twig->addFunction(new Twig_SimpleFunction('deprec', array($this, 'deprec'), array('deprecated' => true))); + $twig->addFunction(new Twig_SimpleFunction('deprec', [$this, 'deprec'], ['deprecated' => true])); $collector = new Twig_Util_DeprecationCollector($twig); $deprecations = $collector->collect(new Twig_Tests_Util_Iterator()); - $this->assertEquals(array('Twig Function "deprec" is deprecated in deprec.twig at line 1.'), $deprecations); + $this->assertEquals(['Twig Function "deprec" is deprecated in deprec.twig at line 1.'], $deprecations); } public function deprec() @@ -34,9 +34,9 @@ class Twig_Tests_Util_Iterator implements IteratorAggregate { public function getIterator() { - return new ArrayIterator(array( + return new ArrayIterator([ 'ok.twig' => '{{ foo }}', 'deprec.twig' => '{{ deprec("foo") }}', - )); + ]); } } diff --git a/vendor/twig/twig/test/Twig/Tests/escapingTest.php b/vendor/twig/twig/test/Twig/Tests/escapingTest.php index 80a108ab3..46a047008 100644 --- a/vendor/twig/twig/test/Twig/Tests/escapingTest.php +++ b/vendor/twig/twig/test/Twig/Tests/escapingTest.php @@ -11,18 +11,19 @@ class Twig_Test_EscapingTest extends \PHPUnit\Framework\TestCase /** * All character encodings supported by htmlspecialchars(). */ - protected $htmlSpecialChars = array( + protected $htmlSpecialChars = [ '\'' => ''', '"' => '"', '<' => '<', '>' => '>', '&' => '&', - ); + ]; - protected $htmlAttrSpecialChars = array( + protected $htmlAttrSpecialChars = [ '\'' => ''', /* Characters beyond ASCII value 255 to unicode escape */ 'Ā' => 'Ā', + '😀' => '😀', /* Immune chars excluded */ ',' => ',', '.' => '.', @@ -47,9 +48,9 @@ class Twig_Test_EscapingTest extends \PHPUnit\Framework\TestCase '"' => '"', /* Encode spaces for quoteless attribute protection */ ' ' => ' ', - ); + ]; - protected $jsSpecialChars = array( + protected $jsSpecialChars = [ /* HTML special chars - escape without exception to hex */ '<' => '\\u003C', '>' => '\\u003E', @@ -80,9 +81,9 @@ class Twig_Test_EscapingTest extends \PHPUnit\Framework\TestCase "\0" => '\\u0000', /* Encode spaces for quoteless attribute protection */ ' ' => '\\u0020', - ); + ]; - protected $urlSpecialChars = array( + protected $urlSpecialChars = [ /* HTML special chars - escape without exception to percent encoding */ '<' => '%3C', '>' => '%3E', @@ -115,9 +116,9 @@ class Twig_Test_EscapingTest extends \PHPUnit\Framework\TestCase ' ' => '%20', '~' => '~', '+' => '%2B', - ); + ]; - protected $cssSpecialChars = array( + protected $cssSpecialChars = [ /* HTML special chars - escape without exception to hex */ '<' => '\\3C ', '>' => '\\3E ', @@ -144,7 +145,7 @@ class Twig_Test_EscapingTest extends \PHPUnit\Framework\TestCase "\0" => '\\0 ', /* Encode spaces for quoteless attribute protection */ ' ' => '\\20 ', - ); + ]; protected $env; @@ -219,7 +220,7 @@ class Twig_Test_EscapingTest extends \PHPUnit\Framework\TestCase public function testUnicodeCodepointConversionToUtf8() { $expected = ' ~ޙ'; - $codepoints = array(0x20, 0x7e, 0x799); + $codepoints = [0x20, 0x7e, 0x799]; $result = ''; foreach ($codepoints as $value) { $result .= $this->codepointToUtf8($value); @@ -259,7 +260,7 @@ class Twig_Test_EscapingTest extends \PHPUnit\Framework\TestCase public function testJavascriptEscapingEscapesOwaspRecommendedRanges() { - $immune = array(',', '.', '_'); // Exceptions to escaping ranges + $immune = [',', '.', '_']; // Exceptions to escaping ranges for ($chr = 0; $chr < 0xFF; ++$chr) { if ($chr >= 0x30 && $chr <= 0x39 || $chr >= 0x41 && $chr <= 0x5A @@ -282,7 +283,7 @@ class Twig_Test_EscapingTest extends \PHPUnit\Framework\TestCase public function testHtmlAttributeEscapingEscapesOwaspRecommendedRanges() { - $immune = array(',', '.', '-', '_'); // Exceptions to escaping ranges + $immune = [',', '.', '-', '_']; // Exceptions to escaping ranges for ($chr = 0; $chr < 0xFF; ++$chr) { if ($chr >= 0x30 && $chr <= 0x39 || $chr >= 0x41 && $chr <= 0x5A diff --git a/vendor/consolidation/log/scenarios/symfony2/.gitignore b/vendor/typo3/phar-stream-wrapper/.gitignore similarity index 50% rename from vendor/consolidation/log/scenarios/symfony2/.gitignore rename to vendor/typo3/phar-stream-wrapper/.gitignore index 7579f7431..157ff0c59 100644 --- a/vendor/consolidation/log/scenarios/symfony2/.gitignore +++ b/vendor/typo3/phar-stream-wrapper/.gitignore @@ -1,2 +1,3 @@ -vendor +.idea +vendor/ composer.lock diff --git a/vendor/typo3/phar-stream-wrapper/LICENSE b/vendor/typo3/phar-stream-wrapper/LICENSE new file mode 100644 index 000000000..d71267a1a --- /dev/null +++ b/vendor/typo3/phar-stream-wrapper/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018 TYPO3 project - https://typo3.org/ + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/vendor/typo3/phar-stream-wrapper/README.md b/vendor/typo3/phar-stream-wrapper/README.md new file mode 100644 index 000000000..b632784bd --- /dev/null +++ b/vendor/typo3/phar-stream-wrapper/README.md @@ -0,0 +1,155 @@ +[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/TYPO3/phar-stream-wrapper/badges/quality-score.png?b=v2)](https://scrutinizer-ci.com/g/TYPO3/phar-stream-wrapper/?branch=v2) +[![Travis CI Build Status](https://travis-ci.org/TYPO3/phar-stream-wrapper.svg?branch=v2)](https://travis-ci.org/TYPO3/phar-stream-wrapper) + +# PHP Phar Stream Wrapper + +## Abstract & History + +Based on Sam Thomas' findings concerning +[insecure deserialization in combination with obfuscation strategies](https://blog.secarma.co.uk/labs/near-phar-dangerous-unserialization-wherever-you-are) +allowing to hide Phar files inside valid image resources, the TYPO3 project +decided back then to introduce a `PharStreamWrapper` to intercept invocations +of the `phar://` stream in PHP and only allow usage for defined locations in +the file system. + +Since the TYPO3 mission statement is **inspiring people to share**, we thought +it would be helpful for others to release our `PharStreamWrapper` as standalone +package to the PHP community. + +The mentioned security issue was reported to TYPO3 on 10th June 2018 by Sam Thomas +and has been addressed concerning the specific attack vector and for this generic +`PharStreamWrapper` in TYPO3 versions 7.6.30 LTS, 8.7.17 LTS and 9.3.1 on 12th +July 2018. + +* https://typo3.org/security/advisory/typo3-core-sa-2018-002/ +* https://blog.secarma.co.uk/labs/near-phar-dangerous-unserialization-wherever-you-are +* https://youtu.be/GePBmsNJw6Y + +## License + +In general the TYPO3 core is released under the GNU General Public License version +2 or any later version (`GPL-2.0-or-later`). In order to avoid licensing issues and +incompatibilities this `PharStreamWrapper` is licenced under the MIT License. In case +you duplicate or modify source code, credits are not required but really appreciated. + +## Credits + +Thanks to [Alex Pott](https://github.com/alexpott), Drupal for creating +back-ports of all sources in order to provide compatibility with PHP v5.3. + +## Installation + +The `PharStreamWrapper` is provided as composer package `typo3/phar-stream-wrapper` +and has minimum requirements of PHP v5.3 ([`v2`](https://github.com/TYPO3/phar-stream-wrapper/tree/v2) branch) and PHP v7.0 ([`master`](https://github.com/TYPO3/phar-stream-wrapper) branch). + +### Installation for PHP v7.0 + +``` +composer require typo3/phar-stream-wrapper ^3.0 +``` + +### Installation for PHP v5.3 + +``` +composer require typo3/phar-stream-wrapper ^2.0 +``` + +## Example + +The following example is bundled within this package, the shown +`PharExtensionInterceptor` denies all stream wrapper invocations files +not having the `.phar` suffix. Interceptor logic has to be individual and +adjusted to according requirements. + +``` +$behavior = new \TYPO3\PharStreamWrapper\Behavior(); +Manager::initialize( + $behavior->withAssertion(new PharExtensionInterceptor()) +); + +if (in_array('phar', stream_get_wrappers())) { + stream_wrapper_unregister('phar'); + stream_wrapper_register('phar', 'TYPO3\\PharStreamWrapper\\PharStreamWrapper'); +} +``` + +* `PharStreamWrapper` defined as class reference will be instantiated each time + `phar://` streams shall be processed. +* `Manager` as singleton pattern being called by `PharStreamWrapper` instances + in order to retrieve individual behavior and settings. +* `Behavior` holds reference to interceptor(s) that shall assert correct/allowed + invocation of a given `$path` for a given `$command`. Interceptors implement + the interface `Assertable`. Interceptors can act individually on following + commands or handle all of them in case not defined specifically: + + `COMMAND_DIR_OPENDIR` + + `COMMAND_MKDIR` + + `COMMAND_RENAME` + + `COMMAND_RMDIR` + + `COMMAND_STEAM_METADATA` + + `COMMAND_STREAM_OPEN` + + `COMMAND_UNLINK` + + `COMMAND_URL_STAT` + +## Interceptor + +The following interceptor is shipped with the package and ready to use in order +to block any Phar invocation of files not having a `.phar` suffix. Besides that +individual interceptors are possible of course. + +``` +class PharExtensionInterceptor implements Assertable +{ + /** + * Determines whether the base file name has a ".phar" suffix. + * + * @param string $path + * @param string $command + * @return bool + * @throws Exception + */ + public function assert($path, $command) + { + if ($this->baseFileContainsPharExtension($path)) { + return true; + } + throw new Exception( + sprintf( + 'Unexpected file extension in "%s"', + $path + ), + 1535198703 + ); + } + + /** + * @param string $path + * @return bool + */ + private function baseFileContainsPharExtension($path) + { + $baseFile = Helper::determineBaseFile($path); + if ($baseFile === null) { + return false; + } + $fileExtension = pathinfo($baseFile, PATHINFO_EXTENSION); + return strtolower($fileExtension) === 'phar'; + } +} +``` + +## Helper + +* `Helper::determineBaseFile(string $path)`: Determines base file that can be + accessed using the regular file system. For instance the following path + `phar:///home/user/bundle.phar/content.txt` would be resolved to + `/home/user/bundle.phar`. +* `Helper::resetOpCache()`: Resets PHP's OPcache if enabled as work-around for + issues in `include()` or `require()` calls and OPcache delivering wrong + results. More details can be found in PHP's bug tracker, for instance like + https://bugs.php.net/bug.php?id=66569 + +## Security Contact + +In case of finding additional security issues in the TYPO3 project or in this +`PharStreamWrapper` package in particular, please get in touch with the +[TYPO3 Security Team](mailto:security@typo3.org). diff --git a/vendor/typo3/phar-stream-wrapper/composer.json b/vendor/typo3/phar-stream-wrapper/composer.json new file mode 100644 index 000000000..d308f8c87 --- /dev/null +++ b/vendor/typo3/phar-stream-wrapper/composer.json @@ -0,0 +1,24 @@ +{ + "name": "typo3/phar-stream-wrapper", + "description": "Interceptors for PHP's native phar:// stream handling", + "type": "library", + "license": "MIT", + "homepage": "https://typo3.org/", + "keywords": ["php", "phar", "stream-wrapper", "security"], + "require": { + "php": "^5.3.3|^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.36" + }, + "autoload": { + "psr-4": { + "TYPO3\\PharStreamWrapper\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "TYPO3\\PharStreamWrapper\\Tests\\": "tests/" + } + } +} diff --git a/vendor/typo3/phar-stream-wrapper/src/Assertable.php b/vendor/typo3/phar-stream-wrapper/src/Assertable.php new file mode 100644 index 000000000..a21b1da2a --- /dev/null +++ b/vendor/typo3/phar-stream-wrapper/src/Assertable.php @@ -0,0 +1,22 @@ +assertCommands($commands); + $commands = $commands ?: $this->availableCommands; + + $target = clone $this; + foreach ($commands as $command) { + $target->assertions[$command] = $assertable; + } + return $target; + } + + /** + * @param string $path + * @param string $command + * @return bool + */ + public function assert($path, $command) + { + $this->assertCommand($command); + $this->assertAssertionCompleteness(); + + return $this->assertions[$command]->assert($path, $command); + } + + /** + * @param array $commands + */ + private function assertCommands(array $commands) + { + $unknownCommands = array_diff($commands, $this->availableCommands); + if (empty($unknownCommands)) { + return; + } + throw new \LogicException( + sprintf( + 'Unknown commands: %s', + implode(', ', $unknownCommands) + ), + 1535189881 + ); + } + + private function assertCommand($command) + { + if (in_array($command, $this->availableCommands, true)) { + return; + } + throw new \LogicException( + sprintf( + 'Unknown command "%s"', + $command + ), + 1535189882 + ); + } + + private function assertAssertionCompleteness() + { + $undefinedAssertions = array_diff( + $this->availableCommands, + array_keys($this->assertions) + ); + if (empty($undefinedAssertions)) { + return; + } + throw new \LogicException( + sprintf( + 'Missing assertions for commands: %s', + implode(', ', $undefinedAssertions) + ), + 1535189883 + ); + } +} diff --git a/vendor/typo3/phar-stream-wrapper/src/Exception.php b/vendor/typo3/phar-stream-wrapper/src/Exception.php new file mode 100644 index 000000000..690121a99 --- /dev/null +++ b/vendor/typo3/phar-stream-wrapper/src/Exception.php @@ -0,0 +1,16 @@ += 1) { + // Rremove this and previous element + array_splice($pathParts, $partCount - 1, 2); + $partCount -= 2; + $pathPartsLength -= 2; + } elseif ($absolutePathPrefix) { + // can't go higher than root dir + // simply remove this part and continue + array_splice($pathParts, $partCount, 1); + $partCount--; + $pathPartsLength--; + } + } + } + + return $absolutePathPrefix . implode('/', $pathParts); + } + + /** + * Checks if the $path is absolute or relative (detecting either '/' or + * 'x:/' as first part of string) and returns TRUE if so. + * + * @param string $path File path to evaluate + * @return bool + */ + private static function isAbsolutePath($path) + { + // Path starting with a / is always absolute, on every system + // On Windows also a path starting with a drive letter is absolute: X:/ + return (isset($path[0]) ? $path[0] : null) === '/' + || static::isWindows() && ( + strpos($path, ':/') === 1 + || strpos($path, ':\\') === 1 + ); + } + + /** + * @return bool + */ + private static function isWindows() + { + return stripos(PHP_OS, 'WIN') === 0; + } +} \ No newline at end of file diff --git a/vendor/typo3/phar-stream-wrapper/src/Interceptor/PharExtensionInterceptor.php b/vendor/typo3/phar-stream-wrapper/src/Interceptor/PharExtensionInterceptor.php new file mode 100644 index 000000000..db500afc8 --- /dev/null +++ b/vendor/typo3/phar-stream-wrapper/src/Interceptor/PharExtensionInterceptor.php @@ -0,0 +1,55 @@ +baseFileContainsPharExtension($path)) { + return true; + } + throw new Exception( + sprintf( + 'Unexpected file extension in "%s"', + $path + ), + 1535198703 + ); + } + + /** + * @param string $path + * @return bool + */ + private function baseFileContainsPharExtension($path) + { + $baseFile = Helper::determineBaseFile($path); + if ($baseFile === null) { + return false; + } + $fileExtension = pathinfo($baseFile, PATHINFO_EXTENSION); + return strtolower($fileExtension) === 'phar'; + } +} diff --git a/vendor/typo3/phar-stream-wrapper/src/Manager.php b/vendor/typo3/phar-stream-wrapper/src/Manager.php new file mode 100644 index 000000000..1eb9735d9 --- /dev/null +++ b/vendor/typo3/phar-stream-wrapper/src/Manager.php @@ -0,0 +1,85 @@ +behavior = $behaviour; + } + + /** + * @param string $path + * @param string $command + * @return bool + */ + public function assert($path, $command) + { + return $this->behavior->assert($path, $command); + } +} diff --git a/vendor/typo3/phar-stream-wrapper/src/PharStreamWrapper.php b/vendor/typo3/phar-stream-wrapper/src/PharStreamWrapper.php new file mode 100644 index 000000000..5a924e4cc --- /dev/null +++ b/vendor/typo3/phar-stream-wrapper/src/PharStreamWrapper.php @@ -0,0 +1,477 @@ +internalResource)) { + return false; + } + + $this->invokeInternalStreamWrapper( + 'closedir', + $this->internalResource + ); + return !is_resource($this->internalResource); + } + + /** + * @param string $path + * @param int $options + * @return bool + */ + public function dir_opendir($path, $options) + { + $this->assert($path, Behavior::COMMAND_DIR_OPENDIR); + $this->internalResource = $this->invokeInternalStreamWrapper( + 'opendir', + $path, + $this->context + ); + return is_resource($this->internalResource); + } + + /** + * @return string|false + */ + public function dir_readdir() + { + return $this->invokeInternalStreamWrapper( + 'readdir', + $this->internalResource + ); + } + + /** + * @return bool + */ + public function dir_rewinddir() + { + if (!is_resource($this->internalResource)) { + return false; + } + + $this->invokeInternalStreamWrapper( + 'rewinddir', + $this->internalResource + ); + return is_resource($this->internalResource); + } + + /** + * @param string $path + * @param int $mode + * @param int $options + * @return bool + */ + public function mkdir($path, $mode, $options) + { + $this->assert($path, Behavior::COMMAND_MKDIR); + return $this->invokeInternalStreamWrapper( + 'mkdir', + $path, + $mode, + (bool) ($options & STREAM_MKDIR_RECURSIVE), + $this->context + ); + } + + /** + * @param string $path_from + * @param string $path_to + * @return bool + */ + public function rename($path_from, $path_to) + { + $this->assert($path_from, Behavior::COMMAND_RENAME); + $this->assert($path_to, Behavior::COMMAND_RENAME); + return $this->invokeInternalStreamWrapper( + 'rename', + $path_from, + $path_to, + $this->context + ); + } + + /** + * @param string $path + * @param int $options + * @return bool + */ + public function rmdir($path, $options) + { + $this->assert($path, Behavior::COMMAND_RMDIR); + return $this->invokeInternalStreamWrapper( + 'rmdir', + $path, + $this->context + ); + } + + /** + * @param int $cast_as + */ + public function stream_cast($cast_as) + { + throw new Exception( + 'Method stream_select() cannot be used', + 1530103999 + ); + } + + public function stream_close() + { + $this->invokeInternalStreamWrapper( + 'fclose', + $this->internalResource + ); + } + + /** + * @return bool + */ + public function stream_eof() + { + return $this->invokeInternalStreamWrapper( + 'feof', + $this->internalResource + ); + } + + /** + * @return bool + */ + public function stream_flush() + { + return $this->invokeInternalStreamWrapper( + 'fflush', + $this->internalResource + ); + } + + /** + * @param int $operation + * @return bool + */ + public function stream_lock($operation) + { + return $this->invokeInternalStreamWrapper( + 'flock', + $this->internalResource, + $operation + ); + } + + /** + * @param string $path + * @param int $option + * @param string|int $value + * @return bool + */ + public function stream_metadata($path, $option, $value) + { + $this->assert($path, Behavior::COMMAND_STEAM_METADATA); + if ($option === STREAM_META_TOUCH) { + return call_user_func_array( + array($this, 'invokeInternalStreamWrapper'), + array_merge(array('touch', $path), (array) $value) + ); + } + if ($option === STREAM_META_OWNER_NAME || $option === STREAM_META_OWNER) { + return $this->invokeInternalStreamWrapper( + 'chown', + $path, + $value + ); + } + if ($option === STREAM_META_GROUP_NAME || $option === STREAM_META_GROUP) { + return $this->invokeInternalStreamWrapper( + 'chgrp', + $path, + $value + ); + } + if ($option === STREAM_META_ACCESS) { + return $this->invokeInternalStreamWrapper( + 'chmod', + $path, + $value + ); + } + return false; + } + + /** + * @param string $path + * @param string $mode + * @param int $options + * @param string|null $opened_path + * @return bool + */ + public function stream_open( + $path, + $mode, + $options, + &$opened_path = null + ) { + $this->assert($path, Behavior::COMMAND_STREAM_OPEN); + $arguments = array($path, $mode, (bool) ($options & STREAM_USE_PATH)); + // only add stream context for non include/require calls + if (!($options & static::STREAM_OPEN_FOR_INCLUDE)) { + $arguments[] = $this->context; + // work around https://bugs.php.net/bug.php?id=66569 + // for including files from Phar stream with OPcache enabled + } else { + Helper::resetOpCache(); + } + $this->internalResource = call_user_func_array( + array($this, 'invokeInternalStreamWrapper'), + array_merge(array('fopen'), $arguments) + ); + if (!is_resource($this->internalResource)) { + return false; + } + if ($opened_path !== null) { + $metaData = stream_get_meta_data($this->internalResource); + $opened_path = $metaData['uri']; + } + return true; + } + + /** + * @param int $count + * @return string + */ + public function stream_read($count) + { + return $this->invokeInternalStreamWrapper( + 'fread', + $this->internalResource, + $count + ); + } + + /** + * @param int $offset + * @param int $whence + * @return bool + */ + public function stream_seek($offset, $whence = SEEK_SET) + { + return $this->invokeInternalStreamWrapper( + 'fseek', + $this->internalResource, + $offset, + $whence + ) !== -1; + } + + /** + * @param int $option + * @param int $arg1 + * @param int $arg2 + * @return bool + */ + public function stream_set_option($option, $arg1, $arg2) + { + if ($option === STREAM_OPTION_BLOCKING) { + return $this->invokeInternalStreamWrapper( + 'stream_set_blocking', + $this->internalResource, + $arg1 + ); + } + if ($option === STREAM_OPTION_READ_TIMEOUT) { + return $this->invokeInternalStreamWrapper( + 'stream_set_timeout', + $this->internalResource, + $arg1, + $arg2 + ); + } + if ($option === STREAM_OPTION_WRITE_BUFFER) { + return $this->invokeInternalStreamWrapper( + 'stream_set_write_buffer', + $this->internalResource, + $arg2 + ) === 0; + } + return false; + } + + /** + * @return array + */ + public function stream_stat() + { + return $this->invokeInternalStreamWrapper( + 'fstat', + $this->internalResource + ); + } + + /** + * @return int + */ + public function stream_tell() + { + return $this->invokeInternalStreamWrapper( + 'ftell', + $this->internalResource + ); + } + + /** + * @param int $new_size + * @return bool + */ + public function stream_truncate($new_size) + { + return $this->invokeInternalStreamWrapper( + 'ftruncate', + $this->internalResource, + $new_size + ); + } + + /** + * @param string $data + * @return int + */ + public function stream_write($data) + { + return $this->invokeInternalStreamWrapper( + 'fwrite', + $this->internalResource, + $data + ); + } + + /** + * @param string $path + * @return bool + */ + public function unlink($path) + { + $this->assert($path, Behavior::COMMAND_UNLINK); + return $this->invokeInternalStreamWrapper( + 'unlink', + $path, + $this->context + ); + } + + /** + * @param string $path + * @param int $flags + * @return array|false + */ + public function url_stat($path, $flags) + { + $this->assert($path, Behavior::COMMAND_URL_STAT); + $functionName = $flags & STREAM_URL_STAT_QUIET ? '@stat' : 'stat'; + return $this->invokeInternalStreamWrapper($functionName, $path); + } + + /** + * @param string $path + * @param string $command + */ + protected function assert($path, $command) + { + if ($this->resolveAssertable()->assert($path, $command) === true) { + return; + } + + throw new Exception( + sprintf( + 'Denied invocation of "%s" for command "%s"', + $path, + $command + ), + 1535189880 + ); + } + + /** + * @return Assertable + */ + protected function resolveAssertable() + { + return Manager::instance(); + } + + /** + * Invokes commands on the native PHP Phar stream wrapper. + * + * @param string $functionName + * @param mixed ...$arguments + * @return mixed + */ + private function invokeInternalStreamWrapper($functionName) + { + $arguments = func_get_args(); + array_shift($arguments); + $silentExecution = $functionName{0} === '@'; + $functionName = ltrim($functionName, '@'); + $this->restoreInternalSteamWrapper(); + + try { + if ($silentExecution) { + $result = @call_user_func_array($functionName, $arguments); + } else { + $result = call_user_func_array($functionName, $arguments); + } + } catch (\Exception $exception) { + $this->registerStreamWrapper(); + throw $exception; + } catch (\Throwable $throwable) { + $this->registerStreamWrapper(); + throw $throwable; + } + + $this->registerStreamWrapper(); + return $result; + } + + private function restoreInternalSteamWrapper() + { + stream_wrapper_restore('phar'); + } + + private function registerStreamWrapper() + { + stream_wrapper_unregister('phar'); + stream_wrapper_register('phar', get_class($this)); + } +} diff --git a/vendor/vlucas/phpdotenv/src/Loader.php b/vendor/vlucas/phpdotenv/src/Loader.php index cb3508fac..f0dc8b9bc 100644 --- a/vendor/vlucas/phpdotenv/src/Loader.php +++ b/vendor/vlucas/phpdotenv/src/Loader.php @@ -374,7 +374,7 @@ class Loader // If PHP is running as an Apache module and an existing // Apache environment variable exists, overwrite it - if (function_exists('apache_getenv') && function_exists('apache_setenv') && apache_getenv($name)) { + if (function_exists('apache_getenv') && function_exists('apache_setenv') && apache_getenv($name) !== false) { apache_setenv($name, $value); } diff --git a/vendor/webmozart/assert/.composer-auth.json b/vendor/webmozart/assert/.composer-auth.json deleted file mode 100644 index eea80018f..000000000 --- a/vendor/webmozart/assert/.composer-auth.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "github-oauth": { - "github.com": "PLEASE DO NOT USE THIS TOKEN IN YOUR OWN PROJECTS/FORKS", - "github.com": "This token is reserved for testing the webmozart/* repositories", - "github.com": "a9debbffdd953ee9b3b82dbc3b807cde2086bb86" - } -} diff --git a/vendor/webmozart/assert/.styleci.yml b/vendor/webmozart/assert/.styleci.yml deleted file mode 100644 index c2ad4a57d..000000000 --- a/vendor/webmozart/assert/.styleci.yml +++ /dev/null @@ -1,11 +0,0 @@ -preset: symfony - -finder: - exclude: - - "tests" - -enabled: - - ordered_use - -disabled: - - phpdoc_annotation_without_dot # This is still buggy: https://github.com/symfony/symfony/pull/19198 diff --git a/vendor/webmozart/assert/CHANGELOG.md b/vendor/webmozart/assert/CHANGELOG.md index 65fbc8f7a..da4fb3fea 100644 --- a/vendor/webmozart/assert/CHANGELOG.md +++ b/vendor/webmozart/assert/CHANGELOG.md @@ -3,6 +3,25 @@ Changelog ## UNRELEASED +## 1.4.0 (2018-12-25) + +### Added + +* added `Assert::ip()` +* added `Assert::ipv4()` +* added `Assert::ipv6()` +* added `Assert::notRegex()` +* added `Assert::interfaceExists()` +* added `Assert::isList()` +* added `Assert::isMap()` +* added polyfill for ctype + +### Fixed + +* Special case when comparing objects implementing `__toString()` + +## 1.3.0 (2018-01-29) + ### Added * added `Assert::minCount()` @@ -20,6 +39,10 @@ Changelog * `stringNotEmpty` will no longer report "0" is an empty string +### Deprecation + +* deprecated `Assert::isTraversable()` in favor of `Assert::isIterable()` + ## 1.2.0 (2016-11-23) * added `Assert::throws()` diff --git a/vendor/webmozart/assert/README.md b/vendor/webmozart/assert/README.md index 1c1ede7dd..ce7ba59de 100644 --- a/vendor/webmozart/assert/README.md +++ b/vendor/webmozart/assert/README.md @@ -5,7 +5,6 @@ Webmozart Assert [![Build status](https://ci.appveyor.com/api/projects/status/lyg83bcsisrr94se/branch/master?svg=true)](https://ci.appveyor.com/project/webmozart/assert/branch/master) [![Latest Stable Version](https://poser.pugx.org/webmozart/assert/v/stable.svg)](https://packagist.org/packages/webmozart/assert) [![Total Downloads](https://poser.pugx.org/webmozart/assert/downloads.svg)](https://packagist.org/packages/webmozart/assert) -[![Dependency Status](https://www.versioneye.com/php/webmozart:assert/1.2.0/badge.svg)](https://www.versioneye.com/php/webmozart:assert/1.2.0) Latest release: [1.2.0](https://packagist.org/packages/webmozart/assert#1.2.0) @@ -146,6 +145,7 @@ Method | Description `startsWithLetter($value, $message = '')` | Check that a string starts with a letter `endsWith($value, $suffix, $message = '')` | Check that a string has a suffix `regex($value, $pattern, $message = '')` | Check that a string matches a regular expression +`notRegex($value, $pattern, $message = '')` | Check that a string does not match a regular expression `alpha($value, $message = '')` | Check that a string contains letters only `digits($value, $message = '')` | Check that a string contains digits only `alnum($value, $message = '')` | Check that a string contains letters and digits only @@ -156,6 +156,9 @@ Method | Description `maxLength($value, $max, $message = '')` | Check that a string has at most a certain number of characters `lengthBetween($value, $min, $max, $message = '')` | Check that a string has a length in the given range `uuid($value, $message = '')` | Check that a string is a valid UUID +`ip($value, $message = '')` | Check that a string is a valid IP (either IPv4 or IPv6) +`ipv4($value, $message = '')` | Check that a string is a valid IPv4 +`ipv6($value, $message = '')` | Check that a string is a valid IPv6 `notWhitespaceOnly($value, $message = '')` | Check that a string contains at least one non-whitespace character ### File Assertions @@ -174,6 +177,7 @@ Method | Description ----------------------------------------------------- | -------------------------------------------------- `classExists($value, $message = '')` | Check that a value is an existing class name `subclassOf($value, $class, $message = '')` | Check that a class is a subclass of another +`interfaceExists($value, $message = '')` | Check that a value is an existing interface name `implementsInterface($value, $class, $message = '')` | Check that a class implements an interface `propertyExists($value, $property, $message = '')` | Check that a property exists in a class/object `propertyNotExists($value, $property, $message = '')` | Check that a property does not exist in a class/object @@ -190,6 +194,8 @@ Method | Description `minCount($array, $min, $message = '')` | Check that an array contains at least a certain number of elements `maxCount($array, $max, $message = '')` | Check that an array contains at most a certain number of elements `countBetween($array, $min, $max, $message = '')` | Check that an array has a count in the given range +`isList($array, $message = '')` | Check that an array is a non-associative list +`isMap($array, $message = '')` | Check that an array is associative and has strings as keys ### Function Assertions diff --git a/vendor/webmozart/assert/composer.json b/vendor/webmozart/assert/composer.json index c49e623a3..b6002ef35 100644 --- a/vendor/webmozart/assert/composer.json +++ b/vendor/webmozart/assert/composer.json @@ -1,7 +1,11 @@ { "name": "webmozart/assert", "description": "Assertions to validate method input/output with nice error messages.", - "keywords": ["assert", "check", "validate"], + "keywords": [ + "assert", + "check", + "validate" + ], "license": "MIT", "authors": [ { @@ -10,12 +14,18 @@ } ], "require": { - "php": "^5.3.3 || ^7.0" + "php": "^5.3.3 || ^7.0", + "symfony/polyfill-ctype": "^1.8" }, "require-dev": { "phpunit/phpunit": "^4.6", "sebastian/version": "^1.0.1" }, + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, "autoload": { "psr-4": { "Webmozart\\Assert\\": "src/" @@ -25,10 +35,5 @@ "psr-4": { "Webmozart\\Assert\\Tests\\": "tests/" } - }, - "extra": { - "branch-alias": { - "dev-master": "1.3-dev" - } } } diff --git a/vendor/webmozart/assert/src/Assert.php b/vendor/webmozart/assert/src/Assert.php index e2f89c0b0..db04bfbef 100644 --- a/vendor/webmozart/assert/src/Assert.php +++ b/vendor/webmozart/assert/src/Assert.php @@ -29,6 +29,7 @@ use Traversable; * @method static void nullOrIntegerish($value, $message = '') * @method static void nullOrFloat($value, $message = '') * @method static void nullOrNumeric($value, $message = '') + * @method static void nullOrNatural($value, $message = '') * @method static void nullOrBoolean($value, $message = '') * @method static void nullOrScalar($value, $message = '') * @method static void nullOrObject($value, $message = '') @@ -38,6 +39,7 @@ use Traversable; * @method static void nullOrIsTraversable($value, $message = '') * @method static void nullOrIsArrayAccessible($value, $message = '') * @method static void nullOrIsCountable($value, $message = '') + * @method static void nullOrIsIterable($value, $message = '') * @method static void nullOrIsInstanceOf($value, $class, $message = '') * @method static void nullOrNotInstanceOf($value, $class, $message = '') * @method static void nullOrIsInstanceOfAny($value, $classes, $message = '') @@ -45,6 +47,9 @@ use Traversable; * @method static void nullOrNotEmpty($value, $message = '') * @method static void nullOrTrue($value, $message = '') * @method static void nullOrFalse($value, $message = '') + * @method static void nullOrIp($value, $message = '') + * @method static void nullOrIpv4($value, $message = '') + * @method static void nullOrIpv6($value, $message = '') * @method static void nullOrEq($value, $value2, $message = '') * @method static void nullOrNotEq($value,$value2, $message = '') * @method static void nullOrSame($value, $value2, $message = '') @@ -62,6 +67,7 @@ use Traversable; * @method static void nullOrStartsWithLetter($value, $message = '') * @method static void nullOrEndsWith($value, $suffix, $message = '') * @method static void nullOrRegex($value, $pattern, $message = '') + * @method static void nullOrNotRegex($value, $pattern, $message = '') * @method static void nullOrAlpha($value, $message = '') * @method static void nullOrDigits($value, $message = '') * @method static void nullOrAlnum($value, $message = '') @@ -78,6 +84,7 @@ use Traversable; * @method static void nullOrWritable($value, $message = '') * @method static void nullOrClassExists($value, $message = '') * @method static void nullOrSubclassOf($value, $class, $message = '') + * @method static void nullOrInterfaceExists($value, $message = '') * @method static void nullOrImplementsInterface($value, $interface, $message = '') * @method static void nullOrPropertyExists($value, $property, $message = '') * @method static void nullOrPropertyNotExists($value, $property, $message = '') @@ -88,14 +95,18 @@ use Traversable; * @method static void nullOrCount($value, $key, $message = '') * @method static void nullOrMinCount($value, $min, $message = '') * @method static void nullOrMaxCount($value, $max, $message = '') - * @method static void nullCountBetween($value, $min, $max, $message = '') + * @method static void nullOrIsList($value, $message = '') + * @method static void nullOrIsMap($value, $message = '') + * @method static void nullOrCountBetween($value, $min, $max, $message = '') * @method static void nullOrUuid($values, $message = '') + * @method static void nullOrThrows($expression, $class = 'Exception', $message = '') * @method static void allString($values, $message = '') * @method static void allStringNotEmpty($values, $message = '') * @method static void allInteger($values, $message = '') * @method static void allIntegerish($values, $message = '') * @method static void allFloat($values, $message = '') * @method static void allNumeric($values, $message = '') + * @method static void allNatural($values, $message = '') * @method static void allBoolean($values, $message = '') * @method static void allScalar($values, $message = '') * @method static void allObject($values, $message = '') @@ -105,6 +116,7 @@ use Traversable; * @method static void allIsTraversable($values, $message = '') * @method static void allIsArrayAccessible($values, $message = '') * @method static void allIsCountable($values, $message = '') + * @method static void allIsIterable($values, $message = '') * @method static void allIsInstanceOf($values, $class, $message = '') * @method static void allNotInstanceOf($values, $class, $message = '') * @method static void allIsInstanceOfAny($values, $classes, $message = '') @@ -114,6 +126,9 @@ use Traversable; * @method static void allNotEmpty($values, $message = '') * @method static void allTrue($values, $message = '') * @method static void allFalse($values, $message = '') + * @method static void allIp($values, $message = '') + * @method static void allIpv4($values, $message = '') + * @method static void allIpv6($values, $message = '') * @method static void allEq($values, $value2, $message = '') * @method static void allNotEq($values,$value2, $message = '') * @method static void allSame($values, $value2, $message = '') @@ -131,6 +146,7 @@ use Traversable; * @method static void allStartsWithLetter($values, $message = '') * @method static void allEndsWith($values, $suffix, $message = '') * @method static void allRegex($values, $pattern, $message = '') + * @method static void allNotRegex($values, $pattern, $message = '') * @method static void allAlpha($values, $message = '') * @method static void allDigits($values, $message = '') * @method static void allAlnum($values, $message = '') @@ -147,6 +163,7 @@ use Traversable; * @method static void allWritable($values, $message = '') * @method static void allClassExists($values, $message = '') * @method static void allSubclassOf($values, $class, $message = '') + * @method static void allInterfaceExists($values, $message = '') * @method static void allImplementsInterface($values, $interface, $message = '') * @method static void allPropertyExists($values, $property, $message = '') * @method static void allPropertyNotExists($values, $property, $message = '') @@ -158,7 +175,10 @@ use Traversable; * @method static void allMinCount($values, $min, $message = '') * @method static void allMaxCount($values, $max, $message = '') * @method static void allCountBetween($values, $min, $max, $message = '') + * @method static void allIsList($values, $message = '') + * @method static void allIsMap($values, $message = '') * @method static void allUuid($values, $message = '') + * @method static void allThrows($expressions, $class = 'Exception', $message = '') * * @since 1.0 * @@ -444,6 +464,36 @@ class Assert } } + public static function ip($value, $message = '') + { + if (false === filter_var($value, FILTER_VALIDATE_IP)) { + static::reportInvalidArgument(sprintf( + $message ?: 'Expected a value to be an IP. Got: %s', + static::valueToString($value) + )); + } + } + + public static function ipv4($value, $message = '') + { + if (false === filter_var($value, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) { + static::reportInvalidArgument(sprintf( + $message ?: 'Expected a value to be an IPv4. Got: %s', + static::valueToString($value) + )); + } + } + + public static function ipv6($value, $message = '') + { + if (false === filter_var($value, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) { + static::reportInvalidArgument(sprintf( + $message ?: 'Expected a value to be an IPv6. Got %s', + static::valueToString($value) + )); + } + } + public static function eq($value, $value2, $message = '') { if ($value2 != $value) { @@ -636,6 +686,18 @@ class Assert } } + public static function notRegex($value, $pattern, $message = '') + { + if (preg_match($pattern, $value, $matches, PREG_OFFSET_CAPTURE)) { + static::reportInvalidArgument(sprintf( + $message ?: 'The value %s matches the pattern %s (at offset %d).', + static::valueToString($value), + static::valueToString($pattern), + $matches[0][1] + )); + } + } + public static function alpha($value, $message = '') { $locale = setlocale(LC_CTYPE, 0); @@ -835,6 +897,16 @@ class Assert } } + public static function interfaceExists($value, $message = '') + { + if (!interface_exists($value)) { + static::reportInvalidArgument(sprintf( + $message ?: 'Expected an existing interface name. got %s', + static::valueToString($value) + )); + } + } + public static function implementsInterface($value, $interface, $message = '') { if (!in_array($interface, class_implements($value))) { @@ -888,7 +960,7 @@ class Assert public static function keyExists($array, $key, $message = '') { - if (!array_key_exists($key, $array)) { + if (!(isset($array[$key]) || array_key_exists($key, $array))) { static::reportInvalidArgument(sprintf( $message ?: 'Expected the key %s to exist.', static::valueToString($key) @@ -898,7 +970,7 @@ class Assert public static function keyNotExists($array, $key, $message = '') { - if (array_key_exists($key, $array)) { + if (isset($array[$key]) || array_key_exists($key, $array)) { static::reportInvalidArgument(sprintf( $message ?: 'Expected the key %s to not exist.', static::valueToString($key) @@ -951,6 +1023,30 @@ class Assert } } + public static function isList($array, $message = '') + { + if (!is_array($array) || !$array || array_keys($array) !== range(0, count($array) - 1)) { + static::reportInvalidArgument( + $message ?: 'Expected list - non-associative array.' + ); + } + } + + public static function isMap($array, $message = '') + { + if ( + !is_array($array) || + !$array || + array_keys($array) !== array_filter(array_keys($array), function ($key) { + return is_string($key); + }) + ) { + static::reportInvalidArgument( + $message ?: 'Expected map - associative array with string keys.' + ); + } + } + public static function uuid($value, $message = '') { $value = str_replace(array('urn:', 'uuid:', '{', '}'), '', $value); @@ -1044,6 +1140,10 @@ class Assert } if (is_object($value)) { + if (method_exists($value, '__toString')) { + return get_class($value).': '.self::valueToString($value->__toString()); + } + return get_class($value); } diff --git a/web/core/MAINTAINERS.txt b/web/core/MAINTAINERS.txt index f56097cf3..a505c631a 100644 --- a/web/core/MAINTAINERS.txt +++ b/web/core/MAINTAINERS.txt @@ -284,9 +284,9 @@ Menu UI Migrate - Adam Globus-Hoenich 'phenaproxima' https://www.drupal.org/u/phenaproxima - Lucas Hedding 'heddn' https://www.drupal.org/u/heddn +- Michael Lutz 'mikelutz' https://www.drupal.org/u/mikelutz - Markus Sipilä 'masipila' https://www.drupal.org/u/masipila - Vicki Spagnolo 'quietone' https://www.drupal.org/u/quietone -- Maxime Turcotte 'maxocub' https://www.drupal.org/u/maxocub Node - Tim Millwood 'timmillwood' https://www.drupal.org/u/timmillwood diff --git a/web/core/composer.json b/web/core/composer.json index 37120ae8c..34fed39b1 100644 --- a/web/core/composer.json +++ b/web/core/composer.json @@ -31,6 +31,7 @@ "symfony/process": "~3.4.0", "symfony/polyfill-iconv": "^1.0", "symfony/yaml": "~3.4.5", + "typo3/phar-stream-wrapper": "^2.0.1", "twig/twig": "^1.35.0", "doctrine/common": "^2.5", "doctrine/annotations": "^1.2", diff --git a/web/core/includes/common.inc b/web/core/includes/common.inc index 49cf6e104..5090c45fa 100644 --- a/web/core/includes/common.inc +++ b/web/core/includes/common.inc @@ -251,42 +251,46 @@ function check_url($uri) { * A translated string representation of the size. */ function format_size($size, $langcode = NULL) { - if ($size < Bytes::KILOBYTE) { + $absolute_size = abs($size); + if ($absolute_size < Bytes::KILOBYTE) { return \Drupal::translation()->formatPlural($size, '1 byte', '@count bytes', [], ['langcode' => $langcode]); } - else { - // Convert bytes to kilobytes. - $size = $size / Bytes::KILOBYTE; - $units = ['KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']; - foreach ($units as $unit) { - if (round($size, 2) >= Bytes::KILOBYTE) { - $size = $size / Bytes::KILOBYTE; - } - else { - break; - } - } - $args = ['@size' => round($size, 2)]; - $options = ['langcode' => $langcode]; - switch ($unit) { - case 'KB': - return new TranslatableMarkup('@size KB', $args, $options); - case 'MB': - return new TranslatableMarkup('@size MB', $args, $options); - case 'GB': - return new TranslatableMarkup('@size GB', $args, $options); - case 'TB': - return new TranslatableMarkup('@size TB', $args, $options); - case 'PB': - return new TranslatableMarkup('@size PB', $args, $options); - case 'EB': - return new TranslatableMarkup('@size EB', $args, $options); - case 'ZB': - return new TranslatableMarkup('@size ZB', $args, $options); - case 'YB': - return new TranslatableMarkup('@size YB', $args, $options); + // Create a multiplier to preserve the sign of $size. + $sign = $absolute_size / $size; + foreach (['KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'] as $unit) { + $absolute_size /= Bytes::KILOBYTE; + $rounded_size = round($absolute_size, 2); + if ($rounded_size < Bytes::KILOBYTE) { + break; } } + $args = ['@size' => $rounded_size * $sign]; + $options = ['langcode' => $langcode]; + switch ($unit) { + case 'KB': + return new TranslatableMarkup('@size KB', $args, $options); + + case 'MB': + return new TranslatableMarkup('@size MB', $args, $options); + + case 'GB': + return new TranslatableMarkup('@size GB', $args, $options); + + case 'TB': + return new TranslatableMarkup('@size TB', $args, $options); + + case 'PB': + return new TranslatableMarkup('@size PB', $args, $options); + + case 'EB': + return new TranslatableMarkup('@size EB', $args, $options); + + case 'ZB': + return new TranslatableMarkup('@size ZB', $args, $options); + + case 'YB': + return new TranslatableMarkup('@size YB', $args, $options); + } } /** @@ -490,7 +494,7 @@ function drupal_js_defaults($data = NULL) { * * Every condition is a key/value pair, whose key is a jQuery selector that * denotes another element on the page, and whose value is an array of - * conditions, which must bet met on that element: + * conditions, which must be met on that element: * @code * array( * 'visible' => array( diff --git a/web/core/lib/Drupal.php b/web/core/lib/Drupal.php index ebd52afba..a5aa5214f 100644 --- a/web/core/lib/Drupal.php +++ b/web/core/lib/Drupal.php @@ -82,7 +82,7 @@ class Drupal { /** * The current system version. */ - const VERSION = '8.6.3'; + const VERSION = '8.6.7'; /** * Core API compatibility. diff --git a/web/core/lib/Drupal/Component/Plugin/ContextAwarePluginBase.php b/web/core/lib/Drupal/Component/Plugin/ContextAwarePluginBase.php index b9f6e0221..2d499fd7d 100644 --- a/web/core/lib/Drupal/Component/Plugin/ContextAwarePluginBase.php +++ b/web/core/lib/Drupal/Component/Plugin/ContextAwarePluginBase.php @@ -3,6 +3,7 @@ namespace Drupal\Component\Plugin; use Drupal\Component\Plugin\Context\ContextInterface; +use Drupal\Component\Plugin\Definition\ContextAwarePluginDefinitionInterface; use Drupal\Component\Plugin\Exception\ContextException; use Drupal\Component\Plugin\Context\Context; use Symfony\Component\Validator\ConstraintViolationList; @@ -67,7 +68,12 @@ abstract class ContextAwarePluginBase extends PluginBase implements ContextAware */ public function getContextDefinitions() { $definition = $this->getPluginDefinition(); - return !empty($definition['context']) ? $definition['context'] : []; + if ($definition instanceof ContextAwarePluginDefinitionInterface) { + return $definition->getContextDefinitions(); + } + else { + return !empty($definition['context']) ? $definition['context'] : []; + } } /** @@ -75,10 +81,15 @@ abstract class ContextAwarePluginBase extends PluginBase implements ContextAware */ public function getContextDefinition($name) { $definition = $this->getPluginDefinition(); - if (empty($definition['context'][$name])) { - throw new ContextException(sprintf("The %s context is not a valid context.", $name)); + if ($definition instanceof ContextAwarePluginDefinitionInterface) { + if ($definition->hasContextDefinition($name)) { + return $definition->getContextDefinition($name); + } } - return $definition['context'][$name]; + elseif (!empty($definition['context'][$name])) { + return $definition['context'][$name]; + } + throw new ContextException(sprintf("The %s context is not a valid context.", $name)); } /** diff --git a/web/core/lib/Drupal/Component/Transliteration/PhpTransliteration.php b/web/core/lib/Drupal/Component/Transliteration/PhpTransliteration.php index 3cd8d6856..2f6397406 100644 --- a/web/core/lib/Drupal/Component/Transliteration/PhpTransliteration.php +++ b/web/core/lib/Drupal/Component/Transliteration/PhpTransliteration.php @@ -107,6 +107,29 @@ class PhpTransliteration implements TransliterationInterface { public function transliterate($string, $langcode = 'en', $unknown_character = '?', $max_length = NULL) { $result = ''; $length = 0; + $hash = FALSE; + + // Replace question marks with a unique hash if necessary. This because + // mb_convert_encoding() replaces all invalid characters with a question + // mark. + if ($unknown_character != '?' && strpos($string, '?') !== FALSE) { + $hash = hash('sha256', $string); + $string = str_replace('?', $hash, $string); + } + + // Ensure the string is valid UTF8 for preg_split(). Unknown characters will + // be replaced by a question mark. + $string = mb_convert_encoding($string, 'UTF-8', 'UTF-8'); + + // Use the provided unknown character instead of a question mark. + if ($unknown_character != '?') { + $string = str_replace('?', $unknown_character, $string); + // Restore original question marks if necessary. + if ($hash !== FALSE) { + $string = str_replace($hash, '?', $string); + } + } + // Split into Unicode characters and transliterate each one. foreach (preg_split('//u', $string, 0, PREG_SPLIT_NO_EMPTY) as $character) { $code = self::ordUTF8($character); diff --git a/web/core/lib/Drupal/Component/Utility/Mail.php b/web/core/lib/Drupal/Component/Utility/Mail.php new file mode 100644 index 000000000..423cfb266 --- /dev/null +++ b/web/core/lib/Drupal/Component/Utility/Mail.php @@ -0,0 +1,67 @@ +[]:;@\,."'; + + /** + * Return a RFC-2822 compliant "display-name" component. + * + * The "display-name" component is used in mail header "Originator" fields + * (From, Sender, Reply-to) to give a human-friendly description of the + * address, i.e. From: My Display Name . RFC-822 and + * RFC-2822 define its syntax and rules. This method gets as input a string + * to be used as "display-name" and formats it to be RFC compliant. + * + * @param string $string + * A string to be used as "display-name". + * + * @return string + * A RFC compliant version of the string, ready to be used as + * "display-name" in mail originator header fields. + */ + public static function formatDisplayName($string) { + // Make sure we don't process html-encoded characters. They may create + // unneeded trouble if left encoded, besides they will be correctly + // processed if decoded. + $string = Html::decodeEntities($string); + + // If string contains non-ASCII characters it must be (short) encoded + // according to RFC-2047. The output of a "B" (Base64) encoded-word is + // always safe to be used as display-name. + $safe_display_name = Unicode::mimeHeaderEncode($string, TRUE); + + // Encoded-words are always safe to be used as display-name because don't + // contain any RFC 2822 "specials" characters. However + // Unicode::mimeHeaderEncode() encodes a string only if it contains any + // non-ASCII characters, and leaves its value untouched (un-encoded) if + // ASCII only. For this reason in order to produce a valid display-name we + // still need to make sure there are no "specials" characters left. + if (preg_match('/[' . preg_quote(Mail::RFC_2822_SPECIALS) . ']/', $safe_display_name)) { + + // If string is already quoted, it may or may not be escaped properly, so + // don't trust it and reset. + if (preg_match('/^"(.+)"$/', $safe_display_name, $matches)) { + $safe_display_name = str_replace(['\\\\', '\\"'], ['\\', '"'], $matches[1]); + } + + // Transform the string in a RFC-2822 "quoted-string" by wrapping it in + // double-quotes. Also make sure '"' and '\' occurrences are escaped. + $safe_display_name = '"' . str_replace(['\\', '"'], ['\\\\', '\\"'], $safe_display_name) . '"'; + + } + + return $safe_display_name; + } + +} diff --git a/web/core/lib/Drupal/Core/Archiver/ArchiveTar.php b/web/core/lib/Drupal/Core/Archiver/ArchiveTar.php index 716511ede..abee870c0 100644 --- a/web/core/lib/Drupal/Core/Archiver/ArchiveTar.php +++ b/web/core/lib/Drupal/Core/Archiver/ArchiveTar.php @@ -42,7 +42,7 @@ /** * Note on Drupal 8 porting. - * This file origin is Tar.php, release 1.4.0 (stable) with some code + * This file origin is Tar.php, release 1.4.5 (stable) with some code * from PEAR.php, release 1.9.5 (stable) both at http://pear.php.net. * To simplify future porting from pear of this file, you should not * do cosmetic or other non significant changes to this file. @@ -151,6 +151,13 @@ class ArchiveTar */ public $error_object = null; + /** + * Format for data extraction + * + * @var string + */ + public $_fmt =''; + /** * Archive_Tar Class constructor. This flavour of the constructor only * declare a new Archive_Tar object, identifying it by the name of the @@ -257,6 +264,18 @@ class ArchiveTar return false; } } + + if (version_compare(PHP_VERSION, "5.5.0-dev") < 0) { + $this->_fmt = "a100filename/a8mode/a8uid/a8gid/a12size/a12mtime/" . + "a8checksum/a1typeflag/a100link/a6magic/a2version/" . + "a32uname/a32gname/a8devmajor/a8devminor/a131prefix"; + } else { + $this->_fmt = "Z100filename/Z8mode/Z8uid/Z8gid/Z12size/Z12mtime/" . + "Z8checksum/Z1typeflag/Z100link/Z6magic/Z2version/" . + "Z32uname/Z32gname/Z8devmajor/Z8devminor/Z131prefix"; + } + + } public function __destruct() @@ -712,7 +731,7 @@ class ArchiveTar } // ----- Get the arguments - $v_att_list = & func_get_args(); + $v_att_list = func_get_args(); // ----- Read the attributes $i = 0; @@ -1392,10 +1411,20 @@ class ArchiveTar if ($p_stored_filename == '') { $p_stored_filename = $p_filename; } - $v_reduce_filename = $this->_pathReduction($p_stored_filename); + $v_reduced_filename = $this->_pathReduction($p_stored_filename); - if (strlen($v_reduce_filename) > 99) { - if (!$this->_writeLongHeader($v_reduce_filename)) { + if (strlen($v_reduced_filename) > 99) { + if (!$this->_writeLongHeader($v_reduced_filename, false)) { + return false; + } + } + + $v_linkname = ''; + if (@is_link($p_filename)) { + $v_linkname = readlink($p_filename); + } + if (strlen($v_linkname) > 99) { + if (!$this->_writeLongHeader($v_linkname, true)) { return false; } } @@ -1404,14 +1433,10 @@ class ArchiveTar $v_uid = sprintf("%07s", DecOct($v_info[4])); $v_gid = sprintf("%07s", DecOct($v_info[5])); $v_perms = sprintf("%07s", DecOct($v_info['mode'] & 000777)); - $v_mtime = sprintf("%011s", DecOct($v_info['mtime'])); - $v_linkname = ''; - if (@is_link($p_filename)) { $v_typeflag = '2'; - $v_linkname = readlink($p_filename); $v_size = sprintf("%011s", DecOct(0)); } elseif (@is_dir($p_filename)) { $v_typeflag = "5"; @@ -1423,7 +1448,6 @@ class ArchiveTar } $v_magic = 'ustar '; - $v_version = ' '; if (function_exists('posix_getpwuid')) { @@ -1438,14 +1462,12 @@ class ArchiveTar } $v_devmajor = ''; - $v_devminor = ''; $v_prefix = ''; $v_binary_data_first = pack( "a100a8a8a8a12a12", - $v_reduce_filename, $v_perms, $v_uid, $v_gid, @@ -1485,7 +1507,7 @@ class ArchiveTar $this->_writeBlock($v_binary_data_first, 148); // ----- Write the calculated checksum - $v_checksum = sprintf("%06s ", DecOct($v_checksum)); + $v_checksum = sprintf("%06s\0 ", DecOct($v_checksum)); $v_binary_data = pack("a8", $v_checksum); $this->_writeBlock($v_binary_data, 8); @@ -1517,7 +1539,7 @@ class ArchiveTar $p_filename = $this->_pathReduction($p_filename); if (strlen($p_filename) > 99) { - if (!$this->_writeLongHeader($p_filename)) { + if (!$this->_writeLongHeader($p_filename, false)) { return false; } } @@ -1613,36 +1635,31 @@ class ArchiveTar * @param string $p_filename * @return bool */ - public function _writeLongHeader($p_filename) + public function _writeLongHeader($p_filename, $is_link = false) { - $v_size = sprintf("%11s ", DecOct(strlen($p_filename))); - - $v_typeflag = 'L'; - + $v_uid = sprintf("%07s", 0); + $v_gid = sprintf("%07s", 0); + $v_perms = sprintf("%07s", 0); + $v_size = sprintf("%'011s", DecOct(strlen($p_filename))); + $v_mtime = sprintf("%011s", 0); + $v_typeflag = ($is_link ? 'K' : 'L'); $v_linkname = ''; - - $v_magic = ''; - - $v_version = ''; - + $v_magic = 'ustar '; + $v_version = ' '; $v_uname = ''; - $v_gname = ''; - $v_devmajor = ''; - $v_devminor = ''; - $v_prefix = ''; $v_binary_data_first = pack( "a100a8a8a8a12a12", '././@LongLink', - 0, - 0, - 0, + $v_perms, + $v_uid, + $v_gid, $v_size, - 0 + $v_mtime ); $v_binary_data_last = pack( "a1a100a6a2a32a32a8a8a155a12", @@ -1677,7 +1694,7 @@ class ArchiveTar $this->_writeBlock($v_binary_data_first, 148); // ----- Write the calculated checksum - $v_checksum = sprintf("%06s ", DecOct($v_checksum)); + $v_checksum = sprintf("%06s\0 ", DecOct($v_checksum)); $v_binary_data = pack("a8", $v_checksum); $this->_writeBlock($v_binary_data, 8); @@ -1718,28 +1735,12 @@ class ArchiveTar // ----- Calculate the checksum $v_checksum = 0; // ..... First part of the header - for ($i = 0; $i < 148; $i++) { - $v_checksum += ord(substr($v_binary_data, $i, 1)); - } - // ..... Ignore the checksum value and replace it by ' ' (space) - for ($i = 148; $i < 156; $i++) { - $v_checksum += ord(' '); - } - // ..... Last part of the header - for ($i = 156; $i < 512; $i++) { - $v_checksum += ord(substr($v_binary_data, $i, 1)); - } + $v_binary_split = str_split($v_binary_data); + $v_checksum += array_sum(array_map('ord', array_slice($v_binary_split, 0, 148))); + $v_checksum += array_sum(array_map('ord', array(' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ',))); + $v_checksum += array_sum(array_map('ord', array_slice($v_binary_split, 156, 512))); - if (version_compare(PHP_VERSION, "5.5.0-dev") < 0) { - $fmt = "a100filename/a8mode/a8uid/a8gid/a12size/a12mtime/" . - "a8checksum/a1typeflag/a100link/a6magic/a2version/" . - "a32uname/a32gname/a8devmajor/a8devminor/a131prefix"; - } else { - $fmt = "Z100filename/Z8mode/Z8uid/Z8gid/Z12size/Z12mtime/" . - "Z8checksum/Z1typeflag/Z100link/Z6magic/Z2version/" . - "Z32uname/Z32gname/Z8devmajor/Z8devminor/Z131prefix"; - } - $v_data = unpack($fmt, $v_binary_data); + $v_data = unpack($this->_fmt, $v_binary_data); if (strlen($v_data["prefix"]) > 0) { $v_data["filename"] = "$v_data[prefix]/$v_data[filename]"; @@ -1775,7 +1776,7 @@ class ArchiveTar $v_header['mode'] = OctDec(trim($v_data['mode'])); $v_header['uid'] = OctDec(trim($v_data['uid'])); $v_header['gid'] = OctDec(trim($v_data['gid'])); - $v_header['size'] = OctDec(trim($v_data['size'])); + $v_header['size'] = $this->_tarRecToSize($v_data['size']); $v_header['mtime'] = OctDec(trim($v_data['mtime'])); if (($v_header['typeflag'] = $v_data['typeflag']) == "5") { $v_header['size'] = 0; @@ -1794,6 +1795,41 @@ class ArchiveTar return true; } + /** + * Convert Tar record size to actual size + * + * @param string $tar_size + * @return size of tar record in bytes + */ + private function _tarRecToSize($tar_size) + { + /* + * First byte of size has a special meaning if bit 7 is set. + * + * Bit 7 indicates base-256 encoding if set. + * Bit 6 is the sign bit. + * Bits 5:0 are most significant value bits. + */ + $ch = ord($tar_size[0]); + if ($ch & 0x80) { + // Full 12-bytes record is required. + $rec_str = $tar_size . "\x00"; + + $size = ($ch & 0x40) ? -1 : 0; + $size = ($size << 6) | ($ch & 0x3f); + + for ($num_ch = 1; $num_ch < 12; ++$num_ch) { + $size = ($size * 256) + ord($rec_str[$num_ch]); + } + + return $size; + + } else { + return OctDec(trim($tar_size)); + } + } + + /** * Detect and report a malicious file name * @@ -1803,10 +1839,13 @@ class ArchiveTar */ private function _maliciousFilename($file) { - if (strpos($file, '/../') !== false) { + if (strpos($file, 'phar://') === 0) { return true; } - if (strpos($file, '../') === 0) { + if (strpos($file, DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR) !== false) { + return true; + } + if (strpos($file, '..' . DIRECTORY_SEPARATOR) === 0) { return true; } return false; @@ -1871,11 +1910,20 @@ class ArchiveTar continue; } - // ----- Look for long filename - if ($v_header['typeflag'] == 'L') { - if (!$this->_readLongHeader($v_header)) { - return null; - } + switch ($v_header['typeflag']) { + case 'L': { + if (!$this->_readLongHeader($v_header)) { + return null; + } + } break; + + case 'K': { + $v_link_header = $v_header; + if (!$this->_readLongHeader($v_link_header)) { + return null; + } + $v_header['link'] = $v_link_header['filename']; + } break; } if ($v_header['filename'] == $p_filename) { @@ -1976,11 +2024,20 @@ class ArchiveTar continue; } - // ----- Look for long filename - if ($v_header['typeflag'] == 'L') { - if (!$this->_readLongHeader($v_header)) { - return false; - } + switch ($v_header['typeflag']) { + case 'L': { + if (!$this->_readLongHeader($v_header)) { + return null; + } + } break; + + case 'K': { + $v_link_header = $v_header; + if (!$this->_readLongHeader($v_link_header)) { + return null; + } + $v_header['link'] = $v_link_header['filename']; + } break; } // ignore extended / pax headers diff --git a/web/core/lib/Drupal/Core/Block/BlockBase.php b/web/core/lib/Drupal/Core/Block/BlockBase.php index a5f7fa9ed..bebdf09bd 100644 --- a/web/core/lib/Drupal/Core/Block/BlockBase.php +++ b/web/core/lib/Drupal/Core/Block/BlockBase.php @@ -11,6 +11,7 @@ use Drupal\Component\Utility\NestedArray; use Drupal\Core\Language\LanguageInterface; use Drupal\Core\Plugin\PluginWithFormsInterface; use Drupal\Core\Plugin\PluginWithFormsTrait; +use Drupal\Core\Render\PreviewFallbackInterface; use Drupal\Core\Session\AccountInterface; use Drupal\Component\Transliteration\TransliterationInterface; @@ -23,7 +24,7 @@ use Drupal\Component\Transliteration\TransliterationInterface; * * @ingroup block_api */ -abstract class BlockBase extends ContextAwarePluginBase implements BlockPluginInterface, PluginWithFormsInterface { +abstract class BlockBase extends ContextAwarePluginBase implements BlockPluginInterface, PluginWithFormsInterface, PreviewFallbackInterface { use ContextAwarePluginAssignmentTrait; use MessengerTrait; @@ -252,6 +253,13 @@ abstract class BlockBase extends ContextAwarePluginBase implements BlockPluginIn return $transliterated; } + /** + * {@inheritdoc} + */ + public function getPreviewFallbackString() { + return $this->t('Placeholder for the "@block" block', ['@block' => $this->label()]); + } + /** * Wraps the transliteration service. * diff --git a/web/core/lib/Drupal/Core/Cache/MemoryBackend.php b/web/core/lib/Drupal/Core/Cache/MemoryBackend.php index 09454d785..c12769237 100644 --- a/web/core/lib/Drupal/Core/Cache/MemoryBackend.php +++ b/web/core/lib/Drupal/Core/Cache/MemoryBackend.php @@ -156,7 +156,8 @@ class MemoryBackend implements CacheBackendInterface, CacheTagsInvalidatorInterf * {@inheritdoc} */ public function invalidateMultiple(array $cids) { - foreach ($cids as $cid) { + $items = array_intersect_key($this->cache, array_flip($cids)); + foreach ($items as $cid => $item) { $this->cache[$cid]->expire = $this->getRequestTime() - 1; } } diff --git a/web/core/lib/Drupal/Core/Command/DbDumpCommand.php b/web/core/lib/Drupal/Core/Command/DbDumpCommand.php index 26b4363cd..a7d6d0905 100644 --- a/web/core/lib/Drupal/Core/Command/DbDumpCommand.php +++ b/web/core/lib/Drupal/Core/Command/DbDumpCommand.php @@ -162,12 +162,19 @@ class DbDumpCommand extends DbCommandBase { $definition['fields'][$name]['precision'] = $matches[2]; $definition['fields'][$name]['scale'] = $matches[3]; } - elseif ($type === 'time' || $type === 'datetime') { + elseif ($type === 'time') { // @todo Core doesn't support these, but copied from `migrate-db.sh` for now. // Convert to varchar. $definition['fields'][$name]['type'] = 'varchar'; $definition['fields'][$name]['length'] = '100'; } + elseif ($type === 'datetime') { + // Adjust for other database types. + $definition['fields'][$name]['mysql_type'] = 'datetime'; + $definition['fields'][$name]['pgsql_type'] = 'timestamp without time zone'; + $definition['fields'][$name]['sqlite_type'] = 'varchar'; + $definition['fields'][$name]['sqlsrv_type'] = 'smalldatetime'; + } elseif (!isset($definition['fields'][$name]['size'])) { // Try use the provided length, if it doesn't exist default to 100. It's // not great but good enough for our dumps at this point. diff --git a/web/core/lib/Drupal/Core/Database/Install/Tasks.php b/web/core/lib/Drupal/Core/Database/Install/Tasks.php index 44bddea81..90a077200 100644 --- a/web/core/lib/Drupal/Core/Database/Install/Tasks.php +++ b/web/core/lib/Drupal/Core/Database/Install/Tasks.php @@ -33,7 +33,7 @@ abstract class Tasks { ], [ 'arguments' => [ - 'CREATE TABLE {drupal_install_test} (id int NULL)', + 'CREATE TABLE {drupal_install_test} (id int NOT NULL PRIMARY KEY)', 'Drupal can use CREATE TABLE database commands.', 'Failed to CREATE a test table on your database server with the command %query. The server reports the following message: %error.

Are you sure the configured username has the necessary permissions to create tables in the database?

', TRUE, diff --git a/web/core/lib/Drupal/Core/Database/database.api.php b/web/core/lib/Drupal/Core/Database/database.api.php index 4cf34f8dd..c39cf78cf 100644 --- a/web/core/lib/Drupal/Core/Database/database.api.php +++ b/web/core/lib/Drupal/Core/Database/database.api.php @@ -248,18 +248,15 @@ use Drupal\Core\Database\Query\Condition; * * The following keys are defined: * - 'description': A string in non-markup plain text describing this table - * and its purpose. References to other tables should be enclosed in - * curly-brackets. For example, the node_field_revision table - * description field might contain "Stores per-revision title and - * body data for each {node}." + * and its purpose. References to other tables should be enclosed in curly + * brackets. * - 'fields': An associative array ('fieldname' => specification) * that describes the table's database columns. The specification * is also an array. The following specification parameters are defined: * - 'description': A string in non-markup plain text describing this field - * and its purpose. References to other tables should be enclosed in - * curly-brackets. For example, the node table vid field - * description might contain "Always holds the largest (most - * recent) {node_field_revision}.vid value for this nid." + * and its purpose. References to other tables should be enclosed in curly + * brackets. For example, the users_data table 'uid' field description + * might contain "The {users}.uid this record affects." * - 'type': The generic datatype: 'char', 'varchar', 'text', 'blob', 'int', * 'float', 'numeric', or 'serial'. Most types just map to the according * database engine specific data types. Use 'serial' for auto incrementing @@ -322,64 +319,70 @@ use Drupal\Core\Database\Query\Condition; * key column specifiers (see below) that form an index on the * table. * - * A key column specifier is either a string naming a column or an - * array of two elements, column name and length, specifying a prefix - * of the named column. + * A key column specifier is either a string naming a column or an array of two + * elements, column name and length, specifying a prefix of the named column. * - * As an example, here is a SUBSET of the schema definition for - * Drupal's 'node' table. It show four fields (nid, vid, type, and - * title), the primary key on field 'nid', a unique key named 'vid' on - * field 'vid', and two indexes, one named 'nid' on field 'nid' and - * one named 'node_title_type' on the field 'title' and the first four - * bytes of the field 'type': + * As an example, this is the schema definition for the 'users_data' table. It + * shows five fields ('uid', 'module', 'name', 'value', and 'serialized'), the + * primary key (on the 'uid', 'module', and 'name' fields), and two indexes (the + * 'module' index on the 'module' field and the 'name' index on the 'name' + * field). * * @code - * $schema['node'] = array( - * 'description' => 'The base table for nodes.', - * 'fields' => array( - * 'nid' => array('type' => 'serial', 'unsigned' => TRUE, 'not null' => TRUE), - * 'vid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE,'default' => 0), - * 'type' => array('type' => 'varchar','length' => 32,'not null' => TRUE, 'default' => ''), - * 'language' => array('type' => 'varchar','length' => 12,'not null' => TRUE,'default' => ''), - * 'title' => array('type' => 'varchar','length' => 255,'not null' => TRUE, 'default' => ''), - * 'uid' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - * 'status' => array('type' => 'int', 'not null' => TRUE, 'default' => 1), - * 'created' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - * 'changed' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - * 'comment' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - * 'promote' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - * 'moderate' => array('type' => 'int', 'not null' => TRUE,'default' => 0), - * 'sticky' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - * 'translate' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - * ), - * 'indexes' => array( - * 'node_changed' => array('changed'), - * 'node_created' => array('created'), - * 'node_moderate' => array('moderate'), - * 'node_frontpage' => array('promote', 'status', 'sticky', 'created'), - * 'node_status_type' => array('status', 'type', 'nid'), - * 'node_title_type' => array('title', array('type', 4)), - * 'node_type' => array(array('type', 4)), - * 'uid' => array('uid'), - * 'translate' => array('translate'), - * ), - * 'unique keys' => array( - * 'vid' => array('vid'), - * ), + * $schema['users_data'] = [ + * 'description' => 'Stores module data as key/value pairs per user.', + * 'fields' => [ + * 'uid' => [ + * 'description' => 'The {users}.uid this record affects.', + * 'type' => 'int', + * 'unsigned' => TRUE, + * 'not null' => TRUE, + * 'default' => 0, + * ], + * 'module' => [ + * 'description' => 'The name of the module declaring the variable.', + * 'type' => 'varchar_ascii', + * 'length' => DRUPAL_EXTENSION_NAME_MAX_LENGTH, + * 'not null' => TRUE, + * 'default' => '', + * ], + * 'name' => [ + * 'description' => 'The identifier of the data.', + * 'type' => 'varchar_ascii', + * 'length' => 128, + * 'not null' => TRUE, + * 'default' => '', + * ], + * 'value' => [ + * 'description' => 'The value.', + * 'type' => 'blob', + * 'not null' => FALSE, + * 'size' => 'big', + * ], + * 'serialized' => [ + * 'description' => 'Whether value is serialized.', + * 'type' => 'int', + * 'size' => 'tiny', + * 'unsigned' => TRUE, + * 'default' => 0, + * ], + * ], + * 'primary key' => ['uid', 'module', 'name'], + * 'indexes' => [ + * 'module' => ['module'], + * 'name' => ['name'], + * ], * // For documentation purposes only; foreign keys are not created in the * // database. - * 'foreign keys' => array( - * 'node_revision' => array( - * 'table' => 'node_field_revision', - * 'columns' => array('vid' => 'vid'), - * ), - * 'node_author' => array( + * 'foreign keys' => [ + * 'data_user' => [ * 'table' => 'users', - * 'columns' => array('uid' => 'uid'), - * ), - * ), - * 'primary key' => array('nid'), - * ); + * 'columns' => [ + * 'uid' => 'uid', + * ], + * ], + * ], + * ]; * @endcode * * @see drupal_install_schema() @@ -490,60 +493,61 @@ function hook_query_TAG_alter(Drupal\Core\Database\Query\AlterableInterface $que * @ingroup schemaapi */ function hook_schema() { - $schema['node'] = [ - // Example (partial) specification for table "node". - 'description' => 'The base table for nodes.', + $schema['users_data'] = [ + 'description' => 'Stores module data as key/value pairs per user.', 'fields' => [ - 'nid' => [ - 'description' => 'The primary identifier for a node.', - 'type' => 'serial', - 'unsigned' => TRUE, - 'not null' => TRUE, - ], - 'vid' => [ - 'description' => 'The current {node_field_revision}.vid version identifier.', + 'uid' => [ + 'description' => 'The {users}.uid this record affects.', 'type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, ], - 'type' => [ - 'description' => 'The type of this node.', - 'type' => 'varchar', - 'length' => 32, + 'module' => [ + 'description' => 'The name of the module declaring the variable.', + 'type' => 'varchar_ascii', + 'length' => DRUPAL_EXTENSION_NAME_MAX_LENGTH, 'not null' => TRUE, 'default' => '', ], - 'title' => [ - 'description' => 'The node title.', - 'type' => 'varchar', - 'length' => 255, + 'name' => [ + 'description' => 'The identifier of the data.', + 'type' => 'varchar_ascii', + 'length' => 128, 'not null' => TRUE, 'default' => '', ], + 'value' => [ + 'description' => 'The value.', + 'type' => 'blob', + 'not null' => FALSE, + 'size' => 'big', + ], + 'serialized' => [ + 'description' => 'Whether value is serialized.', + 'type' => 'int', + 'size' => 'tiny', + 'unsigned' => TRUE, + 'default' => 0, + ], ], + 'primary key' => ['uid', 'module', 'name'], 'indexes' => [ - 'node_changed' => ['changed'], - 'node_created' => ['created'], - ], - 'unique keys' => [ - 'nid_vid' => ['nid', 'vid'], - 'vid' => ['vid'], + 'module' => ['module'], + 'name' => ['name'], ], // For documentation purposes only; foreign keys are not created in the // database. 'foreign keys' => [ - 'node_revision' => [ - 'table' => 'node_field_revision', - 'columns' => ['vid' => 'vid'], - ], - 'node_author' => [ + 'data_user' => [ 'table' => 'users', - 'columns' => ['uid' => 'uid'], + 'columns' => [ + 'uid' => 'uid', + ], ], ], - 'primary key' => ['nid'], ]; + return $schema; } diff --git a/web/core/lib/Drupal/Core/DrupalKernel.php b/web/core/lib/Drupal/Core/DrupalKernel.php index a099327c9..3b14d4d44 100644 --- a/web/core/lib/Drupal/Core/DrupalKernel.php +++ b/web/core/lib/Drupal/Core/DrupalKernel.php @@ -19,6 +19,7 @@ use Drupal\Core\File\MimeType\MimeTypeGuesser; use Drupal\Core\Http\TrustedHostsRequestFactory; use Drupal\Core\Installer\InstallerRedirectTrait; use Drupal\Core\Language\Language; +use Drupal\Core\Security\PharExtensionInterceptor; use Drupal\Core\Security\RequestSanitizer; use Drupal\Core\Site\Settings; use Drupal\Core\Test\TestDatabase; @@ -35,6 +36,9 @@ use Symfony\Component\HttpKernel\Exception\BadRequestHttpException; use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface; use Symfony\Component\HttpKernel\TerminableInterface; use Symfony\Component\Routing\Route; +use TYPO3\PharStreamWrapper\Manager as PharStreamWrapperManager; +use TYPO3\PharStreamWrapper\Behavior as PharStreamWrapperBehavior; +use TYPO3\PharStreamWrapper\PharStreamWrapper; /** * The DrupalKernel class is the core of Drupal itself. @@ -471,6 +475,26 @@ class DrupalKernel implements DrupalKernelInterface, TerminableInterface { // Initialize the container. $this->initializeContainer(); + if (in_array('phar', stream_get_wrappers(), TRUE)) { + // Set up a stream wrapper to handle insecurities due to PHP's builtin + // phar stream wrapper. This is not registered as a regular stream wrapper + // to prevent \Drupal\Core\File\FileSystem::validScheme() treating "phar" + // as a valid scheme. + try { + $behavior = new PharStreamWrapperBehavior(); + PharStreamWrapperManager::initialize( + $behavior->withAssertion(new PharExtensionInterceptor()) + ); + } + catch (\LogicException $e) { + // Continue if the PharStreamWrapperManager is already initialized. For + // example, this occurs during a module install. + // @see \Drupal\Core\Extension\ModuleInstaller::install() + }; + stream_wrapper_unregister('phar'); + stream_wrapper_register('phar', PharStreamWrapper::class); + } + $this->booted = TRUE; return $this; diff --git a/web/core/lib/Drupal/Core/Entity/Entity/EntityViewDisplay.php b/web/core/lib/Drupal/Core/Entity/Entity/EntityViewDisplay.php index cd36418d1..6783522ac 100644 --- a/web/core/lib/Drupal/Core/Entity/Entity/EntityViewDisplay.php +++ b/web/core/lib/Drupal/Core/Entity/Entity/EntityViewDisplay.php @@ -8,6 +8,7 @@ use Drupal\Core\Entity\EntityDisplayPluginCollection; use Drupal\Core\Entity\EntityStorageInterface; use Drupal\Core\Entity\FieldableEntityInterface; use Drupal\Core\Entity\EntityDisplayBase; +use Drupal\Core\Render\Element; use Drupal\Core\TypedData\TranslatableInterface as TranslatableDataInterface; /** @@ -269,7 +270,7 @@ class EntityViewDisplay extends EntityDisplayBase implements EntityViewDisplayIn foreach ($entities as $id => $entity) { // Assign the configured weights. foreach ($this->getComponents() as $name => $options) { - if (isset($build_list[$id][$name])) { + if (isset($build_list[$id][$name]) && !Element::isEmpty($build_list[$id][$name])) { $build_list[$id][$name]['#weight'] = $options['weight']; } } diff --git a/web/core/lib/Drupal/Core/Entity/Plugin/DataType/ConfigEntityAdapter.php b/web/core/lib/Drupal/Core/Entity/Plugin/DataType/ConfigEntityAdapter.php index 093c77dd1..55a8bba0b 100644 --- a/web/core/lib/Drupal/Core/Entity/Plugin/DataType/ConfigEntityAdapter.php +++ b/web/core/lib/Drupal/Core/Entity/Plugin/DataType/ConfigEntityAdapter.php @@ -2,7 +2,9 @@ namespace Drupal\Core\Entity\Plugin\DataType; +use Drupal\Core\Config\TypedConfigManagerInterface; use Drupal\Core\TypedData\Exception\MissingDataException; +use Drupal\Core\TypedData\TypedDataManagerInterface; /** * Enhances EntityAdapter for config entities. @@ -16,6 +18,13 @@ class ConfigEntityAdapter extends EntityAdapter { */ protected $entity; + /** + * The typed config manager. + * + * @var \Drupal\Core\Config\TypedConfigManagerInterface + */ + protected $typedConfigManager; + /** * {@inheritdoc} */ @@ -68,10 +77,31 @@ class ConfigEntityAdapter extends EntityAdapter { } /** - * Gets the typed data manager. + * Gets the typed config manager. * * @return \Drupal\Core\Config\TypedConfigManagerInterface - * The typed data manager. + * The typed config manager. + */ + protected function getTypedConfigManager() { + if (empty($this->typedConfigManager)) { + // Use the typed data manager if it is also the typed config manager. + // @todo Remove this in https://www.drupal.org/node/3011137. + $typed_data_manager = $this->getTypedDataManager(); + if ($typed_data_manager instanceof TypedConfigManagerInterface) { + $this->typedConfigManager = $typed_data_manager; + } + else { + $this->typedConfigManager = \Drupal::service('config.typed'); + } + } + + return $this->typedConfigManager; + } + + /** + * {@inheritdoc} + * + * @todo Remove this in https://www.drupal.org/node/3011137. */ public function getTypedDataManager() { if (empty($this->typedDataManager)) { @@ -81,6 +111,19 @@ class ConfigEntityAdapter extends EntityAdapter { return $this->typedDataManager; } + /** + * {@inheritdoc} + * + * @todo Remove this in https://www.drupal.org/node/3011137. + */ + public function setTypedDataManager(TypedDataManagerInterface $typed_data_manager) { + $this->typedDataManager = $typed_data_manager; + if ($typed_data_manager instanceof TypedConfigManagerInterface) { + $this->typedConfigManager = $typed_data_manager; + } + return $this; + } + /** * {@inheritdoc} */ @@ -97,7 +140,7 @@ class ConfigEntityAdapter extends EntityAdapter { * The typed data. */ protected function getConfigTypedData() { - return $this->getTypedDataManager()->createFromNameAndData($this->entity->getConfigDependencyName(), $this->entity->toArray()); + return $this->getTypedConfigManager()->createFromNameAndData($this->entity->getConfigDependencyName(), $this->entity->toArray()); } } diff --git a/web/core/lib/Drupal/Core/Entity/Query/Sql/Tables.php b/web/core/lib/Drupal/Core/Entity/Query/Sql/Tables.php index a9ff4b136..1f99d0f77 100644 --- a/web/core/lib/Drupal/Core/Entity/Query/Sql/Tables.php +++ b/web/core/lib/Drupal/Core/Entity/Query/Sql/Tables.php @@ -184,6 +184,7 @@ class Tables implements TablesInterface { // finds the property first. The data table is preferred, which is why // it gets added before the base table. $entity_tables = []; + $revision_table = NULL; if ($all_revisions && $field_storage && $field_storage->isRevisionable()) { $data_table = $entity_type->getRevisionDataTable(); $entity_base_table = $entity_type->getRevisionTable(); @@ -191,11 +192,18 @@ class Tables implements TablesInterface { else { $data_table = $entity_type->getDataTable(); $entity_base_table = $entity_type->getBaseTable(); + + if ($field_storage && $field_storage->isRevisionable() && in_array($field_storage->getName(), $entity_type->getRevisionMetadataKeys())) { + $revision_table = $entity_type->getRevisionTable(); + } } if ($data_table) { $this->sqlQuery->addMetaData('simple_query', FALSE); $entity_tables[$data_table] = $this->getTableMapping($data_table, $entity_type_id); } + if ($revision_table) { + $entity_tables[$revision_table] = $this->getTableMapping($revision_table, $entity_type_id); + } $entity_tables[$entity_base_table] = $this->getTableMapping($entity_base_table, $entity_type_id); $sql_column = $specifier; diff --git a/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php b/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php index 3fdf81b74..48545d22d 100644 --- a/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php +++ b/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php @@ -821,10 +821,13 @@ class SqlContentEntityStorage extends ContentEntityStorageBase implements SqlEnt if ($update) { $default_revision = $entity->isDefaultRevision(); if ($default_revision) { + // Remove the ID from the record to enable updates on SQL variants + // that prevent updating serial columns, for example, mssql. + unset($record->{$this->idKey}); $this->database ->update($this->baseTable) ->fields((array) $record) - ->condition($this->idKey, $record->{$this->idKey}) + ->condition($this->idKey, $entity->get($this->idKey)->value) ->execute(); } if ($this->revisionTable) { @@ -833,11 +836,15 @@ class SqlContentEntityStorage extends ContentEntityStorageBase implements SqlEnt } else { $record = $this->mapToStorageRecord($entity->getUntranslated(), $this->revisionTable); + // Remove the revision ID from the record to enable updates on SQL + // variants that prevent updating serial columns, for example, + // mssql. + unset($record->{$this->revisionKey}); $entity->preSaveRevision($this, $record); $this->database ->update($this->revisionTable) ->fields((array) $record) - ->condition($this->revisionKey, $record->{$this->revisionKey}) + ->condition($this->revisionKey, $entity->getRevisionId()) ->execute(); } } @@ -1064,19 +1071,21 @@ class SqlContentEntityStorage extends ContentEntityStorageBase implements SqlEnt ->condition($this->idKey, $record->{$this->idKey}) ->execute(); } + // Make sure to update the new revision key for the entity. + $entity->{$this->revisionKey}->value = $record->{$this->revisionKey}; } else { + // Remove the revision ID from the record to enable updates on SQL + // variants that prevent updating serial columns, for example, + // mssql. + unset($record->{$this->revisionKey}); $this->database ->update($this->revisionTable) ->fields((array) $record) - ->condition($this->revisionKey, $record->{$this->revisionKey}) + ->condition($this->revisionKey, $entity->getRevisionId()) ->execute(); } - - // Make sure to update the new revision key for the entity. - $entity->{$this->revisionKey}->value = $record->{$this->revisionKey}; - - return $record->{$this->revisionKey}; + return $entity->getRevisionId(); } /** diff --git a/web/core/lib/Drupal/Core/Entity/entity.api.php b/web/core/lib/Drupal/Core/Entity/entity.api.php index ac137330f..65b913d12 100644 --- a/web/core/lib/Drupal/Core/Entity/entity.api.php +++ b/web/core/lib/Drupal/Core/Entity/entity.api.php @@ -811,10 +811,10 @@ function hook_entity_view_mode_info_alter(&$view_modes) { * An associative array of all entity bundles, keyed by the entity * type name, and then the bundle name, with the following keys: * - label: The human-readable name of the bundle. - * - uri_callback: The same as the 'uri_callback' key defined for the entity - * type in the EntityManager, but for the bundle only. When determining - * the URI of an entity, if a 'uri_callback' is defined for both the - * entity type and the bundle, the one for the bundle is used. + * - uri_callback: (optional) The same as the 'uri_callback' key defined for + * the entity type in the EntityManager, but for the bundle only. When + * determining the URI of an entity, if a 'uri_callback' is defined for both + * the entity type and the bundle, the one for the bundle is used. * - translatable: (optional) A boolean value specifying whether this bundle * has translation support enabled. Defaults to FALSE. * diff --git a/web/core/lib/Drupal/Core/Extension/module.api.php b/web/core/lib/Drupal/Core/Extension/module.api.php index 76c49b5b7..a7d94ff3a 100644 --- a/web/core/lib/Drupal/Core/Extension/module.api.php +++ b/web/core/lib/Drupal/Core/Extension/module.api.php @@ -684,6 +684,20 @@ function hook_update_N(&$sandbox) { * Drupal also ensures to not execute the same hook_post_update_NAME() function * twice. * + * @section sec_bulk Batch updates + * If running your update all at once could possibly cause PHP to time out, use + * the $sandbox parameter to indicate that the Batch API should be used for your + * update. In this case, your update function acts as an implementation of + * callback_batch_operation(), and $sandbox acts as the batch context + * parameter. In your function, read the state information from the previous + * run from $sandbox (or initialize), run a chunk of updates, save the state in + * $sandbox, and set $sandbox['#finished'] to a value between 0 and 1 to + * indicate the percent completed, or 1 if it is finished (you need to do this + * explicitly in each pass). + * + * See the @link batch Batch operations topic @endlink for more information on + * how to use the Batch API. + * * @param array $sandbox * Stores information for batch updates. See above for more information. * diff --git a/web/core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/StringFormatter.php b/web/core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/StringFormatter.php index 320005cee..ef2f43c28 100644 --- a/web/core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/StringFormatter.php +++ b/web/core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/StringFormatter.php @@ -124,7 +124,6 @@ class StringFormatter extends FormatterBase implements ContainerFactoryPluginInt $elements = []; $url = NULL; if ($this->getSetting('link_to_entity')) { - // For the default revision this falls back to 'canonical'. $url = $this->getEntityUrl($items->getEntity()); } @@ -173,8 +172,11 @@ class StringFormatter extends FormatterBase implements ContainerFactoryPluginInt * The URI elements of the entity. */ protected function getEntityUrl(EntityInterface $entity) { - // For the default revision this falls back to 'canonical'. - return $entity->toUrl('revision'); + // For the default revision, the 'revision' link template falls back to + // 'canonical'. + // @see \Drupal\Core\Entity\Entity::toUrl() + $rel = $entity->getEntityType()->hasLinkTemplate('revision') ? 'revision' : 'canonical'; + return $entity->toUrl($rel); } } diff --git a/web/core/lib/Drupal/Core/Layout/LayoutPluginManager.php b/web/core/lib/Drupal/Core/Layout/LayoutPluginManager.php index a5a465293..2cd0c6895 100644 --- a/web/core/lib/Drupal/Core/Layout/LayoutPluginManager.php +++ b/web/core/lib/Drupal/Core/Layout/LayoutPluginManager.php @@ -13,6 +13,7 @@ use Drupal\Core\Plugin\Discovery\ContainerDerivativeDiscoveryDecorator; use Drupal\Core\Plugin\Discovery\YamlDiscoveryDecorator; use Drupal\Core\Layout\Annotation\Layout; use Drupal\Core\Plugin\FilteredPluginManagerTrait; +use Drupal\Core\StringTranslation\TranslatableMarkup; /** * Provides a plugin manager for layouts. @@ -71,6 +72,10 @@ class LayoutPluginManager extends DefaultPluginManager implements LayoutPluginMa if (!$this->discovery) { $discovery = new AnnotatedClassDiscovery($this->subdir, $this->namespaces, $this->pluginDefinitionAnnotationName, $this->additionalAnnotationNamespaces); $discovery = new YamlDiscoveryDecorator($discovery, 'layouts', $this->moduleHandler->getModuleDirectories() + $this->themeHandler->getThemeDirectories()); + $discovery + ->addTranslatableProperty('label') + ->addTranslatableProperty('description') + ->addTranslatableProperty('category'); $discovery = new AnnotationBridgeDecorator($discovery, $this->pluginDefinitionAnnotationName); $discovery = new ContainerDerivativeDiscoveryDecorator($discovery); $this->discovery = $discovery; @@ -140,6 +145,15 @@ class LayoutPluginManager extends DefaultPluginManager implements LayoutPluginMa if (!$definition->getDefaultRegion()) { $definition->setDefaultRegion(key($definition->getRegions())); } + // Makes sure region names are translatable. + $regions = array_map(function ($region) { + if (!$region['label'] instanceof TranslatableMarkup) { + // Region labels from YAML discovery needs translation. + $region['label'] = new TranslatableMarkup($region['label'], [], ['context' => 'layout_region']); + } + return $region; + }, $definition->getRegions()); + $definition->setRegions($regions); } /** diff --git a/web/core/lib/Drupal/Core/Mail/MailManager.php b/web/core/lib/Drupal/Core/Mail/MailManager.php index bbc0432c6..5cf3c9ea0 100644 --- a/web/core/lib/Drupal/Core/Mail/MailManager.php +++ b/web/core/lib/Drupal/Core/Mail/MailManager.php @@ -5,7 +5,7 @@ namespace Drupal\Core\Mail; use Drupal\Component\Render\MarkupInterface; use Drupal\Component\Render\PlainTextOutput; use Drupal\Component\Utility\Html; -use Drupal\Component\Utility\Unicode; +use Drupal\Component\Utility\Mail as MailHelper; use Drupal\Core\Logger\LoggerChannelFactoryInterface; use Drupal\Core\Messenger\MessengerTrait; use Drupal\Core\Plugin\DefaultPluginManager; @@ -254,12 +254,8 @@ class MailManager extends DefaultPluginManager implements MailManagerInterface { // Return-Path headers should have a domain authorized to use the // originating SMTP server. $headers['Sender'] = $headers['Return-Path'] = $site_mail; - // Headers are usually encoded in the mail plugin that implements - // \Drupal\Core\Mail\MailInterface::mail(), for example, - // \Drupal\Core\Mail\Plugin\Mail\PhpMail::mail(). The site name must be - // encoded here to prevent mail plugins from encoding the email address, - // which would break the header. - $headers['From'] = Unicode::mimeHeaderEncode($site_config->get('name'), TRUE) . ' <' . $site_mail . '>'; + // Make sure the site-name is a RFC-2822 compliant 'display-name'. + $headers['From'] = MailHelper::formatDisplayName($site_config->get('name')) . ' <' . $site_mail . '>'; if ($reply) { $headers['Reply-to'] = $reply; } diff --git a/web/core/lib/Drupal/Core/Path/AliasStorage.php b/web/core/lib/Drupal/Core/Path/AliasStorage.php index a02bc3534..b68984871 100644 --- a/web/core/lib/Drupal/Core/Path/AliasStorage.php +++ b/web/core/lib/Drupal/Core/Path/AliasStorage.php @@ -106,11 +106,11 @@ class AliasStorage implements AliasStorageInterface { $this->catchException($e); $original = FALSE; } - $fields['pid'] = $pid; $query = $this->connection->update(static::TABLE) ->fields($fields) ->condition('pid', $pid); $pid = $query->execute(); + $fields['pid'] = $pid; $fields['original'] = $original; $operation = 'update'; } diff --git a/web/core/lib/Drupal/Core/Plugin/Context/ContextDefinition.php b/web/core/lib/Drupal/Core/Plugin/Context/ContextDefinition.php index 9d8c81f58..be1d57846 100644 --- a/web/core/lib/Drupal/Core/Plugin/Context/ContextDefinition.php +++ b/web/core/lib/Drupal/Core/Plugin/Context/ContextDefinition.php @@ -270,7 +270,7 @@ class ContextDefinition implements ContextDefinitionInterface { public function setConstraints(array $constraints) { // If the backwards compatibility layer is present, delegate to that. if ($this->entityContextDefinition) { - $this->entityContextDefinition->setConstraint(); + $this->entityContextDefinition->setConstraints($constraints); } $this->constraints = $constraints; diff --git a/web/core/lib/Drupal/Core/Plugin/ContextAwarePluginAssignmentTrait.php b/web/core/lib/Drupal/Core/Plugin/ContextAwarePluginAssignmentTrait.php index 31ff649fa..75cbc681f 100644 --- a/web/core/lib/Drupal/Core/Plugin/ContextAwarePluginAssignmentTrait.php +++ b/web/core/lib/Drupal/Core/Plugin/ContextAwarePluginAssignmentTrait.php @@ -48,7 +48,10 @@ trait ContextAwarePluginAssignmentTrait { ]; } - if (count($options) > 1 || !$definition->isRequired()) { + // Show the context selector only if there is more than 1 option to choose + // from. Also, show if there is a single option but the plugin does not + // require a context. + if (count($options) > 1 || (count($options) == 1 && !$definition->isRequired())) { $assignments = $plugin->getContextMapping(); $element[$context_slot] = [ '#title' => $definition->getLabel() ?: $this->t('Select a @context value:', ['@context' => $context_slot]), diff --git a/web/core/lib/Drupal/Core/Plugin/ContextAwarePluginBase.php b/web/core/lib/Drupal/Core/Plugin/ContextAwarePluginBase.php index 80f10d202..ed8abf17f 100644 --- a/web/core/lib/Drupal/Core/Plugin/ContextAwarePluginBase.php +++ b/web/core/lib/Drupal/Core/Plugin/ContextAwarePluginBase.php @@ -70,7 +70,7 @@ abstract class ContextAwarePluginBase extends ComponentContextAwarePluginBase im * {@inheritdoc} */ public function setContextValue($name, $value) { - $this->context[$name] = Context::createFromContext($this->getContext($name), $value); + $this->setContext($name, Context::createFromContext($this->getContext($name), $value)); return $this; } diff --git a/web/core/lib/Drupal/Core/Render/Element/File.php b/web/core/lib/Drupal/Core/Render/Element/File.php index 07bd41507..bf2310a4a 100644 --- a/web/core/lib/Drupal/Core/Render/Element/File.php +++ b/web/core/lib/Drupal/Core/Render/Element/File.php @@ -44,7 +44,7 @@ class File extends FormElement { */ public static function processFile(&$element, FormStateInterface $form_state, &$complete_form) { if ($element['#multiple']) { - $element['#attributes'] = ['multiple' => 'multiple']; + $element['#attributes']['multiple'] = 'multiple'; $element['#name'] .= '[]'; } return $element; diff --git a/web/core/lib/Drupal/Core/Render/Element/StatusMessages.php b/web/core/lib/Drupal/Core/Render/Element/StatusMessages.php index a5a284298..d8627343e 100644 --- a/web/core/lib/Drupal/Core/Render/Element/StatusMessages.php +++ b/web/core/lib/Drupal/Core/Render/Element/StatusMessages.php @@ -76,7 +76,9 @@ class StatusMessages extends RenderElement { public static function renderMessages($type = NULL) { $render = []; if (isset($type)) { - $messages = \Drupal::messenger()->deleteByType($type); + $messages = [ + $type => \Drupal::messenger()->deleteByType($type), + ]; } else { $messages = \Drupal::messenger()->deleteAll(); diff --git a/web/core/lib/Drupal/Core/Render/PreviewFallbackInterface.php b/web/core/lib/Drupal/Core/Render/PreviewFallbackInterface.php new file mode 100644 index 000000000..cbaf6ac20 --- /dev/null +++ b/web/core/lib/Drupal/Core/Render/PreviewFallbackInterface.php @@ -0,0 +1,21 @@ +currentPath->getPath())); } $collection = $this->applyRouteFilters($collection, $request); + $collection = $this->applyFitOrder($collection); if ($ret = $this->matchCollection(rawurldecode($this->currentPath->getPath($request)), $collection)) { return $this->applyRouteEnhancers($ret, $request); @@ -286,6 +287,44 @@ class Router extends UrlMatcher implements RequestMatcherInterface, RouterInterf return $collection; } + /** + * Reapplies the fit order to a RouteCollection object. + * + * Route filters can reorder route collections. For example, routes with an + * explicit _format requirement will be preferred. This can result in a less + * fit route being used. For example, as a result of filtering /user/% comes + * before /user/login. In order to not break this fundamental property of + * routes, we need to reapply the fit order. We also need to ensure that order + * within each group of the same fit is preserved. + * + * @param \Symfony\Component\Routing\RouteCollection $collection + * The route collection. + * + * @return \Symfony\Component\Routing\RouteCollection + * The reordered route collection. + */ + protected function applyFitOrder(RouteCollection $collection) { + $buckets = []; + // Sort all the routes by fit descending. + foreach ($collection->all() as $name => $route) { + $fit = $route->compile()->getFit(); + $buckets += [$fit => []]; + $buckets[$fit][] = [$name, $route]; + } + krsort($buckets); + + $flattened = array_reduce($buckets, 'array_merge', []); + + // Add them back onto a new route collection. + $collection = new RouteCollection(); + foreach ($flattened as $pair) { + $name = $pair[0]; + $route = $pair[1]; + $collection->add($name, $route); + } + return $collection; + } + /** * {@inheritdoc} */ diff --git a/web/core/lib/Drupal/Core/Security/PharExtensionInterceptor.php b/web/core/lib/Drupal/Core/Security/PharExtensionInterceptor.php new file mode 100644 index 000000000..2e1a0cbc8 --- /dev/null +++ b/web/core/lib/Drupal/Core/Security/PharExtensionInterceptor.php @@ -0,0 +1,79 @@ +baseFileContainsPharExtension($path)) { + return TRUE; + } + throw new Exception( + sprintf( + 'Unexpected file extension in "%s"', + $path + ), + 1535198703 + ); + } + + /** + * Determines if a path has a .phar extension or invoked execution. + * + * @param string $path + * The path of the phar file to check. + * + * @return bool + * TRUE if the file has a .phar extension or if the execution has been + * invoked by the phar file. + */ + private function baseFileContainsPharExtension($path) { + $baseFile = Helper::determineBaseFile($path); + if ($baseFile === NULL) { + return FALSE; + } + // If the stream wrapper is registered by invoking a phar file that does + // not not have .phar extension then this should be allowed. For + // example, some CLI tools recommend removing the extension. + $backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); + // Find the last entry in the backtrace containing a 'file' key as + // sometimes the last caller is executed outside the scope of a file. For + // example, this occurs with shutdown functions. + do { + $caller = array_pop($backtrace); + } while (empty($caller['file']) && !empty($backtrace)); + if (isset($caller['file']) && $baseFile === Helper::determineBaseFile($caller['file'])) { + return TRUE; + } + $fileExtension = pathinfo($baseFile, PATHINFO_EXTENSION); + return strtolower($fileExtension) === 'phar'; + } + +} diff --git a/web/core/lib/Drupal/Core/Session/SessionManager.php b/web/core/lib/Drupal/Core/Session/SessionManager.php index 607103109..798139867 100644 --- a/web/core/lib/Drupal/Core/Session/SessionManager.php +++ b/web/core/lib/Drupal/Core/Session/SessionManager.php @@ -218,6 +218,11 @@ class SessionManager extends NativeSessionStorage implements SessionManagerInter if ($this->isStarted()) { $old_session_id = $this->getId(); + // Save and close the old session. Call the parent method to avoid issue + // with session destruction due to the session being considered obsolete. + parent::save(); + // Ensure the session is reloaded correctly. + $this->startedLazy = TRUE; } session_id(Crypt::randomBytesBase64()); @@ -230,10 +235,7 @@ class SessionManager extends NativeSessionStorage implements SessionManagerInter $this->migrateStoredSession($old_session_id); } - if (!$this->isStarted()) { - // Start the session when it doesn't exist yet. - $this->startNow(); - } + $this->startNow(); } /** diff --git a/web/core/lib/Drupal/Core/TempStore/PrivateTempStore.php b/web/core/lib/Drupal/Core/TempStore/PrivateTempStore.php index ea7ec3fc3..606a0dc9e 100644 --- a/web/core/lib/Drupal/Core/TempStore/PrivateTempStore.php +++ b/web/core/lib/Drupal/Core/TempStore/PrivateTempStore.php @@ -2,6 +2,7 @@ namespace Drupal\Core\TempStore; +use Drupal\Core\DependencyInjection\DependencySerializationTrait; use Drupal\Core\KeyValueStore\KeyValueStoreExpirableInterface; use Drupal\Core\Lock\LockBackendInterface; use Drupal\Core\Session\AccountProxyInterface; @@ -27,6 +28,7 @@ use Symfony\Component\HttpFoundation\RequestStack; * \Drupal\Core\TempStore\SharedTempStore. */ class PrivateTempStore { + use DependencySerializationTrait; /** * The key/value storage object used for this data. diff --git a/web/core/lib/Drupal/Core/TypedData/Validation/RecursiveContextualValidator.php b/web/core/lib/Drupal/Core/TypedData/Validation/RecursiveContextualValidator.php index a5d453ae5..449996710 100644 --- a/web/core/lib/Drupal/Core/TypedData/Validation/RecursiveContextualValidator.php +++ b/web/core/lib/Drupal/Core/TypedData/Validation/RecursiveContextualValidator.php @@ -126,10 +126,16 @@ class RecursiveContextualValidator implements ContextualValidatorInterface { $metadata = $this->metadataFactory->getMetadataFor($data); $cache_key = spl_object_hash($data); $property_path = $is_root_call ? '' : PropertyPath::append($previous_path, $data->getName()); + + // Prefer a specific instance of the typed data manager stored by the data + // if it is available. This is necessary for specialized typed data objects, + // for example those using the typed config subclass of the manager. + $typed_data_manager = method_exists($data, 'getTypedDataManager') ? $data->getTypedDataManager() : $this->typedDataManager; + // Pass the canonical representation of the data as validated value to // constraint validators, such that they do not have to care about Typed // Data. - $value = $this->typedDataManager->getCanonicalRepresentation($data); + $value = $typed_data_manager->getCanonicalRepresentation($data); $this->context->setNode($value, $data, $metadata, $property_path); if (isset($constraints) || !$this->context->isGroupValidated($cache_key, Constraint::DEFAULT_GROUP)) { diff --git a/web/core/lib/Drupal/Core/Update/UpdateKernel.php b/web/core/lib/Drupal/Core/Update/UpdateKernel.php index 24a5755e3..2b74dabb6 100644 --- a/web/core/lib/Drupal/Core/Update/UpdateKernel.php +++ b/web/core/lib/Drupal/Core/Update/UpdateKernel.php @@ -5,6 +5,7 @@ namespace Drupal\Core\Update; use Drupal\Core\DrupalKernel; use Drupal\Core\Session\AnonymousUserSession; use Drupal\Core\Site\Settings; +use Drupal\Core\StackMiddleware\ReverseProxyMiddleware; use Symfony\Cmf\Component\Routing\RouteObjectInterface; use Symfony\Component\HttpFoundation\ParameterBag; use Symfony\Component\HttpFoundation\Request; @@ -59,6 +60,7 @@ class UpdateKernel extends DrupalKernel { // First boot up basic things, like loading the include files. $this->initializeSettings($request); + ReverseProxyMiddleware::setSettingsOnRequest($request, Settings::getInstance()); $this->boot(); $container = $this->getContainer(); /** @var \Symfony\Component\HttpFoundation\RequestStack $request_stack */ diff --git a/web/core/misc/tableheader.es6.js b/web/core/misc/tableheader.es6.js index 9e26be5fc..c43d1dece 100644 --- a/web/core/misc/tableheader.es6.js +++ b/web/core/misc/tableheader.es6.js @@ -326,4 +326,4 @@ // Expose constructor in the public space. Drupal.TableHeader = TableHeader; -})(jQuery, Drupal, window.parent.Drupal.displace); +})(jQuery, Drupal, window.Drupal.displace); diff --git a/web/core/misc/tableheader.js b/web/core/misc/tableheader.js index 1fd60086d..d5ad0a235 100644 --- a/web/core/misc/tableheader.js +++ b/web/core/misc/tableheader.js @@ -164,4 +164,4 @@ }); Drupal.TableHeader = TableHeader; -})(jQuery, Drupal, window.parent.Drupal.displace); \ No newline at end of file +})(jQuery, Drupal, window.Drupal.displace); \ No newline at end of file diff --git a/web/core/modules/aggregator/src/Tests/AggregatorTestBase.php b/web/core/modules/aggregator/src/Tests/AggregatorTestBase.php index f42248975..00827a223 100644 --- a/web/core/modules/aggregator/src/Tests/AggregatorTestBase.php +++ b/web/core/modules/aggregator/src/Tests/AggregatorTestBase.php @@ -70,9 +70,9 @@ abstract class AggregatorTestBase extends WebTestBase { $view_link = $this->xpath('//div[@class="messages"]//a[contains(@href, :href)]', [':href' => 'aggregator/sources/']); $this->assert(isset($view_link), 'The message area contains a link to a feed'); - $fid = db_query("SELECT fid FROM {aggregator_feed} WHERE title = :title AND url = :url", [':title' => $edit['title[0][value]'], ':url' => $edit['url[0][value]']])->fetchField(); - $this->assertTrue(!empty($fid), 'The feed found in database.'); - return Feed::load($fid); + $fids = \Drupal::entityQuery('aggregator_feed')->condition('title', $edit['title[0][value]'])->condition('url', $edit['url[0][value]'])->execute(); + $this->assertNotEmpty($fids, 'The feed found in database.'); + return Feed::load(array_values($fids)[0]); } /** @@ -179,10 +179,10 @@ abstract class AggregatorTestBase extends WebTestBase { $this->clickLink('Update items'); // Ensure we have the right number of items. - $result = db_query('SELECT iid FROM {aggregator_item} WHERE fid = :fid', [':fid' => $feed->id()]); + $iids = \Drupal::entityQuery('aggregator_item')->condition('fid', $feed->id())->execute(); $feed->items = []; - foreach ($result as $item) { - $feed->items[] = $item->iid; + foreach ($iids as $iid) { + $feed->items[] = $iid; } if ($expected_count !== NULL) { @@ -211,11 +211,12 @@ abstract class AggregatorTestBase extends WebTestBase { * Expected number of feed items. */ public function updateAndDelete(FeedInterface $feed, $expected_count) { + $count_query = \Drupal::entityQuery('aggregator_item')->condition('fid', $feed->id())->count(); $this->updateFeedItems($feed, $expected_count); - $count = db_query('SELECT COUNT(*) FROM {aggregator_item} WHERE fid = :fid', [':fid' => $feed->id()])->fetchField(); + $count = $count_query->execute(); $this->assertTrue($count); $this->deleteFeedItems($feed); - $count = db_query('SELECT COUNT(*) FROM {aggregator_item} WHERE fid = :fid', [':fid' => $feed->id()])->fetchField(); + $count = $count_query->execute(); $this->assertTrue($count == 0); } @@ -231,7 +232,7 @@ abstract class AggregatorTestBase extends WebTestBase { * TRUE if feed is unique. */ public function uniqueFeed($feed_name, $feed_url) { - $result = db_query("SELECT COUNT(*) FROM {aggregator_feed} WHERE title = :title AND url = :url", [':title' => $feed_name, ':url' => $feed_url])->fetchField(); + $result = \Drupal::entityQuery('aggregator_feed')->condition('title', $feed_name)->condition('url', $feed_url)->count()->execute(); return (1 == $result); } diff --git a/web/core/modules/aggregator/tests/src/Functional/AggregatorCronTest.php b/web/core/modules/aggregator/tests/src/Functional/AggregatorCronTest.php index bb7c90ae3..4a3ca0b07 100644 --- a/web/core/modules/aggregator/tests/src/Functional/AggregatorCronTest.php +++ b/web/core/modules/aggregator/tests/src/Functional/AggregatorCronTest.php @@ -20,31 +20,23 @@ class AggregatorCronTest extends AggregatorTestBase { // Create feed and test basic updating on cron. $this->createSampleNodes(); $feed = $this->createFeed(); + $count_query = \Drupal::entityQuery('aggregator_item')->condition('fid', $feed->id())->count(); + $this->cronRun(); - $this->assertEqual(5, db_query('SELECT COUNT(*) FROM {aggregator_item} WHERE fid = :fid', [':fid' => $feed->id()])->fetchField()); + $this->assertEqual(5, $count_query->execute()); $this->deleteFeedItems($feed); - $this->assertEqual(0, db_query('SELECT COUNT(*) FROM {aggregator_item} WHERE fid = :fid', [':fid' => $feed->id()])->fetchField()); + $this->assertEqual(0, $count_query->execute()); $this->cronRun(); - $this->assertEqual(5, db_query('SELECT COUNT(*) FROM {aggregator_item} WHERE fid = :fid', [':fid' => $feed->id()])->fetchField()); + $this->assertEqual(5, $count_query->execute()); // Test feed locking when queued for update. $this->deleteFeedItems($feed); - db_update('aggregator_feed') - ->condition('fid', $feed->id()) - ->fields([ - 'queued' => REQUEST_TIME, - ]) - ->execute(); + $feed->setQueuedTime(REQUEST_TIME)->save(); $this->cronRun(); - $this->assertEqual(0, db_query('SELECT COUNT(*) FROM {aggregator_item} WHERE fid = :fid', [':fid' => $feed->id()])->fetchField()); - db_update('aggregator_feed') - ->condition('fid', $feed->id()) - ->fields([ - 'queued' => 0, - ]) - ->execute(); + $this->assertEqual(0, $count_query->execute()); + $feed->setQueuedTime(0)->save(); $this->cronRun(); - $this->assertEqual(5, db_query('SELECT COUNT(*) FROM {aggregator_item} WHERE fid = :fid', [':fid' => $feed->id()])->fetchField()); + $this->assertEqual(5, $count_query->execute()); } } diff --git a/web/core/modules/aggregator/tests/src/Functional/AggregatorTestBase.php b/web/core/modules/aggregator/tests/src/Functional/AggregatorTestBase.php index ddd98bb82..71c19031a 100644 --- a/web/core/modules/aggregator/tests/src/Functional/AggregatorTestBase.php +++ b/web/core/modules/aggregator/tests/src/Functional/AggregatorTestBase.php @@ -67,9 +67,9 @@ abstract class AggregatorTestBase extends BrowserTestBase { $view_link = $this->xpath('//div[@class="messages"]//a[contains(@href, :href)]', [':href' => 'aggregator/sources/']); $this->assert(isset($view_link), 'The message area contains a link to a feed'); - $fid = db_query("SELECT fid FROM {aggregator_feed} WHERE title = :title AND url = :url", [':title' => $edit['title[0][value]'], ':url' => $edit['url[0][value]']])->fetchField(); - $this->assertTrue(!empty($fid), 'The feed found in database.'); - return Feed::load($fid); + $fids = \Drupal::entityQuery('aggregator_feed')->condition('title', $edit['title[0][value]'])->condition('url', $edit['url[0][value]'])->execute(); + $this->assertNotEmpty($fids, 'The feed found in database.'); + return Feed::load(array_values($fids)[0]); } /** @@ -176,10 +176,10 @@ abstract class AggregatorTestBase extends BrowserTestBase { $this->clickLink('Update items'); // Ensure we have the right number of items. - $result = db_query('SELECT iid FROM {aggregator_item} WHERE fid = :fid', [':fid' => $feed->id()]); + $iids = \Drupal::entityQuery('aggregator_item')->condition('fid', $feed->id())->execute(); $feed->items = []; - foreach ($result as $item) { - $feed->items[] = $item->iid; + foreach ($iids as $iid) { + $feed->items[] = $iid; } if ($expected_count !== NULL) { @@ -208,11 +208,12 @@ abstract class AggregatorTestBase extends BrowserTestBase { * Expected number of feed items. */ public function updateAndDelete(FeedInterface $feed, $expected_count) { + $count_query = \Drupal::entityQuery('aggregator_item')->condition('fid', $feed->id())->count(); $this->updateFeedItems($feed, $expected_count); - $count = db_query('SELECT COUNT(*) FROM {aggregator_item} WHERE fid = :fid', [':fid' => $feed->id()])->fetchField(); + $count = $count_query->execute(); $this->assertTrue($count); $this->deleteFeedItems($feed); - $count = db_query('SELECT COUNT(*) FROM {aggregator_item} WHERE fid = :fid', [':fid' => $feed->id()])->fetchField(); + $count = $count_query->execute(); $this->assertTrue($count == 0); } @@ -228,7 +229,7 @@ abstract class AggregatorTestBase extends BrowserTestBase { * TRUE if feed is unique. */ public function uniqueFeed($feed_name, $feed_url) { - $result = db_query("SELECT COUNT(*) FROM {aggregator_feed} WHERE title = :title AND url = :url", [':title' => $feed_name, ':url' => $feed_url])->fetchField(); + $result = \Drupal::entityQuery('aggregator_feed')->condition('title', $feed_name)->condition('url', $feed_url)->count()->execute(); return (1 == $result); } diff --git a/web/core/modules/aggregator/tests/src/Functional/DeleteFeedTest.php b/web/core/modules/aggregator/tests/src/Functional/DeleteFeedTest.php index 557720658..7f6a4087f 100644 --- a/web/core/modules/aggregator/tests/src/Functional/DeleteFeedTest.php +++ b/web/core/modules/aggregator/tests/src/Functional/DeleteFeedTest.php @@ -43,8 +43,8 @@ class DeleteFeedTest extends AggregatorTestBase { $this->assertResponse(404, 'Deleted feed source does not exist.'); // Check database for feed. - $result = db_query("SELECT COUNT(*) FROM {aggregator_feed} WHERE title = :title AND url = :url", [':title' => $feed1->label(), ':url' => $feed1->getUrl()])->fetchField(); - $this->assertFalse($result, 'Feed not found in database'); + $result = \Drupal::entityQuery('aggregator_feed')->condition('title', $feed1->label())->condition('url', $feed1->getUrl())->count()->execute(); + $this->assertEquals(0, $result, 'Feed not found in database'); } } diff --git a/web/core/modules/aggregator/tests/src/Functional/FeedParserTest.php b/web/core/modules/aggregator/tests/src/Functional/FeedParserTest.php index ecb2e50c7..e340b27a9 100644 --- a/web/core/modules/aggregator/tests/src/Functional/FeedParserTest.php +++ b/web/core/modules/aggregator/tests/src/Functional/FeedParserTest.php @@ -4,6 +4,7 @@ namespace Drupal\Tests\aggregator\Functional; use Drupal\Core\Url; use Drupal\aggregator\Entity\Feed; +use Drupal\aggregator\Entity\Item; /** * Tests the built-in feed parser with valid feed samples. @@ -57,16 +58,17 @@ class FeedParserTest extends AggregatorTestBase { $this->assertText('Atom-Powered Robots Run Amok'); $this->assertLinkByHref('http://example.org/2003/12/13/atom03'); $this->assertText('Some text.'); - $this->assertEqual('urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a', db_query('SELECT guid FROM {aggregator_item} WHERE link = :link', [':link' => 'http://example.org/2003/12/13/atom03'])->fetchField(), 'Atom entry id element is parsed correctly.'); + $iids = \Drupal::entityQuery('aggregator_item')->condition('link', 'http://example.org/2003/12/13/atom03')->execute(); + $item = Item::load(array_values($iids)[0]); + $this->assertEqual('urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a', $item->getGuid(), 'Atom entry id element is parsed correctly.'); // Check for second feed entry. $this->assertText('We tried to stop them, but we failed.'); $this->assertLinkByHref('http://example.org/2003/12/14/atom03'); $this->assertText('Some other text.'); - $db_guid = db_query('SELECT guid FROM {aggregator_item} WHERE link = :link', [ - ':link' => 'http://example.org/2003/12/14/atom03', - ])->fetchField(); - $this->assertEqual('urn:uuid:1225c695-cfb8-4ebb-bbbb-80da344efa6a', $db_guid, 'Atom entry id element is parsed correctly.'); + $iids = \Drupal::entityQuery('aggregator_item')->condition('link', 'http://example.org/2003/12/14/atom03')->execute(); + $item = Item::load(array_values($iids)[0]); + $this->assertEqual('urn:uuid:1225c695-cfb8-4ebb-bbbb-80da344efa6a', $item->getGuid(), 'Atom entry id element is parsed correctly.'); } /** diff --git a/web/core/modules/aggregator/tests/src/Functional/ImportOpmlTest.php b/web/core/modules/aggregator/tests/src/Functional/ImportOpmlTest.php index 2500b9ebb..f9099e0eb 100644 --- a/web/core/modules/aggregator/tests/src/Functional/ImportOpmlTest.php +++ b/web/core/modules/aggregator/tests/src/Functional/ImportOpmlTest.php @@ -2,6 +2,8 @@ namespace Drupal\Tests\aggregator\Functional; +use Drupal\aggregator\Entity\Feed; + /** * Tests OPML import. * @@ -44,7 +46,8 @@ class ImportOpmlTest extends AggregatorTestBase { * Submits form filled with invalid fields. */ public function validateImportFormFields() { - $before = db_query('SELECT COUNT(*) FROM {aggregator_feed}')->fetchField(); + $count_query = \Drupal::entityQuery('aggregator_feed')->count(); + $before = $count_query->execute(); $edit = []; $this->drupalPostForm('admin/config/services/aggregator/add/opml', $edit, t('Import')); @@ -62,7 +65,7 @@ class ImportOpmlTest extends AggregatorTestBase { $this->drupalPostForm('admin/config/services/aggregator/add/opml', $edit, t('Import')); $this->assertText(t('The URL invalidUrl://empty is not valid.'), 'Error if the URL is invalid.'); - $after = db_query('SELECT COUNT(*) FROM {aggregator_feed}')->fetchField(); + $after = $count_query->execute(); $this->assertEqual($before, $after, 'No feeds were added during the three last form submissions.'); } @@ -70,7 +73,8 @@ class ImportOpmlTest extends AggregatorTestBase { * Submits form with invalid, empty, and valid OPML files. */ protected function submitImportForm() { - $before = db_query('SELECT COUNT(*) FROM {aggregator_feed}')->fetchField(); + $count_query = \Drupal::entityQuery('aggregator_feed')->count(); + $before = $count_query->execute(); $form['files[upload]'] = $this->getInvalidOpml(); $this->drupalPostForm('admin/config/services/aggregator/add/opml', $form, t('Import')); @@ -80,10 +84,12 @@ class ImportOpmlTest extends AggregatorTestBase { $this->drupalPostForm('admin/config/services/aggregator/add/opml', $edit, t('Import')); $this->assertText(t('No new feed has been added.'), 'Attempting to load empty OPML from remote URL.'); - $after = db_query('SELECT COUNT(*) FROM {aggregator_feed}')->fetchField(); + $after = $count_query->execute(); $this->assertEqual($before, $after, 'No feeds were added during the two last form submissions.'); - db_delete('aggregator_feed')->execute(); + foreach (Feed::loadMultiple() as $feed) { + $feed->delete(); + } $feeds[0] = $this->getFeedEditArray(); $feeds[1] = $this->getFeedEditArray(); @@ -96,15 +102,15 @@ class ImportOpmlTest extends AggregatorTestBase { $this->assertRaw(t('A feed with the URL %url already exists.', ['%url' => $feeds[0]['url[0][value]']]), 'Verifying that a duplicate URL was identified'); $this->assertRaw(t('A feed named %title already exists.', ['%title' => $feeds[1]['title[0][value]']]), 'Verifying that a duplicate title was identified'); - $after = db_query('SELECT COUNT(*) FROM {aggregator_feed}')->fetchField(); + $after = $count_query->execute(); $this->assertEqual($after, 2, 'Verifying that two distinct feeds were added.'); - $feeds_from_db = db_query("SELECT title, url, refresh FROM {aggregator_feed}"); + $feed_entities = Feed::loadMultiple(); $refresh = TRUE; - foreach ($feeds_from_db as $feed) { - $title[$feed->url] = $feed->title; - $url[$feed->title] = $feed->url; - $refresh = $refresh && $feed->refresh == 900; + foreach ($feed_entities as $feed_entity) { + $title[$feed_entity->getUrl()] = $feed_entity->label(); + $url[$feed_entity->label()] = $feed_entity->getUrl(); + $refresh = $refresh && $feed_entity->getRefreshRate() == 900; } $this->assertEqual($title[$feeds[0]['url[0][value]']], $feeds[0]['title[0][value]'], 'First feed was added correctly.'); diff --git a/web/core/modules/aggregator/tests/src/Functional/UpdateFeedItemTest.php b/web/core/modules/aggregator/tests/src/Functional/UpdateFeedItemTest.php index a7ec0edd5..fd2a74244 100644 --- a/web/core/modules/aggregator/tests/src/Functional/UpdateFeedItemTest.php +++ b/web/core/modules/aggregator/tests/src/Functional/UpdateFeedItemTest.php @@ -3,6 +3,7 @@ namespace Drupal\Tests\aggregator\Functional; use Drupal\aggregator\Entity\Feed; +use Drupal\aggregator\Entity\Item; /** * Update feed items from a feed. @@ -43,26 +44,24 @@ class UpdateFeedItemTest extends AggregatorTestBase { $view_link = $this->xpath('//div[@class="messages"]//a[contains(@href, :href)]', [':href' => 'aggregator/sources/']); $this->assert(isset($view_link), 'The message area contains a link to a feed'); - $fid = db_query("SELECT fid FROM {aggregator_feed} WHERE url = :url", [':url' => $edit['url[0][value]']])->fetchField(); - $feed = Feed::load($fid); + $fids = \Drupal::entityQuery('aggregator_feed')->condition('url', $edit['url[0][value]'])->execute(); + $feed = Feed::load(array_values($fids)[0]); $feed->refreshItems(); - $before = db_query('SELECT timestamp FROM {aggregator_item} WHERE fid = :fid', [':fid' => $feed->id()])->fetchField(); + $iids = \Drupal::entityQuery('aggregator_item')->condition('fid', $feed->id())->execute(); + $before = Item::load(array_values($iids)[0])->getPostedTime(); // Sleep for 3 second. sleep(3); - db_update('aggregator_feed') - ->condition('fid', $feed->id()) - ->fields([ - 'checked' => 0, - 'hash' => '', - 'etag' => '', - 'modified' => 0, - ]) - ->execute(); + $feed + ->setLastCheckedTime(0) + ->setHash('') + ->setEtag('') + ->setLastModified(0) + ->save(); $feed->refreshItems(); - $after = db_query('SELECT timestamp FROM {aggregator_item} WHERE fid = :fid', [':fid' => $feed->id()])->fetchField(); + $after = Item::load(array_values($iids)[0])->getPostedTime(); $this->assertTrue($before === $after, format_string('Publish timestamp of feed item was not updated (@before === @after)', ['@before' => $before, '@after' => $after])); // Make sure updating items works even after uninstalling a module diff --git a/web/core/modules/block/js/block.admin.es6.js b/web/core/modules/block/js/block.admin.es6.js index 197bc4bea..ff4d8eb20 100644 --- a/web/core/modules/block/js/block.admin.es6.js +++ b/web/core/modules/block/js/block.admin.es6.js @@ -93,7 +93,8 @@ */ Drupal.behaviors.blockHighlightPlacement = { attach(context, settings) { - if (settings.blockPlacement) { + // Ensure that the block we are attempting to scroll to actually exists. + if (settings.blockPlacement && $('.js-block-placed').length) { $(context) .find('[data-drupal-selector="edit-blocks"]') .once('block-highlight') diff --git a/web/core/modules/block/js/block.admin.js b/web/core/modules/block/js/block.admin.js index 7cafed16a..641f12d3f 100644 --- a/web/core/modules/block/js/block.admin.js +++ b/web/core/modules/block/js/block.admin.js @@ -41,7 +41,7 @@ Drupal.behaviors.blockHighlightPlacement = { attach: function attach(context, settings) { - if (settings.blockPlacement) { + if (settings.blockPlacement && $('.js-block-placed').length) { $(context).find('[data-drupal-selector="edit-blocks"]').once('block-highlight').each(function () { var $container = $(this); diff --git a/web/core/modules/block/src/BlockListBuilder.php b/web/core/modules/block/src/BlockListBuilder.php index c1ccc504d..3884d27f2 100644 --- a/web/core/modules/block/src/BlockListBuilder.php +++ b/web/core/modules/block/src/BlockListBuilder.php @@ -193,6 +193,9 @@ class BlockListBuilder extends ConfigEntityListBuilder implements FormInterface if ($this->request->query->has('block-placement')) { $placement = $this->request->query->get('block-placement'); $form['#attached']['drupalSettings']['blockPlacement'] = $placement; + // Remove the block placement from the current request so that it is not + // passed on to any redirect destinations. + $this->request->query->remove('block-placement'); } // Loop over each region and build blocks. @@ -378,9 +381,6 @@ class BlockListBuilder extends ConfigEntityListBuilder implements FormInterface $entity->save(); } $this->messenger->addStatus($this->t('The block settings have been updated.')); - - // Remove any previously set block placement. - $this->request->query->remove('block-placement'); } /** diff --git a/web/core/modules/block/src/Plugin/migrate/source/d7/BlockTranslation.php b/web/core/modules/block/src/Plugin/migrate/source/d7/BlockTranslation.php new file mode 100644 index 000000000..acf9e2b7c --- /dev/null +++ b/web/core/modules/block/src/Plugin/migrate/source/d7/BlockTranslation.php @@ -0,0 +1,99 @@ +select('i18n_string', 'i18n') + ->fields('i18n') + ->fields('b', [ + 'bid', + 'module', + 'delta', + 'theme', + 'status', + 'weight', + 'region', + 'custom', + 'visibility', + 'pages', + 'title', + 'cache', + 'i18n_mode', + ]) + ->fields('lt', [ + 'lid', + 'translation', + 'language', + 'plid', + 'plural', + 'i18n_status', + ]) + ->condition('i18n_mode', 1); + $query->leftjoin($this->blockTable, 'b', ('b.delta = i18n.objectid')); + $query->leftjoin('locales_target', 'lt', 'lt.lid = i18n.lid'); + return $query; + } + + /** + * {@inheritdoc} + */ + public function fields() { + return [ + 'bid' => $this->t('The block numeric identifier.'), + 'module' => $this->t('The module providing the block.'), + 'delta' => $this->t("The block's delta."), + 'theme' => $this->t('Which theme the block is placed in.'), + 'status' => $this->t('Block enabled status'), + 'weight' => $this->t('Block weight within region'), + 'region' => $this->t('Theme region within which the block is set'), + 'visibility' => $this->t('Visibility'), + 'pages' => $this->t('Pages list.'), + 'title' => $this->t('Block title.'), + 'cache' => $this->t('Cache rule.'), + 'i18n_mode' => $this->t('Multilingual mode'), + 'lid' => $this->t('Language string ID'), + 'textgroup' => $this->t('A module defined group of translations'), + 'context' => $this->t('Full string ID for quick search: type:objectid:property.'), + 'objectid' => $this->t('Object ID'), + 'type' => $this->t('Object type for this string'), + 'property' => $this->t('Object property for this string'), + 'objectindex' => $this->t('Integer value of Object ID'), + 'format' => $this->t('The {filter_format}.format of the string'), + 'translation' => $this->t('Translation'), + 'language' => $this->t('Language code'), + 'plid' => $this->t('Parent lid'), + 'plural' => $this->t('Plural index number'), + 'i18n_status' => $this->t('Translation needs update'), + ]; + } + + /** + * {@inheritdoc} + */ + public function getIds() { + $ids['delta']['type'] = 'string'; + $ids['delta']['alias'] = 'b'; + $ids['language']['type'] = 'string'; + return $ids; + } + +} diff --git a/web/core/modules/block/tests/modules/block_test/src/Plugin/Block/TestContextAwareNoValidContextOptionsBlock.php b/web/core/modules/block/tests/modules/block_test/src/Plugin/Block/TestContextAwareNoValidContextOptionsBlock.php new file mode 100644 index 000000000..234bf9a30 --- /dev/null +++ b/web/core/modules/block/tests/modules/block_test/src/Plugin/Block/TestContextAwareNoValidContextOptionsBlock.php @@ -0,0 +1,29 @@ + 'Rendered block with no valid context options', + ]; + } + +} diff --git a/web/core/modules/block/tests/src/Functional/BlockUiTest.php b/web/core/modules/block/tests/src/Functional/BlockUiTest.php index e6c187544..a2b53e8f5 100644 --- a/web/core/modules/block/tests/src/Functional/BlockUiTest.php +++ b/web/core/modules/block/tests/src/Functional/BlockUiTest.php @@ -3,6 +3,8 @@ namespace Drupal\Tests\block\Functional; use Drupal\Component\Utility\Html; +use Drupal\language\Entity\ConfigurableLanguage; +use Drupal\language\Plugin\LanguageNegotiation\LanguageNegotiationUrl; use Drupal\Tests\BrowserTestBase; /** @@ -239,6 +241,13 @@ class BlockUiTest extends BrowserTestBase { $this->assertText('User context found.'); $this->assertRaw($expected_text); + // Test context mapping form element is not visible if there are no valid + // context options for the block (the test_context_aware_no_valid_context_options + // block has one context defined which is not available for it on the + // Block Layout interface). + $this->drupalGet('admin/structure/block/add/test_context_aware_no_valid_context_options/classy'); + $this->assertSession()->fieldNotExists('edit-settings-context-mapping-email'); + // Test context mapping allows empty selection for optional contexts. $this->drupalGet('admin/structure/block/manage/testcontextawareblock'); $edit = [ @@ -281,6 +290,24 @@ class BlockUiTest extends BrowserTestBase { * Tests the block placement indicator. */ public function testBlockPlacementIndicator() { + // Test the block placement indicator with using the domain as URL language + // indicator. This causes destination query parameters to be absolute URLs. + \Drupal::service('module_installer')->install(['language', 'locale']); + $this->container = \Drupal::getContainer(); + ConfigurableLanguage::createFromLangcode('it')->save(); + $config = $this->config('language.types'); + $config->set('negotiation.language_interface.enabled', [ + LanguageNegotiationUrl::METHOD_ID => -10, + ]); + $config->save(); + $config = $this->config('language.negotiation'); + $config->set('url.source', LanguageNegotiationUrl::CONFIG_DOMAIN); + $config->set('url.domains', [ + 'en' => \Drupal::request()->getHost(), + 'it' => 'it.example.com', + ]); + $config->save(); + // Select the 'Powered by Drupal' block to be placed. $block = []; $block['id'] = strtolower($this->randomMachineName()); @@ -289,11 +316,30 @@ class BlockUiTest extends BrowserTestBase { // After adding a block, it will indicate which block was just added. $this->drupalPostForm('admin/structure/block/add/system_powered_by_block', $block, t('Save block')); - $this->assertUrl('admin/structure/block/list/classy?block-placement=' . Html::getClass($block['id'])); + $this->assertSession()->addressEquals('admin/structure/block/list/classy?block-placement=' . Html::getClass($block['id'])); - // Resaving the block page will remove the block indicator. + // Resaving the block page will remove the block placement indicator. $this->drupalPostForm(NULL, [], t('Save blocks')); - $this->assertUrl('admin/structure/block/list/classy'); + $this->assertSession()->addressEquals('admin/structure/block/list/classy'); + + // Place another block and test the remove functionality works with the + // block placement indicator. Click the first 'Place block' link to bring up + // the list of blocks to place in the first available region. + $this->clickLink('Place block'); + // Select the first available block. + $this->clickLink('Place block'); + $block = []; + $block['id'] = strtolower($this->randomMachineName()); + $block['theme'] = 'classy'; + $this->submitForm([], 'Save block'); + $this->assertSession()->addressEquals('admin/structure/block/list/classy?block-placement=' . Html::getClass($block['id'])); + + // Removing a block will remove the block placement indicator. + $this->clickLink('Remove'); + $this->submitForm([], 'Remove'); + // @todo https://www.drupal.org/project/drupal/issues/2980527 this should be + // 'admin/structure/block/list/classy' but there is a bug. + $this->assertSession()->addressEquals('admin/structure/block'); } /** diff --git a/web/core/modules/block/tests/src/Kernel/Migrate/d7/MigrateBlockContentTranslationTest.php b/web/core/modules/block/tests/src/Kernel/Migrate/d7/MigrateBlockContentTranslationTest.php new file mode 100644 index 000000000..0d082a8e0 --- /dev/null +++ b/web/core/modules/block/tests/src/Kernel/Migrate/d7/MigrateBlockContentTranslationTest.php @@ -0,0 +1,69 @@ +installConfig(['block']); + $this->installConfig(['block_content']); + $this->installEntitySchema('block_content'); + + $this->executeMigrations([ + 'language', + 'd7_filter_format', + 'block_content_type', + 'block_content_body_field', + 'd7_custom_block', + 'd7_user_role', + 'd7_block', + 'd7_block_translation', + ]); + block_rebuild(); + } + + /** + * Tests the migration of block title translation. + */ + public function testBlockContentTranslation() { + /** @var \Drupal\language\ConfigurableLanguageManagerInterface $language_manager */ + $language_manager = $this->container->get('language_manager'); + + $config = $language_manager->getLanguageConfigOverride('fr', 'block.block.bartik_user_login'); + $this->assertSame('fr - User login title', $config->get('settings.label')); + } + +} diff --git a/web/core/modules/block/tests/src/Kernel/Migrate/d7/MigrateBlockTest.php b/web/core/modules/block/tests/src/Kernel/Migrate/d7/MigrateBlockTest.php index 6f07dc9c2..d56b9ed19 100644 --- a/web/core/modules/block/tests/src/Kernel/Migrate/d7/MigrateBlockTest.php +++ b/web/core/modules/block/tests/src/Kernel/Migrate/d7/MigrateBlockTest.php @@ -112,10 +112,10 @@ class MigrateBlockTest extends MigrateDrupal7TestBase { public function testBlockMigration() { $this->assertEntity('bartik_system_main', 'system_main_block', [], '', 'content', 'bartik', 0, '', '0'); $this->assertEntity('bartik_search_form', 'search_form_block', [], '', 'sidebar_first', 'bartik', -1, '', '0'); - $this->assertEntity('bartik_user_login', 'user_login_block', [], '', 'sidebar_first', 'bartik', 0, '', '0'); + $this->assertEntity('bartik_user_login', 'user_login_block', [], '', 'sidebar_first', 'bartik', 0, 'User login title', 'visible'); $this->assertEntity('bartik_system_powered_by', 'system_powered_by_block', [], '', 'footer_fifth', 'bartik', 10, '', '0'); $this->assertEntity('seven_system_main', 'system_main_block', [], '', 'content', 'seven', 0, '', '0'); - $this->assertEntity('seven_user_login', 'user_login_block', [], '', 'content', 'seven', 10, '', '0'); + $this->assertEntity('seven_user_login', 'user_login_block', [], '', 'content', 'seven', 10, 'User login title', 'visible'); // The d7_custom_block migration should have migrated a block containing a // mildly amusing limerick. We'll need its UUID to determine diff --git a/web/core/modules/block/tests/src/Kernel/Plugin/migrate/source/d7/BlockTranslationTest.php b/web/core/modules/block/tests/src/Kernel/Plugin/migrate/source/d7/BlockTranslationTest.php new file mode 100644 index 000000000..01b2dced6 --- /dev/null +++ b/web/core/modules/block/tests/src/Kernel/Plugin/migrate/source/d7/BlockTranslationTest.php @@ -0,0 +1,147 @@ + 1, + 'module' => 'system', + 'delta' => 'main', + 'theme' => 'bartik', + 'status' => 1, + 'weight' => 0, + 'region' => 'content', + 'custom' => '0', + 'visibility' => 0, + 'pages' => '', + 'title' => '', + 'cache' => -1, + 'i18n_mode' => 0, + ], + [ + 'bid' => 2, + 'module' => 'system', + 'delta' => 'navigation', + 'theme' => 'bartik', + 'status' => 1, + 'weight' => 0, + 'region' => 'sidebar_first', + 'custom' => '0', + 'visibility' => 0, + 'pages' => '', + 'title' => 'Navigation', + 'cache' => -1, + 'i18n_mode' => 1, + ], + ]; + $tests[0]['source_data']['block_role'] = [ + [ + 'module' => 'block', + 'delta' => 1, + 'rid' => 2, + ], + [ + 'module' => 'block', + 'delta' => 2, + 'rid' => 2, + ], + [ + 'module' => 'block', + 'delta' => 2, + 'rid' => 100, + ], + ]; + $tests[0]['source_data']['i18n_string'] = [ + [ + 'lid' => 1, + 'textgroup' => 'block', + 'context' => '1', + 'objectid' => 'navigation', + 'type' => 'system', + 'property' => 'title', + 'objectindex' => 0, + 'format' => '', + ], + ]; + + $tests[0]['source_data']['locales_target'] = [ + [ + 'lid' => 1, + 'translation' => 'fr - Navigation', + 'language' => 'fr', + 'plid' => 0, + 'plural' => 0, + 'i18n_status' => 0, + ], + ]; + $tests[0]['source_data']['role'] = [ + [ + 'rid' => 2, + 'name' => 'authenticated user', + ], + ]; + $tests[0]['source_data']['system'] = [ + [ + 'filename' => 'modules/system/system.module', + 'name' => 'system', + 'type' => 'module', + 'owner' => '', + 'status' => '1', + 'throttle' => '0', + 'bootstrap' => '0', + 'schema_version' => '7055', + 'weight' => '0', + 'info' => 'a:0:{}', + ], + ]; + // The expected results. + $tests[0]['expected_data'] = [ + [ + 'bid' => 2, + 'module' => 'system', + 'delta' => 'navigation', + 'theme' => 'bartik', + 'status' => 1, + 'weight' => 0, + 'region' => 'sidebar_first', + 'custom' => '0', + 'visibility' => 0, + 'pages' => '', + 'title' => 'Navigation', + 'cache' => -1, + 'i18n_mode' => 1, + 'lid' => 1, + 'translation' => 'fr - Navigation', + 'language' => 'fr', + 'plid' => 0, + 'plural' => 0, + 'i18n_status' => 0, + ], + ]; + + return $tests; + } + +} diff --git a/web/core/modules/block_content/tests/src/Kernel/BlockContentAccessHandlerTest.php b/web/core/modules/block_content/tests/src/Kernel/BlockContentAccessHandlerTest.php index 64b524d80..1767e363b 100644 --- a/web/core/modules/block_content/tests/src/Kernel/BlockContentAccessHandlerTest.php +++ b/web/core/modules/block_content/tests/src/Kernel/BlockContentAccessHandlerTest.php @@ -293,8 +293,8 @@ class BlockContentAccessHandlerTest extends KernelTestBase { 'forbidden', ], ]; - return $cases; } + return $cases; } } diff --git a/web/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentTypeTest.php b/web/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentTypeTest.php index b0c96dab8..9a82b5b0c 100644 --- a/web/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentTypeTest.php +++ b/web/core/modules/comment/tests/src/Kernel/Migrate/d7/MigrateCommentTypeTest.php @@ -46,6 +46,17 @@ class MigrateCommentTypeTest extends MigrateDrupal7TestBase { * Tests the migrated comment types. */ public function testMigration() { + $comment_fields = [ + 'comment' => 'Default comment setting', + 'comment_default_mode' => 'Default display mode', + 'comment_default_per_page' => 'Default comments per page', + 'comment_anonymous' => 'Anonymous commenting', + 'comment_subject_field' => 'Comment subject field', + 'comment_preview' => 'Preview comment', + 'comment_form_location' => 'Location of comment submission form', + ]; + $this->assertArraySubset($comment_fields, $this->migration->getSourcePlugin()->fields()); + $this->assertEntity('comment_node_article', 'Article comment'); $this->assertEntity('comment_node_blog', 'Blog entry comment'); $this->assertEntity('comment_node_book', 'Book page comment'); diff --git a/web/core/modules/content_moderation/src/EntityOperations.php b/web/core/modules/content_moderation/src/EntityOperations.php index 9ab40eac0..8c6d33250 100644 --- a/web/core/modules/content_moderation/src/EntityOperations.php +++ b/web/core/modules/content_moderation/src/EntityOperations.php @@ -184,11 +184,16 @@ class EntityOperations implements ContainerInjectionInterface { // Sync translations. if ($entity->getEntityType()->hasKey('langcode')) { $entity_langcode = $entity->language()->getId(); - if (!$content_moderation_state->hasTranslation($entity_langcode)) { - $content_moderation_state->addTranslation($entity_langcode); + if ($entity->isDefaultTranslation()) { + $content_moderation_state->langcode = $entity_langcode; } - if ($content_moderation_state->language()->getId() !== $entity_langcode) { - $content_moderation_state = $content_moderation_state->getTranslation($entity_langcode); + else { + if (!$content_moderation_state->hasTranslation($entity_langcode)) { + $content_moderation_state->addTranslation($entity_langcode); + } + if ($content_moderation_state->language()->getId() !== $entity_langcode) { + $content_moderation_state = $content_moderation_state->getTranslation($entity_langcode); + } } } diff --git a/web/core/modules/content_moderation/src/Plugin/Field/ModerationStateFieldItemList.php b/web/core/modules/content_moderation/src/Plugin/Field/ModerationStateFieldItemList.php index 64c5ad849..357c60c9b 100644 --- a/web/core/modules/content_moderation/src/Plugin/Field/ModerationStateFieldItemList.php +++ b/web/core/modules/content_moderation/src/Plugin/Field/ModerationStateFieldItemList.php @@ -93,7 +93,7 @@ class ModerationStateFieldItemList extends FieldItemList { if ($entity->getEntityType()->hasKey('langcode')) { $langcode = $entity->language()->getId(); if (!$content_moderation_state->hasTranslation($langcode)) { - $content_moderation_state->addTranslation($langcode); + $content_moderation_state->addTranslation($langcode, $content_moderation_state->toArray()); } if ($content_moderation_state->language()->getId() !== $langcode) { $content_moderation_state = $content_moderation_state->getTranslation($langcode); diff --git a/web/core/modules/content_moderation/tests/src/Functional/ModerationContentTranslationTest.php b/web/core/modules/content_moderation/tests/src/Functional/ModerationContentTranslationTest.php new file mode 100644 index 000000000..4afa97de6 --- /dev/null +++ b/web/core/modules/content_moderation/tests/src/Functional/ModerationContentTranslationTest.php @@ -0,0 +1,109 @@ +drupalLogin($this->rootUser); + // Create an Article content type. + $this->drupalCreateContentType(['type' => 'article', 'name' => 'Article'])->save(); + $edit = [ + 'predefined_langcode' => 'fr', + ]; + $this->drupalPostForm('admin/config/regional/language/add', $edit, 'Add language'); + // Enable content translation on articles. + $this->drupalGet('admin/config/regional/content-language'); + $edit = [ + 'entity_types[node]' => TRUE, + 'settings[node][article][translatable]' => TRUE, + 'settings[node][article][settings][language][language_alterable]' => TRUE, + ]; + $this->drupalPostForm(NULL, $edit, 'Save configuration'); + // Adding languages requires a container rebuild in the test running + // environment so that multilingual services are used. + $this->rebuildContainer(); + } + + /** + * Tests existing translations being edited after enabling content moderation. + */ + public function testModerationWithExistingContent() { + // Create a published article in English. + $edit = [ + 'title[0][value]' => 'Published English node', + 'langcode[0][value]' => 'en', + ]; + $this->drupalPostForm('node/add/article', $edit, 'Save'); + $this->assertSession()->pageTextContains('Article Published English node has been created.'); + $english_node = $this->drupalGetNodeByTitle('Published English node'); + + // Add a French translation. + $this->drupalGet('node/' . $english_node->id() . '/translations'); + $this->clickLink('Add'); + $edit = [ + 'title[0][value]' => 'Published French node', + ]; + $this->drupalPostForm(NULL, $edit, 'Save (this translation)'); + $this->assertSession()->pageTextContains('Article Published French node has been updated.'); + + // Install content moderation and enable moderation on Article node type. + \Drupal::service('module_installer')->install(['content_moderation']); + $workflow = $this->createEditorialWorkflow(); + $workflow->getTypePlugin()->addEntityTypeAndBundle('node', 'article'); + $workflow->save(); + $this->drupalLogin($this->rootUser); + + // Edit the English node. + $this->drupalGet('node/' . $english_node->id() . '/edit'); + $this->assertSession()->statusCodeEquals(200); + $edit = [ + 'title[0][value]' => 'Published English new node', + ]; + $this->drupalPostForm(NULL, $edit, 'Save'); + $this->assertSession()->statusCodeEquals(200); + $this->assertSession()->pageTextContains('Article Published English new node has been updated.'); + // Edit the French translation. + $this->drupalGet('fr/node/' . $english_node->id() . '/edit'); + $this->assertSession()->statusCodeEquals(200); + $edit = [ + 'title[0][value]' => 'Published French new node', + ]; + $this->drupalPostForm(NULL, $edit, 'Save (this translation)'); + $this->assertSession()->statusCodeEquals(200); + $this->assertSession()->pageTextContains('Article Published French new node has been updated.'); + } + +} diff --git a/web/core/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php b/web/core/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php index 8574ad6a1..4b7d75be4 100644 --- a/web/core/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php +++ b/web/core/modules/content_moderation/tests/src/Kernel/ContentModerationStateTest.php @@ -296,7 +296,7 @@ class ContentModerationStateTest extends KernelTestBase { // Create a French translation. $french_node = $english_node->addTranslation('fr', ['title' => 'French title']); $french_node->setUnpublished(); - // Revision 1 (fr). + // Revision 2 (fr). $french_node->save(); $french_node = $this->reloadEntity($english_node)->getTranslation('fr'); $this->assertEquals('draft', $french_node->moderation_state->value); @@ -305,7 +305,7 @@ class ContentModerationStateTest extends KernelTestBase { // Move English node to create another draft. $english_node = $this->reloadEntity($english_node); $english_node->moderation_state->value = 'draft'; - // Revision 2 (en, fr). + // Revision 3 (en, fr). $english_node->save(); $english_node = $this->reloadEntity($english_node); $this->assertEquals('draft', $english_node->moderation_state->value); @@ -316,7 +316,7 @@ class ContentModerationStateTest extends KernelTestBase { // Publish the French node. $french_node->moderation_state->value = 'published'; - // Revision 3 (en, fr). + // Revision 4 (en, fr). $french_node->save(); $french_node = $this->reloadEntity($french_node)->getTranslation('fr'); $this->assertTrue($french_node->isPublished()); @@ -327,7 +327,7 @@ class ContentModerationStateTest extends KernelTestBase { // Publish the English node. $english_node->moderation_state->value = 'published'; - // Revision 4 (en, fr). + // Revision 5 (en, fr). $english_node->save(); $english_node = $this->reloadEntity($english_node); $this->assertTrue($english_node->isPublished()); @@ -336,15 +336,15 @@ class ContentModerationStateTest extends KernelTestBase { $french_node = $this->reloadEntity($english_node)->getTranslation('fr'); $this->assertTrue($french_node->isPublished()); $french_node->moderation_state->value = 'draft'; - // Revision 5 (en, fr). + // Revision 6 (en, fr). $french_node->save(); - $french_node = $this->reloadEntity($english_node, 5)->getTranslation('fr'); + $french_node = $this->reloadEntity($english_node, 6)->getTranslation('fr'); $this->assertFalse($french_node->isPublished()); $this->assertTrue($french_node->getTranslation('en')->isPublished()); // Republish the French node. $french_node->moderation_state->value = 'published'; - // Revision 6 (en, fr). + // Revision 7 (en, fr). $french_node->save(); $french_node = $this->reloadEntity($english_node)->getTranslation('fr'); $this->assertTrue($french_node->isPublished()); @@ -353,7 +353,7 @@ class ContentModerationStateTest extends KernelTestBase { $content_moderation_state = ContentModerationState::load(1); $content_moderation_state->set('moderation_state', 'draft'); $content_moderation_state->setNewRevision(TRUE); - // Revision 7 (en, fr). + // Revision 8 (en, fr). $content_moderation_state->save(); $english_node = $this->reloadEntity($french_node, $french_node->getRevisionId() + 1); @@ -366,12 +366,12 @@ class ContentModerationStateTest extends KernelTestBase { $content_moderation_state = $content_moderation_state->getTranslation('fr'); $content_moderation_state->set('moderation_state', 'draft'); $content_moderation_state->setNewRevision(TRUE); - // Revision 8 (en, fr). + // Revision 9 (en, fr). $content_moderation_state->save(); $english_node = $this->reloadEntity($english_node, $english_node->getRevisionId()); $this->assertEquals('draft', $english_node->moderation_state->value); - $french_node = $this->reloadEntity($english_node, '8')->getTranslation('fr'); + $french_node = $this->reloadEntity($english_node, '9')->getTranslation('fr'); $this->assertEquals('draft', $french_node->moderation_state->value); // Switching the moderation state to an unpublished state should update the // entity. @@ -380,7 +380,7 @@ class ContentModerationStateTest extends KernelTestBase { // Get the default english node. $english_node = $this->reloadEntity($english_node); $this->assertTrue($english_node->isPublished()); - $this->assertEquals(6, $english_node->getRevisionId()); + $this->assertEquals(7, $english_node->getRevisionId()); } /** @@ -416,25 +416,83 @@ class ContentModerationStateTest extends KernelTestBase { /** * Tests that entities with special languages can be moderated. + * + * @dataProvider moderationWithSpecialLanguagesTestCases */ - public function testModerationWithSpecialLanguages() { + public function testModerationWithSpecialLanguages($original_language, $updated_language) { $workflow = $this->createEditorialWorkflow(); $workflow->getTypePlugin()->addEntityTypeAndBundle('entity_test_rev', 'entity_test_rev'); $workflow->save(); // Create a test entity. $entity = EntityTestRev::create([ - 'langcode' => LanguageInterface::LANGCODE_NOT_SPECIFIED, + 'langcode' => $original_language, ]); $entity->save(); $this->assertEquals('draft', $entity->moderation_state->value); $entity->moderation_state->value = 'published'; + $entity->langcode = $updated_language; $entity->save(); $this->assertEquals('published', EntityTestRev::load($entity->id())->moderation_state->value); } + /** + * Test cases for ::testModerationWithSpecialLanguages(). + */ + public function moderationWithSpecialLanguagesTestCases() { + return [ + 'Not specified to not specified' => [ + LanguageInterface::LANGCODE_NOT_SPECIFIED, + LanguageInterface::LANGCODE_NOT_SPECIFIED, + ], + 'English to not specified' => [ + 'en', + LanguageInterface::LANGCODE_NOT_SPECIFIED, + ], + 'Not specified to english' => [ + LanguageInterface::LANGCODE_NOT_SPECIFIED, + 'en', + ], + ]; + } + + /** + * Test changing the language of content without adding a translation. + */ + public function testChangingContentLangcode() { + ConfigurableLanguage::createFromLangcode('fr')->save(); + NodeType::create([ + 'type' => 'test_type', + ])->save(); + $workflow = $this->createEditorialWorkflow(); + $workflow->getTypePlugin()->addEntityTypeAndBundle('node', 'test_type'); + $workflow->save(); + + $entity = Node::create([ + 'title' => 'Test node', + 'langcode' => 'en', + 'type' => 'test_type', + ]); + $entity->save(); + + $content_moderation_state = ContentModerationState::loadFromModeratedEntity($entity); + $this->assertCount(1, $entity->getTranslationLanguages()); + $this->assertCount(1, $content_moderation_state->getTranslationLanguages()); + $this->assertEquals('en', $entity->langcode->value); + $this->assertEquals('en', $content_moderation_state->langcode->value); + + $entity->langcode = 'fr'; + $entity->save(); + + $content_moderation_state = ContentModerationState::loadFromModeratedEntity($entity); + $this->assertCount(1, $entity->getTranslationLanguages()); + $this->assertCount(1, $content_moderation_state->getTranslationLanguages()); + $this->assertEquals('fr', $entity->langcode->value); + $this->assertEquals('fr', $content_moderation_state->langcode->value); + } + /** * Tests that a non-translatable entity type with a langcode can be moderated. */ diff --git a/web/core/modules/content_moderation/tests/src/Kernel/ModerationStateFieldItemListTest.php b/web/core/modules/content_moderation/tests/src/Kernel/ModerationStateFieldItemListTest.php index 7b57bd704..0c8db872a 100644 --- a/web/core/modules/content_moderation/tests/src/Kernel/ModerationStateFieldItemListTest.php +++ b/web/core/modules/content_moderation/tests/src/Kernel/ModerationStateFieldItemListTest.php @@ -3,9 +3,11 @@ namespace Drupal\Tests\content_moderation\Kernel; use Drupal\KernelTests\KernelTestBase; +use Drupal\language\Entity\ConfigurableLanguage; use Drupal\node\Entity\Node; use Drupal\node\Entity\NodeType; use Drupal\Tests\content_moderation\Traits\ContentModerationTestTrait; +use Drupal\workflows\Entity\Workflow; /** * @coversDefaultClass \Drupal\content_moderation\Plugin\Field\ModerationStateFieldItemList @@ -64,6 +66,8 @@ class ModerationStateFieldItemListTest extends KernelTestBase { $this->testNode->save(); \Drupal::entityTypeManager()->getStorage('node')->resetCache(); $this->testNode = Node::load($this->testNode->id()); + + ConfigurableLanguage::createFromLangcode('de')->save(); } /** @@ -332,4 +336,37 @@ class ModerationStateFieldItemListTest extends KernelTestBase { ]; } + /** + * Test the field item list when used with existing unmoderated content. + */ + public function testWithExistingUnmoderatedContent() { + $node = Node::create([ + 'title' => 'Test title', + 'type' => 'unmoderated', + ]); + $node->save(); + $translation = $node->addTranslation('de', $node->toArray()); + $translation->title = 'Translated'; + $translation->save(); + + $workflow = Workflow::load('editorial'); + $workflow->getTypePlugin()->addEntityTypeAndBundle('node', 'unmoderated'); + $workflow->save(); + + // After enabling moderation, both the original node and translation should + // have a published moderation state. + $node = Node::load($node->id()); + $translation = $node->getTranslation('de'); + $this->assertEquals('published', $node->moderation_state->value); + $this->assertEquals('published', $translation->moderation_state->value); + + // After the node has been updated, both the original node and translation + // should still have a value. + $node->title = 'Updated title'; + $node->save(); + $translation = $node->getTranslation('de'); + $this->assertEquals('published', $node->moderation_state->value); + $this->assertEquals('published', $translation->moderation_state->value); + } + } diff --git a/web/core/modules/content_translation/migrations/d6_taxonomy_term_localized_translation.yml b/web/core/modules/content_translation/migrations/d6_taxonomy_term_localized_translation.yml new file mode 100644 index 000000000..980baf4ae --- /dev/null +++ b/web/core/modules/content_translation/migrations/d6_taxonomy_term_localized_translation.yml @@ -0,0 +1,44 @@ +id: d6_taxonomy_term_localized_translation +label: Taxonomy localized term translations +migration_tags: + - Drupal 6 + - Content + - Multilingual +source: + plugin: d6_term_localized_translation + translations: true +process: + # If you are using this file to build a custom migration consider removing + # the tid field to allow incremental migrations. + tid: tid + langcode: language + vid: + plugin: migration + migration: d6_taxonomy_vocabulary + source: vid + name: + - + plugin: callback + source: + - name_translated + - name + callable: array_filter + - + plugin: callback + callable: current + description: + - + plugin: callback + source: + - description_translated + - description + callable: array_filter + - + plugin: callback + callable: current +destination: + plugin: entity:taxonomy_term + translations: true +migration_dependencies: + required: + - d6_taxonomy_term diff --git a/web/core/modules/content_translation/migrations/d7_block_translation.yml b/web/core/modules/content_translation/migrations/d7_block_translation.yml new file mode 100644 index 000000000..a664ec17f --- /dev/null +++ b/web/core/modules/content_translation/migrations/d7_block_translation.yml @@ -0,0 +1,77 @@ +id: d7_block_translation +label: Block translation +migration_tags: + - Drupal 7 + - Configuration + - Multilingual +source: + plugin: d7_block_translation + constants: + dest_label: 'settings/label' +process: + multilingual: + plugin: skip_on_empty + source: i18n_mode + method: row + langcode: language + property: constants/dest_label + translation: translation + id: + - + plugin: migration_lookup + migration: d7_block + source: + - module + - delta + - + plugin: skip_on_empty + method: row + # The plugin process is copied from d7_block.yml + plugin: + - + plugin: static_map + bypass: true + source: + - module + - delta + map: + book: + navigation: book_navigation + comment: + recent: views_block:comments_recent-block_1 + forum: + active: forum_active_block + new: forum_new_block + # locale: + # 0: language_block + node: + syndicate: node_syndicate_block + search: + form: search_form_block + statistics: + popular: statistics_popular_block + system: + main: system_main_block + 'powered-by': system_powered_by_block + user: + login: user_login_block + # 1: system_menu_block:tools + new: views_block:who_s_new-block_1 + online: views_block:who_s_online-who_s_online_block + - + plugin: block_plugin_id + - + plugin: skip_on_empty + method: row + # The theme process is copied from d7_block.yml + theme: + plugin: block_theme + source: + - theme + - default_theme + - admin_theme +destination: + plugin: entity:block +migration_dependencies: + optional: + - d7_block diff --git a/web/core/modules/content_translation/tests/src/Kernel/Migrate/d6/MigrateTaxonomyTermTranslationTest.php b/web/core/modules/content_translation/tests/src/Kernel/Migrate/d6/MigrateTaxonomyTermTranslationTest.php index 3e32406d2..1baf584ef 100644 --- a/web/core/modules/content_translation/tests/src/Kernel/Migrate/d6/MigrateTaxonomyTermTranslationTest.php +++ b/web/core/modules/content_translation/tests/src/Kernel/Migrate/d6/MigrateTaxonomyTermTranslationTest.php @@ -108,7 +108,12 @@ class MigrateTaxonomyTermTranslationTest extends MigrateDrupal6TestBase { $this->assertArrayHasKey($tid, $this->treeData[$vid], "Term $tid exists in taxonomy tree"); $term = $this->treeData[$vid][$tid]; - $this->assertEquals($parent_ids, array_filter($term->parents), "Term $tid has correct parents in taxonomy tree"); + // PostgreSQL, MySQL and SQLite may not return the parent terms in the same + // order so sort before testing. + sort($parent_ids); + $actual_terms = array_filter($term->parents); + sort($actual_terms); + $this->assertEquals($parent_ids, $actual_terms, "Term $tid has correct parents in taxonomy tree"); } /** diff --git a/web/core/modules/datetime/tests/src/Functional/Views/FilterDateTest.php b/web/core/modules/datetime/tests/src/Functional/Views/FilterDateTest.php new file mode 100644 index 000000000..6c106497a --- /dev/null +++ b/web/core/modules/datetime/tests/src/Functional/Views/FilterDateTest.php @@ -0,0 +1,147 @@ +getRequestTime(); + + $admin_user = $this->drupalCreateUser(['administer views']); + $this->drupalLogin($admin_user); + + $this->drupalCreateContentType(['type' => 'page', 'name' => 'Basic page']); + + // Add a date field to page nodes. + $fieldStorage = FieldStorageConfig::create([ + 'field_name' => $this->fieldName, + 'entity_type' => 'node', + 'type' => 'datetime', + 'settings' => ['datetime_type' => DateTimeItem::DATETIME_TYPE_DATETIME], + ]); + $fieldStorage->save(); + $field = FieldConfig::create([ + 'field_storage' => $fieldStorage, + 'bundle' => 'page', + 'required' => TRUE, + ]); + $field->save(); + + // Create some nodes. + $dates = [ + // Tomorrow. + DrupalDateTime::createFromTimestamp($now + 86400, DateTimeItemInterface::STORAGE_TIMEZONE)->format(DateTimeItemInterface::DATE_STORAGE_FORMAT), + // Today. + DrupalDateTime::createFromTimestamp($now, DateTimeItemInterface::STORAGE_TIMEZONE)->format(DateTimeItemInterface::DATE_STORAGE_FORMAT), + // Yesterday. + DrupalDateTime::createFromTimestamp($now - 86400, DateTimeItemInterface::STORAGE_TIMEZONE)->format(DateTimeItemInterface::DATE_STORAGE_FORMAT), + ]; + + $this->nodes = []; + foreach ($dates as $date) { + $this->nodes[] = $this->drupalCreateNode([ + $this->fieldName => [ + 'value' => $date, + ], + ]); + } + // Add a node where the date field is empty. + $this->nodes[] = $this->drupalCreateNode(); + + // Views needs to be aware of the new field. + $this->container->get('views.views_data')->clear(); + + // Load test views. + ViewTestData::createTestViews(get_class($this), ['datetime_test']); + } + + /** + * Tests exposed grouped filters. + */ + public function testExposedGroupedFilters() { + // Expose the empty and not empty operators in a grouped filter. + $this->drupalPostForm('admin/structure/views/nojs/handler/test_filter_datetime/default/filter/' . $this->fieldName . '_value', [], t('Expose filter')); + $this->drupalPostForm(NULL, [], 'Grouped filters'); + + $edit = []; + $edit['options[group_info][group_items][1][title]'] = 'empty'; + $edit['options[group_info][group_items][1][operator]'] = 'empty'; + $edit['options[group_info][group_items][2][title]'] = 'not empty'; + $edit['options[group_info][group_items][2][operator]'] = 'not empty'; + + $this->drupalPostForm(NULL, $edit, 'Apply'); + + // Test that the exposed filter works as expected. + $path = 'test_filter_datetime-path'; + $this->drupalPostForm('admin/structure/views/view/test_filter_datetime/edit', [], 'Add Page'); + $this->drupalPostForm('admin/structure/views/nojs/display/test_filter_datetime/page_1/path', ['path' => $path], 'Apply'); + $this->drupalPostForm(NULL, [], t('Save')); + + $this->drupalGet($path); + + // Filter the Preview by 'empty'. + $this->getSession()->getPage()->findField($this->fieldName . '_value')->selectOption(1); + $this->getSession()->getPage()->pressButton('Apply'); + $results = $this->cssSelect('.view-content .field-content'); + $this->assertEquals(1, count($results)); + + // Filter the Preview by 'not empty'. + $this->getSession()->getPage()->findField($this->fieldName . '_value')->selectOption(2); + $this->getSession()->getPage()->pressButton('Apply'); + $results = $this->cssSelect('.view-content .field-content'); + $this->assertEquals(3, count($results)); + } + +} diff --git a/web/core/modules/datetime/tests/src/Kernel/Views/FilterDateTest.php b/web/core/modules/datetime/tests/src/Kernel/Views/FilterDateTest.php index f7386cc2c..314d18fb1 100644 --- a/web/core/modules/datetime/tests/src/Kernel/Views/FilterDateTest.php +++ b/web/core/modules/datetime/tests/src/Kernel/Views/FilterDateTest.php @@ -71,6 +71,15 @@ class FilterDateTest extends DateTimeHandlerTestBase { $node->save(); $this->nodes[] = $node; } + + // Add a node where the date field is empty. + $node = Node::create([ + 'title' => $this->randomMachineName(8), + 'type' => 'page', + 'field_date' => [], + ]); + $node->save(); + $this->nodes[] = $node; } /** @@ -130,6 +139,30 @@ class FilterDateTest extends DateTimeHandlerTestBase { ]; $this->assertIdenticalResultset($view, $expected_result, $this->map); $view->destroy(); + + // Test the empty operator. + $view->initHandlers(); + $view->filter[$field]->operator = 'empty'; + $view->setDisplay('default'); + $this->executeView($view); + $expected_result = [ + ['nid' => $this->nodes[3]->id()], + ]; + $this->assertIdenticalResultset($view, $expected_result, $this->map); + $view->destroy(); + + // Test the not empty operator. + $view->initHandlers(); + $view->filter[$field]->operator = 'not empty'; + $view->setDisplay('default'); + $this->executeView($view); + $expected_result = [ + ['nid' => $this->nodes[0]->id()], + ['nid' => $this->nodes[1]->id()], + ['nid' => $this->nodes[2]->id()], + ]; + $this->assertIdenticalResultset($view, $expected_result, $this->map); + $view->destroy(); } } diff --git a/web/core/modules/field/src/Tests/EntityReference/EntityReferenceAdminTest.php b/web/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceAdminTest.php similarity index 64% rename from web/core/modules/field/src/Tests/EntityReference/EntityReferenceAdminTest.php rename to web/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceAdminTest.php index 7a5e3ea4c..8510539c5 100644 --- a/web/core/modules/field/src/Tests/EntityReference/EntityReferenceAdminTest.php +++ b/web/core/modules/field/tests/src/Functional/EntityReference/EntityReferenceAdminTest.php @@ -1,20 +1,21 @@ type; - - // First step: 'Add new field' on the 'Manage fields' page. - $this->drupalGet($bundle_path . '/fields/add-field'); - - // Check if the commonly referenced entity types appear in the list. - $this->assertOption('edit-new-storage-type', 'field_ui:entity_reference:node'); - $this->assertOption('edit-new-storage-type', 'field_ui:entity_reference:user'); - - $this->drupalPostForm(NULL, [ - 'label' => 'Test label', - 'field_name' => 'test', - 'new_storage_type' => 'entity_reference', - ], t('Save and continue')); - - // Node should be selected by default. - $this->assertFieldByName('settings[target_type]', 'node'); - - // Check that all entity types can be referenced. - $this->assertFieldSelectOptions('settings[target_type]', array_keys(\Drupal::entityManager()->getDefinitions())); - - // Second step: 'Field settings' form. - $this->drupalPostForm(NULL, [], t('Save field settings')); - - // The base handler should be selected by default. - $this->assertFieldByName('settings[handler]', 'default:node'); - - // The base handler settings should be displayed. - $entity_type_id = 'node'; - // Check that the type label is correctly displayed. - $this->assertText('Content type'); - $bundles = $this->container->get('entity_type.bundle.info')->getBundleInfo($entity_type_id); - foreach ($bundles as $bundle_name => $bundle_info) { - $this->assertFieldByName('settings[handler_settings][target_bundles][' . $bundle_name . ']'); - } - - reset($bundles); - - // Test the sort settings. - // Option 0: no sort. - $this->assertFieldByName('settings[handler_settings][sort][field]', '_none'); - $this->assertNoFieldByName('settings[handler_settings][sort][direction]'); - // Option 1: sort by field. - $this->drupalPostAjaxForm(NULL, ['settings[handler_settings][sort][field]' => 'nid'], 'settings[handler_settings][sort][field]'); - $this->assertFieldByName('settings[handler_settings][sort][direction]', 'ASC'); - - // Test that a non-translatable base field is a sort option. - $this->assertFieldByXPath("//select[@name='settings[handler_settings][sort][field]']/option[@value='nid']"); - // Test that a translatable base field is a sort option. - $this->assertFieldByXPath("//select[@name='settings[handler_settings][sort][field]']/option[@value='title']"); - // Test that a configurable field is a sort option. - $this->assertFieldByXPath("//select[@name='settings[handler_settings][sort][field]']/option[@value='body.value']"); - - // Set back to no sort. - $this->drupalPostAjaxForm(NULL, ['settings[handler_settings][sort][field]' => '_none'], 'settings[handler_settings][sort][field]'); - $this->assertNoFieldByName('settings[handler_settings][sort][direction]'); - - // Third step: confirm. - $this->drupalPostForm(NULL, [ - 'required' => '1', - 'settings[handler_settings][target_bundles][' . key($bundles) . ']' => key($bundles), - ], t('Save settings')); - - // Check that the field appears in the overview form. - $this->assertFieldByXPath('//table[@id="field-overview"]//tr[@id="field-test"]/td[1]', 'Test label', 'Field was created and appears in the overview page.'); - - // Check that the field settings form can be submitted again, even when the - // field is required. - // The first 'Edit' link is for the Body field. - $this->clickLink(t('Edit'), 1); - $this->drupalPostForm(NULL, [], t('Save settings')); - - // Switch the target type to 'taxonomy_term' and check that the settings - // specific to its selection handler are displayed. - $field_name = 'node.' . $this->type . '.field_test'; - $edit = [ - 'settings[target_type]' => 'taxonomy_term', - ]; - $this->drupalPostForm($bundle_path . '/fields/' . $field_name . '/storage', $edit, t('Save field settings')); - $this->drupalGet($bundle_path . '/fields/' . $field_name); - $this->assertFieldByName('settings[handler_settings][auto_create]'); - - // Switch the target type to 'user' and check that the settings specific to - // its selection handler are displayed. - $field_name = 'node.' . $this->type . '.field_test'; - $edit = [ - 'settings[target_type]' => 'user', - ]; - $this->drupalPostForm($bundle_path . '/fields/' . $field_name . '/storage', $edit, t('Save field settings')); - $this->drupalGet($bundle_path . '/fields/' . $field_name); - $this->assertFieldByName('settings[handler_settings][filter][type]', '_none'); - - // Switch the target type to 'node'. - $field_name = 'node.' . $this->type . '.field_test'; - $edit = [ - 'settings[target_type]' => 'node', - ]; - $this->drupalPostForm($bundle_path . '/fields/' . $field_name . '/storage', $edit, t('Save field settings')); - - // Try to select the views handler. - $edit = [ - 'settings[handler]' => 'views', - ]; - $this->drupalPostAjaxForm($bundle_path . '/fields/' . $field_name, $edit, 'settings[handler]'); - $this->assertRaw(t('No eligible views were found. Create a view with an Entity Reference display, or add such a display to an existing view.', [ - ':create' => \Drupal::url('views_ui.add'), - ':existing' => \Drupal::url('entity.view.collection'), - ])); - $this->drupalPostForm(NULL, $edit, t('Save settings')); - // If no eligible view is available we should see a message. - $this->assertText('The views entity selection mode requires a view.'); - - // Enable the entity_reference_test module which creates an eligible view. - $this->container->get('module_installer')->install(['entity_reference_test']); - $this->resetAll(); - $this->drupalGet($bundle_path . '/fields/' . $field_name); - $this->drupalPostAjaxForm($bundle_path . '/fields/' . $field_name, $edit, 'settings[handler]'); - $edit = [ - 'settings[handler_settings][view][view_and_display]' => 'test_entity_reference:entity_reference_1', - ]; - $this->drupalPostForm(NULL, $edit, t('Save settings')); - $this->assertResponse(200); - - // Switch the target type to 'entity_test'. - $edit = [ - 'settings[target_type]' => 'entity_test', - ]; - $this->drupalPostForm($bundle_path . '/fields/' . $field_name . '/storage', $edit, t('Save field settings')); - $this->drupalGet($bundle_path . '/fields/' . $field_name); - $edit = [ - 'settings[handler]' => 'views', - ]; - $this->drupalPostAjaxForm($bundle_path . '/fields/' . $field_name, $edit, 'settings[handler]'); - $edit = [ - 'required' => FALSE, - 'settings[handler_settings][view][view_and_display]' => 'test_entity_reference_entity_test:entity_reference_1', - ]; - $this->drupalPostForm(NULL, $edit, t('Save settings')); - $this->assertResponse(200); - // Create a new view and display it as a entity reference. $edit = [ 'id' => 'node_test_view', @@ -253,7 +115,7 @@ class EntityReferenceAdminTest extends WebTestBase { $edit = [ 'settings[handler]' => 'views', ]; - $this->drupalPostAjaxForm(NULL, $edit, 'settings[handler]'); + $this->drupalPostForm(NULL, $edit, t('Change handler')); $edit = [ 'required' => FALSE, 'settings[handler_settings][view][view_and_display]' => 'node_test_view:entity_reference_1', @@ -275,7 +137,7 @@ class EntityReferenceAdminTest extends WebTestBase { // Try to add a new node and fill the entity reference field. $this->drupalGet('node/add/' . $this->type); $result = $this->xpath('//input[@name="field_test_entity_ref_field[0][target_id]" and contains(@data-autocomplete-path, "/entity_reference_autocomplete/node/views/")]'); - $target_url = $this->getAbsoluteUrl($result[0]['data-autocomplete-path']); + $target_url = $this->getAbsoluteUrl($result[0]->getAttribute('data-autocomplete-path')); $this->drupalGet($target_url, ['query' => ['q' => 'Foo']]); $this->assertRaw($node1->getTitle() . ' (' . $node1->id() . ')'); $this->assertRaw($node2->getTitle() . ' (' . $node2->id() . ')'); @@ -446,7 +308,8 @@ class EntityReferenceAdminTest extends WebTestBase { 'settings[handler_settings][target_bundles][' . $vocabularies[1]->id() . ']' => TRUE, ]; // Enable the second vocabulary as a target bundle. - $this->drupalPostAjaxForm($path, $edit, key($edit)); + $this->drupalPostForm($path, $edit, 'Save settings'); + $this->drupalGet($path); // Expect a select element with the two vocabularies as options. $this->assertFieldByXPath("//select[@name='settings[handler_settings][auto_create_bundle]']/option[@value='" . $vocabularies[0]->id() . "']"); $this->assertFieldByXPath("//select[@name='settings[handler_settings][auto_create_bundle]']/option[@value='" . $vocabularies[1]->id() . "']"); @@ -513,49 +376,23 @@ class EntityReferenceAdminTest extends WebTestBase { * The field name. * @param array $expected_options * An array of expected options. - * - * @return bool - * TRUE if the assertion succeeded, FALSE otherwise. */ protected function assertFieldSelectOptions($name, array $expected_options) { $xpath = $this->buildXPathQuery('//select[@name=:name]', [':name' => $name]); $fields = $this->xpath($xpath); if ($fields) { $field = $fields[0]; - $options = $this->getAllOptionsList($field); - + $options = $field->findAll('xpath', 'option'); + array_walk($options, function (NodeElement &$option) { + $option = $option->getValue(); + }); sort($options); sort($expected_options); - - return $this->assertIdentical($options, $expected_options); + $this->assertIdentical($options, $expected_options); } else { - return $this->fail('Unable to find field ' . $name); + $this->fail('Unable to find field ' . $name); } } - /** - * Extracts all options from a select element. - * - * @param \SimpleXMLElement $element - * The select element field information. - * - * @return array - * An array of option values as strings. - */ - protected function getAllOptionsList(\SimpleXMLElement $element) { - $options = []; - // Add all options items. - foreach ($element->option as $option) { - $options[] = (string) $option['value']; - } - - // Loops trough all the option groups - foreach ($element->optgroup as $optgroup) { - $options = array_merge($this->getAllOptionsList($optgroup), $options); - } - - return $options; - } - } diff --git a/web/core/modules/field/tests/src/FunctionalJavascript/EntityReference/EntityReferenceAdminTest.php b/web/core/modules/field/tests/src/FunctionalJavascript/EntityReference/EntityReferenceAdminTest.php new file mode 100644 index 000000000..89a8ce1e4 --- /dev/null +++ b/web/core/modules/field/tests/src/FunctionalJavascript/EntityReference/EntityReferenceAdminTest.php @@ -0,0 +1,244 @@ +drupalPlaceBlock('system_breadcrumb_block'); + + // Create a content type, with underscores. + $type_name = strtolower($this->randomMachineName(8)) . '_test'; + $type = $this->drupalCreateContentType(['name' => $type_name, 'type' => $type_name]); + $this->type = $type->id(); + + // Create test user. + $admin_user = $this->drupalCreateUser([ + 'access content', + 'administer node fields', + 'administer node display', + 'administer views', + 'create ' . $type_name . ' content', + 'edit own ' . $type_name . ' content', + ]); + $this->drupalLogin($admin_user); + } + + /** + * Tests the Entity Reference Admin UI. + */ + public function testFieldAdminHandler() { + $bundle_path = 'admin/structure/types/manage/' . $this->type; + + $page = $this->getSession()->getPage(); + $assert_session = $this->assertSession(); + + // First step: 'Add new field' on the 'Manage fields' page. + $this->drupalGet($bundle_path . '/fields/add-field'); + + // Check if the commonly referenced entity types appear in the list. + $this->assertOption('edit-new-storage-type', 'field_ui:entity_reference:node'); + $this->assertOption('edit-new-storage-type', 'field_ui:entity_reference:user'); + + $page->findField('new_storage_type')->setValue('entity_reference'); + $assert_session->waitForField('label')->setValue('Test'); + $machine_name = $assert_session->waitForElement('xpath', '//*[@id="edit-label-machine-name-suffix"]/span[2]/span[contains(text(), "field_test")]'); + $this->assertNotEmpty($machine_name); + $page->pressButton('Save and continue'); + + // Node should be selected by default. + $this->assertFieldByName('settings[target_type]', 'node'); + + // Check that all entity types can be referenced. + $this->assertFieldSelectOptions('settings[target_type]', array_keys(\Drupal::entityManager()->getDefinitions())); + + // Second step: 'Field settings' form. + $this->drupalPostForm(NULL, [], t('Save field settings')); + + // The base handler should be selected by default. + $this->assertFieldByName('settings[handler]', 'default:node'); + + // The base handler settings should be displayed. + $entity_type_id = 'node'; + // Check that the type label is correctly displayed. + $assert_session->pageTextContains('Content type'); + $bundles = $this->container->get('entity_type.bundle.info')->getBundleInfo($entity_type_id); + foreach ($bundles as $bundle_name => $bundle_info) { + $this->assertFieldByName('settings[handler_settings][target_bundles][' . $bundle_name . ']'); + } + + reset($bundles); + + // Test the sort settings. + // Option 0: no sort. + $this->assertFieldByName('settings[handler_settings][sort][field]', '_none'); + $this->assertNoFieldByName('settings[handler_settings][sort][direction]'); + // Option 1: sort by field. + $page->findField('settings[handler_settings][sort][field]')->setValue('nid'); + $assert_session->waitForField('settings[handler_settings][sort][direction]'); + $this->assertFieldByName('settings[handler_settings][sort][direction]', 'ASC'); + + // Test that a non-translatable base field is a sort option. + $this->assertFieldByXPath("//select[@name='settings[handler_settings][sort][field]']/option[@value='nid']"); + // Test that a translatable base field is a sort option. + $this->assertFieldByXPath("//select[@name='settings[handler_settings][sort][field]']/option[@value='title']"); + // Test that a configurable field is a sort option. + $this->assertFieldByXPath("//select[@name='settings[handler_settings][sort][field]']/option[@value='body.value']"); + + // Set back to no sort. + $page->findField('settings[handler_settings][sort][field]')->setValue('_none'); + $assert_session->assertWaitOnAjaxRequest(); + $this->assertNoFieldByName('settings[handler_settings][sort][direction]'); + + // Third step: confirm. + $page->findField('settings[handler_settings][target_bundles][' . key($bundles) . ']')->setValue(key($bundles)); + $assert_session->assertWaitOnAjaxRequest(); + $this->drupalPostForm(NULL, [ + 'required' => '1', + ], t('Save settings')); + + // Check that the field appears in the overview form. + $this->assertFieldByXPath('//table[@id="field-overview"]//tr[@id="field-test"]/td[1]', 'Test', 'Field was created and appears in the overview page.'); + + // Check that the field settings form can be submitted again, even when the + // field is required. + // The first 'Edit' link is for the Body field. + $this->clickLink(t('Edit'), 1); + $this->drupalPostForm(NULL, [], t('Save settings')); + + // Switch the target type to 'taxonomy_term' and check that the settings + // specific to its selection handler are displayed. + $field_name = 'node.' . $this->type . '.field_test'; + $edit = [ + 'settings[target_type]' => 'taxonomy_term', + ]; + $this->drupalPostForm($bundle_path . '/fields/' . $field_name . '/storage', $edit, t('Save field settings')); + $this->drupalGet($bundle_path . '/fields/' . $field_name); + $this->assertFieldByName('settings[handler_settings][auto_create]'); + + // Switch the target type to 'user' and check that the settings specific to + // its selection handler are displayed. + $field_name = 'node.' . $this->type . '.field_test'; + $edit = [ + 'settings[target_type]' => 'user', + ]; + $this->drupalPostForm($bundle_path . '/fields/' . $field_name . '/storage', $edit, t('Save field settings')); + $this->drupalGet($bundle_path . '/fields/' . $field_name); + $this->assertFieldByName('settings[handler_settings][filter][type]', '_none'); + + // Switch the target type to 'node'. + $field_name = 'node.' . $this->type . '.field_test'; + $edit = [ + 'settings[target_type]' => 'node', + ]; + $this->drupalPostForm($bundle_path . '/fields/' . $field_name . '/storage', $edit, t('Save field settings')); + + // Try to select the views handler. + $this->drupalGet($bundle_path . '/fields/' . $field_name); + $page->findField('settings[handler]')->setValue('views'); + $views_text = (string) new FormattableMarkup('No eligible views were found. Create a view with an Entity Reference display, or add such a display to an existing view.', [ + ':create' => \Drupal::url('views_ui.add'), + ':existing' => \Drupal::url('entity.view.collection'), + ]); + $assert_session->waitForElement('xpath', '//a[contains(text(), "Create a view")]'); + $assert_session->responseContains($views_text); + + $this->drupalPostForm(NULL, [], t('Save settings')); + // If no eligible view is available we should see a message. + $assert_session->pageTextContains('The views entity selection mode requires a view.'); + + // Enable the entity_reference_test module which creates an eligible view. + $this->container->get('module_installer') + ->install(['entity_reference_test']); + $this->resetAll(); + $this->drupalGet($bundle_path . '/fields/' . $field_name); + $page->findField('settings[handler]')->setValue('views'); + $assert_session + ->waitForField('settings[handler_settings][view][view_and_display]') + ->setValue('test_entity_reference:entity_reference_1'); + $this->drupalPostForm(NULL, [], t('Save settings')); + $assert_session->pageTextContains('Saved Test configuration.'); + + // Switch the target type to 'entity_test'. + $edit = [ + 'settings[target_type]' => 'entity_test', + ]; + $this->drupalPostForm($bundle_path . '/fields/' . $field_name . '/storage', $edit, t('Save field settings')); + $this->drupalGet($bundle_path . '/fields/' . $field_name); + $page->findField('settings[handler]')->setValue('views'); + $assert_session + ->waitForField('settings[handler_settings][view][view_and_display]') + ->setValue('test_entity_reference_entity_test:entity_reference_1'); + $edit = [ + 'required' => FALSE, + ]; + $this->drupalPostForm(NULL, $edit, t('Save settings')); + $assert_session->pageTextContains('Saved Test configuration.'); + } + + /** + * Checks if a select element contains the specified options. + * + * @param string $name + * The field name. + * @param array $expected_options + * An array of expected options. + */ + protected function assertFieldSelectOptions($name, array $expected_options) { + $xpath = $this->buildXPathQuery('//select[@name=:name]', [':name' => $name]); + $fields = $this->xpath($xpath); + if ($fields) { + $field = $fields[0]; + $options = $field->findAll('xpath', 'option'); + $optgroups = $field->findAll('xpath', 'optgroup'); + foreach ($optgroups as $optgroup) { + $options = array_merge($options, $optgroup->findAll('xpath', 'option')); + } + array_walk($options, function (NodeElement &$option) { + $option = $option->getAttribute('value'); + }); + + sort($options); + sort($expected_options); + + $this->assertIdentical($options, $expected_options); + } + else { + $this->fail('Unable to find field ' . $name); + } + } + +} diff --git a/web/core/modules/field/tests/src/Kernel/String/StringFormatterTest.php b/web/core/modules/field/tests/src/Kernel/String/StringFormatterTest.php index ae3a371c8..74f16d582 100644 --- a/web/core/modules/field/tests/src/Kernel/String/StringFormatterTest.php +++ b/web/core/modules/field/tests/src/Kernel/String/StringFormatterTest.php @@ -24,6 +24,13 @@ class StringFormatterTest extends KernelTestBase { */ public static $modules = ['field', 'text', 'entity_test', 'system', 'filter', 'user']; + /** + * The entity type manager. + * + * @var \Drupal\Core\Entity\EntityTypeManagerInterface + */ + protected $entityTypeManager; + /** * @var string */ @@ -79,6 +86,8 @@ class StringFormatterTest extends KernelTestBase { 'settings' => [], ]); $this->display->save(); + + $this->entityTypeManager = \Drupal::entityTypeManager(); } /** @@ -145,7 +154,7 @@ class StringFormatterTest extends KernelTestBase { $value2 = $this->randomMachineName(); $entity->{$this->fieldName}->value = $value2; $entity->save(); - $entity_new_revision = \Drupal::entityManager()->getStorage('entity_test_rev')->loadRevision($old_revision_id); + $entity_new_revision = $this->entityTypeManager->getStorage('entity_test_rev')->loadRevision($old_revision_id); $this->renderEntityFields($entity, $this->display); $this->assertLink($value2, 0); @@ -154,6 +163,19 @@ class StringFormatterTest extends KernelTestBase { $this->renderEntityFields($entity_new_revision, $this->display); $this->assertLink($value, 0); $this->assertLinkByHref('/entity_test_rev/' . $entity_new_revision->id() . '/revision/' . $entity_new_revision->getRevisionId() . '/view'); + + // Check that linking to a revisionable entity works if the entity type does + // not specify a 'revision' link template. + $entity_type = clone $this->entityTypeManager->getDefinition('entity_test_rev'); + $link_templates = $entity_type->getLinkTemplates(); + unset($link_templates['revision']); + $entity_type->set('links', $link_templates); + \Drupal::state()->set('entity_test_rev.entity_type', $entity_type); + $this->entityTypeManager->clearCachedDefinitions(); + + $this->renderEntityFields($entity_new_revision, $this->display); + $this->assertLink($value, 0); + $this->assertLinkByHref($entity->url('canonical')); } } diff --git a/web/core/modules/field_ui/tests/src/Functional/ManageFieldsFunctionalTest.php b/web/core/modules/field_ui/tests/src/Functional/ManageFieldsFunctionalTest.php index 3e31c815e..85a5017cb 100644 --- a/web/core/modules/field_ui/tests/src/Functional/ManageFieldsFunctionalTest.php +++ b/web/core/modules/field_ui/tests/src/Functional/ManageFieldsFunctionalTest.php @@ -176,7 +176,7 @@ class ManageFieldsFunctionalTest extends BrowserTestBase { /** * Tests adding a new field. * - * @todo Assert properties can bet set in the form and read back in + * @todo Assert properties can be set in the form and read back in * $field_storage and $fields. */ public function createField() { diff --git a/web/core/modules/file/file.module b/web/core/modules/file/file.module index c0003b350..0eb9a64ec 100644 --- a/web/core/modules/file/file.module +++ b/web/core/modules/file/file.module @@ -23,7 +23,7 @@ use Drupal\Core\Template\Attribute; /** * The regex pattern used when checking for insecure file types. */ -define('FILE_INSECURE_EXTENSION_REGEX', '/\.(php|pl|py|cgi|asp|js)(\.|$)/i'); +define('FILE_INSECURE_EXTENSION_REGEX', '/\.(phar|php|pl|py|cgi|asp|js)(\.|$)/i'); // Load all Field module hooks for File. require_once __DIR__ . '/file.field.inc'; @@ -859,7 +859,6 @@ function _file_save_upload_from_form(array $element, FormStateInterface $form_st * @todo: move this logic to a service in https://www.drupal.org/node/2244513. */ function file_save_upload($form_field_name, $validators = [], $destination = FALSE, $delta = NULL, $replace = FILE_EXISTS_RENAME) { - $user = \Drupal::currentUser(); static $upload_cache; $all_files = \Drupal::request()->files->get('files', []); @@ -887,176 +886,7 @@ function file_save_upload($form_field_name, $validators = [], $destination = FAL $files = []; foreach ($uploaded_files as $i => $file_info) { - // Check for file upload errors and return FALSE for this file if a lower - // level system error occurred. For a complete list of errors: - // See http://php.net/manual/features.file-upload.errors.php. - switch ($file_info->getError()) { - case UPLOAD_ERR_INI_SIZE: - case UPLOAD_ERR_FORM_SIZE: - \Drupal::messenger()->addError(t('The file %file could not be saved because it exceeds %maxsize, the maximum allowed size for uploads.', ['%file' => $file_info->getFilename(), '%maxsize' => format_size(file_upload_max_size())])); - $files[$i] = FALSE; - continue; - - case UPLOAD_ERR_PARTIAL: - case UPLOAD_ERR_NO_FILE: - \Drupal::messenger()->addError(t('The file %file could not be saved because the upload did not complete.', ['%file' => $file_info->getFilename()])); - $files[$i] = FALSE; - continue; - - case UPLOAD_ERR_OK: - // Final check that this is a valid upload, if it isn't, use the - // default error handler. - if (is_uploaded_file($file_info->getRealPath())) { - break; - } - - // Unknown error - default: - \Drupal::messenger()->addError(t('The file %file could not be saved. An unknown error has occurred.', ['%file' => $file_info->getFilename()])); - $files[$i] = FALSE; - continue; - - } - // Begin building file entity. - $values = [ - 'uid' => $user->id(), - 'status' => 0, - 'filename' => $file_info->getClientOriginalName(), - 'uri' => $file_info->getRealPath(), - 'filesize' => $file_info->getSize(), - ]; - $values['filemime'] = \Drupal::service('file.mime_type.guesser')->guess($values['filename']); - $file = File::create($values); - - $extensions = ''; - if (isset($validators['file_validate_extensions'])) { - if (isset($validators['file_validate_extensions'][0])) { - // Build the list of non-munged extensions if the caller provided them. - $extensions = $validators['file_validate_extensions'][0]; - } - else { - // If 'file_validate_extensions' is set and the list is empty then the - // caller wants to allow any extension. In this case we have to remove the - // validator or else it will reject all extensions. - unset($validators['file_validate_extensions']); - } - } - else { - // No validator was provided, so add one using the default list. - // Build a default non-munged safe list for file_munge_filename(). - $extensions = 'jpg jpeg gif png txt doc xls pdf ppt pps odt ods odp'; - $validators['file_validate_extensions'] = []; - $validators['file_validate_extensions'][0] = $extensions; - } - - if (!empty($extensions)) { - // Munge the filename to protect against possible malicious extension - // hiding within an unknown file type (ie: filename.html.foo). - $file->setFilename(file_munge_filename($file->getFilename(), $extensions)); - } - - // Rename potentially executable files, to help prevent exploits (i.e. will - // rename filename.php.foo and filename.php to filename.php.foo.txt and - // filename.php.txt, respectively). Don't rename if 'allow_insecure_uploads' - // evaluates to TRUE. - if (!\Drupal::config('system.file')->get('allow_insecure_uploads') && preg_match(FILE_INSECURE_EXTENSION_REGEX, $file->getFilename()) && (substr($file->getFilename(), -4) != '.txt')) { - $file->setMimeType('text/plain'); - // The destination filename will also later be used to create the URI. - $file->setFilename($file->getFilename() . '.txt'); - // The .txt extension may not be in the allowed list of extensions. We have - // to add it here or else the file upload will fail. - if (!empty($extensions)) { - $validators['file_validate_extensions'][0] .= ' txt'; - \Drupal::messenger()->addStatus(t('For security reasons, your upload has been renamed to %filename.', ['%filename' => $file->getFilename()])); - } - } - - // If the destination is not provided, use the temporary directory. - if (empty($destination)) { - $destination = 'temporary://'; - } - - // Assert that the destination contains a valid stream. - $destination_scheme = file_uri_scheme($destination); - if (!file_stream_wrapper_valid_scheme($destination_scheme)) { - \Drupal::messenger()->addError(t('The file could not be uploaded because the destination %destination is invalid.', ['%destination' => $destination])); - $files[$i] = FALSE; - continue; - } - - $file->source = $form_field_name; - // A file URI may already have a trailing slash or look like "public://". - if (substr($destination, -1) != '/') { - $destination .= '/'; - } - $file->destination = file_destination($destination . $file->getFilename(), $replace); - // If file_destination() returns FALSE then $replace === FILE_EXISTS_ERROR and - // there's an existing file so we need to bail. - if ($file->destination === FALSE) { - \Drupal::messenger()->addError(t('The file %source could not be uploaded because a file by that name already exists in the destination %directory.', ['%source' => $form_field_name, '%directory' => $destination])); - $files[$i] = FALSE; - continue; - } - - // Add in our check of the file name length. - $validators['file_validate_name_length'] = []; - - // Call the validation functions specified by this function's caller. - $errors = file_validate($file, $validators); - - // Check for errors. - if (!empty($errors)) { - $message = [ - 'error' => [ - '#markup' => t('The specified file %name could not be uploaded.', ['%name' => $file->getFilename()]), - ], - 'item_list' => [ - '#theme' => 'item_list', - '#items' => $errors, - ], - ]; - // @todo Add support for render arrays in - // \Drupal\Core\Messenger\MessengerInterface::addMessage()? - // @see https://www.drupal.org/node/2505497. - \Drupal::messenger()->addError(\Drupal::service('renderer')->renderPlain($message)); - $files[$i] = FALSE; - continue; - } - - $file->setFileUri($file->destination); - if (!drupal_move_uploaded_file($file_info->getRealPath(), $file->getFileUri())) { - \Drupal::messenger()->addError(t('File upload error. Could not move uploaded file.')); - \Drupal::logger('file')->notice('Upload error. Could not move uploaded file %file to destination %destination.', ['%file' => $file->getFilename(), '%destination' => $file->getFileUri()]); - $files[$i] = FALSE; - continue; - } - - // Set the permissions on the new file. - drupal_chmod($file->getFileUri()); - - // If we are replacing an existing file re-use its database record. - // @todo Do not create a new entity in order to update it. See - // https://www.drupal.org/node/2241865. - if ($replace == FILE_EXISTS_REPLACE) { - $existing_files = entity_load_multiple_by_properties('file', ['uri' => $file->getFileUri()]); - if (count($existing_files)) { - $existing = reset($existing_files); - $file->fid = $existing->id(); - $file->setOriginalId($existing->id()); - } - } - - // If we made it this far it's safe to record this file in the database. - $file->save(); - $files[$i] = $file; - // Allow an anonymous user who creates a non-public file to see it. See - // \Drupal\file\FileAccessControlHandler::checkAccess(). - if ($user->isAnonymous() && $destination_scheme !== 'public') { - $session = \Drupal::request()->getSession(); - $allowed_temp_files = $session->get('anonymous_allowed_file_ids', []); - $allowed_temp_files[$file->id()] = $file->id(); - $session->set('anonymous_allowed_file_ids', $allowed_temp_files); - } + $files[$i] = _file_save_upload_single($file_info, $form_field_name, $validators, $destination, $replace); } // Add files to the cache. @@ -1065,6 +895,201 @@ function file_save_upload($form_field_name, $validators = [], $destination = FAL return isset($delta) ? $files[$delta] : $files; } +/** + * Saves a file upload to a new location. + * + * @param \SplFileInfo $file_info + * The file upload to save. + * @param string $form_field_name + * A string that is the associative array key of the upload form element in + * the form array. + * @param array $validators + * (optional) An associative array of callback functions used to validate the + * file. + * @param bool $destination + * (optional) A string containing the URI that the file should be copied to. + * @param int $replace + * (optional) The replace behavior when the destination file already exists. + * + * @return \Drupal\file\FileInterface|false + * The created file entity or FALSE if the uploaded file not saved. + * + * @throws \Drupal\Core\Entity\EntityStorageException + * + * @internal + * This method should only be called from file_save_upload(). Use that method + * instead. + * + * @see file_save_upload() + */ +function _file_save_upload_single(\SplFileInfo $file_info, $form_field_name, $validators = [], $destination = FALSE, $replace = FILE_EXISTS_RENAME) { + $user = \Drupal::currentUser(); + // Check for file upload errors and return FALSE for this file if a lower + // level system error occurred. For a complete list of errors: + // See http://php.net/manual/features.file-upload.errors.php. + switch ($file_info->getError()) { + case UPLOAD_ERR_INI_SIZE: + case UPLOAD_ERR_FORM_SIZE: + \Drupal::messenger()->addError(t('The file %file could not be saved because it exceeds %maxsize, the maximum allowed size for uploads.', ['%file' => $file_info->getFilename(), '%maxsize' => format_size(file_upload_max_size())])); + return FALSE; + + case UPLOAD_ERR_PARTIAL: + case UPLOAD_ERR_NO_FILE: + \Drupal::messenger()->addError(t('The file %file could not be saved because the upload did not complete.', ['%file' => $file_info->getFilename()])); + return FALSE; + + case UPLOAD_ERR_OK: + // Final check that this is a valid upload, if it isn't, use the + // default error handler. + if (is_uploaded_file($file_info->getRealPath())) { + break; + } + + default: + // Unknown error + \Drupal::messenger()->addError(t('The file %file could not be saved. An unknown error has occurred.', ['%file' => $file_info->getFilename()])); + return FALSE; + + } + // Begin building file entity. + $values = [ + 'uid' => $user->id(), + 'status' => 0, + 'filename' => $file_info->getClientOriginalName(), + 'uri' => $file_info->getRealPath(), + 'filesize' => $file_info->getSize(), + ]; + $values['filemime'] = \Drupal::service('file.mime_type.guesser')->guess($values['filename']); + $file = File::create($values); + + $extensions = ''; + if (isset($validators['file_validate_extensions'])) { + if (isset($validators['file_validate_extensions'][0])) { + // Build the list of non-munged extensions if the caller provided them. + $extensions = $validators['file_validate_extensions'][0]; + } + else { + // If 'file_validate_extensions' is set and the list is empty then the + // caller wants to allow any extension. In this case we have to remove the + // validator or else it will reject all extensions. + unset($validators['file_validate_extensions']); + } + } + else { + // No validator was provided, so add one using the default list. + // Build a default non-munged safe list for file_munge_filename(). + $extensions = 'jpg jpeg gif png txt doc xls pdf ppt pps odt ods odp'; + $validators['file_validate_extensions'] = []; + $validators['file_validate_extensions'][0] = $extensions; + } + + if (!empty($extensions)) { + // Munge the filename to protect against possible malicious extension + // hiding within an unknown file type (ie: filename.html.foo). + $file->setFilename(file_munge_filename($file->getFilename(), $extensions)); + } + + // Rename potentially executable files, to help prevent exploits (i.e. will + // rename filename.php.foo and filename.php to filename.php.foo.txt and + // filename.php.txt, respectively). Don't rename if 'allow_insecure_uploads' + // evaluates to TRUE. + if (!\Drupal::config('system.file')->get('allow_insecure_uploads') && preg_match(FILE_INSECURE_EXTENSION_REGEX, $file->getFilename()) && (substr($file->getFilename(), -4) != '.txt')) { + $file->setMimeType('text/plain'); + // The destination filename will also later be used to create the URI. + $file->setFilename($file->getFilename() . '.txt'); + // The .txt extension may not be in the allowed list of extensions. We have + // to add it here or else the file upload will fail. + if (!empty($extensions)) { + $validators['file_validate_extensions'][0] .= ' txt'; + \Drupal::messenger()->addStatus(t('For security reasons, your upload has been renamed to %filename.', ['%filename' => $file->getFilename()])); + } + } + + // If the destination is not provided, use the temporary directory. + if (empty($destination)) { + $destination = 'temporary://'; + } + + // Assert that the destination contains a valid stream. + $destination_scheme = file_uri_scheme($destination); + if (!file_stream_wrapper_valid_scheme($destination_scheme)) { + \Drupal::messenger()->addError(t('The file could not be uploaded because the destination %destination is invalid.', ['%destination' => $destination])); + return FALSE; + } + + $file->source = $form_field_name; + // A file URI may already have a trailing slash or look like "public://". + if (substr($destination, -1) != '/') { + $destination .= '/'; + } + $file->destination = file_destination($destination . $file->getFilename(), $replace); + // If file_destination() returns FALSE then $replace === FILE_EXISTS_ERROR and + // there's an existing file so we need to bail. + if ($file->destination === FALSE) { + \Drupal::messenger()->addError(t('The file %source could not be uploaded because a file by that name already exists in the destination %directory.', ['%source' => $form_field_name, '%directory' => $destination])); + return FALSE; + } + + // Add in our check of the file name length. + $validators['file_validate_name_length'] = []; + + // Call the validation functions specified by this function's caller. + $errors = file_validate($file, $validators); + + // Check for errors. + if (!empty($errors)) { + $message = [ + 'error' => [ + '#markup' => t('The specified file %name could not be uploaded.', ['%name' => $file->getFilename()]), + ], + 'item_list' => [ + '#theme' => 'item_list', + '#items' => $errors, + ], + ]; + // @todo Add support for render arrays in + // \Drupal\Core\Messenger\MessengerInterface::addMessage()? + // @see https://www.drupal.org/node/2505497. + \Drupal::messenger()->addError(\Drupal::service('renderer')->renderPlain($message)); + return FALSE; + } + + $file->setFileUri($file->destination); + if (!drupal_move_uploaded_file($file_info->getRealPath(), $file->getFileUri())) { + \Drupal::messenger()->addError(t('File upload error. Could not move uploaded file.')); + \Drupal::logger('file')->notice('Upload error. Could not move uploaded file %file to destination %destination.', ['%file' => $file->getFilename(), '%destination' => $file->getFileUri()]); + return FALSE; + } + + // Set the permissions on the new file. + drupal_chmod($file->getFileUri()); + + // If we are replacing an existing file re-use its database record. + // @todo Do not create a new entity in order to update it. See + // https://www.drupal.org/node/2241865. + if ($replace == FILE_EXISTS_REPLACE) { + $existing_files = entity_load_multiple_by_properties('file', ['uri' => $file->getFileUri()]); + if (count($existing_files)) { + $existing = reset($existing_files); + $file->fid = $existing->id(); + $file->setOriginalId($existing->id()); + } + } + + // If we made it this far it's safe to record this file in the database. + $file->save(); + + // Allow an anonymous user who creates a non-public file to see it. See + // \Drupal\file\FileAccessControlHandler::checkAccess(). + if ($user->isAnonymous() && $destination_scheme !== 'public') { + $session = \Drupal::request()->getSession(); + $allowed_temp_files = $session->get('anonymous_allowed_file_ids', []); + $allowed_temp_files[$file->id()] = $file->id(); + $session->set('anonymous_allowed_file_ids', $allowed_temp_files); + } + return $file; +} + /** * Determines the preferred upload progress implementation. * diff --git a/web/core/modules/file/tests/src/Functional/MultipleFileUploadTest.php b/web/core/modules/file/tests/src/Functional/MultipleFileUploadTest.php new file mode 100644 index 000000000..587d4479e --- /dev/null +++ b/web/core/modules/file/tests/src/Functional/MultipleFileUploadTest.php @@ -0,0 +1,59 @@ +drupalCreateUser(['administer themes']); + $this->drupalLogin($admin); + } + + /** + * Tests multiple file field with all file extensions. + */ + public function testMultipleFileFieldWithAllFileExtensions() { + $theme = 'test_theme_settings'; + \Drupal::service('theme_handler')->install([$theme]); + $this->drupalGet("admin/appearance/settings/$theme"); + + $edit = []; + // Create few files with non-typical extensions. + foreach (['file1.wtf', 'file2.wtf'] as $i => $file) { + $file_path = $this->root . "/sites/default/files/simpletest/$file"; + file_put_contents($file_path, 'File with non-default extension.', FILE_APPEND | LOCK_EX); + $edit["files[multi_file][$i]"] = $file_path; + } + + // @todo: Replace after https://www.drupal.org/project/drupal/issues/2917885 + $this->drupalGet("admin/appearance/settings/$theme"); + $submit_xpath = $this->assertSession()->buttonExists('Save configuration')->getXpath(); + $client = $this->getSession()->getDriver()->getClient(); + $form = $client->getCrawler()->filterXPath($submit_xpath)->form(); + $client->request($form->getMethod(), $form->getUri(), $form->getPhpValues(), $edit); + + $page = $this->getSession()->getPage(); + $this->assertNotContains('Only files with the following extensions are allowed', $page->getContent()); + $this->assertContains('The configuration options have been saved.', $page->getContent()); + $this->assertContains('file1.wtf', $page->getContent()); + $this->assertContains('file2.wtf', $page->getContent()); + } + +} diff --git a/web/core/modules/language/src/ConfigurableLanguageManager.php b/web/core/modules/language/src/ConfigurableLanguageManager.php index 13079f855..25927b525 100644 --- a/web/core/modules/language/src/ConfigurableLanguageManager.php +++ b/web/core/modules/language/src/ConfigurableLanguageManager.php @@ -90,11 +90,11 @@ class ConfigurableLanguageManager extends LanguageManager implements Configurabl protected $initialized = FALSE; /** - * Whether already in the process of language initialization. + * Whether language types are in the process of language initialization. * - * @var bool + * @var bool[] */ - protected $initializing = FALSE; + protected $initializing = []; /** * {@inheritdoc} @@ -213,12 +213,12 @@ class ConfigurableLanguageManager extends LanguageManager implements Configurabl $this->negotiatedLanguages[$type] = $this->getDefaultLanguage(); if ($this->negotiator && $this->isMultilingual()) { - if (!$this->initializing) { - $this->initializing = TRUE; + if (!isset($this->initializing[$type])) { + $this->initializing[$type] = TRUE; $negotiation = $this->negotiator->initializeType($type); $this->negotiatedLanguages[$type] = reset($negotiation); $this->negotiatedMethods[$type] = key($negotiation); - $this->initializing = FALSE; + unset($this->initializing[$type]); } // If the current interface language needs to be retrieved during // initialization we return the system language. This way string diff --git a/web/core/modules/language/tests/src/Functional/ConfigurableLanguageManagerTest.php b/web/core/modules/language/tests/src/Functional/ConfigurableLanguageManagerTest.php new file mode 100644 index 000000000..d36aee0ac --- /dev/null +++ b/web/core/modules/language/tests/src/Functional/ConfigurableLanguageManagerTest.php @@ -0,0 +1,189 @@ +createUser([], '', TRUE); + $this->drupalLogin($user); + ConfigurableLanguage::createFromLangcode('es')->save(); + + // Create a page node type and make it translatable. + NodeType::create([ + 'type' => 'page', + 'name' => t('Page'), + ])->save(); + + $config = ContentLanguageSettings::loadByEntityTypeBundle('node', 'page'); + $config->setDefaultLangcode('en') + ->setLanguageAlterable(TRUE) + ->save(); + + // Create a Node with title 'English' and translate it to Spanish. + $node = Node::create([ + 'type' => 'page', + 'title' => 'English', + ]); + $node->save(); + $node->addTranslation('es', ['title' => 'Español']); + $node->save(); + + // Enable both language_interface and language_content language negotiation. + \Drupal::getContainer()->get('language_negotiator')->updateConfiguration([ + 'language_interface', + 'language_content', + ]); + + // Set the preferred language of the user for admin pages to English. + $user->set('preferred_admin_langcode', 'en')->save(); + + // Make sure node edit pages are administration pages. + $this->config('node.settings')->set('use_admin_theme', '1')->save(); + $this->container->get('router.builder')->rebuild(); + + // Place a Block with a translatable string on the page. + $this->placeBlock('system_powered_by_block', ['region' => 'content']); + + // Load the Spanish Node page once, to register the translatable string. + $this->drupalGet('/es/node/1'); + + // Translate the Powered by string. + /** @var \Drupal\locale\StringStorageInterface $string_storage */ + $string_storage = \Drupal::getContainer()->get('locale.storage'); + $source = $string_storage->findString(['source' => 'Powered by Drupal']); + $string_storage->createTranslation([ + 'lid' => $source->lid, + 'language' => 'es', + 'translation' => 'Funciona con ...', + ])->save(); + // Invalidate caches so that the new translation will be used. + Cache::invalidateTags(['rendered', 'locale']); + } + + /** + * Test translation with URL and Preferred Admin Language negotiators. + * + * The interface language uses the preferred language for admin pages of the + * user and after that the URL. The Content uses just the URL. + */ + public function testUrlContentTranslationWithPreferredAdminLanguage() { + $assert_session = $this->assertSession(); + // Set the interface language to use the preferred administration language + // and then the URL. + /** @var \Drupal\language\LanguageNegotiatorInterface $language_negotiator */ + $language_negotiator = \Drupal::getContainer()->get('language_negotiator'); + $language_negotiator->saveConfiguration('language_interface', [ + 'language-user-admin' => 1, + 'language-url' => 2, + 'language-selected' => 3, + ]); + // Set Content Language Negotiator to use just the URL. + $language_negotiator->saveConfiguration('language_content', [ + 'language-url' => 4, + 'language-selected' => 5, + ]); + + // See if the full view of the node in english is present and the + // string in the Powered By Block is in English. + $this->drupalGet('/node/1'); + $assert_session->pageTextContains('English'); + $assert_session->pageTextContains('Powered by'); + + // Load the spanish node page again and see if both the node and the string + // are translated. + $this->drupalGet('/es/node/1'); + $assert_session->pageTextContains('Español'); + $assert_session->pageTextContains('Funciona con'); + $assert_session->pageTextNotContains('Powered by'); + + // Check if the Powered by string is shown in English on an + // administration page, and the node content is shown in Spanish. + $this->drupalGet('/es/node/1/edit'); + $assert_session->pageTextContains('Español'); + $assert_session->pageTextContains('Powered by'); + $assert_session->pageTextNotContains('Funciona con'); + } + + /** + * Test translation with URL and Session Language Negotiators. + */ + public function testUrlContentTranslationWithSessionLanguage() { + $assert_session = $this->assertSession(); + /** @var \Drupal\language\LanguageNegotiatorInterface $language_negotiator */ + $language_negotiator = \Drupal::getContainer()->get('language_negotiator'); + // Set Interface Language Negotiator to Session. + $language_negotiator->saveConfiguration('language_interface', [ + 'language-session' => 1, + 'language-url' => 2, + 'language-selected' => 3, + ]); + + // Set Content Language Negotiator to URL. + $language_negotiator->saveConfiguration('language_content', [ + 'language-url' => 4, + 'language-selected' => 5, + ]); + + // See if the full view of the node in english is present and the + // string in the Powered By Block is in English. + $this->drupalGet('/node/1'); + $assert_session->pageTextContains('English'); + $assert_session->pageTextContains('Powered by'); + + // The language session variable has not been set yet, so + // The string should be in Spanish. + $this->drupalGet('/es/node/1'); + $assert_session->pageTextContains('Español'); + $assert_session->pageTextNotContains('Powered by'); + $assert_session->pageTextContains('Funciona con'); + + // Set the session language to Spanish but load the English node page. + $this->drupalGet('/node/1', ['query' => ['language' => 'es']]); + $assert_session->pageTextContains('English'); + $assert_session->pageTextNotContains('Español'); + $assert_session->pageTextContains('Funciona con'); + $assert_session->pageTextNotContains('Powered by'); + + // Set the session language to English but load the node page in Spanish. + $this->drupalGet('/es/node/1', ['query' => ['language' => 'en']]); + $assert_session->pageTextNotContains('English'); + $assert_session->pageTextContains('Español'); + $assert_session->pageTextNotContains('Funciona con'); + $assert_session->pageTextContains('Powered by'); + } + +} diff --git a/web/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateLanguageContentTaxonomyVocabularySettingsTest.php b/web/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateLanguageContentTaxonomyVocabularySettingsTest.php index 1f7fd035d..b7b3f4b8f 100644 --- a/web/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateLanguageContentTaxonomyVocabularySettingsTest.php +++ b/web/core/modules/language/tests/src/Kernel/Migrate/d6/MigrateLanguageContentTaxonomyVocabularySettingsTest.php @@ -45,9 +45,9 @@ class MigrateLanguageContentTaxonomyVocabularySettingsTest extends MigrateDrupal // Set language to vocabulary. $this->assertLanguageContentSettings($target_entity, 'vocabulary_2_i_1_', 'fr', FALSE, ['enabled' => FALSE]); // Localize terms. - $this->assertLanguageContentSettings($target_entity, 'vocabulary_3_i_2_', LanguageInterface::LANGCODE_SITE_DEFAULT, TRUE, ['enabled' => TRUE]); + $this->assertLanguageContentSettings($target_entity, 'vocabulary_3_i_2_', LanguageInterface::LANGCODE_SITE_DEFAULT, TRUE, ['enabled' => FALSE]); // None translation enabled. - $this->assertLanguageContentSettings($target_entity, 'vocabulary_name_much_longer_than', LanguageInterface::LANGCODE_SITE_DEFAULT, FALSE, ['enabled' => FALSE]); + $this->assertLanguageContentSettings($target_entity, 'vocabulary_name_much_longer_than', LanguageInterface::LANGCODE_SITE_DEFAULT, TRUE, ['enabled' => TRUE]); $this->assertLanguageContentSettings($target_entity, 'tags', LanguageInterface::LANGCODE_SITE_DEFAULT, FALSE, ['enabled' => FALSE]); $this->assertLanguageContentSettings($target_entity, 'forums', LanguageInterface::LANGCODE_SITE_DEFAULT, FALSE, ['enabled' => FALSE]); $this->assertLanguageContentSettings($target_entity, 'type', LanguageInterface::LANGCODE_SITE_DEFAULT, FALSE, ['enabled' => FALSE]); diff --git a/web/core/modules/layout_builder/css/layout-builder.css b/web/core/modules/layout_builder/css/layout-builder.css index c920f23bd..edb0c48cb 100644 --- a/web/core/modules/layout_builder/css/layout-builder.css +++ b/web/core/modules/layout_builder/css/layout-builder.css @@ -85,3 +85,32 @@ display: block; padding-top: 0.55em; } + +#drupal-off-canvas .inline-block-create-button { + display: block; + padding: 24px; + padding-left: 44px; + font-size: 16px; + color: #eee; + background: url(../../../misc/icons/bebebe/plus.svg) transparent 16px no-repeat; +} + +#drupal-off-canvas .inline-block-create-button, +#drupal-off-canvas .inline-block-list__item { + margin: 0 -20px; + background-color: #444; +} + +#drupal-off-canvas .inline-block-create-button:hover, +#drupal-off-canvas .inline-block-list__item:hover { + background-color: #333; +} + +#drupal-off-canvas .inline-block-list { + margin-bottom: 15px; +} + +#drupal-off-canvas .inline-block-list__item { + display: block; + padding: 15px 0 15px 25px; +} diff --git a/web/core/modules/layout_builder/layout_builder.info.yml b/web/core/modules/layout_builder/layout_builder.info.yml index dfd9922df..f70cdcaec 100644 --- a/web/core/modules/layout_builder/layout_builder.info.yml +++ b/web/core/modules/layout_builder/layout_builder.info.yml @@ -9,3 +9,5 @@ dependencies: - drupal:contextual # @todo Discuss removing in https://www.drupal.org/project/drupal/issues/2935999. - drupal:field_ui + # @todo Discuss removing in https://www.drupal.org/project/drupal/issues/3003610. + - drupal:block diff --git a/web/core/modules/layout_builder/layout_builder.module b/web/core/modules/layout_builder/layout_builder.module index 5d7c60615..373f7d8a0 100644 --- a/web/core/modules/layout_builder/layout_builder.module +++ b/web/core/modules/layout_builder/layout_builder.module @@ -19,6 +19,7 @@ use Drupal\layout_builder\Plugin\Block\ExtraFieldBlock; use Drupal\layout_builder\InlineBlockEntityOperations; use Drupal\Core\Session\AccountInterface; use Drupal\Core\Access\AccessResult; +use Drupal\layout_builder\Plugin\SectionStorage\OverridesSectionStorage; /** * Implements hook_help(). @@ -62,8 +63,8 @@ function layout_builder_entity_type_alter(array &$entity_types) { function layout_builder_form_entity_form_display_edit_form_alter(&$form, FormStateInterface $form_state) { // Hides the Layout Builder field. It is rendered directly in // \Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay::buildMultiple(). - unset($form['fields']['layout_builder__layout']); - $key = array_search('layout_builder__layout', $form['#fields']); + unset($form['fields'][OverridesSectionStorage::FIELD_NAME]); + $key = array_search(OverridesSectionStorage::FIELD_NAME, $form['#fields']); if ($key !== FALSE) { unset($form['#fields'][$key]); } @@ -177,7 +178,7 @@ function layout_builder_cron() { function layout_builder_plugin_filter_block_alter(array &$definitions, array $extra, $consumer) { // @todo Determine the 'inline_block' blocks should be allowed outside // of layout_builder https://www.drupal.org/node/2979142. - if ($consumer !== 'layout_builder') { + if ($consumer !== 'layout_builder' || !isset($extra['list']) || $extra['list'] !== 'inline_blocks') { foreach ($definitions as $id => $definition) { if ($definition['id'] === 'inline_block') { unset($definitions[$id]); @@ -202,3 +203,21 @@ function layout_builder_block_content_access(EntityInterface $entity, $operation } return AccessResult::forbidden(); } + +/** + * Implements hook_plugin_filter_TYPE__CONSUMER_alter(). + */ +function layout_builder_plugin_filter_block__block_ui_alter(array &$definitions, array $extra) { + foreach ($definitions as $id => $definition) { + // Filter out any layout_builder definition with required contexts. + if ($definition['provider'] === 'layout_builder' && !empty($definition['context'])) { + /** @var \Drupal\Core\Plugin\Context\ContextDefinitionInterface $context */ + foreach ($definition['context'] as $context) { + if ($context->isRequired()) { + unset($definitions[$id]); + break; + } + } + } + } +} diff --git a/web/core/modules/layout_builder/layout_builder.routing.yml b/web/core/modules/layout_builder/layout_builder.routing.yml index 54c9cf25b..3e3ee1b02 100644 --- a/web/core/modules/layout_builder/layout_builder.routing.yml +++ b/web/core/modules/layout_builder/layout_builder.routing.yml @@ -80,6 +80,19 @@ layout_builder.add_block: section_storage: layout_builder_tempstore: TRUE +layout_builder.choose_inline_block: + path: '/layout_builder/choose/inline-block/{section_storage_type}/{section_storage}/{delta}/{region}' + defaults: + _controller: '\Drupal\layout_builder\Controller\ChooseBlockController::inlineBlockList' + _title: 'Add a new Inline Block' + requirements: + _permission: 'configure any layout' + options: + _admin_route: TRUE + parameters: + section_storage: + layout_builder_tempstore: TRUE + layout_builder.update_block: path: '/layout_builder/update/block/{section_storage_type}/{section_storage}/{delta}/{region}/{uuid}' defaults: diff --git a/web/core/modules/layout_builder/src/Controller/ChooseBlockController.php b/web/core/modules/layout_builder/src/Controller/ChooseBlockController.php index ac8514c48..9bd76bacc 100644 --- a/web/core/modules/layout_builder/src/Controller/ChooseBlockController.php +++ b/web/core/modules/layout_builder/src/Controller/ChooseBlockController.php @@ -5,6 +5,7 @@ namespace Drupal\layout_builder\Controller; use Drupal\Core\Ajax\AjaxHelperTrait; use Drupal\Core\Block\BlockManagerInterface; use Drupal\Core\DependencyInjection\ContainerInjectionInterface; +use Drupal\Core\Entity\EntityTypeManagerInterface; use Drupal\Core\StringTranslation\StringTranslationTrait; use Drupal\Core\Url; use Drupal\layout_builder\Context\LayoutBuilderContextTrait; @@ -29,14 +30,24 @@ class ChooseBlockController implements ContainerInjectionInterface { */ protected $blockManager; + /** + * The entity type manager. + * + * @var \Drupal\Core\Entity\EntityTypeManagerInterface + */ + protected $entityTypeManager; + /** * ChooseBlockController constructor. * * @param \Drupal\Core\Block\BlockManagerInterface $block_manager * The block manager. + * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager + * The entity type manager. */ - public function __construct(BlockManagerInterface $block_manager) { + public function __construct(BlockManagerInterface $block_manager, EntityTypeManagerInterface $entity_type_manager) { $this->blockManager = $block_manager; + $this->entityTypeManager = $entity_type_manager; } /** @@ -44,7 +55,8 @@ class ChooseBlockController implements ContainerInjectionInterface { */ public static function create(ContainerInterface $container) { return new static( - $container->get('plugin.manager.block') + $container->get('plugin.manager.block'), + $container->get('entity_type.manager') ); } @@ -63,8 +75,43 @@ class ChooseBlockController implements ContainerInjectionInterface { */ public function build(SectionStorageInterface $section_storage, $delta, $region) { $build['#title'] = $this->t('Choose a block'); - $build['#type'] = 'container'; - $build['#attributes']['class'][] = 'block-categories'; + if ($this->entityTypeManager->hasDefinition('block_content_type') && $types = $this->entityTypeManager->getStorage('block_content_type')->loadMultiple()) { + if (count($types) === 1) { + $type = reset($types); + $plugin_id = 'inline_block:' . $type->id(); + if ($this->blockManager->hasDefinition($plugin_id)) { + $url = Url::fromRoute('layout_builder.add_block', [ + 'section_storage_type' => $section_storage->getStorageType(), + 'section_storage' => $section_storage->getStorageId(), + 'delta' => $delta, + 'region' => $region, + 'plugin_id' => $plugin_id, + ]); + } + } + else { + $url = Url::fromRoute('layout_builder.choose_inline_block', [ + 'section_storage_type' => $section_storage->getStorageType(), + 'section_storage' => $section_storage->getStorageId(), + 'delta' => $delta, + 'region' => $region, + ]); + } + if (isset($url)) { + $build['add_block'] = [ + '#type' => 'link', + '#url' => $url, + '#title' => $this->t('Create @entity_type', [ + '@entity_type' => $this->entityTypeManager->getDefinition('block_content')->getSingularLabel(), + ]), + '#attributes' => $this->getAjaxAttributes(), + ]; + $build['add_block']['#attributes']['class'][] = 'inline-block-create-button'; + } + } + + $block_categories['#type'] = 'container'; + $block_categories['#attributes']['class'][] = 'block-categories'; // @todo Explicitly cast delta to an integer, remove this in // https://www.drupal.org/project/drupal/issues/2984509. @@ -75,35 +122,116 @@ class ChooseBlockController implements ContainerInjectionInterface { 'delta' => $delta, 'region' => $region, ]); - foreach ($this->blockManager->getGroupedDefinitions($definitions) as $category => $blocks) { - $build[$category]['#type'] = 'details'; - $build[$category]['#open'] = TRUE; - $build[$category]['#title'] = $category; - $build[$category]['links'] = [ - '#theme' => 'links', - ]; - foreach ($blocks as $block_id => $block) { - $link = [ - 'title' => $block['admin_label'], - 'url' => Url::fromRoute('layout_builder.add_block', - [ - 'section_storage_type' => $section_storage->getStorageType(), - 'section_storage' => $section_storage->getStorageId(), - 'delta' => $delta, - 'region' => $region, - 'plugin_id' => $block_id, - ] - ), - ]; - if ($this->isAjax()) { - $link['attributes']['class'][] = 'use-ajax'; - $link['attributes']['data-dialog-type'][] = 'dialog'; - $link['attributes']['data-dialog-renderer'][] = 'off_canvas'; - } - $build[$category]['links']['#links'][] = $link; + $grouped_definitions = $this->blockManager->getGroupedDefinitions($definitions); + foreach ($grouped_definitions as $category => $blocks) { + $block_categories[$category]['#type'] = 'details'; + $block_categories[$category]['#open'] = TRUE; + $block_categories[$category]['#title'] = $category; + $block_categories[$category]['links'] = $this->getBlockLinks($section_storage, $delta, $region, $blocks); + } + $build['block_categories'] = $block_categories; + return $build; + } + + /** + * Provides the UI for choosing a new inline block. + * + * @param \Drupal\layout_builder\SectionStorageInterface $section_storage + * The section storage. + * @param int $delta + * The delta of the section to splice. + * @param string $region + * The region the block is going in. + * + * @return array + * A render array. + */ + public function inlineBlockList(SectionStorageInterface $section_storage, $delta, $region) { + $definitions = $this->blockManager->getFilteredDefinitions('layout_builder', $this->getAvailableContexts($section_storage), [ + 'section_storage' => $section_storage, + 'region' => $region, + 'list' => 'inline_blocks', + ]); + $blocks = $this->blockManager->getGroupedDefinitions($definitions); + $build = []; + if (isset($blocks['Inline blocks'])) { + $build['links'] = $this->getBlockLinks($section_storage, $delta, $region, $blocks['Inline blocks']); + $build['links']['#attributes']['class'][] = 'inline-block-list'; + foreach ($build['links']['#links'] as &$link) { + $link['attributes']['class'][] = 'inline-block-list__item'; } + $build['back_button'] = [ + '#type' => 'link', + '#url' => Url::fromRoute('layout_builder.choose_block', + [ + 'section_storage_type' => $section_storage->getStorageType(), + 'section_storage' => $section_storage->getStorageId(), + 'delta' => $delta, + 'region' => $region, + ] + ), + '#title' => $this->t('Back'), + '#attributes' => $this->getAjaxAttributes(), + ]; } return $build; } + /** + * Gets a render array of block links. + * + * @param \Drupal\layout_builder\SectionStorageInterface $section_storage + * The section storage. + * @param int $delta + * The delta of the section to splice. + * @param string $region + * The region the block is going in. + * @param array $blocks + * The information for each block. + * + * @return array + * The block links render array. + */ + protected function getBlockLinks(SectionStorageInterface $section_storage, $delta, $region, array $blocks) { + $links = []; + foreach ($blocks as $block_id => $block) { + $link = [ + 'title' => $block['admin_label'], + 'url' => Url::fromRoute('layout_builder.add_block', + [ + 'section_storage_type' => $section_storage->getStorageType(), + 'section_storage' => $section_storage->getStorageId(), + 'delta' => $delta, + 'region' => $region, + 'plugin_id' => $block_id, + ] + ), + 'attributes' => $this->getAjaxAttributes(), + ]; + + $links[] = $link; + } + return [ + '#theme' => 'links', + '#links' => $links, + ]; + } + + /** + * Get dialog attributes if an ajax request. + * + * @return array + * The attributes array. + */ + protected function getAjaxAttributes() { + if ($this->isAjax()) { + return [ + 'class' => ['use-ajax'], + 'data-dialog-type' => 'dialog', + 'data-dialog-renderer' => 'off_canvas', + ]; + } + return []; + } + } diff --git a/web/core/modules/layout_builder/src/Controller/LayoutBuilderController.php b/web/core/modules/layout_builder/src/Controller/LayoutBuilderController.php index c01fea544..00bb40261 100644 --- a/web/core/modules/layout_builder/src/Controller/LayoutBuilderController.php +++ b/web/core/modules/layout_builder/src/Controller/LayoutBuilderController.php @@ -2,6 +2,7 @@ namespace Drupal\layout_builder\Controller; +use Drupal\Core\Ajax\AjaxHelperTrait; use Drupal\Core\DependencyInjection\ContainerInjectionInterface; use Drupal\Core\Messenger\MessengerInterface; use Drupal\Core\Plugin\PluginFormInterface; @@ -24,6 +25,7 @@ class LayoutBuilderController implements ContainerInjectionInterface { use LayoutBuilderContextTrait; use StringTranslationTrait; + use AjaxHelperTrait; /** * The layout tempstore repository. @@ -90,6 +92,11 @@ class LayoutBuilderController implements ContainerInjectionInterface { $this->prepareLayout($section_storage, $is_rebuilding); $output = []; + if ($this->isAjax()) { + $output['status_messages'] = [ + '#type' => 'status_messages', + ]; + } $count = 0; for ($i = 0; $i < $section_storage->count(); $i++) { $output[] = $this->buildAddSectionLink($section_storage, $count); @@ -114,6 +121,11 @@ class LayoutBuilderController implements ContainerInjectionInterface { * Indicates if the layout is rebuilding. */ protected function prepareLayout(SectionStorageInterface $section_storage, $is_rebuilding) { + // If the layout has pending changes, add a warning. + if ($this->layoutTempstoreRepository->has($section_storage)) { + $this->messenger->addWarning($this->t('You have unsaved changes.')); + } + // Only add sections if the layout is new and empty. if (!$is_rebuilding && $section_storage->count() === 0) { $sections = []; @@ -269,7 +281,7 @@ class LayoutBuilderController implements ContainerInjectionInterface { ], 'remove' => [ '#type' => 'link', - '#title' => $this->t('Remove section'), + '#title' => $this->t('Remove section @section', ['@section' => $delta + 1]), '#url' => Url::fromRoute('layout_builder.remove_section', [ 'section_storage_type' => $storage_type, 'section_storage' => $storage_id, diff --git a/web/core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php b/web/core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php index 0118768f7..7f10d6f51 100644 --- a/web/core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php +++ b/web/core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php @@ -9,6 +9,7 @@ use Drupal\Core\Plugin\Context\EntityContext; use Drupal\Core\StringTranslation\TranslatableMarkup; use Drupal\field\Entity\FieldConfig; use Drupal\field\Entity\FieldStorageConfig; +use Drupal\layout_builder\Plugin\SectionStorage\OverridesSectionStorage; use Drupal\layout_builder\Section; use Drupal\layout_builder\SectionComponent; use Drupal\layout_builder\SectionStorage\SectionStorageTrait; @@ -110,10 +111,10 @@ class LayoutBuilderEntityViewDisplay extends BaseEntityViewDisplay implements La $bundle = $this->getTargetBundle(); if ($new_value) { - $this->addSectionField($entity_type_id, $bundle, 'layout_builder__layout'); + $this->addSectionField($entity_type_id, $bundle, OverridesSectionStorage::FIELD_NAME); } else { - $this->removeSectionField($entity_type_id, $bundle, 'layout_builder__layout'); + $this->removeSectionField($entity_type_id, $bundle, OverridesSectionStorage::FIELD_NAME); } } @@ -274,8 +275,8 @@ class LayoutBuilderEntityViewDisplay extends BaseEntityViewDisplay implements La * The sections. */ protected function getRuntimeSections(FieldableEntityInterface $entity) { - if ($this->isOverridable() && !$entity->get('layout_builder__layout')->isEmpty()) { - return $entity->get('layout_builder__layout')->getSections(); + if ($this->isOverridable() && !$entity->get(OverridesSectionStorage::FIELD_NAME)->isEmpty()) { + return $entity->get(OverridesSectionStorage::FIELD_NAME)->getSections(); } return $this->getSections(); diff --git a/web/core/modules/layout_builder/src/EventSubscriber/BlockComponentRenderArray.php b/web/core/modules/layout_builder/src/EventSubscriber/BlockComponentRenderArray.php index c2e3bfb18..8b445bd77 100644 --- a/web/core/modules/layout_builder/src/EventSubscriber/BlockComponentRenderArray.php +++ b/web/core/modules/layout_builder/src/EventSubscriber/BlockComponentRenderArray.php @@ -5,6 +5,8 @@ namespace Drupal\layout_builder\EventSubscriber; use Drupal\block_content\Access\RefinableDependentAccessInterface; use Drupal\Core\Access\AccessResult; use Drupal\Core\Block\BlockPluginInterface; +use Drupal\Core\Render\Element; +use Drupal\Core\Render\PreviewFallbackInterface; use Drupal\Core\Session\AccountInterface; use Drupal\layout_builder\Access\LayoutPreviewAccessAllowed; use Drupal\layout_builder\Event\SectionComponentBuildRenderArrayEvent; @@ -88,6 +90,14 @@ class BlockComponentRenderArray implements EventSubscriberInterface { if ($access->isAllowed()) { $event->addCacheableDependency($block); + $content = $block->build(); + $is_content_empty = Element::isEmpty($content); + $is_placeholder_ready = $event->inPreview() && $block instanceof PreviewFallbackInterface; + // If the content is empty and no placeholder is available, return. + if ($is_content_empty && !$is_placeholder_ready) { + return; + } + $build = [ // @todo Move this to BlockBase in https://www.drupal.org/node/2931040. '#theme' => 'block', @@ -96,8 +106,11 @@ class BlockComponentRenderArray implements EventSubscriberInterface { '#base_plugin_id' => $block->getBaseId(), '#derivative_plugin_id' => $block->getDerivativeId(), '#weight' => $event->getComponent()->getWeight(), - 'content' => $block->build(), + 'content' => $content, ]; + if ($is_content_empty && $is_placeholder_ready) { + $build['content']['#markup'] = $block->getPreviewFallbackString(); + } $event->setBuild($build); } } diff --git a/web/core/modules/layout_builder/src/Form/LayoutBuilderEntityViewDisplayForm.php b/web/core/modules/layout_builder/src/Form/LayoutBuilderEntityViewDisplayForm.php index fea971bbc..72edc2f5b 100644 --- a/web/core/modules/layout_builder/src/Form/LayoutBuilderEntityViewDisplayForm.php +++ b/web/core/modules/layout_builder/src/Form/LayoutBuilderEntityViewDisplayForm.php @@ -7,6 +7,7 @@ use Drupal\Core\Field\FieldDefinitionInterface; use Drupal\Core\Form\FormStateInterface; use Drupal\field_ui\Form\EntityViewDisplayEditForm; use Drupal\layout_builder\Entity\LayoutEntityDisplayInterface; +use Drupal\layout_builder\Plugin\SectionStorage\OverridesSectionStorage; use Drupal\layout_builder\SectionStorageInterface; /** @@ -48,8 +49,8 @@ class LayoutBuilderEntityViewDisplayForm extends EntityViewDisplayEditForm { $form = parent::form($form, $form_state); // Remove the Layout Builder field from the list. - $form['#fields'] = array_diff($form['#fields'], ['layout_builder__layout']); - unset($form['fields']['layout_builder__layout']); + $form['#fields'] = array_diff($form['#fields'], [OverridesSectionStorage::FIELD_NAME]); + unset($form['fields'][OverridesSectionStorage::FIELD_NAME]); $is_enabled = $this->entity->isLayoutBuilderEnabled(); if ($is_enabled) { @@ -133,7 +134,7 @@ class LayoutBuilderEntityViewDisplayForm extends EntityViewDisplayEditForm { $entity_type = $this->entityTypeManager->getDefinition($display->getTargetEntityTypeId()); $query = $this->entityTypeManager->getStorage($display->getTargetEntityTypeId())->getQuery() - ->exists('layout_builder__layout'); + ->exists(OverridesSectionStorage::FIELD_NAME); if ($bundle_key = $entity_type->getKey('bundle')) { $query->condition($bundle_key, $display->getTargetBundle()); } diff --git a/web/core/modules/layout_builder/src/LayoutEntityHelperTrait.php b/web/core/modules/layout_builder/src/LayoutEntityHelperTrait.php index 912402754..fc22168a9 100644 --- a/web/core/modules/layout_builder/src/LayoutEntityHelperTrait.php +++ b/web/core/modules/layout_builder/src/LayoutEntityHelperTrait.php @@ -6,6 +6,7 @@ use Drupal\Component\Plugin\DerivativeInspectionInterface; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\FieldableEntityInterface; use Drupal\layout_builder\Entity\LayoutEntityDisplayInterface; +use Drupal\layout_builder\Plugin\SectionStorage\OverridesSectionStorage; /** * Methods to help with entities using the layout builder. @@ -65,7 +66,7 @@ trait LayoutEntityHelperTrait { return $entity->getSections(); } elseif ($this->isEntityUsingFieldOverride($entity)) { - return $entity->get('layout_builder__layout')->getSections(); + return $entity->get(OverridesSectionStorage::FIELD_NAME)->getSections(); } return NULL; } @@ -102,7 +103,7 @@ trait LayoutEntityHelperTrait { * TRUE if the entity is using a field for a layout override. */ protected function isEntityUsingFieldOverride(EntityInterface $entity) { - return $entity instanceof FieldableEntityInterface && $entity->hasField('layout_builder__layout'); + return $entity instanceof FieldableEntityInterface && $entity->hasField(OverridesSectionStorage::FIELD_NAME); } } diff --git a/web/core/modules/layout_builder/src/LayoutTempstoreRepository.php b/web/core/modules/layout_builder/src/LayoutTempstoreRepository.php index 39725afc7..69676861d 100644 --- a/web/core/modules/layout_builder/src/LayoutTempstoreRepository.php +++ b/web/core/modules/layout_builder/src/LayoutTempstoreRepository.php @@ -45,6 +45,15 @@ class LayoutTempstoreRepository implements LayoutTempstoreRepositoryInterface { return $section_storage; } + /** + * {@inheritdoc} + */ + public function has(SectionStorageInterface $section_storage) { + $id = $section_storage->getStorageId(); + $tempstore = $this->getTempstore($section_storage)->get($id); + return !empty($tempstore['section_storage']); + } + /** * {@inheritdoc} */ diff --git a/web/core/modules/layout_builder/src/LayoutTempstoreRepositoryInterface.php b/web/core/modules/layout_builder/src/LayoutTempstoreRepositoryInterface.php index 4972a47f6..67dc59ca9 100644 --- a/web/core/modules/layout_builder/src/LayoutTempstoreRepositoryInterface.php +++ b/web/core/modules/layout_builder/src/LayoutTempstoreRepositoryInterface.php @@ -35,6 +35,17 @@ interface LayoutTempstoreRepositoryInterface { */ public function set(SectionStorageInterface $section_storage); + /** + * Checks for the existence of a tempstore version of a section storage. + * + * @param \Drupal\layout_builder\SectionStorageInterface $section_storage + * The section storage to check for in tempstore. + * + * @return bool + * TRUE if there is a tempstore version of this section storage. + */ + public function has(SectionStorageInterface $section_storage); + /** * Removes the tempstore version of a section storage. * diff --git a/web/core/modules/layout_builder/src/Plugin/Block/ExtraFieldBlock.php b/web/core/modules/layout_builder/src/Plugin/Block/ExtraFieldBlock.php index ddb7f01fd..6b9910376 100644 --- a/web/core/modules/layout_builder/src/Plugin/Block/ExtraFieldBlock.php +++ b/web/core/modules/layout_builder/src/Plugin/Block/ExtraFieldBlock.php @@ -130,13 +130,22 @@ class ExtraFieldBlock extends BlockBase implements ContextAwarePluginInterface, // render array. If the hook is invoked the placeholder will be // replaced. // @see ::replaceFieldPlaceholder() - '#markup' => new TranslatableMarkup('Placeholder for the "@field" field', ['@field' => $extra_fields['display'][$this->fieldName]['label']]), + '#markup' => $this->getPreviewFallbackString(), ]; } CacheableMetadata::createFromObject($this)->applyTo($build); return $build; } + /** + * {@inheritdoc} + */ + public function getPreviewFallbackString() { + $entity = $this->getEntity(); + $extra_fields = $this->entityFieldManager->getExtraFields($entity->getEntityTypeId(), $entity->bundle()); + return new TranslatableMarkup('Placeholder for the "@field" field', ['@field' => $extra_fields['display'][$this->fieldName]['label']]); + } + /** * Replaces all placeholders for a given field. * diff --git a/web/core/modules/layout_builder/src/Plugin/Block/FieldBlock.php b/web/core/modules/layout_builder/src/Plugin/Block/FieldBlock.php index bb8ed1179..88e608f6f 100644 --- a/web/core/modules/layout_builder/src/Plugin/Block/FieldBlock.php +++ b/web/core/modules/layout_builder/src/Plugin/Block/FieldBlock.php @@ -17,7 +17,6 @@ use Drupal\Core\Field\FormatterPluginManager; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Plugin\ContainerFactoryPluginInterface; use Drupal\Core\Plugin\ContextAwarePluginInterface; -use Drupal\Core\Render\Element; use Drupal\Core\Session\AccountInterface; use Drupal\Core\StringTranslation\TranslatableMarkup; use Psr\Log\LoggerInterface; @@ -160,13 +159,17 @@ class FieldBlock extends BlockBase implements ContextAwarePluginInterface, Conta $build = []; $this->logger->warning('The field "%field" failed to render with the error of "%error".', ['%field' => $this->fieldName, '%error' => $e->getMessage()]); } - if (!empty($entity->in_preview) && !Element::getVisibleChildren($build)) { - $build['content']['#markup'] = new TranslatableMarkup('Placeholder for the "@field" field', ['@field' => $this->getFieldDefinition()->getLabel()]); - } CacheableMetadata::createFromObject($this)->applyTo($build); return $build; } + /** + * {@inheritdoc} + */ + public function getPreviewFallbackString() { + return new TranslatableMarkup('Placeholder for the "@field" field', ['@field' => $this->getFieldDefinition()->getLabel()]); + } + /** * {@inheritdoc} */ diff --git a/web/core/modules/layout_builder/src/Plugin/Derivative/FieldBlockDeriver.php b/web/core/modules/layout_builder/src/Plugin/Derivative/FieldBlockDeriver.php index 3e15fcd78..57d2c1ec7 100644 --- a/web/core/modules/layout_builder/src/Plugin/Derivative/FieldBlockDeriver.php +++ b/web/core/modules/layout_builder/src/Plugin/Derivative/FieldBlockDeriver.php @@ -106,7 +106,7 @@ class FieldBlockDeriver extends DeriverBase implements ContainerDeriverInterface $derivative['default_formatter'] = $field_type_definition['default_formatter']; } - $derivative['category'] = $this->t('@entity', ['@entity' => $entity_type_labels[$entity_type_id]]); + $derivative['category'] = $this->t('@entity fields', ['@entity' => $entity_type_labels[$entity_type_id]]); $derivative['admin_label'] = $field_definition->getLabel(); diff --git a/web/core/modules/layout_builder/src/Plugin/Derivative/LayoutBuilderLocalTaskDeriver.php b/web/core/modules/layout_builder/src/Plugin/Derivative/LayoutBuilderLocalTaskDeriver.php index e2053f342..9e4a2ce42 100644 --- a/web/core/modules/layout_builder/src/Plugin/Derivative/LayoutBuilderLocalTaskDeriver.php +++ b/web/core/modules/layout_builder/src/Plugin/Derivative/LayoutBuilderLocalTaskDeriver.php @@ -3,11 +3,11 @@ namespace Drupal\layout_builder\Plugin\Derivative; use Drupal\Component\Plugin\Derivative\DeriverBase; -use Drupal\Core\Entity\EntityTypeInterface; use Drupal\Core\Entity\EntityTypeManagerInterface; -use Drupal\Core\Entity\FieldableEntityInterface; use Drupal\Core\Plugin\Discovery\ContainerDeriverInterface; use Drupal\Core\StringTranslation\StringTranslationTrait; +use Drupal\layout_builder\Plugin\SectionStorage\SectionStorageLocalTaskProviderInterface; +use Drupal\layout_builder\SectionStorage\SectionStorageManagerInterface; use Symfony\Component\DependencyInjection\ContainerInterface; /** @@ -28,14 +28,24 @@ class LayoutBuilderLocalTaskDeriver extends DeriverBase implements ContainerDeri */ protected $entityTypeManager; + /** + * The section storage manager. + * + * @var \Drupal\layout_builder\SectionStorage\SectionStorageManagerInterface + */ + protected $sectionStorageManager; + /** * Constructs a new LayoutBuilderLocalTaskDeriver. * * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager * The entity type manager. + * @param \Drupal\layout_builder\SectionStorage\SectionStorageManagerInterface $section_storage_manager + * The section storage manager. */ - public function __construct(EntityTypeManagerInterface $entity_type_manager) { + public function __construct(EntityTypeManagerInterface $entity_type_manager, SectionStorageManagerInterface $section_storage_manager) { $this->entityTypeManager = $entity_type_manager; + $this->sectionStorageManager = $section_storage_manager; } /** @@ -43,7 +53,8 @@ class LayoutBuilderLocalTaskDeriver extends DeriverBase implements ContainerDeri */ public static function create(ContainerInterface $container, $base_plugin_id) { return new static( - $container->get('entity_type.manager') + $container->get('entity_type.manager'), + $container->get('plugin.manager.layout_builder.section_storage') ); } @@ -51,84 +62,13 @@ class LayoutBuilderLocalTaskDeriver extends DeriverBase implements ContainerDeri * {@inheritdoc} */ public function getDerivativeDefinitions($base_plugin_definition) { - foreach ($this->getEntityTypesForOverrides() as $entity_type_id => $entity_type) { - // Overrides. - $this->derivatives["layout_builder.overrides.$entity_type_id.view"] = $base_plugin_definition + [ - 'route_name' => "layout_builder.overrides.$entity_type_id.view", - 'weight' => 15, - 'title' => $this->t('Layout'), - 'base_route' => "entity.$entity_type_id.canonical", - 'cache_contexts' => ['layout_builder_is_active:' . $entity_type_id], - ]; - $this->derivatives["layout_builder.overrides.$entity_type_id.save"] = $base_plugin_definition + [ - 'route_name' => "layout_builder.overrides.$entity_type_id.save", - 'title' => $this->t('Save Layout'), - 'parent_id' => "layout_builder_ui:layout_builder.overrides.$entity_type_id.view", - 'cache_contexts' => ['layout_builder_is_active:' . $entity_type_id], - ]; - $this->derivatives["layout_builder.overrides.$entity_type_id.cancel"] = $base_plugin_definition + [ - 'route_name' => "layout_builder.overrides.$entity_type_id.cancel", - 'title' => $this->t('Cancel Layout'), - 'parent_id' => "layout_builder_ui:layout_builder.overrides.$entity_type_id.view", - 'weight' => 5, - 'cache_contexts' => ['layout_builder_is_active:' . $entity_type_id], - ]; - // @todo This link should be conditionally displayed, see - // https://www.drupal.org/node/2917777. - $this->derivatives["layout_builder.overrides.$entity_type_id.revert"] = $base_plugin_definition + [ - 'route_name' => "layout_builder.overrides.$entity_type_id.revert", - 'title' => $this->t('Revert to defaults'), - 'parent_id' => "layout_builder_ui:layout_builder.overrides.$entity_type_id.view", - 'weight' => 10, - 'cache_contexts' => ['layout_builder_is_active:' . $entity_type_id], - ]; + foreach ($this->sectionStorageManager->getDefinitions() as $plugin_id => $definition) { + $section_storage = $this->sectionStorageManager->loadEmpty($plugin_id); + if ($section_storage instanceof SectionStorageLocalTaskProviderInterface) { + $this->derivatives += $section_storage->buildLocalTasks($base_plugin_definition); + } } - - foreach ($this->getEntityTypesForDefaults() as $entity_type_id => $entity_type) { - // Defaults. - $this->derivatives["layout_builder.defaults.$entity_type_id.view"] = $base_plugin_definition + [ - 'route_name' => "layout_builder.defaults.$entity_type_id.view", - 'title' => $this->t('Manage layout'), - 'base_route' => "layout_builder.defaults.$entity_type_id.view", - ]; - $this->derivatives["layout_builder.defaults.$entity_type_id.save"] = $base_plugin_definition + [ - 'route_name' => "layout_builder.defaults.$entity_type_id.save", - 'title' => $this->t('Save Layout'), - 'parent_id' => "layout_builder_ui:layout_builder.defaults.$entity_type_id.view", - ]; - $this->derivatives["layout_builder.defaults.$entity_type_id.cancel"] = $base_plugin_definition + [ - 'route_name' => "layout_builder.defaults.$entity_type_id.cancel", - 'title' => $this->t('Cancel Layout'), - 'weight' => 5, - 'parent_id' => "layout_builder_ui:layout_builder.defaults.$entity_type_id.view", - ]; - } - return $this->derivatives; } - /** - * Returns an array of entity types relevant for defaults. - * - * @return \Drupal\Core\Entity\EntityTypeInterface[] - * An array of entity types. - */ - protected function getEntityTypesForDefaults() { - return array_filter($this->entityTypeManager->getDefinitions(), function (EntityTypeInterface $entity_type) { - return $entity_type->entityClassImplements(FieldableEntityInterface::class) && $entity_type->hasViewBuilderClass() && $entity_type->get('field_ui_base_route'); - }); - } - - /** - * Returns an array of entity types relevant for overrides. - * - * @return \Drupal\Core\Entity\EntityTypeInterface[] - * An array of entity types. - */ - protected function getEntityTypesForOverrides() { - return array_filter($this->entityTypeManager->getDefinitions(), function (EntityTypeInterface $entity_type) { - return $entity_type->entityClassImplements(FieldableEntityInterface::class) && $entity_type->hasViewBuilderClass() && $entity_type->hasLinkTemplate('canonical'); - }); - } - } diff --git a/web/core/modules/layout_builder/src/Plugin/SectionStorage/DefaultsSectionStorage.php b/web/core/modules/layout_builder/src/Plugin/SectionStorage/DefaultsSectionStorage.php index 6fab11996..d35041d03 100644 --- a/web/core/modules/layout_builder/src/Plugin/SectionStorage/DefaultsSectionStorage.php +++ b/web/core/modules/layout_builder/src/Plugin/SectionStorage/DefaultsSectionStorage.php @@ -32,7 +32,7 @@ use Symfony\Component\Routing\RouteCollection; * experimental modules and development releases of contributed modules. * See https://www.drupal.org/core/experimental for more information. */ -class DefaultsSectionStorage extends SectionStorageBase implements ContainerFactoryPluginInterface, DefaultsSectionStorageInterface { +class DefaultsSectionStorage extends SectionStorageBase implements ContainerFactoryPluginInterface, DefaultsSectionStorageInterface, SectionStorageLocalTaskProviderInterface { /** * The entity type manager. @@ -196,6 +196,32 @@ class DefaultsSectionStorage extends SectionStorageBase implements ContainerFact } } + /** + * {@inheritdoc} + */ + public function buildLocalTasks($base_plugin_definition) { + $local_tasks = []; + foreach ($this->getEntityTypes() as $entity_type_id => $entity_type) { + $local_tasks["layout_builder.defaults.$entity_type_id.view"] = $base_plugin_definition + [ + 'route_name' => "layout_builder.defaults.$entity_type_id.view", + 'title' => $this->t('Manage layout'), + 'base_route' => "layout_builder.defaults.$entity_type_id.view", + ]; + $local_tasks["layout_builder.defaults.$entity_type_id.save"] = $base_plugin_definition + [ + 'route_name' => "layout_builder.defaults.$entity_type_id.save", + 'title' => $this->t('Save Layout'), + 'parent_id' => "layout_builder_ui:layout_builder.defaults.$entity_type_id.view", + ]; + $local_tasks["layout_builder.defaults.$entity_type_id.cancel"] = $base_plugin_definition + [ + 'route_name' => "layout_builder.defaults.$entity_type_id.cancel", + 'title' => $this->t('Cancel Layout'), + 'weight' => 5, + 'parent_id' => "layout_builder_ui:layout_builder.defaults.$entity_type_id.view", + ]; + } + return $local_tasks; + } + /** * Returns an array of relevant entity types. * diff --git a/web/core/modules/layout_builder/src/Plugin/SectionStorage/OverridesSectionStorage.php b/web/core/modules/layout_builder/src/Plugin/SectionStorage/OverridesSectionStorage.php index 3a92ee63f..bba10ef67 100644 --- a/web/core/modules/layout_builder/src/Plugin/SectionStorage/OverridesSectionStorage.php +++ b/web/core/modules/layout_builder/src/Plugin/SectionStorage/OverridesSectionStorage.php @@ -30,7 +30,14 @@ use Symfony\Component\Routing\RouteCollection; * experimental modules and development releases of contributed modules. * See https://www.drupal.org/core/experimental for more information. */ -class OverridesSectionStorage extends SectionStorageBase implements ContainerFactoryPluginInterface, OverridesSectionStorageInterface { +class OverridesSectionStorage extends SectionStorageBase implements ContainerFactoryPluginInterface, OverridesSectionStorageInterface, SectionStorageLocalTaskProviderInterface { + + /** + * The field name used by this storage. + * + * @var string + */ + const FIELD_NAME = 'layout_builder__layout'; /** * The entity type manager. @@ -127,8 +134,8 @@ class OverridesSectionStorage extends SectionStorageBase implements ContainerFac if (strpos($id, '.') !== FALSE) { list($entity_type_id, $entity_id) = explode('.', $id, 2); $entity = $this->entityTypeManager->getStorage($entity_type_id)->load($entity_id); - if ($entity instanceof FieldableEntityInterface && $entity->hasField('layout_builder__layout')) { - return $entity->get('layout_builder__layout'); + if ($entity instanceof FieldableEntityInterface && $entity->hasField(static::FIELD_NAME)) { + return $entity->get(static::FIELD_NAME); } } throw new \InvalidArgumentException(sprintf('The "%s" ID for the "%s" section storage type is invalid', $id, $this->getStorageType())); @@ -157,6 +164,45 @@ class OverridesSectionStorage extends SectionStorageBase implements ContainerFac } } + /** + * {@inheritdoc} + */ + public function buildLocalTasks($base_plugin_definition) { + $local_tasks = []; + foreach ($this->getEntityTypes() as $entity_type_id => $entity_type) { + $local_tasks["layout_builder.overrides.$entity_type_id.view"] = $base_plugin_definition + [ + 'route_name' => "layout_builder.overrides.$entity_type_id.view", + 'weight' => 15, + 'title' => $this->t('Layout'), + 'base_route' => "entity.$entity_type_id.canonical", + 'cache_contexts' => ['layout_builder_is_active:' . $entity_type_id], + ]; + $local_tasks["layout_builder.overrides.$entity_type_id.save"] = $base_plugin_definition + [ + 'route_name' => "layout_builder.overrides.$entity_type_id.save", + 'title' => $this->t('Save Layout'), + 'parent_id' => "layout_builder_ui:layout_builder.overrides.$entity_type_id.view", + 'cache_contexts' => ['layout_builder_is_active:' . $entity_type_id], + ]; + $local_tasks["layout_builder.overrides.$entity_type_id.cancel"] = $base_plugin_definition + [ + 'route_name' => "layout_builder.overrides.$entity_type_id.cancel", + 'title' => $this->t('Cancel Layout'), + 'parent_id' => "layout_builder_ui:layout_builder.overrides.$entity_type_id.view", + 'weight' => 5, + 'cache_contexts' => ['layout_builder_is_active:' . $entity_type_id], + ]; + // @todo This link should be conditionally displayed, see + // https://www.drupal.org/node/2917777. + $local_tasks["layout_builder.overrides.$entity_type_id.revert"] = $base_plugin_definition + [ + 'route_name' => "layout_builder.overrides.$entity_type_id.revert", + 'title' => $this->t('Revert to defaults'), + 'parent_id' => "layout_builder_ui:layout_builder.overrides.$entity_type_id.view", + 'weight' => 10, + 'cache_contexts' => ['layout_builder_is_active:' . $entity_type_id], + ]; + } + return $local_tasks; + } + /** * Determines if this entity type's ID is stored as an integer. * diff --git a/web/core/modules/layout_builder/src/Plugin/SectionStorage/SectionStorageLocalTaskProviderInterface.php b/web/core/modules/layout_builder/src/Plugin/SectionStorage/SectionStorageLocalTaskProviderInterface.php new file mode 100644 index 000000000..a275d6340 --- /dev/null +++ b/web/core/modules/layout_builder/src/Plugin/SectionStorage/SectionStorageLocalTaskProviderInterface.php @@ -0,0 +1,29 @@ +components as $uuid => $component) { + $this->components[$uuid] = clone $component; + } + } + } diff --git a/web/core/modules/layout_builder/src/SectionStorage/SectionStorageTrait.php b/web/core/modules/layout_builder/src/SectionStorage/SectionStorageTrait.php index 9d942c7ad..36729d2ba 100644 --- a/web/core/modules/layout_builder/src/SectionStorage/SectionStorageTrait.php +++ b/web/core/modules/layout_builder/src/SectionStorage/SectionStorageTrait.php @@ -111,4 +111,17 @@ trait SectionStorageTrait { return isset($this->getSections()[$delta]); } + /** + * Magic method: Implements a deep clone. + */ + public function __clone() { + $sections = $this->getSections(); + + foreach ($sections as $delta => $item) { + $sections[$delta] = clone $item; + } + + $this->setSections($sections); + } + } diff --git a/web/core/modules/layout_builder/tests/modules/layout_builder_fieldblock_test/config/schema/layout_builder_fieldblock_test.schema.yml b/web/core/modules/layout_builder/tests/modules/layout_builder_fieldblock_test/config/schema/layout_builder_fieldblock_test.schema.yml new file mode 100644 index 000000000..92ce34d00 --- /dev/null +++ b/web/core/modules/layout_builder/tests/modules/layout_builder_fieldblock_test/config/schema/layout_builder_fieldblock_test.schema.yml @@ -0,0 +1,3 @@ +# See \Drupal\layout_builder_fieldblock_test\Plugin\Block\FieldBlock. +block.settings.field_block_test:*:*:*: + type: block.settings.field_block:*:*:* diff --git a/web/core/modules/layout_builder/tests/modules/layout_builder_fieldblock_test/layout_builder_fieldblock_test.info.yml b/web/core/modules/layout_builder/tests/modules/layout_builder_fieldblock_test/layout_builder_fieldblock_test.info.yml new file mode 100644 index 000000000..607877e78 --- /dev/null +++ b/web/core/modules/layout_builder/tests/modules/layout_builder_fieldblock_test/layout_builder_fieldblock_test.info.yml @@ -0,0 +1,6 @@ +name: 'Layout Builder test' +type: module +description: 'Support module for testing layout building.' +package: Testing +version: VERSION +core: 8.x diff --git a/web/core/modules/layout_builder/tests/modules/layout_builder_fieldblock_test/src/Plugin/Block/FieldBlock.php b/web/core/modules/layout_builder/tests/modules/layout_builder_fieldblock_test/src/Plugin/Block/FieldBlock.php new file mode 100644 index 000000000..07a00f541 --- /dev/null +++ b/web/core/modules/layout_builder/tests/modules/layout_builder_fieldblock_test/src/Plugin/Block/FieldBlock.php @@ -0,0 +1,27 @@ +elementsCount('css', '.field--name-body', 1); // The extra field is only present once. - $this->assertTextAppearsOnce('Placeholder for the "Extra label" field'); + $assert_session->pageTextContainsOnce('Placeholder for the "Extra label" field'); // Save the defaults. $assert_session->linkExists('Save Layout'); $this->clickLink('Save Layout'); @@ -105,7 +106,7 @@ class LayoutBuilderTest extends BrowserTestBase { // The body field is only present once. $assert_session->elementsCount('css', '.field--name-body', 1); // The extra field is only present once. - $this->assertTextAppearsOnce('Placeholder for the "Extra label" field'); + $assert_session->pageTextContainsOnce('Placeholder for the "Extra label" field'); // Add a new block. $assert_session->linkExists('Add Block'); @@ -316,6 +317,11 @@ class LayoutBuilderTest extends BrowserTestBase { $page->fillField('id', 'myothermenu'); $page->pressButton('Save'); + $page->clickLink('Add link'); + $page->fillField('title[0][value]', 'My link'); + $page->fillField('link[0][uri]', '/'); + $page->pressButton('Save'); + $this->drupalPostForm('admin/structure/types/manage/bundle_with_section_field/display', ['layout[enabled]' => TRUE], 'Save'); $assert_session->linkExists('Manage layout'); $this->clickLink('Manage layout'); @@ -514,13 +520,68 @@ class LayoutBuilderTest extends BrowserTestBase { } /** - * Asserts that a text string only appears once on the page. + * Tests the usage of placeholders for empty blocks. * - * @param string $needle - * The string to look for. + * @see \Drupal\Core\Block\BlockPluginInterface::getPlaceholderString() + * @see \Drupal\layout_builder\EventSubscriber\BlockComponentRenderArray::onBuildRender() */ - protected function assertTextAppearsOnce($needle) { - $this->assertEquals(1, substr_count($this->getSession()->getPage()->getContent(), $needle), "'$needle' only appears once on the page."); + public function testBlockPlaceholder() { + $assert_session = $this->assertSession(); + $page = $this->getSession()->getPage(); + + $this->drupalLogin($this->drupalCreateUser([ + 'configure any layout', + 'administer node display', + ])); + + $field_ui_prefix = 'admin/structure/types/manage/bundle_with_section_field'; + $this->drupalPostForm("$field_ui_prefix/display/default", ['layout[enabled]' => TRUE], 'Save'); + + // Customize the default view mode. + $this->drupalGet("$field_ui_prefix/display-layout/default"); + + // Add a block whose content is controlled by state and is empty by default. + $this->clickLink('Add Block'); + $this->clickLink('Test block caching'); + $page->fillField('settings[label]', 'The block label'); + $page->pressButton('Add Block'); + + $block_content = 'I am content'; + $placeholder_content = 'Placeholder for the "The block label" block'; + + // The block placeholder is displayed and there is no content. + $assert_session->pageTextContains($placeholder_content); + $assert_session->pageTextNotContains($block_content); + + // Set block content and reload the page. + \Drupal::state()->set('block_test.content', $block_content); + $this->getSession()->reload(); + + // The block placeholder is no longer displayed and the content is visible. + $assert_session->pageTextNotContains($placeholder_content); + $assert_session->pageTextContains($block_content); + } + + /** + * Tests the Block UI when Layout Builder is installed. + */ + public function testBlockUiListing() { + $assert_session = $this->assertSession(); + $page = $this->getSession()->getPage(); + + $this->drupalLogin($this->drupalCreateUser([ + 'administer blocks', + ])); + + $this->drupalGet('admin/structure/block'); + $page->clickLink('Place block'); + + // Ensure that blocks expected to appear are available. + $assert_session->pageTextContains('Test HTML block'); + $assert_session->pageTextContains('Block test'); + // Ensure that blocks not expected to appear are not available. + $assert_session->pageTextNotContains('Body'); + $assert_session->pageTextNotContains('Content fields'); } } diff --git a/web/core/modules/layout_builder/tests/src/Functional/LayoutSectionTest.php b/web/core/modules/layout_builder/tests/src/Functional/LayoutSectionTest.php index e4af3290c..e29609b30 100644 --- a/web/core/modules/layout_builder/tests/src/Functional/LayoutSectionTest.php +++ b/web/core/modules/layout_builder/tests/src/Functional/LayoutSectionTest.php @@ -4,6 +4,7 @@ namespace Drupal\Tests\layout_builder\Functional; use Drupal\language\Entity\ConfigurableLanguage; use Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay; +use Drupal\layout_builder\Plugin\SectionStorage\OverridesSectionStorage; use Drupal\layout_builder\Section; use Drupal\layout_builder\SectionComponent; use Drupal\Tests\BrowserTestBase; @@ -20,13 +21,6 @@ class LayoutSectionTest extends BrowserTestBase { */ public static $modules = ['field_ui', 'layout_builder', 'node', 'block_test']; - /** - * The name of the layout section field. - * - * @var string - */ - protected $fieldName = 'layout_builder__layout'; - /** * {@inheritdoc} */ @@ -226,7 +220,7 @@ class LayoutSectionTest extends BrowserTestBase { ]); $entity->addTranslation('es', [ 'title' => 'Translated node title', - $this->fieldName => [ + OverridesSectionStorage::FIELD_NAME => [ [ 'section' => new Section('layout_twocol', [], [ 'foo' => new SectionComponent('foo', 'first', [ @@ -373,7 +367,7 @@ class LayoutSectionTest extends BrowserTestBase { 'value' => 'The node body', ], ], - $this->fieldName => $section_values, + OverridesSectionStorage::FIELD_NAME => $section_values, ]); } diff --git a/web/core/modules/layout_builder/tests/src/FunctionalJavascript/FieldBlockTest.php b/web/core/modules/layout_builder/tests/src/FunctionalJavascript/FieldBlockTest.php index f2ecd52b3..bd4d1843c 100644 --- a/web/core/modules/layout_builder/tests/src/FunctionalJavascript/FieldBlockTest.php +++ b/web/core/modules/layout_builder/tests/src/FunctionalJavascript/FieldBlockTest.php @@ -16,7 +16,14 @@ class FieldBlockTest extends WebDriverTestBase { /** * {@inheritdoc} */ - public static $modules = ['block', 'datetime', 'layout_builder', 'user']; + protected static $modules = [ + 'block', + 'datetime', + 'layout_builder', + 'user', + // See \Drupal\layout_builder_fieldblock_test\Plugin\Block\FieldBlock. + 'layout_builder_fieldblock_test', + ]; /** * {@inheritdoc} @@ -67,7 +74,7 @@ class FieldBlockTest extends WebDriverTestBase { $assert_session->pageTextNotContains('Initial email'); $assert_session->pageTextContains('Date field'); - $block_url = 'admin/structure/block/add/field_block%3Auser%3Auser%3Afield_date/classy'; + $block_url = 'admin/structure/block/add/field_block_test%3Auser%3Auser%3Afield_date/classy'; $assert_session->linkByHrefExists($block_url); $this->drupalGet($block_url); diff --git a/web/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockPrivateFilesTest.php b/web/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockPrivateFilesTest.php index 05892bd31..a94be8ba1 100644 --- a/web/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockPrivateFilesTest.php +++ b/web/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockPrivateFilesTest.php @@ -192,8 +192,8 @@ class InlineBlockPrivateFilesTest extends InlineBlockTestBase { $page = $this->getSession()->getPage(); $page->clickLink('Add Block'); $assert_session->assertWaitOnAjaxRequest(); - $this->assertNotEmpty($assert_session->waitForElementVisible('css', '.block-categories details:contains(Create new block)')); - $this->clickLink('Basic block'); + $this->assertNotEmpty($assert_session->waitForLink('Create custom block')); + $this->clickLink('Create custom block'); $assert_session->assertWaitOnAjaxRequest(); $assert_session->fieldValueEquals('Title', ''); $page->findField('Title')->setValue($title); diff --git a/web/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTest.php b/web/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTest.php index 9fdc8fdd3..4f463192d 100644 --- a/web/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTest.php +++ b/web/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTest.php @@ -428,4 +428,74 @@ class InlineBlockTest extends InlineBlockTestBase { $assert_session->pageTextNotContains('You are not authorized to access this page'); } + /** + * Tests the workflow for adding an inline block depending on number of types. + * + * @throws \Behat\Mink\Exception\ElementNotFoundException + * @throws \Behat\Mink\Exception\ExpectationException + */ + public function testAddWorkFlow() { + $assert_session = $this->assertSession(); + $page = $this->getSession()->getPage(); + $type_storage = $this->container->get('entity_type.manager')->getStorage('block_content_type'); + foreach ($type_storage->loadByProperties() as $type) { + $type->delete(); + } + + $this->drupalLogin($this->drupalCreateUser([ + 'access contextual links', + 'configure any layout', + 'administer node display', + 'administer node fields', + ])); + + // Enable layout builder and overrides. + $this->drupalPostForm( + static::FIELD_UI_PREFIX . '/display/default', + ['layout[enabled]' => TRUE, 'layout[allow_custom]' => TRUE], + 'Save' + ); + + $layout_default_path = 'admin/structure/types/manage/bundle_with_section_field/display-layout/default'; + $this->drupalGet($layout_default_path); + // Add a basic block with the body field set. + $page->clickLink('Add Block'); + $assert_session->assertWaitOnAjaxRequest(); + // Confirm that with no block content types the link does not appear. + $assert_session->linkNotExists('Create custom block'); + + $this->createBlockContentType('basic', 'Basic block'); + + $this->drupalGet($layout_default_path); + // Add a basic block with the body field set. + $page->clickLink('Add Block'); + $assert_session->assertWaitOnAjaxRequest(); + // Confirm with only 1 type the "Create custom block" link goes directly t + // block add form. + $assert_session->linkNotExists('Basic block'); + $this->clickLink('Create custom block'); + $assert_session->assertWaitOnAjaxRequest(); + $assert_session->fieldExists('Title'); + + $this->createBlockContentType('advanced', 'Advanced block'); + + $this->drupalGet($layout_default_path); + // Add a basic block with the body field set. + $page->clickLink('Add Block'); + // Confirm that, when more than 1 type exists, "Create custom block" shows a + // list of block types. + $assert_session->assertWaitOnAjaxRequest(); + $assert_session->linkNotExists('Basic block'); + $assert_session->linkNotExists('Advanced block'); + $this->clickLink('Create custom block'); + $assert_session->assertWaitOnAjaxRequest(); + $assert_session->fieldNotExists('Title'); + $assert_session->linkExists('Basic block'); + $assert_session->linkExists('Advanced block'); + + $this->clickLink('Advanced block'); + $assert_session->assertWaitOnAjaxRequest(); + $assert_session->fieldExists('Title'); + } + } diff --git a/web/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTestBase.php b/web/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTestBase.php index 6c99c6c39..2b781766a 100644 --- a/web/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTestBase.php +++ b/web/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTestBase.php @@ -71,13 +71,7 @@ abstract class InlineBlockTestBase extends WebDriverTestBase { ], ], ]); - $bundle = BlockContentType::create([ - 'id' => 'basic', - 'label' => 'Basic block', - 'revision' => 1, - ]); - $bundle->save(); - block_content_add_body_field($bundle->id()); + $this->createBlockContentType('basic', 'Basic block'); $this->blockStorage = $this->container->get('entity_type.manager')->getStorage('block_content'); } @@ -146,8 +140,8 @@ abstract class InlineBlockTestBase extends WebDriverTestBase { $page = $this->getSession()->getPage(); $page->clickLink('Add Block'); $assert_session->assertWaitOnAjaxRequest(); - $this->assertNotEmpty($assert_session->waitForElementVisible('css', '.block-categories details:contains(Create new block)')); - $this->clickLink('Basic block'); + $this->assertNotEmpty($assert_session->waitForLink('Create custom block')); + $this->clickLink('Create custom block'); $assert_session->assertWaitOnAjaxRequest(); $textarea = $assert_session->waitForElement('css', '[name="settings[block_form][body][0][value]"]'); $this->assertNotEmpty($textarea); @@ -219,4 +213,22 @@ abstract class InlineBlockTestBase extends WebDriverTestBase { } } + /** + * Creates a block content type. + * + * @param string $id + * The block type id. + * @param string $label + * The block type label. + */ + protected function createBlockContentType($id, $label) { + $bundle = BlockContentType::create([ + 'id' => $id, + 'label' => $label, + 'revision' => 1, + ]); + $bundle->save(); + block_content_add_body_field($bundle->id()); + } + } diff --git a/web/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderUiTest.php b/web/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderUiTest.php new file mode 100644 index 000000000..c5510e9d5 --- /dev/null +++ b/web/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderUiTest.php @@ -0,0 +1,94 @@ +drupalPlaceBlock('local_tasks_block'); + + $this->createContentType(['type' => 'bundle_with_section_field']); + + $this->drupalLogin($this->drupalCreateUser([ + 'configure any layout', + 'administer node display', + 'administer node fields', + ])); + } + + /** + * Tests the message indicating unsaved changes. + */ + public function testUnsavedChangesMessage() { + $assert_session = $this->assertSession(); + $page = $this->getSession()->getPage(); + + // Enable layout builder. + $this->drupalPostForm( + static::FIELD_UI_PREFIX . '/display/default', + ['layout[enabled]' => TRUE], + 'Save' + ); + + // Make and then cancel changes. + $this->assertModifiedLayout(static::FIELD_UI_PREFIX . '/display-layout/default'); + $page->clickLink('Cancel Layout'); + $assert_session->pageTextNotContains('You have unsaved changes.'); + + // Make and then save changes. + $this->assertModifiedLayout(static::FIELD_UI_PREFIX . '/display-layout/default'); + $page->clickLink('Save Layout'); + $assert_session->pageTextNotContains('You have unsaved changes.'); + } + + /** + * Asserts that modifying a layout works as expected. + * + * @param string $path + * The path to a Layout Builder UI page. + */ + protected function assertModifiedLayout($path) { + $assert_session = $this->assertSession(); + $page = $this->getSession()->getPage(); + + $this->drupalGet($path); + $page->clickLink('Add Section'); + $assert_session->assertWaitOnAjaxRequest(); + $assert_session->pageTextNotContains('You have unsaved changes.'); + $page->clickLink('One column'); + $assert_session->assertWaitOnAjaxRequest(); + $assert_session->pageTextContainsOnce('You have unsaved changes.'); + + // Reload the page. + $this->drupalGet($path); + $assert_session->pageTextContainsOnce('You have unsaved changes.'); + } + +} diff --git a/web/core/modules/layout_builder/tests/src/Kernel/FieldBlockTest.php b/web/core/modules/layout_builder/tests/src/Kernel/FieldBlockTest.php index d5246a0c2..aaeb4ca81 100644 --- a/web/core/modules/layout_builder/tests/src/Kernel/FieldBlockTest.php +++ b/web/core/modules/layout_builder/tests/src/Kernel/FieldBlockTest.php @@ -230,11 +230,10 @@ class FieldBlockTest extends EntityKernelTestBase { * @covers ::build * @dataProvider providerTestBuild */ - public function testBuild(PromiseInterface $promise, $in_preview, $expected_markup, $log_message = '', $log_arguments = []) { + public function testBuild(PromiseInterface $promise, $expected_markup, $log_message = '', $log_arguments = []) { $entity = $this->prophesize(FieldableEntityInterface::class); $field = $this->prophesize(FieldItemListInterface::class); $entity->get('the_field_name')->willReturn($field->reveal()); - $entity->in_preview = $in_preview; $field->view(Argument::type('array'))->will($promise); $field_definition = $this->prophesize(FieldDefinitionInterface::class); @@ -269,40 +268,20 @@ class FieldBlockTest extends EntityKernelTestBase { */ public function providerTestBuild() { $data = []; - $data['array, no preview'] = [ + $data['array'] = [ new ReturnPromise([['content' => ['#markup' => 'The field value']]]), - FALSE, 'The field value', ]; - $data['array, preview'] = [ - new ReturnPromise([['content' => ['#markup' => 'The field value']]]), - TRUE, - 'The field value', - ]; - $data['empty array, no preview'] = [ + $data['empty array'] = [ new ReturnPromise([[]]), - FALSE, '', ]; - $data['empty array, preview'] = [ - new ReturnPromise([[]]), - TRUE, - 'Placeholder for the "The Field Label" field', - ]; - $data['exception, no preview'] = [ + $data['exception'] = [ new ThrowPromise(new \Exception('The exception message')), - FALSE, '', 'The field "%field" failed to render with the error of "%error".', ['%field' => 'the_field_name', '%error' => 'The exception message'], ]; - $data['exception, preview'] = [ - new ThrowPromise(new \Exception('The exception message')), - TRUE, - 'Placeholder for the "The Field Label" field', - 'The field "%field" failed to render with the error of "%error".', - ['%field' => 'the_field_name', '%error' => 'The exception message'], - ]; return $data; } diff --git a/web/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderFieldLayoutCompatibilityTest.php b/web/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderFieldLayoutCompatibilityTest.php index 57dacb5b1..12fd813f4 100644 --- a/web/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderFieldLayoutCompatibilityTest.php +++ b/web/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderFieldLayoutCompatibilityTest.php @@ -2,6 +2,7 @@ namespace Drupal\Tests\layout_builder\Kernel; +use Drupal\layout_builder\Plugin\SectionStorage\OverridesSectionStorage; use Drupal\layout_builder\Section; /** @@ -56,7 +57,7 @@ class LayoutBuilderFieldLayoutCompatibilityTest extends LayoutBuilderCompatibili // Add a layout override. $this->enableOverrides(); /** @var \Drupal\layout_builder\SectionStorageInterface $field_list */ - $field_list = $this->entity->get('layout_builder__layout'); + $field_list = $this->entity->get(OverridesSectionStorage::FIELD_NAME); $field_list->appendSection(new Section('layout_onecol')); $this->entity->save(); diff --git a/web/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderInstallTest.php b/web/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderInstallTest.php index aa1b9942c..a3ae736da 100644 --- a/web/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderInstallTest.php +++ b/web/core/modules/layout_builder/tests/src/Kernel/LayoutBuilderInstallTest.php @@ -4,6 +4,7 @@ namespace Drupal\Tests\layout_builder\Kernel; use Drupal\field\Entity\FieldConfig; use Drupal\field\Entity\FieldStorageConfig; +use Drupal\layout_builder\Plugin\SectionStorage\OverridesSectionStorage; use Drupal\layout_builder\Section; /** @@ -35,7 +36,7 @@ class LayoutBuilderInstallTest extends LayoutBuilderCompatibilityTestBase { // Add a layout override. $this->enableOverrides(); $this->entity = $this->reloadEntity($this->entity); - $this->entity->get('layout_builder__layout')->appendSection(new Section('layout_onecol')); + $this->entity->get(OverridesSectionStorage::FIELD_NAME)->appendSection(new Section('layout_onecol')); $this->entity->save(); // The rendered entity has now changed. The non-configurable field is shown @@ -50,7 +51,7 @@ class LayoutBuilderInstallTest extends LayoutBuilderCompatibilityTestBase { $this->assertNotEmpty($this->cssSelect('.layout--onecol')); // Removing the layout restores the original rendering of the entity. - $this->entity->get('layout_builder__layout')->removeSection(0); + $this->entity->get(OverridesSectionStorage::FIELD_NAME)->removeSection(0); $this->entity->save(); $this->assertFieldAttributes($this->entity, $expected_fields); diff --git a/web/core/modules/layout_builder/tests/src/Kernel/LayoutSectionItemListTest.php b/web/core/modules/layout_builder/tests/src/Kernel/LayoutSectionItemListTest.php index 5bd354675..4231530fd 100644 --- a/web/core/modules/layout_builder/tests/src/Kernel/LayoutSectionItemListTest.php +++ b/web/core/modules/layout_builder/tests/src/Kernel/LayoutSectionItemListTest.php @@ -4,6 +4,7 @@ namespace Drupal\Tests\layout_builder\Kernel; use Drupal\entity_test\Entity\EntityTestBaseFieldDisplay; use Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay; +use Drupal\layout_builder\Plugin\SectionStorage\OverridesSectionStorage; /** * Tests the field type for Layout Sections. @@ -42,10 +43,10 @@ class LayoutSectionItemListTest extends SectionStorageTestBase { }, $section_data); $entity = EntityTestBaseFieldDisplay::create([ 'name' => 'The test entity', - 'layout_builder__layout' => $section_data, + OverridesSectionStorage::FIELD_NAME => $section_data, ]); $entity->save(); - return $entity->get('layout_builder__layout'); + return $entity->get(OverridesSectionStorage::FIELD_NAME); } } diff --git a/web/core/modules/layout_builder/tests/src/Kernel/SectionStorageTestBase.php b/web/core/modules/layout_builder/tests/src/Kernel/SectionStorageTestBase.php index 187997763..6c54d6c9e 100644 --- a/web/core/modules/layout_builder/tests/src/Kernel/SectionStorageTestBase.php +++ b/web/core/modules/layout_builder/tests/src/Kernel/SectionStorageTestBase.php @@ -137,6 +137,17 @@ abstract class SectionStorageTestBase extends EntityKernelTestBase { $this->assertSections($expected); } + /** + * Tests __clone(). + */ + public function testClone() { + $this->assertSame([], $this->sectionStorage->getSection(0)->getLayoutSettings()); + + $new_section_storage = clone $this->sectionStorage; + $new_section_storage->getSection(0)->setLayoutSettings(['asdf' => 'qwer']); + $this->assertSame([], $this->sectionStorage->getSection(0)->getLayoutSettings()); + } + /** * Asserts that the field list has the expected sections. * diff --git a/web/core/modules/layout_builder/tests/src/Unit/BlockComponentRenderArrayTest.php b/web/core/modules/layout_builder/tests/src/Unit/BlockComponentRenderArrayTest.php index 30820846c..2ac7994d7 100644 --- a/web/core/modules/layout_builder/tests/src/Unit/BlockComponentRenderArrayTest.php +++ b/web/core/modules/layout_builder/tests/src/Unit/BlockComponentRenderArrayTest.php @@ -11,6 +11,7 @@ use Drupal\Core\Cache\Cache; use Drupal\Core\DependencyInjection\ContainerBuilder; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Plugin\Context\ContextHandlerInterface; +use Drupal\Core\Render\PreviewFallbackInterface; use Drupal\Core\Session\AccountInterface; use Drupal\layout_builder\Access\LayoutPreviewAccessAllowed; use Drupal\layout_builder\Event\SectionComponentBuildRenderArrayEvent; @@ -252,6 +253,98 @@ class BlockComponentRenderArrayTest extends UnitTestCase { $this->assertEquals($expected_cache, $result); } + /** + * @covers ::onBuildRender + */ + public function testOnBuildRenderInPreviewEmptyBuild() { + $block = $this->prophesize(BlockPluginInterface::class)->willImplement(PreviewFallbackInterface::class); + + $block->access($this->account->reveal(), TRUE)->shouldNotBeCalled(); + $block->getCacheContexts()->willReturn([]); + $block->getCacheTags()->willReturn(['test']); + $block->getCacheMaxAge()->willReturn(Cache::PERMANENT); + $block->getConfiguration()->willReturn([]); + $block->getPluginId()->willReturn('block_plugin_id'); + $block->getBaseId()->willReturn('block_plugin_id'); + $block->getDerivativeId()->willReturn(NULL); + $placeholder_string = 'The placeholder string'; + $block->getPreviewFallbackString()->willReturn($placeholder_string); + + $block_content = []; + $block->build()->willReturn($block_content); + $this->blockManager->createInstance('some_block_id', ['id' => 'some_block_id'])->willReturn($block->reveal()); + + $component = new SectionComponent('some-uuid', 'some-region', ['id' => 'some_block_id']); + $event = new SectionComponentBuildRenderArrayEvent($component, [], TRUE); + + $subscriber = new BlockComponentRenderArray($this->account->reveal()); + + $expected_build = [ + '#theme' => 'block', + '#weight' => 0, + '#configuration' => [], + '#plugin_id' => 'block_plugin_id', + '#base_plugin_id' => 'block_plugin_id', + '#derivative_plugin_id' => NULL, + 'content' => $block_content, + ]; + $expected_build['content']['#markup'] = $placeholder_string; + + $expected_cache = $expected_build + [ + '#cache' => [ + 'contexts' => [], + 'tags' => ['test'], + 'max-age' => 0, + ], + ]; + + $subscriber->onBuildRender($event); + $result = $event->getBuild(); + $this->assertEquals($expected_build, $result); + $event->getCacheableMetadata()->applyTo($result); + $this->assertEquals($expected_cache, $result); + } + + /** + * @covers ::onBuildRender + */ + public function testOnBuildRenderEmptyBuild() { + $block = $this->prophesize(BlockPluginInterface::class); + $access_result = AccessResult::allowed(); + $block->access($this->account->reveal(), TRUE)->willReturn($access_result)->shouldBeCalled(); + $block->getCacheContexts()->willReturn([]); + $block->getCacheTags()->willReturn(['test']); + $block->getCacheMaxAge()->willReturn(Cache::PERMANENT); + $block->getConfiguration()->willReturn([]); + $block->getPluginId()->willReturn('block_plugin_id'); + $block->getBaseId()->willReturn('block_plugin_id'); + $block->getDerivativeId()->willReturn(NULL); + + $block->build()->willReturn([]); + $this->blockManager->createInstance('some_block_id', ['id' => 'some_block_id'])->willReturn($block->reveal()); + + $component = new SectionComponent('some-uuid', 'some-region', ['id' => 'some_block_id']); + $event = new SectionComponentBuildRenderArrayEvent($component, [], FALSE); + + $subscriber = new BlockComponentRenderArray($this->account->reveal()); + + $expected_build = []; + + $expected_cache = $expected_build + [ + '#cache' => [ + 'contexts' => [], + 'tags' => ['test'], + 'max-age' => -1, + ], + ]; + + $subscriber->onBuildRender($event); + $result = $event->getBuild(); + $this->assertEquals($expected_build, $result); + $event->getCacheableMetadata()->applyTo($result); + $this->assertEquals($expected_cache, $result); + } + /** * @covers ::onBuildRender */ diff --git a/web/core/modules/layout_builder/tests/src/Unit/LayoutTempstoreRepositoryTest.php b/web/core/modules/layout_builder/tests/src/Unit/LayoutTempstoreRepositoryTest.php index 0c74d0176..fb46e608a 100644 --- a/web/core/modules/layout_builder/tests/src/Unit/LayoutTempstoreRepositoryTest.php +++ b/web/core/modules/layout_builder/tests/src/Unit/LayoutTempstoreRepositoryTest.php @@ -16,6 +16,7 @@ class LayoutTempstoreRepositoryTest extends UnitTestCase { /** * @covers ::get + * @covers ::has */ public function testGetEmptyTempstore() { $section_storage = $this->prophesize(SectionStorageInterface::class); @@ -30,12 +31,15 @@ class LayoutTempstoreRepositoryTest extends UnitTestCase { $repository = new LayoutTempstoreRepository($tempstore_factory->reveal()); + $this->assertFalse($repository->has($section_storage->reveal())); + $result = $repository->get($section_storage->reveal()); $this->assertSame($section_storage->reveal(), $result); } /** * @covers ::get + * @covers ::has */ public function testGetLoadedTempstore() { $section_storage = $this->prophesize(SectionStorageInterface::class); @@ -50,6 +54,8 @@ class LayoutTempstoreRepositoryTest extends UnitTestCase { $repository = new LayoutTempstoreRepository($tempstore_factory->reveal()); + $this->assertTrue($repository->has($section_storage->reveal())); + $result = $repository->get($section_storage->reveal()); $this->assertSame($tempstore_section_storage->reveal(), $result); $this->assertNotSame($section_storage->reveal(), $result); diff --git a/web/core/modules/layout_builder/tests/src/Unit/OverridesSectionStorageTest.php b/web/core/modules/layout_builder/tests/src/Unit/OverridesSectionStorageTest.php index 110ec2021..3691fb6c7 100644 --- a/web/core/modules/layout_builder/tests/src/Unit/OverridesSectionStorageTest.php +++ b/web/core/modules/layout_builder/tests/src/Unit/OverridesSectionStorageTest.php @@ -112,13 +112,13 @@ class OverridesSectionStorageTest extends UnitTestCase { $entity_storage = $this->prophesize(EntityStorageInterface::class); $entity_without_layout = $this->prophesize(FieldableEntityInterface::class); - $entity_without_layout->hasField('layout_builder__layout')->willReturn(FALSE); - $entity_without_layout->get('layout_builder__layout')->shouldNotBeCalled(); + $entity_without_layout->hasField(OverridesSectionStorage::FIELD_NAME)->willReturn(FALSE); + $entity_without_layout->get(OverridesSectionStorage::FIELD_NAME)->shouldNotBeCalled(); $entity_storage->load('entity_without_layout')->willReturn($entity_without_layout->reveal()); $entity_with_layout = $this->prophesize(FieldableEntityInterface::class); - $entity_with_layout->hasField('layout_builder__layout')->willReturn(TRUE); - $entity_with_layout->get('layout_builder__layout')->willReturn('the_return_value'); + $entity_with_layout->hasField(OverridesSectionStorage::FIELD_NAME)->willReturn(TRUE); + $entity_with_layout->get(OverridesSectionStorage::FIELD_NAME)->willReturn('the_return_value'); $entity_storage->load('entity_with_layout')->willReturn($entity_with_layout->reveal()); $this->entityTypeManager->getStorage($expected_entity_type_id)->willReturn($entity_storage->reveal()); diff --git a/web/core/modules/layout_builder/tests/src/Unit/SectionRenderTest.php b/web/core/modules/layout_builder/tests/src/Unit/SectionRenderTest.php index 079a220a4..ad94e14e1 100644 --- a/web/core/modules/layout_builder/tests/src/Unit/SectionRenderTest.php +++ b/web/core/modules/layout_builder/tests/src/Unit/SectionRenderTest.php @@ -231,6 +231,7 @@ class SectionRenderTest extends UnitTestCase { * @covers ::toRenderArray */ public function testContextAwareBlock() { + $block_content = ['#markup' => 'The block content.']; $render_array = [ '#theme' => 'block', '#weight' => 0, @@ -238,7 +239,7 @@ class SectionRenderTest extends UnitTestCase { '#plugin_id' => 'block_plugin_id', '#base_plugin_id' => 'block_plugin_id', '#derivative_plugin_id' => NULL, - 'content' => [], + 'content' => $block_content, '#cache' => [ 'contexts' => [], 'tags' => [], @@ -251,7 +252,7 @@ class SectionRenderTest extends UnitTestCase { $access_result = AccessResult::allowed(); $block->access($this->account->reveal(), TRUE)->willReturn($access_result); - $block->build()->willReturn([]); + $block->build()->willReturn($block_content); $block->getCacheContexts()->willReturn([]); $block->getCacheTags()->willReturn([]); $block->getCacheMaxAge()->willReturn(Cache::PERMANENT); diff --git a/web/core/modules/media/src/Entity/Media.php b/web/core/modules/media/src/Entity/Media.php index c21821077..d68a0a451 100644 --- a/web/core/modules/media/src/Entity/Media.php +++ b/web/core/modules/media/src/Entity/Media.php @@ -185,20 +185,11 @@ class Media extends EditorialContentEntityBase implements MediaInterface { // Set the thumbnail alt. $media_source = $this->getSource(); $plugin_definition = $media_source->getPluginDefinition(); + + $this->thumbnail->alt = ''; if (!empty($plugin_definition['thumbnail_alt_metadata_attribute'])) { $this->thumbnail->alt = $media_source->getMetadata($this, $plugin_definition['thumbnail_alt_metadata_attribute']); } - else { - $this->thumbnail->alt = $this->t('Thumbnail', [], ['langcode' => $this->langcode->value]); - } - - // Set the thumbnail title. - if (!empty($plugin_definition['thumbnail_title_metadata_attribute'])) { - $this->thumbnail->title = $media_source->getMetadata($this, $plugin_definition['thumbnail_title_metadata_attribute']); - } - else { - $this->thumbnail->title = $this->label(); - } return $this; } diff --git a/web/core/modules/media/src/MediaTypeForm.php b/web/core/modules/media/src/MediaTypeForm.php index fb4915fa3..f2aea499c 100644 --- a/web/core/modules/media/src/MediaTypeForm.php +++ b/web/core/modules/media/src/MediaTypeForm.php @@ -304,6 +304,17 @@ class MediaTypeForm extends EntityForm { */ protected function actions(array $form, FormStateInterface $form_state) { $actions = parent::actions($form, $form_state); + + // If the media source has not been chosen yet, turn the submit button into + // a button. This rebuilds the form with the media source's configuration + // form visible, instead of saving the media type. This allows users to + // create a media type without JavaScript enabled. With JavaScript enabled, + // this rebuild occurs during an AJAX request. + // @see \Drupal\media\MediaTypeForm::ajaxHandlerData() + if (empty($this->getEntity()->get('source'))) { + $actions['submit']['#type'] = 'button'; + } + $actions['submit']['#value'] = $this->t('Save'); $actions['delete']['#value'] = $this->t('Delete'); $actions['delete']['#access'] = $this->entity->access('delete'); diff --git a/web/core/modules/media/src/OEmbed/ResourceFetcher.php b/web/core/modules/media/src/OEmbed/ResourceFetcher.php index 0c210878f..e58e7e26a 100644 --- a/web/core/modules/media/src/OEmbed/ResourceFetcher.php +++ b/web/core/modules/media/src/OEmbed/ResourceFetcher.php @@ -7,7 +7,6 @@ use Drupal\Core\Cache\CacheBackendInterface; use Drupal\Core\Cache\UseCacheBackendTrait; use GuzzleHttp\ClientInterface; use GuzzleHttp\Exception\RequestException; -use Symfony\Component\Serializer\Encoder\XmlEncoder; /** * Fetches and caches oEmbed resources. @@ -69,8 +68,7 @@ class ResourceFetcher implements ResourceFetcherInterface { $content = (string) $response->getBody(); if (strstr($format, 'text/xml') || strstr($format, 'application/xml')) { - $encoder = new XmlEncoder(); - $data = $encoder->decode($content, 'xml'); + $data = $this->parseResourceXml($content, $url); } elseif (strstr($format, 'text/javascript') || strstr($format, 'application/json')) { $data = Json::decode($content); @@ -194,4 +192,42 @@ class ResourceFetcher implements ResourceFetcherInterface { } } + /** + * Parses XML resource data. + * + * @param string $data + * The raw XML for the resource. + * @param string $url + * The resource URL. + * + * @return array + * The parsed resource data. + * + * @throws \Drupal\media\OEmbed\ResourceException + * If the resource data could not be parsed. + */ + protected function parseResourceXml($data, $url) { + // Enable userspace error handling. + $was_using_internal_errors = libxml_use_internal_errors(TRUE); + libxml_clear_errors(); + + $content = simplexml_load_string($data, 'SimpleXMLElement', LIBXML_NOCDATA); + // Restore the previous error handling behavior. + libxml_use_internal_errors($was_using_internal_errors); + + $error = libxml_get_last_error(); + if ($error) { + libxml_clear_errors(); + throw new ResourceException($error->message, $url); + } + elseif ($content === FALSE) { + throw new ResourceException('The fetched resource could not be parsed.', $url); + } + + // Convert XML to JSON so that the parsed resource has a consistent array + // structure, regardless of any XML attributes or quirks of the XML parser. + $data = Json::encode($content); + return Json::decode($data); + } + } diff --git a/web/core/modules/media/src/Plugin/media/Source/Image.php b/web/core/modules/media/src/Plugin/media/Source/Image.php index a83a5144d..34b565c05 100644 --- a/web/core/modules/media/src/Plugin/media/Source/Image.php +++ b/web/core/modules/media/src/Plugin/media/Source/Image.php @@ -22,7 +22,8 @@ use Symfony\Component\DependencyInjection\ContainerInterface; * label = @Translation("Image"), * description = @Translation("Use local images for reusable media."), * allowed_field_types = {"image"}, - * default_thumbnail_filename = "no-thumbnail.png" + * default_thumbnail_filename = "no-thumbnail.png", + * thumbnail_alt_metadata_attribute = "thumbnail_alt_value" * ) */ class Image extends File { @@ -138,6 +139,9 @@ class Image extends File { case 'thumbnail_uri': return $uri; + + case 'thumbnail_alt_value': + return $media->get($this->configuration['source_field'])->alt ?: parent::getMetadata($media, $name); } return parent::getMetadata($media, $name); diff --git a/web/core/modules/media/tests/fixtures/oembed/video_collegehumor.xml b/web/core/modules/media/tests/fixtures/oembed/video_collegehumor.xml index 696b5bf84..9c0b08bfc 100644 --- a/web/core/modules/media/tests/fixtures/oembed/video_collegehumor.xml +++ b/web/core/modules/media/tests/fixtures/oembed/video_collegehumor.xml @@ -1,7 +1,7 @@ video - 1.0 + 1.0 Let's Not Get a Drink Sometime CollegeHumor diff --git a/web/core/modules/media/tests/src/Functional/MediaTypeCreationTest.php b/web/core/modules/media/tests/src/Functional/MediaTypeCreationTest.php new file mode 100644 index 000000000..7de1cd827 --- /dev/null +++ b/web/core/modules/media/tests/src/Functional/MediaTypeCreationTest.php @@ -0,0 +1,42 @@ +randomMachineName()); + + $this->drupalGet('/admin/structure/media/add'); + $this->assertSession()->statusCodeEquals(200); + $this->assertSession()->fieldExists('label')->setValue($this->randomString()); + $this->assertSession()->fieldExists('id')->setValue($machine_name); + $this->assertSession()->selectExists('source')->selectOption('test'); + $this->assertSession()->buttonExists('Save')->press(); + $this->assertSession()->statusCodeEquals(200); + $this->assertSession()->fieldValueEquals('Test config value', 'This is default value.'); + $this->assertSession()->buttonExists('Save')->press(); + $this->assertSession()->statusCodeEquals(200); + $this->assertSession()->addressEquals('admin/structure/media'); + + $this->assertInstanceOf(MediaType::class, MediaType::load($machine_name)); + } + +} diff --git a/web/core/modules/media/tests/src/Functional/MediaUiFunctionalTest.php b/web/core/modules/media/tests/src/Functional/MediaUiFunctionalTest.php index fe39fd828..de25f3d12 100644 --- a/web/core/modules/media/tests/src/Functional/MediaUiFunctionalTest.php +++ b/web/core/modules/media/tests/src/Functional/MediaUiFunctionalTest.php @@ -248,7 +248,7 @@ class MediaUiFunctionalTest extends MediaFunctionalTestBase { // Unlimited value field. 'unlimited_value:single_type:create_list' => [FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED, [TRUE], TRUE], // Unlimited value field with the tags widget. - 'unlimited_value:single_type:create_list' => [FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED, [TRUE], TRUE, 'entity_reference_autocomplete_tags'], + 'unlimited_value:single_type:create_list:tags' => [FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED, [TRUE], TRUE, 'entity_reference_autocomplete_tags'], ]; } diff --git a/web/core/modules/media/tests/src/Functional/Rest/MediaResourceTestBase.php b/web/core/modules/media/tests/src/Functional/Rest/MediaResourceTestBase.php index 85e4e5d73..de352e001 100644 --- a/web/core/modules/media/tests/src/Functional/Rest/MediaResourceTestBase.php +++ b/web/core/modules/media/tests/src/Functional/Rest/MediaResourceTestBase.php @@ -167,13 +167,13 @@ abstract class MediaResourceTestBase extends EntityResourceTestBase { ], 'thumbnail' => [ [ - 'alt' => 'Thumbnail', + 'alt' => '', 'width' => 180, 'height' => 180, 'target_id' => (int) $thumbnail->id(), 'target_type' => 'file', 'target_uuid' => $thumbnail->uuid(), - 'title' => 'Llama', + 'title' => NULL, 'url' => $thumbnail->url(), ], ], diff --git a/web/core/modules/media/tests/src/FunctionalJavascript/MediaSourceImageTest.php b/web/core/modules/media/tests/src/FunctionalJavascript/MediaSourceImageTest.php index faf58c1a3..cb013805a 100644 --- a/web/core/modules/media/tests/src/FunctionalJavascript/MediaSourceImageTest.php +++ b/web/core/modules/media/tests/src/FunctionalJavascript/MediaSourceImageTest.php @@ -59,6 +59,8 @@ class MediaSourceImageTest extends MediaSourceTestBase { // Make sure the thumbnail is displayed from uploaded image. $assert_session->elementAttributeContains('css', '.image-style-thumbnail', 'src', 'example_1.jpeg'); + // Ensure the thumbnail has the correct alt attribute. + $assert_session->elementAttributeContains('css', '.image-style-thumbnail', 'alt', 'Image Alt Text 1'); // Load the media and check that all fields are properly populated. $media = Media::load(1); diff --git a/web/core/modules/media/tests/src/Kernel/MediaSourceTest.php b/web/core/modules/media/tests/src/Kernel/MediaSourceTest.php index 79cb7b414..ecf177850 100644 --- a/web/core/modules/media/tests/src/Kernel/MediaSourceTest.php +++ b/web/core/modules/media/tests/src/Kernel/MediaSourceTest.php @@ -40,7 +40,6 @@ class MediaSourceTest extends MediaKernelTestBase { 'value' => 'Snowball', ], 'thumbnail_uri' => [ - 'title' => 'Thumbnail', 'value' => 'public://TheSisko.png', ], ]); @@ -230,7 +229,7 @@ class MediaSourceTest extends MediaKernelTestBase { // Save a media item and make sure thumbnail was added. \Drupal::state()->set('media_source_test_attributes', [ - 'thumbnail_uri' => ['title' => 'Thumbnail', 'value' => 'public://thumbnail1.jpg'], + 'thumbnail_uri' => ['value' => 'public://thumbnail1.jpg'], ]); /** @var \Drupal\media\MediaInterface $media */ $media = Media::create([ @@ -242,45 +241,46 @@ class MediaSourceTest extends MediaKernelTestBase { $this->assertSame('public://thumbnail1.jpg', $media_source->getMetadata($media, 'thumbnail_uri'), 'Value of the thumbnail metadata attribute is not correct.'); $media->save(); $this->assertSame('public://thumbnail1.jpg', $media->thumbnail->entity->getFileUri(), 'Thumbnail was not added to the media item.'); - $this->assertSame('Mr. Jones', $media->thumbnail->title, 'Title text was not set on the thumbnail.'); - $this->assertEquals('Thumbnail', $media->thumbnail->alt, 'Alt text was not set on the thumbnail.'); + // We expect the title not to be present on the Thumbnail. + $this->assertEmpty($media->thumbnail->title); + $this->assertSame('', $media->thumbnail->alt); // Now change the metadata attribute and make sure that the thumbnail stays // the same. \Drupal::state()->set('media_source_test_attributes', [ - 'thumbnail_uri' => ['title' => 'Thumbnail', 'value' => 'public://thumbnail2.jpg'], + 'thumbnail_uri' => ['value' => 'public://thumbnail2.jpg'], ]); $this->assertSame('public://thumbnail2.jpg', $media_source->getMetadata($media, 'thumbnail_uri'), 'Value of the thumbnail metadata attribute is not correct.'); $media->save(); $this->assertSame('public://thumbnail1.jpg', $media->thumbnail->entity->getFileUri(), 'Thumbnail was not preserved.'); - $this->assertSame('Mr. Jones', $media->thumbnail->title, 'Title text was not set on the thumbnail.'); - $this->assertEquals('Thumbnail', $media->thumbnail->alt, 'Alt text was not set on the thumbnail.'); + $this->assertEmpty($media->thumbnail->title); + $this->assertSame('', $media->thumbnail->alt); // Remove the thumbnail and make sure that it is auto-updated on save. $media->thumbnail->target_id = NULL; $this->assertSame('public://thumbnail2.jpg', $media_source->getMetadata($media, 'thumbnail_uri'), 'Value of the thumbnail metadata attribute is not correct.'); $media->save(); $this->assertSame('public://thumbnail2.jpg', $media->thumbnail->entity->getFileUri(), 'New thumbnail was not added to the media item.'); - $this->assertSame('Mr. Jones', $media->thumbnail->title, 'Title text was not set on the thumbnail.'); - $this->assertEquals('Thumbnail', $media->thumbnail->alt, 'Alt text was not set on the thumbnail.'); + $this->assertEmpty($media->thumbnail->title); + $this->assertSame('', $media->thumbnail->alt); // Change the metadata attribute again, change the source field value too // and make sure that the thumbnail updates. \Drupal::state()->set('media_source_test_attributes', [ - 'thumbnail_uri' => ['title' => 'Thumbnail', 'value' => 'public://thumbnail1.jpg'], + 'thumbnail_uri' => ['value' => 'public://thumbnail1.jpg'], ]); $media->field_media_test->value = 'some_new_value'; $this->assertSame('public://thumbnail1.jpg', $media_source->getMetadata($media, 'thumbnail_uri'), 'Value of the thumbnail metadata attribute is not correct.'); $media->save(); $this->assertSame('public://thumbnail1.jpg', $media->thumbnail->entity->getFileUri(), 'New thumbnail was not added to the media item.'); - $this->assertSame('Mr. Jones', $media->thumbnail->title, 'Title text was not set on the thumbnail.'); - $this->assertEquals('Thumbnail', $media->thumbnail->alt, 'Alt text was not set on the thumbnail.'); + $this->assertEmpty($media->thumbnail->title); + $this->assertSame('', $media->thumbnail->alt); // Change the thumbnail metadata attribute and make sure that the thumbnail // is set correctly. \Drupal::state()->set('media_source_test_attributes', [ - 'thumbnail_uri' => ['title' => 'Should not be used', 'value' => 'public://thumbnail1.jpg'], - 'alternative_thumbnail_uri' => ['title' => 'Should be used', 'value' => 'public://thumbnail2.jpg'], + 'thumbnail_uri' => ['value' => 'public://thumbnail1.jpg'], + 'alternative_thumbnail_uri' => ['value' => 'public://thumbnail2.jpg'], ]); \Drupal::state()->set('media_source_test_definition', ['thumbnail_uri_metadata_attribute' => 'alternative_thumbnail_uri']); $media = Media::create([ @@ -293,14 +293,14 @@ class MediaSourceTest extends MediaKernelTestBase { $this->assertSame('public://thumbnail2.jpg', $media_source->getMetadata($media, 'alternative_thumbnail_uri'), 'Value of the thumbnail metadata attribute is not correct.'); $media->save(); $this->assertSame('public://thumbnail2.jpg', $media->thumbnail->entity->getFileUri(), 'Correct metadata attribute was not used for the thumbnail.'); - $this->assertSame('Mr. Jones', $media->thumbnail->title, 'Title text was not set on the thumbnail.'); - $this->assertEquals('Thumbnail', $media->thumbnail->alt, 'Alt text was not set on the thumbnail.'); + $this->assertEmpty($media->thumbnail->title); + $this->assertSame('', $media->thumbnail->alt); // Enable queued thumbnails and make sure that the entity gets the default // thumbnail initially. \Drupal::state()->set('media_source_test_definition', []); \Drupal::state()->set('media_source_test_attributes', [ - 'thumbnail_uri' => ['title' => 'Should not be used', 'value' => 'public://thumbnail1.jpg'], + 'thumbnail_uri' => ['value' => 'public://thumbnail1.jpg'], ]); $this->testMediaType->setQueueThumbnailDownloadsStatus(TRUE)->save(); $media = Media::create([ @@ -311,8 +311,8 @@ class MediaSourceTest extends MediaKernelTestBase { $this->assertSame('public://thumbnail1.jpg', $media->getSource()->getMetadata($media, 'thumbnail_uri'), 'Value of the metadata attribute is not correct.'); $media->save(); $this->assertSame('public://media-icons/generic/generic.png', $media->thumbnail->entity->getFileUri(), 'Default thumbnail was not set initially.'); - $this->assertSame('Mr. Jones', $media->thumbnail->title, 'Title text was not set on the thumbnail.'); - $this->assertEquals('Thumbnail', $media->thumbnail->alt, 'Alt text was not set on the thumbnail.'); + $this->assertEmpty($media->thumbnail->title); + $this->assertSame('', $media->thumbnail->alt); // Process the queue item and make sure that the thumbnail was updated too. $queue_name = 'media_entity_thumbnail'; @@ -330,18 +330,15 @@ class MediaSourceTest extends MediaKernelTestBase { $media = Media::load($media->id()); $this->assertSame('public://thumbnail1.jpg', $media->thumbnail->entity->getFileUri(), 'Thumbnail was not updated by the queue.'); - $this->assertSame('Mr. Jones', $media->thumbnail->title, 'Title text was not set on the thumbnail.'); - $this->assertSame('Thumbnail', $media->thumbnail->alt, 'Alt text was not set on the thumbnail.'); + $this->assertEmpty($media->thumbnail->title); + $this->assertSame('', $media->thumbnail->alt); - // Set alt and title metadata attributes and make sure they are used for the - // thumbnail. + // Set the alt metadata attribute and make sure it's used for the thumbnail. \Drupal::state()->set('media_source_test_definition', [ 'thumbnail_alt_metadata_attribute' => 'alt', - 'thumbnail_title_metadata_attribute' => 'title', ]); \Drupal::state()->set('media_source_test_attributes', [ - 'alt' => ['title' => 'Alt text', 'value' => 'This will be alt.'], - 'title' => ['title' => 'Title text', 'value' => 'This will be title.'], + 'alt' => ['value' => 'This will be alt.'], ]); $media = Media::create([ 'bundle' => $this->testMediaType->id(), @@ -350,8 +347,8 @@ class MediaSourceTest extends MediaKernelTestBase { ]); $media->save(); $this->assertSame('Boxer', $media->getName(), 'Correct name was not set on the media item.'); - $this->assertSame('This will be title.', $media->thumbnail->title, 'Title text was not set on the thumbnail.'); - $this->assertSame('This will be alt.', $media->thumbnail->alt, 'Alt text was not set on the thumbnail.'); + $this->assertEmpty($media->thumbnail->title); + $this->assertSame('This will be alt.', $media->thumbnail->alt); } /** diff --git a/web/core/modules/menu_link_content/src/Plugin/Menu/MenuLinkContent.php b/web/core/modules/menu_link_content/src/Plugin/Menu/MenuLinkContent.php index 98e8cdfcb..1888eb121 100644 --- a/web/core/modules/menu_link_content/src/Plugin/Menu/MenuLinkContent.php +++ b/web/core/modules/menu_link_content/src/Plugin/Menu/MenuLinkContent.php @@ -198,7 +198,7 @@ class MenuLinkContent extends MenuLinkBase implements ContainerFactoryPluginInte * The menu link ID. */ protected function getUuid() { - $this->getDerivativeId(); + return $this->getDerivativeId(); } /** diff --git a/web/core/modules/menu_link_content/tests/src/Unit/MenuLinkPluginTest.php b/web/core/modules/menu_link_content/tests/src/Unit/MenuLinkPluginTest.php new file mode 100644 index 000000000..a6af5800c --- /dev/null +++ b/web/core/modules/menu_link_content/tests/src/Unit/MenuLinkPluginTest.php @@ -0,0 +1,31 @@ +prophesize(MenuLinkContent::class); + $menu_link_content_plugin->getDerivativeId()->willReturn('test_id'); + $menu_link_content_plugin = $menu_link_content_plugin->reveal(); + + $class = new \ReflectionClass(MenuLinkContent::class); + $instance_method = $class->getMethod('getUuid'); + $instance_method->setAccessible(TRUE); + + $this->assertEquals('test_id', $instance_method->invoke($menu_link_content_plugin)); + } + +} diff --git a/web/core/modules/migrate/src/Plugin/MigrationPluginManager.php b/web/core/modules/migrate/src/Plugin/MigrationPluginManager.php index dde8a9f0a..6d364e77f 100644 --- a/web/core/modules/migrate/src/Plugin/MigrationPluginManager.php +++ b/web/core/modules/migrate/src/Plugin/MigrationPluginManager.php @@ -208,7 +208,14 @@ class MigrationPluginManager extends DefaultPluginManager implements MigrationPl $migration->set('requirements', $required_dependency_graph[$migration_id]['paths']); } } - array_multisort($weights, SORT_DESC, SORT_NUMERIC, $migrations); + // Sort weights, labels, and keys in the same order as each other. + array_multisort( + // Use the numerical weight as the primary sort. + $weights, SORT_DESC, SORT_NUMERIC, + // When migrations have the same weight, sort them alphabetically by ID. + array_keys($migrations), SORT_ASC, SORT_NATURAL, + $migrations + ); return $migrations; } diff --git a/web/core/modules/migrate/src/Plugin/migrate/id_map/Sql.php b/web/core/modules/migrate/src/Plugin/migrate/id_map/Sql.php index 0de83485f..216eecd75 100644 --- a/web/core/modules/migrate/src/Plugin/migrate/id_map/Sql.php +++ b/web/core/modules/migrate/src/Plugin/migrate/id_map/Sql.php @@ -584,7 +584,7 @@ class Sql extends PluginBase implements MigrateIdMapInterface, ContainerFactoryP if (!empty($source_id_values)) { $var_dump = var_export($source_id_values, TRUE); - throw new MigrateException(sprintf("Extra unknown items in source IDs: %s", $var_dump)); + throw new MigrateException(sprintf("Extra unknown items for map %s in source IDs: %s", $this->mapTableName(), $var_dump)); } $query = $this->getDatabase()->select($this->mapTableName(), 'map') diff --git a/web/core/modules/migrate/src/Plugin/migrate/process/FormatDate.php b/web/core/modules/migrate/src/Plugin/migrate/process/FormatDate.php index 9448ca2ff..c9b75a9d7 100644 --- a/web/core/modules/migrate/src/Plugin/migrate/process/FormatDate.php +++ b/web/core/modules/migrate/src/Plugin/migrate/process/FormatDate.php @@ -82,7 +82,8 @@ use Drupal\migrate\Row; * @endcode * * If the source value was '2004-12-19T10:19:42-0600' the transformed value - * would be 2004-12-19T10:19:42. + * would be 2004-12-19T10:19:42. Set validate_format to false if your source + * value is '0000-00-00 00:00:00'. * * @see \DateTime::createFromFormat() * @see \Drupal\Component\Datetime\DateTimePlus::__construct() @@ -99,7 +100,7 @@ class FormatDate extends ProcessPluginBase { * {@inheritdoc} */ public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) { - if (empty($value)) { + if (empty($value) && $value !== '0' && $value !== 0) { return ''; } diff --git a/web/core/modules/migrate/src/Plugin/migrate/source/SourcePluginBase.php b/web/core/modules/migrate/src/Plugin/migrate/source/SourcePluginBase.php index 3dd7144b8..8267bac78 100644 --- a/web/core/modules/migrate/src/Plugin/migrate/source/SourcePluginBase.php +++ b/web/core/modules/migrate/src/Plugin/migrate/source/SourcePluginBase.php @@ -353,7 +353,7 @@ abstract class SourcePluginBase extends PluginBase implements MigrateSourceInter $row_data = $this->getIterator()->current() + $this->configuration; $this->fetchNextRow(); - $row = new Row($row_data, $this->migration->getSourcePlugin()->getIds(), $this->migration->getDestinationIds()); + $row = new Row($row_data, $this->getIds()); // Populate the source key for this row. $this->currentSourceIds = $row->getSourceIdValues(); diff --git a/web/core/modules/migrate/src/Plugin/migrate/source/SqlBase.php b/web/core/modules/migrate/src/Plugin/migrate/source/SqlBase.php index b9e8e731a..4bf846e85 100644 --- a/web/core/modules/migrate/src/Plugin/migrate/source/SqlBase.php +++ b/web/core/modules/migrate/src/Plugin/migrate/source/SqlBase.php @@ -108,6 +108,11 @@ abstract class SqlBase extends SourcePluginBase implements ContainerFactoryPlugi public function __construct(array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration, StateInterface $state) { parent::__construct($configuration, $plugin_id, $plugin_definition, $migration); $this->state = $state; + // If we are using high water, but haven't yet set a high water mark, skip + // joining the map table, as we want to get all available records. + if ($this->getHighWaterProperty() && $this->getHighWater() === NULL) { + $this->configuration['ignore_map'] = TRUE; + } } /** @@ -322,7 +327,9 @@ abstract class SqlBase extends SourcePluginBase implements ContainerFactoryPlugi if ($this->getHighWaterProperty()) { $high_water_field = $this->getHighWaterField(); $high_water = $this->getHighWater(); - if ($high_water) { + // We check against NULL because 0 is an acceptable value for the high + // water mark. + if ($high_water !== NULL) { $conditions->condition($high_water_field, $high_water, '>'); $condition_added = TRUE; } diff --git a/web/core/modules/migrate/tests/src/Kernel/HighWaterTest.php b/web/core/modules/migrate/tests/src/Kernel/HighWaterTest.php index faffb6635..27f826603 100644 --- a/web/core/modules/migrate/tests/src/Kernel/HighWaterTest.php +++ b/web/core/modules/migrate/tests/src/Kernel/HighWaterTest.php @@ -136,6 +136,72 @@ class HighWaterTest extends MigrateTestBase { $this->assertNodeDoesNotExist('Item 3'); } + /** + * Tests that the high water value can be 0. + */ + public function testZeroHighwater() { + // Assert all of the nodes have been imported. + $this->assertNodeExists('Item 1'); + $this->assertNodeExists('Item 2'); + $this->assertNodeExists('Item 3'); + $migration = $this->container->get('plugin.manager.migration')->CreateInstance('high_water_test', []); + $source = $migration->getSourcePlugin(); + $source->rewind(); + $count = 0; + while ($source->valid()) { + $count++; + $source->next(); + } + + // Expect no rows as everything is below the high water mark. + $this->assertSame(0, $count); + + // Test resetting the high water mark to 0. + $this->container->get('keyvalue')->get('migrate:high_water')->set('high_water_test', 0); + $migration = $this->container->get('plugin.manager.migration')->CreateInstance('high_water_test', []); + $source = $migration->getSourcePlugin(); + $source->rewind(); + $count = 0; + while ($source->valid()) { + $count++; + $source->next(); + } + $this->assertSame(3, $count); + } + + /** + * Tests that deleting the high water value causes all rows to be reimported. + */ + public function testNullHighwater() { + // Assert all of the nodes have been imported. + $this->assertNodeExists('Item 1'); + $this->assertNodeExists('Item 2'); + $this->assertNodeExists('Item 3'); + $migration = $this->container->get('plugin.manager.migration')->CreateInstance('high_water_test', []); + $source = $migration->getSourcePlugin(); + $source->rewind(); + $count = 0; + while ($source->valid()) { + $count++; + $source->next(); + } + + // Expect no rows as everything is below the high water mark. + $this->assertSame(0, $count); + + // Test resetting the high water mark. + $this->container->get('keyvalue')->get('migrate:high_water')->delete('high_water_test'); + $migration = $this->container->get('plugin.manager.migration')->CreateInstance('high_water_test', []); + $source = $migration->getSourcePlugin(); + $source->rewind(); + $count = 0; + while ($source->valid()) { + $count++; + $source->next(); + } + $this->assertSame(3, $count); + } + /** * Tests high water property of SqlBase when rows marked for update. */ diff --git a/web/core/modules/migrate/tests/src/Kernel/MigrateEmbeddedDataTest.php b/web/core/modules/migrate/tests/src/Kernel/MigrateEmbeddedDataTest.php index 019ac42ab..7be474e01 100644 --- a/web/core/modules/migrate/tests/src/Kernel/MigrateEmbeddedDataTest.php +++ b/web/core/modules/migrate/tests/src/Kernel/MigrateEmbeddedDataTest.php @@ -45,6 +45,11 @@ class MigrateEmbeddedDataTest extends KernelTestBase { $results = []; /** @var \Drupal\migrate\Row $row */ foreach ($source as $row) { + // The plugin should not mark any rows as stubs. We need to use + // assertSame() here because assertFalse() will pass falsy values (e.g., + // empty arrays). + $this->assertSame(FALSE, $row->isStub()); + $data_row = $row->getSource(); // The "data" row returned by getSource() also includes all source // configuration - we remove it so we see only the data itself. diff --git a/web/core/modules/migrate/tests/src/Unit/MigrateSqlIdMapTest.php b/web/core/modules/migrate/tests/src/Unit/MigrateSqlIdMapTest.php index b0f3d1a35..417ede6f7 100644 --- a/web/core/modules/migrate/tests/src/Unit/MigrateSqlIdMapTest.php +++ b/web/core/modules/migrate/tests/src/Unit/MigrateSqlIdMapTest.php @@ -529,14 +529,14 @@ class MigrateSqlIdMapTest extends MigrateTestCase { $this->fail('Too many source IDs should throw'); } catch (MigrateException $e) { - $this->assertEquals("Extra unknown items in source IDs: array (\n 0 => 3,\n)", $e->getMessage()); + $this->assertEquals("Extra unknown items for map migrate_map_sql_idmap_test in source IDs: array (\n 0 => 3,\n)", $e->getMessage()); } try { $id_map->lookupDestinationIds(['nid' => 1, 'aaa' => '2']); $this->fail('Unknown source ID key should throw'); } catch (MigrateException $e) { - $this->assertEquals("Extra unknown items in source IDs: array (\n 'aaa' => '2',\n)", $e->getMessage()); + $this->assertEquals("Extra unknown items for map migrate_map_sql_idmap_test in source IDs: array (\n 'aaa' => '2',\n)", $e->getMessage()); } // Verify that we are looking up by source_id_hash when all source IDs are diff --git a/web/core/modules/migrate/tests/src/Unit/process/FormatDateTest.php b/web/core/modules/migrate/tests/src/Unit/process/FormatDateTest.php index 994de3855..d11e95e4f 100644 --- a/web/core/modules/migrate/tests/src/Unit/process/FormatDateTest.php +++ b/web/core/modules/migrate/tests/src/Unit/process/FormatDateTest.php @@ -175,6 +175,42 @@ class FormatDateTest extends MigrateProcessTestCase { // converted from Australia/Sydney to America/Managua timezone. 'expected' => '2004-12-18 17:19:42 America/Managua', ], + 'integer_0' => [ + 'configuration' => [ + 'from_format' => 'U', + 'to_format' => 'Y-m-d', + ], + 'value' => 0, + 'expected' => '1970-01-01', + ], + 'string_0' => [ + 'configuration' => [ + 'from_format' => 'U', + 'to_format' => 'Y-m-d', + ], + 'value' => '0', + 'expected' => '1970-01-01', + ], + 'zeros' => [ + 'configuration' => [ + 'from_format' => 'Y-m-d H:i:s', + 'to_format' => 'Y-m-d H:i:s e', + 'settings' => ['validate_format' => FALSE], + ], + 'value' => '0000-00-00 00:00:00', + 'expected' => '-0001-11-30 00:00:00 Australia/Sydney', + ], + 'zeros_same_timezone' => [ + 'configuration' => [ + 'from_format' => 'Y-m-d H:i:s', + 'to_format' => 'Y-m-d H:i:s', + 'settings' => ['validate_format' => FALSE], + 'from_timezone' => 'UTC', + 'to_timezone' => 'UTC', + ], + 'value' => '0000-00-00 00:00:00', + 'expected' => '-0001-11-30 00:00:00', + ], ]; } diff --git a/web/core/modules/migrate_drupal/src/Plugin/migrate/source/DrupalSqlBase.php b/web/core/modules/migrate_drupal/src/Plugin/migrate/source/DrupalSqlBase.php index c8b44f894..15acb0213 100644 --- a/web/core/modules/migrate_drupal/src/Plugin/migrate/source/DrupalSqlBase.php +++ b/web/core/modules/migrate_drupal/src/Plugin/migrate/source/DrupalSqlBase.php @@ -102,6 +102,7 @@ abstract class DrupalSqlBase extends SqlBase implements ContainerFactoryPluginIn * {@inheritdoc} */ public function checkRequirements() { + parent::checkRequirements(); if ($this->pluginDefinition['requirements_met'] === TRUE) { if (isset($this->pluginDefinition['source_module'])) { if ($this->moduleExists($this->pluginDefinition['source_module'])) { @@ -114,7 +115,6 @@ abstract class DrupalSqlBase extends SqlBase implements ContainerFactoryPluginIn } } } - parent::checkRequirements(); } /** diff --git a/web/core/modules/migrate_drupal/tests/fixtures/drupal6.php b/web/core/modules/migrate_drupal/tests/fixtures/drupal6.php index 185a7b6a7..6c0095739 100644 --- a/web/core/modules/migrate_drupal/tests/fixtures/drupal6.php +++ b/web/core/modules/migrate_drupal/tests/fixtures/drupal6.php @@ -292,7 +292,6 @@ $connection->insert('actions') 'description' => 'Block current user', )) ->execute(); - $connection->schema()->createTable('actions_aid', array( 'fields' => array( 'aid' => array( @@ -331,7 +330,6 @@ $connection->insert('actions_aid') 'aid' => '6', )) ->execute(); - $connection->schema()->createTable('aggregator_category', array( 'fields' => array( 'cid' => array( @@ -463,7 +461,6 @@ $connection->insert('aggregator_feed') 'block' => '7', )) ->execute(); - $connection->schema()->createTable('aggregator_item', array( 'fields' => array( 'iid' => array( @@ -539,7 +536,6 @@ $connection->insert('aggregator_item') 'guid' => '395218 at https://groups.drupal.org', )) ->execute(); - $connection->schema()->createTable('authmap', array( 'fields' => array( 'aid' => array( @@ -617,7 +613,6 @@ $connection->insert('batch') 'batch' => NULL, )) ->execute(); - $connection->schema()->createTable('blocks', array( 'fields' => array( 'bid' => array( @@ -1080,7 +1075,6 @@ $connection->insert('blocks') 'cache' => '-1', )) ->execute(); - $connection->schema()->createTable('blocks_roles', array( 'fields' => array( 'module' => array( @@ -1125,7 +1119,6 @@ $connection->insert('blocks_roles') 'rid' => '3', )) ->execute(); - $connection->schema()->createTable('book', array( 'fields' => array( 'mlid' => array( @@ -1188,7 +1181,6 @@ $connection->insert('book') 'bid' => '8', )) ->execute(); - $connection->schema()->createTable('boxes', array( 'fields' => array( 'bid' => array( @@ -1241,7 +1233,6 @@ $connection->insert('boxes') 'format' => '2', )) ->execute(); - $connection->schema()->createTable('cache', array( 'fields' => array( 'cid' => array( @@ -2023,7 +2014,6 @@ $connection->insert('comments') 'homepage' => '', )) ->execute(); - $connection->schema()->createTable('config', array( 'fields' => array( 'collection' => array( @@ -2063,7 +2053,6 @@ $connection->insert('config') 'data' => 'a:1:{s:4:"path";a:1:{s:9:"temporary";s:4:"/tmp";}}', )) ->execute(); - $connection->schema()->createTable('contact', array( 'fields' => array( 'cid' => array( @@ -2141,7 +2130,6 @@ $connection->insert('contact') 'selected' => '0', )) ->execute(); - $connection->schema()->createTable('content_field_company', array( 'fields' => array( 'vid' => array( @@ -2219,7 +2207,6 @@ $connection->insert('content_field_company') 'field_company_nid' => '16', )) ->execute(); - $connection->schema()->createTable('content_field_image', array( 'fields' => array( 'vid' => array( @@ -2288,7 +2275,6 @@ $connection->insert('content_field_image') 'field_image_data' => 'a:2:{s:3:"alt";s:0:"";s:5:"title";s:0:"";}', )) ->execute(); - $connection->schema()->createTable('content_field_multivalue', array( 'fields' => array( 'vid' => array( @@ -2351,7 +2337,6 @@ $connection->insert('content_field_multivalue') 'delta' => '1', )) ->execute(); - $connection->schema()->createTable('content_field_test', array( 'fields' => array( 'vid' => array( @@ -2429,7 +2414,6 @@ $connection->insert('content_field_test') 'field_test_format' => '1', )) ->execute(); - $connection->schema()->createTable('content_field_test_text_single_checkbox', array( 'fields' => array( 'vid' => array( @@ -2495,7 +2479,6 @@ $connection->insert('content_field_test_text_single_checkbox') 'field_test_text_single_checkbox_value' => '0', )) ->execute(); - $connection->schema()->createTable('content_field_test_two', array( 'fields' => array( 'vid' => array( @@ -2581,7 +2564,6 @@ $connection->insert('content_field_test_two') 'field_test_two_value' => '20', )) ->execute(); - $connection->schema()->createTable('content_group', array( 'fields' => array( 'group_type' => array( @@ -3073,7 +3055,6 @@ $connection->insert('content_node_field') 'locked' => '0', )) ->execute(); - $connection->schema()->createTable('content_node_field_instance', array( 'fields' => array( 'field_name' => array( @@ -3515,7 +3496,6 @@ $connection->insert('content_node_field_instance') 'widget_active' => '1', )) ->execute(); - $connection->schema()->createTable('content_type_employee', array( 'fields' => array( 'vid' => array( @@ -3601,7 +3581,6 @@ $connection->insert('content_type_employee') 'field_company_3_nid' => NULL, )) ->execute(); - $connection->schema()->createTable('content_type_page', array( 'fields' => array( 'vid' => array( @@ -3687,7 +3666,6 @@ $connection->insert('content_type_page') 'field_reference_2_nid' => '11', )) ->execute(); - $connection->schema()->createTable('content_type_story', array( 'fields' => array( 'nid' => array( @@ -4057,7 +4035,6 @@ $connection->insert('content_type_story') 'field_test_string_selectlist_value' => NULL, )) ->execute(); - $connection->schema()->createTable('content_type_test_page', array( 'fields' => array( 'vid' => array( @@ -4148,7 +4125,6 @@ $connection->insert('content_type_test_planet') 'vid' => '11', )) ->execute(); - $connection->schema()->createTable('date_format_locale', array( 'fields' => array( 'format' => array( @@ -4221,7 +4197,6 @@ $connection->insert('date_format_types') 'locked' => '1', )) ->execute(); - $connection->schema()->createTable('date_formats', array( 'fields' => array( 'dfid' => array( @@ -4471,7 +4446,6 @@ $connection->insert('date_formats') 'locked' => '1', )) ->execute(); - $connection->schema()->createTable('event', array( 'fields' => array( 'nid' => array( @@ -8271,7 +8245,6 @@ $connection->insert('event_timezones') 'is_dst' => '0', )) ->execute(); - $connection->schema()->createTable('files', array( 'fields' => array( 'fid' => array( @@ -8394,7 +8367,6 @@ $connection->insert('files') 'timestamp' => '1420858106', )) ->execute(); - $connection->schema()->createTable('filter_formats', array( 'fields' => array( 'format' => array( @@ -8459,7 +8431,6 @@ $connection->insert('filter_formats') 'cache' => '0', )) ->execute(); - $connection->schema()->createTable('filters', array( 'fields' => array( 'fid' => array( @@ -8591,7 +8562,6 @@ $connection->insert('filters') 'weight' => '10', )) ->execute(); - $connection->schema()->createTable('flood', array( 'fields' => array( 'fid' => array( @@ -8674,7 +8644,6 @@ $connection->insert('forum') 'tid' => '8', )) ->execute(); - $connection->schema()->createTable('history', array( 'fields' => array( 'uid' => array( @@ -8770,7 +8739,6 @@ $connection->insert('history') 'timestamp' => '1534014763', )) ->execute(); - $connection->schema()->createTable('i18n_blocks', array( 'fields' => array( 'ibid' => array( @@ -8832,7 +8800,6 @@ $connection->insert('i18n_blocks') 'language' => 'zu', )) ->execute(); - $connection->schema()->createTable('i18n_strings', array( 'fields' => array( 'lid' => array( @@ -10071,8 +10038,31 @@ $connection->insert('i18n_strings') 'objectindex' => '0', 'format' => '0', )) +->values(array( + 'lid' => '1692', + 'objectid' => '14', + 'type' => 'term', + 'property' => 'name', + 'objectindex' => '14', + 'format' => '0', +)) +->values(array( + 'lid' => '1693', + 'objectid' => '15', + 'type' => 'term', + 'property' => 'name', + 'objectindex' => '15', + 'format' => '0', +)) +->values(array( + 'lid' => '1694', + 'objectid' => '14', + 'type' => 'term', + 'property' => 'description', + 'objectindex' => '14', + 'format' => '0', +)) ->execute(); - $connection->schema()->createTable('i18n_variable', array( 'fields' => array( 'name' => array( @@ -10512,7 +10502,6 @@ $connection->insert('i18n_variable') 'value' => 's:1:"1";', )) ->execute(); - $connection->schema()->createTable('imagecache_action', array( 'fields' => array( 'actionid' => array( @@ -10598,7 +10587,6 @@ $connection->insert('imagecache_action') 'data' => 'a:3:{s:7:"degrees";s:2:"55";s:6:"random";i:0;s:7:"bgcolor";s:0:"";}', )) ->execute(); - $connection->schema()->createTable('imagecache_preset', array( 'fields' => array( 'presetid' => array( @@ -10633,7 +10621,6 @@ $connection->insert('imagecache_preset') 'presetname' => 'big_blue_cheese', )) ->execute(); - $connection->schema()->createTable('languages', array( 'fields' => array( 'language' => array( @@ -10769,7 +10756,6 @@ $connection->insert('languages') 'javascript' => '', )) ->execute(); - $connection->schema()->createTable('locales_source', array( 'fields' => array( 'lid' => array( @@ -22642,8 +22628,28 @@ $connection->insert('locales_source') 'source' => 'White', 'version' => '1', )) +->values(array( + 'lid' => '1692', + 'location' => 'term:14:name', + 'textgroup' => 'taxonomy', + 'source' => 'Talos IV', + 'version' => '1', +)) +->values(array( + 'lid' => '1693', + 'location' => 'term:15:name', + 'textgroup' => 'taxonomy', + 'source' => 'Vulcan', + 'version' => '1', +)) +->values(array( + 'lid' => '1694', + 'location' => 'term:14:description', + 'textgroup' => 'taxonomy', + 'source' => 'The home of Captain Christopher Pike.', + 'version' => '1', +)) ->execute(); - $connection->schema()->createTable('locales_target', array( 'fields' => array( 'lid' => array( @@ -27702,6 +27708,14 @@ $connection->insert('locales_target') 'plural' => '0', 'i18n_status' => '0', )) +->values(array( + 'lid' => '1672', + 'translation' => 'fr - Type', + 'language' => 'fr', + 'plid' => '0', + 'plural' => '0', + 'i18n_status' => '0', +)) ->values(array( 'lid' => '1678', 'translation' => 'fr - I really, really, really love migrating ', @@ -27718,6 +27732,22 @@ $connection->insert('locales_target') 'plural' => '0', 'i18n_status' => '0', )) +->values(array( + 'lid' => '1692', + 'translation' => 'fr - Talos IV', + 'language' => 'fr', + 'plid' => '0', + 'plural' => '0', + 'i18n_status' => '0', +)) +->values(array( + 'lid' => '1694', + 'translation' => 'fr - The home of Captain Christopher Pike.', + 'language' => 'fr', + 'plid' => '0', + 'plural' => '0', + 'i18n_status' => '0', +)) ->values(array( 'lid' => '66', 'translation' => 'zu - CCK - Aucune Intégration aux Vues', @@ -27830,6 +27860,14 @@ $connection->insert('locales_target') 'plural' => '0', 'i18n_status' => '0', )) +->values(array( + 'lid' => '1672', + 'translation' => 'zu - Type', + 'language' => 'zu', + 'plid' => '0', + 'plural' => '0', + 'i18n_status' => '0', +)) ->values(array( 'lid' => '1690', 'translation' => 'Okumnyama', @@ -27846,8 +27884,23 @@ $connection->insert('locales_target') 'plural' => '0', 'i18n_status' => '0', )) +->values(array( + 'lid' => '1693', + 'translation' => 'zu - Vulcan', + 'language' => 'zu', + 'plid' => '0', + 'plural' => '0', + 'i18n_status' => '0', +)) +->values(array( + 'lid' => '1694', + 'translation' => 'zu - The home of Captain Christopher Pike.', + 'language' => 'zu', + 'plid' => '0', + 'plural' => '0', + 'i18n_status' => '0', +)) ->execute(); - $connection->schema()->createTable('menu_custom', array( 'fields' => array( 'menu_name' => array( @@ -27896,7 +27949,6 @@ $connection->insert('menu_custom') 'description' => 'Secondary links are often used for pages like legal notices, contact details, and other secondary navigation items that play a lesser role than primary links', )) ->execute(); - $connection->schema()->createTable('menu_links', array( 'fields' => array( 'menu_name' => array( @@ -34385,7 +34437,6 @@ $connection->insert('menu_links') 'updated' => '0', )) ->execute(); - $connection->schema()->createTable('menu_router', array( 'fields' => array( 'path' => array( @@ -40934,6 +40985,28 @@ $connection->insert('menu_router') 'weight' => '0', 'file' => 'sites/all/modules/i18n/i18n.admin.inc', )) +->values(array( + 'path' => 'admin/settings/language/i18n/variables', + 'load_functions' => '', + 'to_arg_functions' => '', + 'access_callback' => 'user_access', + 'access_arguments' => 'a:1:{i:0;s:29:"administer site configuration";}', + 'page_callback' => 'drupal_get_form', + 'page_arguments' => 'a:1:{i:0;s:25:"i18n_admin_variables_form";}', + 'fit' => '31', + 'number_parts' => '5', + 'tab_parent' => 'admin/settings/language/i18n', + 'tab_root' => 'admin/settings/language', + 'title' => 'Variables', + 'title_callback' => 't', + 'title_arguments' => '', + 'type' => '128', + 'block_callback' => '', + 'description' => 'Multilingual variables.', + 'position' => '', + 'weight' => '0', + 'file' => 'sites/all/modules/i18n/i18n.admin.inc', +)) ->values(array( 'path' => 'admin/settings/language/overview', 'load_functions' => '', @@ -43575,7 +43648,6 @@ $connection->insert('menu_router') 'file' => '', )) ->execute(); - $connection->schema()->createTable('node', array( 'fields' => array( 'nid' => array( @@ -44070,7 +44142,6 @@ $connection->insert('node') 'translate' => '0', )) ->execute(); - $connection->schema()->createTable('node_access', array( 'fields' => array( 'nid' => array( @@ -44141,7 +44212,6 @@ $connection->insert('node_access') 'grant_delete' => '0', )) ->execute(); - $connection->schema()->createTable('node_comment_statistics', array( 'fields' => array( 'nid' => array( @@ -44290,7 +44360,6 @@ $connection->insert('node_comment_statistics') 'comment_count' => '1', )) ->execute(); - $connection->schema()->createTable('node_counter', array( 'fields' => array( 'nid' => array( @@ -44437,7 +44506,6 @@ $connection->insert('node_counter') 'timestamp' => '1534014763', )) ->execute(); - $connection->schema()->createTable('node_revisions', array( 'fields' => array( 'nid' => array( @@ -44787,7 +44855,6 @@ $connection->insert('node_revisions') 'format' => '1', )) ->execute(); - $connection->schema()->createTable('node_type', array( 'fields' => array( 'type' => array( @@ -45087,7 +45154,6 @@ $connection->insert('node_type') 'orig_type' => 'test_story', )) ->execute(); - $connection->schema()->createTable('permission', array( 'fields' => array( 'pid' => array( @@ -45153,7 +45219,6 @@ $connection->insert('permission') 'tid' => '0', )) ->execute(); - $connection->schema()->createTable('profile_fields', array( 'fields' => array( 'fid' => array( @@ -45386,7 +45451,6 @@ $connection->insert('profile_fields') 'options' => '', )) ->execute(); - $connection->schema()->createTable('profile_values', array( 'fields' => array( 'fid' => array( @@ -45603,7 +45667,6 @@ $connection->insert('profile_values') 'value' => '1', )) ->execute(); - $connection->schema()->createTable('role', array( 'fields' => array( 'rid' => array( @@ -45651,7 +45714,6 @@ $connection->insert('role') 'name' => 'migrate test role 3 that is longer than thirty two characters', )) ->execute(); - $connection->schema()->createTable('semaphore', array( 'fields' => array( 'name' => array( @@ -46957,7 +47019,6 @@ $connection->insert('system') 'info' => 'a:13:{s:4:"name";s:10:"Pushbutton";s:11:"description";s:52:"Tabled, multi-column theme in blue and orange tones.";s:7:"version";s:4:"6.38";s:4:"core";s:3:"6.x";s:6:"engine";s:11:"phptemplate";s:7:"project";s:6:"drupal";s:9:"datestamp";s:10:"1456343372";s:7:"regions";a:5:{s:4:"left";s:12:"Left sidebar";s:5:"right";s:13:"Right sidebar";s:7:"content";s:7:"Content";s:6:"header";s:6:"Header";s:6:"footer";s:6:"Footer";}s:8:"features";a:10:{i:0;s:20:"comment_user_picture";i:1;s:7:"favicon";i:2;s:7:"mission";i:3;s:4:"logo";i:4;s:4:"name";i:5;s:17:"node_user_picture";i:6;s:6:"search";i:7;s:6:"slogan";i:8;s:13:"primary_links";i:9;s:15:"secondary_links";}s:11:"stylesheets";a:1:{s:3:"all";a:1:{s:9:"style.css";s:27:"themes/pushbutton/style.css";}}s:7:"scripts";a:1:{s:9:"script.js";s:27:"themes/pushbutton/script.js";}s:10:"screenshot";s:32:"themes/pushbutton/screenshot.png";s:3:"php";s:5:"4.3.5";}', )) ->execute(); - $connection->schema()->createTable('term_data', array( 'fields' => array( 'tid' => array( @@ -47091,8 +47152,70 @@ $connection->insert('term_data') 'language' => '', 'trid' => '0', )) +->values(array( + 'tid' => '9', + 'vid' => '3', + 'name' => 'fr - term 4 of vocabulary 3', + 'description' => '', + 'weight' => '0', + 'language' => 'fr', + 'trid' => '1', +)) +->values(array( + 'tid' => '10', + 'vid' => '3', + 'name' => 'zu - term 4 of vocabulary 3', + 'description' => '', + 'weight' => '0', + 'language' => 'zu', + 'trid' => '1', +)) +->values(array( + 'tid' => '11', + 'vid' => '3', + 'name' => 'term 7 of vocabulary 3', + 'description' => '', + 'weight' => '0', + 'language' => 'en', + 'trid' => '2', +)) +->values(array( + 'tid' => '12', + 'vid' => '3', + 'name' => 'fr - term 7 of vocabulary 3', + 'description' => '', + 'weight' => '0', + 'language' => 'fr', + 'trid' => '2', +)) +->values(array( + 'tid' => '13', + 'vid' => '3', + 'name' => 'zu - term 7 of vocabulary 3', + 'description' => '', + 'weight' => '0', + 'language' => 'zu', + 'trid' => '2', +)) +->values(array( + 'tid' => '14', + 'vid' => '5', + 'name' => 'Talos IV', + 'description' => 'The home of Captain Christopher Pike.', + 'weight' => '0', + 'language' => '', + 'trid' => '0', +)) +->values(array( + 'tid' => '15', + 'vid' => '5', + 'name' => 'Vulcan', + 'description' => '', + 'weight' => '0', + 'language' => '', + 'trid' => '0', +)) ->execute(); - $connection->schema()->createTable('term_hierarchy', array( 'fields' => array( 'tid' => array( @@ -47142,6 +47265,34 @@ $connection->insert('term_hierarchy') 'tid' => '8', 'parent' => '0', )) +->values(array( + 'tid' => '9', + 'parent' => '0', +)) +->values(array( + 'tid' => '10', + 'parent' => '0', +)) +->values(array( + 'tid' => '11', + 'parent' => '0', +)) +->values(array( + 'tid' => '12', + 'parent' => '0', +)) +->values(array( + 'tid' => '13', + 'parent' => '0', +)) +->values(array( + 'tid' => '14', + 'parent' => '0', +)) +->values(array( + 'tid' => '15', + 'parent' => '0', +)) ->values(array( 'tid' => '3', 'parent' => '2', @@ -47159,7 +47310,6 @@ $connection->insert('term_hierarchy') 'parent' => '5', )) ->execute(); - $connection->schema()->createTable('term_node', array( 'fields' => array( 'nid' => array( @@ -47233,7 +47383,6 @@ $connection->insert('term_node') 'tid' => '8', )) ->execute(); - $connection->schema()->createTable('term_relation', array( 'fields' => array( 'trid' => array( @@ -47397,7 +47546,6 @@ $connection->insert('upload') 'weight' => '0', )) ->execute(); - $connection->schema()->createTable('url_alias', array( 'fields' => array( 'pid' => array( @@ -47487,7 +47635,6 @@ $connection->insert('url_alias') 'language' => '', )) ->execute(); - $connection->schema()->createTable('users', array( 'fields' => array( 'uid' => array( @@ -47809,7 +47956,6 @@ $connection->insert('users') 'timezone_id' => '0', )) ->execute(); - $connection->schema()->createTable('users_roles', array( 'fields' => array( 'uid' => array( @@ -47876,7 +48022,6 @@ $connection->insert('users_roles') 'rid' => '5', )) ->execute(); - $connection->schema()->createTable('variable', array( 'fields' => array( 'name' => array( @@ -48740,7 +48885,7 @@ $connection->insert('variable') )) ->values(array( 'name' => 'i18ntaxonomy_vocabulary', - 'value' => 'a:3:{i:1;s:1:"3";i:2;s:1:"2";i:3;s:1:"1";}', + 'value' => 'a:4:{i:1;s:1:"3";i:2;s:1:"2";i:3;s:1:"3";i:5;s:1:"1";}', )) ->values(array( 'name' => 'i18n_lock_node_article', @@ -49143,7 +49288,6 @@ $connection->insert('variable') 'value' => 's:1:"1";', )) ->execute(); - $connection->schema()->createTable('vocabulary', array( 'fields' => array( 'vid' => array( @@ -49343,7 +49487,6 @@ $connection->insert('vocabulary') 'language' => '', )) ->execute(); - $connection->schema()->createTable('vocabulary_node_types', array( 'fields' => array( 'vid' => array( @@ -49401,7 +49544,6 @@ $connection->insert('vocabulary_node_types') 'type' => 'story', )) ->execute(); - $connection->schema()->createTable('watchdog', array( 'fields' => array( 'wid' => array( diff --git a/web/core/modules/migrate_drupal/tests/fixtures/drupal7.php b/web/core/modules/migrate_drupal/tests/fixtures/drupal7.php index 3f5242e3c..68171683d 100644 --- a/web/core/modules/migrate_drupal/tests/fixtures/drupal7.php +++ b/web/core/modules/migrate_drupal/tests/fixtures/drupal7.php @@ -11,286 +11,6 @@ use Drupal\Core\Database\Database; $connection = Database::getConnection(); -$connection->schema()->createTable('i18n_block_language', array( - 'fields' => array( - 'module' => array( - 'type' => 'varchar', - 'not null' => TRUE, - 'length' => '64', - ), - 'delta' => array( - 'type' => 'varchar', - 'not null' => TRUE, - 'length' => '32', - ), - 'language' => array( - 'type' => 'varchar', - 'not null' => TRUE, - 'length' => '12', - 'default' => '', - ), - ), - 'primary key' => array( - 'module', - 'delta', - 'language', - ), - 'indexes' => array( - 'language' => array( - 'language', - ), - ), - 'mysql_character_set' => 'utf8', -)); - -$connection->schema()->createTable('i18n_string', array( - 'fields' => array( - 'lid' => array( - 'type' => 'int', - 'not null' => TRUE, - 'size' => 'normal', - 'default' => '0', - ), - 'textgroup' => array( - 'type' => 'varchar', - 'not null' => TRUE, - 'length' => '50', - 'default' => 'default', - ), - 'context' => array( - 'type' => 'varchar', - 'not null' => TRUE, - 'length' => '255', - 'default' => '', - ), - 'objectid' => array( - 'type' => 'varchar', - 'not null' => TRUE, - 'length' => '255', - 'default' => '', - ), - 'type' => array( - 'type' => 'varchar', - 'not null' => TRUE, - 'length' => '255', - 'default' => '', - ), - 'property' => array( - 'type' => 'varchar', - 'not null' => TRUE, - 'length' => '255', - 'default' => '', - ), - 'objectindex' => array( - 'type' => 'int', - 'not null' => TRUE, - 'size' => 'big', - 'default' => '0', - ), - 'format' => array( - 'type' => 'varchar', - 'not null' => FALSE, - 'length' => '255', - ), - ), - 'primary key' => array( - 'lid', - ), - 'indexes' => array( - 'group_context' => array( - 'textgroup', - array( - 'context', - '50', - ), - ), - ), - 'mysql_character_set' => 'utf8', -)); - -$connection->insert('i18n_string') -->fields(array( - 'lid', - 'textgroup', - 'context', - 'objectid', - 'type', - 'property', - 'objectindex', - 'format', -)) -->values(array( - 'lid' => '57', - 'textgroup' => 'blocks', - 'context' => 'block:1:title', - 'objectid' => '1', - 'type' => 'block', - 'property' => 'title', - 'objectindex' => '1', - 'format' => '', -)) -->values(array( - 'lid' => '60', - 'textgroup' => 'blocks', - 'context' => 'block:1:body', - 'objectid' => '1', - 'type' => 'block', - 'property' => 'body', - 'objectindex' => '1', - 'format' => 'filtered_html', -)) -->values(array( - 'lid' => '61', - 'textgroup' => 'node', - 'context' => 'type:article:name', - 'objectid' => 'article', - 'type' => 'type', - 'property' => 'name', - 'objectindex' => '0', - 'format' => '', -)) -->values(array( - 'lid' => '62', - 'textgroup' => 'node', - 'context' => 'type:article:title_label', - 'objectid' => 'article', - 'type' => 'type', - 'property' => 'title_label', - 'objectindex' => '0', - 'format' => '', -)) -->values(array( - 'lid' => '63', - 'textgroup' => 'node', - 'context' => 'type:article:description', - 'objectid' => 'article', - 'type' => 'type', - 'property' => 'description', - 'objectindex' => '0', - 'format' => '', -)) -->values(array( - 'lid' => '64', - 'textgroup' => 'node', - 'context' => 'type:article:help', - 'objectid' => 'article', - 'type' => 'type', - 'property' => 'help', - 'objectindex' => '0', - 'format' => '', -)) -->values(array( - 'lid' => '65', - 'textgroup' => 'node', - 'context' => 'type:book:name', - 'objectid' => 'book', - 'type' => 'type', - 'property' => 'name', - 'objectindex' => '0', - 'format' => '', -)) -->values(array( - 'lid' => '66', - 'textgroup' => 'node', - 'context' => 'type:book:title_label', - 'objectid' => 'book', - 'type' => 'type', - 'property' => 'title_label', - 'objectindex' => '0', - 'format' => '', -)) -->values(array( - 'lid' => '67', - 'textgroup' => 'node', - 'context' => 'type:book:description', - 'objectid' => 'book', - 'type' => 'type', - 'property' => 'description', - 'objectindex' => '0', - 'format' => '', -)) -->values(array( - 'lid' => '68', - 'textgroup' => 'node', - 'context' => 'type:page:name', - 'objectid' => 'page', - 'type' => 'type', - 'property' => 'name', - 'objectindex' => '0', - 'format' => '', -)) -->values(array( - 'lid' => '69', - 'textgroup' => 'node', - 'context' => 'type:page:title_label', - 'objectid' => 'page', - 'type' => 'type', - 'property' => 'title_label', - 'objectindex' => '0', - 'format' => '', -)) -->values(array( - 'lid' => '70', - 'textgroup' => 'node', - 'context' => 'type:page:description', - 'objectid' => 'page', - 'type' => 'type', - 'property' => 'description', - 'objectindex' => '0', - 'format' => '', -)) -->values(array( - 'lid' => '71', - 'textgroup' => 'node', - 'context' => 'type:page:help', - 'objectid' => 'page', - 'type' => 'type', - 'property' => 'help', - 'objectindex' => '0', - 'format' => '', -)) -->values(array( - 'lid' => '72', - 'textgroup' => 'node', - 'context' => 'type:test_content_type:name', - 'objectid' => 'test_content_type', - 'type' => 'type', - 'property' => 'name', - 'objectindex' => '0', - 'format' => '', -)) -->values(array( - 'lid' => '73', - 'textgroup' => 'node', - 'context' => 'type:test_content_type:title_label', - 'objectid' => 'test_content_type', - 'type' => 'type', - 'property' => 'title_label', - 'objectindex' => '0', - 'format' => '', -)) -->values(array( - 'lid' => '74', - 'textgroup' => 'node', - 'context' => 'type:test_content_type:description', - 'objectid' => 'test_content_type', - 'type' => 'type', - 'property' => 'description', - 'objectindex' => '0', - 'format' => '', -)) -->values(array( - 'lid' => '75', - 'textgroup' => 'node', - 'context' => 'type:test_content_type:help', - 'objectid' => 'test_content_type', - 'type' => 'type', - 'property' => 'help', - 'objectindex' => '0', - 'format' => '', -)) -->execute(); - $connection->schema()->createTable('accesslog', array( 'fields' => array( 'aid' => array( @@ -651,7 +371,6 @@ $connection->insert('accesslog') 'timestamp' => '1444945246', )) ->execute(); - $connection->schema()->createTable('actions', array( 'fields' => array( 'aid' => array( @@ -825,7 +544,6 @@ $connection->insert('actions') 'label' => 'Block current user', )) ->execute(); - $connection->schema()->createTable('aggregator_category', array( 'fields' => array( 'cid' => array( @@ -1015,7 +733,6 @@ $connection->insert('aggregator_feed') 'block' => '5', )) ->execute(); - $connection->schema()->createTable('aggregator_item', array( 'fields' => array( 'iid' => array( @@ -1180,7 +897,6 @@ $connection->insert('aggregator_item') 'guid' => 'post:18829', )) ->execute(); - $connection->schema()->createTable('authmap', array( 'fields' => array( 'aid' => array( @@ -1316,6 +1032,12 @@ $connection->schema()->createTable('block', array( 'size' => 'normal', 'default' => '1', ), + 'i18n_mode' => array( + 'type' => 'int', + 'not null' => TRUE, + 'size' => 'normal', + 'default' => '0', + ), ), 'primary key' => array( 'bid', @@ -1337,6 +1059,7 @@ $connection->insert('block') 'pages', 'title', 'cache', + 'i18n_mode', )) ->values(array( 'bid' => '1', @@ -1351,6 +1074,7 @@ $connection->insert('block') 'pages' => '', 'title' => '', 'cache' => '-1', + 'i18n_mode' => '0', )) ->values(array( 'bid' => '2', @@ -1365,6 +1089,7 @@ $connection->insert('block') 'pages' => '', 'title' => '', 'cache' => '-1', + 'i18n_mode' => '0', )) ->values(array( 'bid' => '3', @@ -1379,6 +1104,7 @@ $connection->insert('block') 'pages' => '', 'title' => '', 'cache' => '-1', + 'i18n_mode' => '0', )) ->values(array( 'bid' => '4', @@ -1391,8 +1117,9 @@ $connection->insert('block') 'custom' => '0', 'visibility' => '0', 'pages' => '', - 'title' => '', + 'title' => 'User login title', 'cache' => '-1', + 'i18n_mode' => '1', )) ->values(array( 'bid' => '5', @@ -1407,6 +1134,7 @@ $connection->insert('block') 'pages' => '', 'title' => '', 'cache' => '-1', + 'i18n_mode' => '0', )) ->values(array( 'bid' => '6', @@ -1421,6 +1149,7 @@ $connection->insert('block') 'pages' => '', 'title' => '', 'cache' => '-1', + 'i18n_mode' => '0', )) ->values(array( 'bid' => '7', @@ -1435,6 +1164,7 @@ $connection->insert('block') 'pages' => '', 'title' => '', 'cache' => '-1', + 'i18n_mode' => '0', )) ->values(array( 'bid' => '8', @@ -1449,6 +1179,7 @@ $connection->insert('block') 'pages' => '', 'title' => '', 'cache' => '-1', + 'i18n_mode' => '0', )) ->values(array( 'bid' => '9', @@ -1463,6 +1194,7 @@ $connection->insert('block') 'pages' => '', 'title' => '', 'cache' => '-1', + 'i18n_mode' => '0', )) ->values(array( 'bid' => '10', @@ -1475,8 +1207,9 @@ $connection->insert('block') 'custom' => '0', 'visibility' => '0', 'pages' => '', - 'title' => '', + 'title' => 'User login title', 'cache' => '-1', + 'i18n_mode' => '1', )) ->values(array( 'bid' => '11', @@ -1491,6 +1224,7 @@ $connection->insert('block') 'pages' => '', 'title' => '', 'cache' => '-1', + 'i18n_mode' => '0', )) ->values(array( 'bid' => '12', @@ -1505,6 +1239,7 @@ $connection->insert('block') 'pages' => '', 'title' => '', 'cache' => '-1', + 'i18n_mode' => '0', )) ->values(array( 'bid' => '13', @@ -1519,6 +1254,7 @@ $connection->insert('block') 'pages' => '', 'title' => '', 'cache' => '1', + 'i18n_mode' => '0', )) ->values(array( 'bid' => '14', @@ -1533,6 +1269,7 @@ $connection->insert('block') 'pages' => '', 'title' => '', 'cache' => '-1', + 'i18n_mode' => '0', )) ->values(array( 'bid' => '15', @@ -1547,6 +1284,7 @@ $connection->insert('block') 'pages' => '', 'title' => '', 'cache' => '1', + 'i18n_mode' => '0', )) ->values(array( 'bid' => '16', @@ -1561,6 +1299,7 @@ $connection->insert('block') 'pages' => '', 'title' => '', 'cache' => '-1', + 'i18n_mode' => '0', )) ->values(array( 'bid' => '17', @@ -1575,6 +1314,7 @@ $connection->insert('block') 'pages' => '', 'title' => '', 'cache' => '-1', + 'i18n_mode' => '0', )) ->values(array( 'bid' => '18', @@ -1589,6 +1329,7 @@ $connection->insert('block') 'pages' => '', 'title' => '', 'cache' => '-1', + 'i18n_mode' => '0', )) ->values(array( 'bid' => '19', @@ -1603,6 +1344,7 @@ $connection->insert('block') 'pages' => '', 'title' => '', 'cache' => '-1', + 'i18n_mode' => '0', )) ->values(array( 'bid' => '20', @@ -1617,6 +1359,7 @@ $connection->insert('block') 'pages' => '', 'title' => '', 'cache' => '1', + 'i18n_mode' => '0', )) ->values(array( 'bid' => '21', @@ -1631,6 +1374,7 @@ $connection->insert('block') 'pages' => '', 'title' => '', 'cache' => '-1', + 'i18n_mode' => '0', )) ->values(array( 'bid' => '22', @@ -1645,6 +1389,7 @@ $connection->insert('block') 'pages' => '', 'title' => '', 'cache' => '1', + 'i18n_mode' => '0', )) ->values(array( 'bid' => '23', @@ -1659,6 +1404,7 @@ $connection->insert('block') 'pages' => '', 'title' => '', 'cache' => '-1', + 'i18n_mode' => '0', )) ->values(array( 'bid' => '24', @@ -1673,6 +1419,7 @@ $connection->insert('block') 'pages' => '', 'title' => '', 'cache' => '-1', + 'i18n_mode' => '0', )) ->values(array( 'bid' => '25', @@ -1687,6 +1434,7 @@ $connection->insert('block') 'pages' => '', 'title' => '', 'cache' => '-1', + 'i18n_mode' => '0', )) ->values(array( 'bid' => '26', @@ -1701,6 +1449,7 @@ $connection->insert('block') 'pages' => '', 'title' => '', 'cache' => '-1', + 'i18n_mode' => '0', )) ->values(array( 'bid' => '27', @@ -1715,6 +1464,7 @@ $connection->insert('block') 'pages' => '', 'title' => '', 'cache' => '-1', + 'i18n_mode' => '0', )) ->values(array( 'bid' => '28', @@ -1729,6 +1479,7 @@ $connection->insert('block') 'pages' => '', 'title' => '', 'cache' => '-1', + 'i18n_mode' => '0', )) ->values(array( 'bid' => '29', @@ -1743,6 +1494,7 @@ $connection->insert('block') 'pages' => '', 'title' => '', 'cache' => '-1', + 'i18n_mode' => '0', )) ->values(array( 'bid' => '30', @@ -1757,6 +1509,7 @@ $connection->insert('block') 'pages' => '', 'title' => '', 'cache' => '-1', + 'i18n_mode' => '0', )) ->values(array( 'bid' => '31', @@ -1771,6 +1524,7 @@ $connection->insert('block') 'pages' => '', 'title' => '', 'cache' => '1', + 'i18n_mode' => '0', )) ->values(array( 'bid' => '32', @@ -1785,6 +1539,7 @@ $connection->insert('block') 'pages' => '', 'title' => '', 'cache' => '5', + 'i18n_mode' => '0', )) ->values(array( 'bid' => '33', @@ -1799,6 +1554,7 @@ $connection->insert('block') 'pages' => '', 'title' => '', 'cache' => '-1', + 'i18n_mode' => '0', )) ->values(array( 'bid' => '34', @@ -1813,6 +1569,7 @@ $connection->insert('block') 'pages' => '', 'title' => '', 'cache' => '-2', + 'i18n_mode' => '0', )) ->values(array( 'bid' => '35', @@ -1827,6 +1584,7 @@ $connection->insert('block') 'pages' => '', 'title' => '', 'cache' => '-2', + 'i18n_mode' => '0', )) ->values(array( 'bid' => '36', @@ -1841,6 +1599,7 @@ $connection->insert('block') 'pages' => '', 'title' => '', 'cache' => '1', + 'i18n_mode' => '0', )) ->values(array( 'bid' => '37', @@ -1855,6 +1614,7 @@ $connection->insert('block') 'pages' => '', 'title' => '', 'cache' => '5', + 'i18n_mode' => '0', )) ->values(array( 'bid' => '38', @@ -1869,6 +1629,7 @@ $connection->insert('block') 'pages' => '', 'title' => '', 'cache' => '-1', + 'i18n_mode' => '0', )) ->values(array( 'bid' => '39', @@ -1883,6 +1644,7 @@ $connection->insert('block') 'pages' => '', 'title' => '', 'cache' => '-2', + 'i18n_mode' => '0', )) ->values(array( 'bid' => '40', @@ -1897,6 +1659,7 @@ $connection->insert('block') 'pages' => '', 'title' => '', 'cache' => '-2', + 'i18n_mode' => '0', )) ->values(array( 'bid' => '41', @@ -1911,6 +1674,7 @@ $connection->insert('block') 'pages' => '', 'title' => '', 'cache' => '-1', + 'i18n_mode' => '0', )) ->values(array( 'bid' => '42', @@ -1925,6 +1689,7 @@ $connection->insert('block') 'pages' => '', 'title' => '', 'cache' => '-1', + 'i18n_mode' => '0', )) ->values(array( 'bid' => '43', @@ -1939,6 +1704,7 @@ $connection->insert('block') 'pages' => '', 'title' => '', 'cache' => '-1', + 'i18n_mode' => '0', )) ->values(array( 'bid' => '44', @@ -1953,6 +1719,7 @@ $connection->insert('block') 'pages' => '', 'title' => '', 'cache' => '-1', + 'i18n_mode' => '0', )) ->values(array( 'bid' => '45', @@ -1967,6 +1734,7 @@ $connection->insert('block') 'pages' => '', 'title' => 'Mildly amusing limerick of the day', 'cache' => '-1', + 'i18n_mode' => '0', )) ->values(array( 'bid' => '46', @@ -1981,6 +1749,7 @@ $connection->insert('block') 'pages' => '', 'title' => 'Mildly amusing limerick of the day', 'cache' => '-1', + 'i18n_mode' => '0', )) ->values(array( 'bid' => '47', @@ -1995,6 +1764,7 @@ $connection->insert('block') 'pages' => '', 'title' => '', 'cache' => '1', + 'i18n_mode' => '0', )) ->values(array( 'bid' => '48', @@ -2009,9 +1779,39 @@ $connection->insert('block') 'pages' => '', 'title' => '', 'cache' => '1', + 'i18n_mode' => '0', +)) +->values(array( + 'bid' => '49', + 'module' => 'locale', + 'delta' => 'language_content', + 'theme' => 'bartik', + 'status' => '0', + 'weight' => '0', + 'region' => '-1', + 'custom' => '0', + 'visibility' => '0', + 'pages' => '', + 'title' => '', + 'cache' => '-1', + 'i18n_mode' => '0', +)) +->values(array( + 'bid' => '50', + 'module' => 'locale', + 'delta' => 'language_content', + 'theme' => 'seven', + 'status' => '0', + 'weight' => '0', + 'region' => '-1', + 'custom' => '0', + 'visibility' => '0', + 'pages' => '', + 'title' => '', + 'cache' => '-1', + 'i18n_mode' => '0', )) ->execute(); - $connection->schema()->createTable('block_custom', array( 'fields' => array( 'bid' => array( @@ -2057,7 +1857,6 @@ $connection->insert('block_custom') 'format' => 'filtered_html', )) ->execute(); - $connection->schema()->createTable('block_node_type', array( 'fields' => array( 'module' => array( @@ -2123,7 +1922,6 @@ $connection->insert('block_role') 'rid' => '2', )) ->execute(); - $connection->schema()->createTable('blocked_ips', array( 'fields' => array( 'iid' => array( @@ -2155,7 +1953,6 @@ $connection->insert('blocked_ips') 'ip' => '111.111.111.111', )) ->execute(); - $connection->schema()->createTable('book', array( 'fields' => array( 'mlid' => array( @@ -2187,33 +1984,32 @@ $connection->schema()->createTable('book', array( )); $connection->insert('book') - ->fields(array( - 'mlid', - 'nid', - 'bid', - )) - ->values(array( - 'mlid' => '480', - 'nid' => '4', - 'bid' => '4', - )) - ->values(array( - 'mlid' => '481', - 'nid' => '6', - 'bid' => '4', - )) - ->values(array( - 'mlid' => '482', - 'nid' => '2', - 'bid' => '4', - )) - ->values(array( - 'mlid' => '483', - 'nid' => '1', - 'bid' => '8', - )) - ->execute(); - +->fields(array( + 'mlid', + 'nid', + 'bid', +)) +->values(array( + 'mlid' => '480', + 'nid' => '4', + 'bid' => '4', +)) +->values(array( + 'mlid' => '481', + 'nid' => '6', + 'bid' => '4', +)) +->values(array( + 'mlid' => '482', + 'nid' => '2', + 'bid' => '4', +)) +->values(array( + 'mlid' => '483', + 'nid' => '1', + 'bid' => '8', +)) +->execute(); $connection->schema()->createTable('cache', array( 'fields' => array( 'cid' => array( @@ -2632,6 +2428,49 @@ $connection->schema()->createTable('cache_update', array( 'mysql_character_set' => 'utf8', )); +$connection->schema()->createTable('cache_variable', array( + 'fields' => array( + 'cid' => array( + 'type' => 'varchar', + 'not null' => TRUE, + 'length' => '255', + 'default' => '', + ), + 'data' => array( + 'type' => 'blob', + 'not null' => FALSE, + 'size' => 'big', + ), + 'expire' => array( + 'type' => 'int', + 'not null' => TRUE, + 'size' => 'normal', + 'default' => '0', + ), + 'created' => array( + 'type' => 'int', + 'not null' => TRUE, + 'size' => 'normal', + 'default' => '0', + ), + 'serialized' => array( + 'type' => 'int', + 'not null' => TRUE, + 'size' => 'small', + 'default' => '0', + ), + ), + 'primary key' => array( + 'cid', + ), + 'indexes' => array( + 'expire' => array( + 'expire', + ), + ), + 'mysql_character_set' => 'utf8', +)); + $connection->schema()->createTable('cache_views', array( 'fields' => array( 'cid' => array( @@ -2863,7 +2702,6 @@ $connection->insert('comment') 'language' => 'is', )) ->execute(); - $connection->schema()->createTable('contact', array( 'fields' => array( 'cid' => array( @@ -2925,7 +2763,6 @@ $connection->insert('contact') 'selected' => '1', )) ->execute(); - $connection->schema()->createTable('ctools_css_cache', array( 'fields' => array( 'cid' => array( @@ -3066,7 +2903,6 @@ $connection->insert('date_format_type') 'locked' => '1', )) ->execute(); - $connection->schema()->createTable('date_formats', array( 'fields' => array( 'dfid' => array( @@ -3322,7 +3158,6 @@ $connection->insert('date_formats') 'locked' => '0', )) ->execute(); - $connection->schema()->createTable('entity_translation', array( 'fields' => array( 'entity_type' => array( @@ -3479,42 +3314,6 @@ $connection->insert('entity_translation') 'created' => '1529615813', 'changed' => '1529615813', )) -->values(array( - 'entity_type' => 'taxonomy_term', - 'entity_id' => '4', - 'revision_id' => '4', - 'language' => 'en', - 'source' => '', - 'uid' => '1', - 'status' => '1', - 'translate' => '0', - 'created' => '1531922259', - 'changed' => '1531922259', -)) -->values(array( - 'entity_type' => 'taxonomy_term', - 'entity_id' => '4', - 'revision_id' => '4', - 'language' => 'fr', - 'source' => 'en', - 'uid' => '2', - 'status' => '1', - 'translate' => '1', - 'created' => '1531922267', - 'changed' => '1531922268', -)) -->values(array( - 'entity_type' => 'taxonomy_term', - 'entity_id' => '4', - 'revision_id' => '4', - 'language' => 'is', - 'source' => 'en', - 'uid' => '1', - 'status' => '0', - 'translate' => '0', - 'created' => '1531922278', - 'changed' => '1531922279', -)) ->values(array( 'entity_type' => 'user', 'entity_id' => '2', @@ -3551,8 +3350,43 @@ $connection->insert('entity_translation') 'created' => '1531663925', 'changed' => '1531663925', )) +->values(array( + 'entity_type' => 'taxonomy_term', + 'entity_id' => '4', + 'revision_id' => '4', + 'language' => 'en', + 'source' => '', + 'uid' => '1', + 'status' => '1', + 'translate' => '0', + 'created' => '1531922259', + 'changed' => '1531922259', +)) +->values(array( + 'entity_type' => 'taxonomy_term', + 'entity_id' => '4', + 'revision_id' => '4', + 'language' => 'fr', + 'source' => 'en', + 'uid' => '2', + 'status' => '1', + 'translate' => '1', + 'created' => '1531922267', + 'changed' => '1531922268', +)) +->values(array( + 'entity_type' => 'taxonomy_term', + 'entity_id' => '4', + 'revision_id' => '4', + 'language' => 'is', + 'source' => 'en', + 'uid' => '1', + 'status' => '0', + 'translate' => '0', + 'created' => '1531922278', + 'changed' => '1531922279', +)) ->execute(); - $connection->schema()->createTable('entity_translation_revision', array( 'fields' => array( 'entity_type' => array( @@ -4358,7 +4192,6 @@ $connection->insert('field_config') 'deleted' => '0', )) ->execute(); - $connection->schema()->createTable('field_config_instance', array( 'fields' => array( 'id' => array( @@ -5039,7 +4872,6 @@ $connection->insert('field_config_instance') 'deleted' => '0', )) ->execute(); - $connection->schema()->createTable('field_data_body', array( 'fields' => array( 'entity_type' => array( @@ -5148,7 +4980,6 @@ $connection->insert('field_data_body') 'body_format' => 'filtered_html', )) ->execute(); - $connection->schema()->createTable('field_data_comment_body', array( 'fields' => array( 'entity_type' => array( @@ -5260,7 +5091,6 @@ $connection->insert('field_data_comment_body') 'comment_body_format' => 'filtered_html', )) ->execute(); - $connection->schema()->createTable('field_data_description_field', array( 'fields' => array( 'entity_type' => array( @@ -5348,7 +5178,10 @@ $connection->schema()->createTable('field_data_description_field', array( 'language', ), 'description_field_format' => array( - 'description_field_format', + array( + 'description_field_format', + '191', + ), ), ), 'mysql_character_set' => 'utf8', @@ -5411,7 +5244,7 @@ $connection->insert('field_data_description_field') 'revision_id' => '4', 'language' => 'fr', 'delta' => '0', - 'description_field_value' => 'The third term en français s\'il vous plaît.', + 'description_field_value' => "The third term en français s'il vous plaît.", 'description_field_summary' => '', 'description_field_format' => 'filtered_html', )) @@ -5428,7 +5261,6 @@ $connection->insert('field_data_description_field') 'description_field_format' => 'plain_text', )) ->execute(); - $connection->schema()->createTable('field_data_field_boolean', array( 'fields' => array( 'entity_type' => array( @@ -5511,7 +5343,6 @@ $connection->insert('field_data_field_boolean') 'field_boolean_value' => '1', )) ->execute(); - $connection->schema()->createTable('field_data_field_date', array( 'fields' => array( 'entity_type' => array( @@ -5594,7 +5425,6 @@ $connection->insert('field_data_field_date') 'field_date_value' => '2015-01-20 04:15:00', )) ->execute(); - $connection->schema()->createTable('field_data_field_date_with_end_time', array( 'fields' => array( 'entity_type' => array( @@ -5684,92 +5514,6 @@ $connection->insert('field_data_field_date_with_end_time') 'field_date_with_end_time_value2' => '1421727300', )) ->execute(); - -$connection->schema()->createTable('field_data_field_datetime_without_time', array( - 'fields' => array( - 'entity_type' => array( - 'type' => 'varchar', - 'not null' => TRUE, - 'length' => '128', - 'default' => '', - ), - 'bundle' => array( - 'type' => 'varchar', - 'not null' => TRUE, - 'length' => '128', - 'default' => '', - ), - 'deleted' => array( - 'type' => 'int', - 'not null' => TRUE, - 'size' => 'normal', - 'default' => '0', - ), - 'entity_id' => array( - 'type' => 'int', - 'not null' => TRUE, - 'size' => 'normal', - 'unsigned' => TRUE, - ), - 'revision_id' => array( - 'type' => 'int', - 'not null' => FALSE, - 'size' => 'normal', - 'unsigned' => TRUE, - ), - 'language' => array( - 'type' => 'varchar', - 'not null' => TRUE, - 'length' => '32', - 'default' => '', - ), - 'delta' => array( - 'type' => 'int', - 'not null' => TRUE, - 'size' => 'normal', - 'unsigned' => TRUE, - ), - 'field_datetime_without_time_value' => array( - 'mysql_type' => 'datetime', - 'pgsql_type' => 'timestamp without time zone', - 'sqlite_type' => 'varchar', - 'sqlsrv_type' => 'smalldatetime', - 'not null' => FALSE, - ), - ), - 'primary key' => array( - 'entity_type', - 'deleted', - 'entity_id', - 'language', - 'delta', - ), - 'mysql_character_set' => 'utf8', -)); - -$connection->insert('field_data_field_datetime_without_time') -->fields(array( - 'entity_type', - 'bundle', - 'deleted', - 'entity_id', - 'revision_id', - 'language', - 'delta', - 'field_datetime_without_time_value', -)) -->values(array( - 'entity_type' => 'node', - 'bundle' => 'test_content_type', - 'deleted' => '0', - 'entity_id' => '1', - 'revision_id' => '1', - 'language' => 'und', - 'delta' => '0', - 'field_datetime_without_time_value' => '2015-01-20 00:00:00', -)) -->execute(); - $connection->schema()->createTable('field_data_field_date_without_time', array( 'fields' => array( 'entity_type' => array( @@ -5852,7 +5596,91 @@ $connection->insert('field_data_field_date_without_time') 'field_date_without_time_value' => '2015-01-20T00:00:00', )) ->execute(); +$connection->schema()->createTable('field_data_field_datetime_without_time', array( + 'fields' => array( + 'entity_type' => array( + 'type' => 'varchar', + 'not null' => TRUE, + 'length' => '128', + 'default' => '', + ), + 'bundle' => array( + 'type' => 'varchar', + 'not null' => TRUE, + 'length' => '128', + 'default' => '', + ), + 'deleted' => array( + 'type' => 'int', + 'not null' => TRUE, + 'size' => 'normal', + 'default' => '0', + ), + 'entity_id' => array( + 'type' => 'int', + 'not null' => TRUE, + 'size' => 'normal', + 'unsigned' => TRUE, + ), + 'revision_id' => array( + 'type' => 'int', + 'not null' => FALSE, + 'size' => 'normal', + 'unsigned' => TRUE, + ), + 'language' => array( + 'type' => 'varchar', + 'not null' => TRUE, + 'length' => '32', + 'default' => '', + ), + 'delta' => array( + 'type' => 'int', + 'not null' => TRUE, + 'size' => 'normal', + 'unsigned' => TRUE, + ), + 'field_datetime_without_time_value' => array( + 'type' => 'datetime', + 'not null' => FALSE, + 'mysql_type' => 'datetime', + 'pgsql_type' => 'timestamp without time zone', + 'sqlite_type' => 'varchar', + 'sqlsrv_type' => 'smalldatetime', + ), + ), + 'primary key' => array( + 'entity_type', + 'deleted', + 'entity_id', + 'language', + 'delta', + ), + 'mysql_character_set' => 'utf8', +)); +$connection->insert('field_data_field_datetime_without_time') +->fields(array( + 'entity_type', + 'bundle', + 'deleted', + 'entity_id', + 'revision_id', + 'language', + 'delta', + 'field_datetime_without_time_value', +)) +->values(array( + 'entity_type' => 'node', + 'bundle' => 'test_content_type', + 'deleted' => '0', + 'entity_id' => '1', + 'revision_id' => '1', + 'language' => 'und', + 'delta' => '0', + 'field_datetime_without_time_value' => '2015-01-20 00:00:00', +)) +->execute(); $connection->schema()->createTable('field_data_field_email', array( 'fields' => array( 'entity_type' => array( @@ -5945,7 +5773,6 @@ $connection->insert('field_data_field_email') 'field_email_email' => 'another@example.com', )) ->execute(); - $connection->schema()->createTable('field_data_field_file', array( 'fields' => array( 'entity_type' => array( @@ -6057,7 +5884,6 @@ $connection->insert('field_data_field_file') 'field_file_description' => 'file desc', )) ->execute(); - $connection->schema()->createTable('field_data_field_float', array( 'fields' => array( 'entity_type' => array( @@ -6141,7 +5967,6 @@ $connection->insert('field_data_field_float') 'field_float_value' => '1', )) ->execute(); - $connection->schema()->createTable('field_data_field_float_list', array( 'fields' => array( 'entity_type' => array( @@ -6247,7 +6072,6 @@ $connection->insert('field_data_field_float_list') 'field_float_list_value' => '3.1416', )) ->execute(); - $connection->schema()->createTable('field_data_field_image', array( 'fields' => array( 'entity_type' => array( @@ -6444,7 +6268,6 @@ $connection->insert('field_data_field_images') 'field_images_height' => '93', )) ->execute(); - $connection->schema()->createTable('field_data_field_integer', array( 'fields' => array( 'entity_type' => array( @@ -6637,7 +6460,6 @@ $connection->insert('field_data_field_integer') 'field_integer_value' => '4', )) ->execute(); - $connection->schema()->createTable('field_data_field_integer_list', array( 'fields' => array( 'entity_type' => array( @@ -6720,7 +6542,6 @@ $connection->insert('field_data_field_integer_list') 'field_integer_list_value' => '7', )) ->execute(); - $connection->schema()->createTable('field_data_field_link', array( 'fields' => array( 'entity_type' => array( @@ -6841,7 +6662,6 @@ $connection->insert('field_data_field_link') 'field_link_attributes' => 'a:1:{s:5:"title";s:0:"";}', )) ->execute(); - $connection->schema()->createTable('field_data_field_long_text', array( 'fields' => array( 'entity_type' => array( @@ -7018,7 +6838,6 @@ $connection->insert('field_data_field_node_entityreference') 'field_node_entityreference_target_id' => '2', )) ->execute(); - $connection->schema()->createTable('field_data_field_phone', array( 'fields' => array( 'entity_type' => array( @@ -7101,7 +6920,6 @@ $connection->insert('field_data_field_phone') 'field_phone_value' => '99-99-99-99', )) ->execute(); - $connection->schema()->createTable('field_data_field_private_file', array( 'fields' => array( 'entity_type' => array( @@ -7224,7 +7042,6 @@ $connection->insert('field_data_field_private_file') 'field_private_file_description' => '', )) ->execute(); - $connection->schema()->createTable('field_data_field_reference', array( 'fields' => array( 'entity_type' => array( @@ -7361,7 +7178,6 @@ $connection->insert('field_data_field_reference') 'field_reference_target_id' => '2', )) ->execute(); - $connection->schema()->createTable('field_data_field_reference_2', array( 'fields' => array( 'entity_type' => array( @@ -7498,7 +7314,6 @@ $connection->insert('field_data_field_reference_2') 'field_reference_2_target_id' => '2', )) ->execute(); - $connection->schema()->createTable('field_data_field_tags', array( 'fields' => array( 'entity_type' => array( @@ -7581,6 +7396,16 @@ $connection->insert('field_data_field_tags') 'delta' => '0', 'field_tags_tid' => '9', )) +->values(array( + 'entity_type' => 'node', + 'bundle' => 'article', + 'deleted' => '0', + 'entity_id' => '3', + 'revision_id' => '3', + 'language' => 'und', + 'delta' => '0', + 'field_tags_tid' => '9', +)) ->values(array( 'entity_type' => 'node', 'bundle' => 'article', @@ -7591,6 +7416,16 @@ $connection->insert('field_data_field_tags') 'delta' => '1', 'field_tags_tid' => '14', )) +->values(array( + 'entity_type' => 'node', + 'bundle' => 'article', + 'deleted' => '0', + 'entity_id' => '3', + 'revision_id' => '3', + 'language' => 'und', + 'delta' => '1', + 'field_tags_tid' => '14', +)) ->values(array( 'entity_type' => 'node', 'bundle' => 'article', @@ -7601,26 +7436,6 @@ $connection->insert('field_data_field_tags') 'delta' => '2', 'field_tags_tid' => '17', )) -->values(array( - 'entity_type' => 'node', - 'bundle' => 'article', - 'deleted' => '0', - 'entity_id' => '3', - 'revision_id' => '3', - 'language' => 'und', - 'delta' => '0', - 'field_tags_tid' => '9', -)) -->values(array( - 'entity_type' => 'node', - 'bundle' => 'article', - 'deleted' => '0', - 'entity_id' => '3', - 'revision_id' => '3', - 'language' => 'und', - 'delta' => '1', - 'field_tags_tid' => '14', -)) ->values(array( 'entity_type' => 'node', 'bundle' => 'article', @@ -7632,7 +7447,6 @@ $connection->insert('field_data_field_tags') 'field_tags_tid' => '17', )) ->execute(); - $connection->schema()->createTable('field_data_field_term_entityreference', array( 'fields' => array( 'entity_type' => array( @@ -7749,7 +7563,6 @@ $connection->insert('field_data_field_term_entityreference') 'field_term_entityreference_target_id' => '15', )) ->execute(); - $connection->schema()->createTable('field_data_field_term_reference', array( 'fields' => array( 'entity_type' => array( @@ -7843,7 +7656,6 @@ $connection->insert('field_data_field_term_reference') 'field_term_reference_tid' => '3', )) ->execute(); - $connection->schema()->createTable('field_data_field_text', array( 'fields' => array( 'entity_type' => array( @@ -7933,7 +7745,6 @@ $connection->insert('field_data_field_text') 'field_text_format' => NULL, )) ->execute(); - $connection->schema()->createTable('field_data_field_text_filtered', array( 'fields' => array( 'entity_type' => array( @@ -8016,7 +7827,10 @@ $connection->schema()->createTable('field_data_field_text_filtered', array( 'language', ), 'field_text_filtered_format' => array( - 'field_text_filtered_format', + array( + 'field_text_filtered_format', + '191', + ), ), ), 'mysql_character_set' => 'utf8', @@ -8104,7 +7918,6 @@ $connection->insert('field_data_field_text_list') 'field_text_list_value' => 'Some more text', )) ->execute(); - $connection->schema()->createTable('field_data_field_text_long_filtered', array( 'fields' => array( 'entity_type' => array( @@ -8187,7 +8000,10 @@ $connection->schema()->createTable('field_data_field_text_long_filtered', array( 'language', ), 'field_text_long_filtered_format' => array( - 'field_text_long_filtered_format', + array( + 'field_text_long_filtered_format', + '191', + ), ), ), 'mysql_character_set' => 'utf8', @@ -8275,7 +8091,10 @@ $connection->schema()->createTable('field_data_field_text_long_plain', array( 'language', ), 'field_text_long_plain_format' => array( - 'field_text_long_plain_format', + array( + 'field_text_long_plain_format', + '191', + ), ), ), 'mysql_character_set' => 'utf8', @@ -8363,7 +8182,10 @@ $connection->schema()->createTable('field_data_field_text_long_plain_filtered', 'language', ), 'field_text_long_plain_filtered_format' => array( - 'field_text_long_plain_filtered_format', + array( + 'field_text_long_plain_filtered_format', + '191', + ), ), ), 'mysql_character_set' => 'utf8', @@ -8451,7 +8273,10 @@ $connection->schema()->createTable('field_data_field_text_plain', array( 'language', ), 'field_text_plain_format' => array( - 'field_text_plain_format', + array( + 'field_text_plain_format', + '191', + ), ), ), 'mysql_character_set' => 'utf8', @@ -8539,7 +8364,10 @@ $connection->schema()->createTable('field_data_field_text_plain_filtered', array 'language', ), 'field_text_plain_filtered_format' => array( - 'field_text_plain_filtered_format', + array( + 'field_text_plain_filtered_format', + '191', + ), ), ), 'mysql_character_set' => 'utf8', @@ -8632,7 +8460,10 @@ $connection->schema()->createTable('field_data_field_text_sum_filtered', array( 'language', ), 'field_text_sum_filtered_format' => array( - 'field_text_sum_filtered_format', + array( + 'field_text_sum_filtered_format', + '191', + ), ), ), 'mysql_character_set' => 'utf8', @@ -8725,7 +8556,10 @@ $connection->schema()->createTable('field_data_field_text_sum_plain', array( 'language', ), 'field_text_sum_plain_format' => array( - 'field_text_sum_plain_format', + array( + 'field_text_sum_plain_format', + '191', + ), ), ), 'mysql_character_set' => 'utf8', @@ -8818,7 +8652,10 @@ $connection->schema()->createTable('field_data_field_text_sum_plain_filtered', a 'language', ), 'field_text_sum_plain_filtered_format' => array( - 'field_text_sum_plain_filtered_format', + array( + 'field_text_sum_plain_filtered_format', + '191', + ), ), ), 'mysql_character_set' => 'utf8', @@ -8930,7 +8767,6 @@ $connection->insert('field_data_field_user_entityreference') 'field_user_entityreference_target_id' => '2', )) ->execute(); - $connection->schema()->createTable('field_data_name_field', array( 'fields' => array( 'entity_type' => array( @@ -9013,7 +8849,10 @@ $connection->schema()->createTable('field_data_name_field', array( 'language', ), 'name_field_format' => array( - 'name_field_format', + array( + 'name_field_format', + '191', + ), ), ), 'mysql_character_set' => 'utf8', @@ -9072,7 +8911,7 @@ $connection->insert('field_data_name_field') 'revision_id' => '4', 'language' => 'fr', 'delta' => '0', - 'name_field_value' => 'Term3 en français s\'il vous plaît', + 'name_field_value' => "Term3 en français s'il vous plaît", 'name_field_format' => NULL, )) ->values(array( @@ -9087,7 +8926,6 @@ $connection->insert('field_data_name_field') 'name_field_format' => NULL, )) ->execute(); - $connection->schema()->createTable('field_data_subject_field', array( 'fields' => array( 'entity_type' => array( @@ -9170,7 +9008,10 @@ $connection->schema()->createTable('field_data_subject_field', array( 'language', ), 'subject_field_format' => array( - 'subject_field_format', + array( + 'subject_field_format', + '191', + ), ), ), 'mysql_character_set' => 'utf8', @@ -9244,7 +9085,6 @@ $connection->insert('field_data_subject_field') 'subject_field_format' => NULL, )) ->execute(); - $connection->schema()->createTable('field_data_taxonomy_forums', array( 'fields' => array( 'entity_type' => array( @@ -9338,7 +9178,6 @@ $connection->insert('field_data_taxonomy_forums') 'taxonomy_forums_tid' => '1', )) ->execute(); - $connection->schema()->createTable('field_data_title_field', array( 'fields' => array( 'entity_type' => array( @@ -9421,7 +9260,10 @@ $connection->schema()->createTable('field_data_title_field', array( 'language', ), 'title_field_format' => array( - 'title_field_format', + array( + 'title_field_format', + '191', + ), ), ), 'mysql_character_set' => 'utf8', @@ -9473,7 +9315,6 @@ $connection->insert('field_data_title_field') 'title_field_format' => NULL, )) ->execute(); - $connection->schema()->createTable('field_revision_body', array( 'fields' => array( 'entity_type' => array( @@ -9607,7 +9448,6 @@ $connection->insert('field_revision_body') 'body_format' => 'filtered_html', )) ->execute(); - $connection->schema()->createTable('field_revision_comment_body', array( 'fields' => array( 'entity_type' => array( @@ -9720,7 +9560,6 @@ $connection->insert('field_revision_comment_body') 'comment_body_format' => 'filtered_html', )) ->execute(); - $connection->schema()->createTable('field_revision_description_field', array( 'fields' => array( 'entity_type' => array( @@ -9809,7 +9648,10 @@ $connection->schema()->createTable('field_revision_description_field', array( 'language', ), 'description_field_format' => array( - 'description_field_format', + array( + 'description_field_format', + '191', + ), ), ), 'mysql_character_set' => 'utf8', @@ -9872,7 +9714,7 @@ $connection->insert('field_revision_description_field') 'revision_id' => '4', 'language' => 'fr', 'delta' => '0', - 'description_field_value' => 'The third term en français s\'il vous plaît.', + 'description_field_value' => "The third term en français s'il vous plaît.", 'description_field_summary' => '', 'description_field_format' => 'full_html', )) @@ -9889,7 +9731,6 @@ $connection->insert('field_revision_description_field') 'description_field_format' => 'full_html', )) ->execute(); - $connection->schema()->createTable('field_revision_field_boolean', array( 'fields' => array( 'entity_type' => array( @@ -9973,7 +9814,6 @@ $connection->insert('field_revision_field_boolean') 'field_boolean_value' => '1', )) ->execute(); - $connection->schema()->createTable('field_revision_field_date', array( 'fields' => array( 'entity_type' => array( @@ -10057,7 +9897,6 @@ $connection->insert('field_revision_field_date') 'field_date_value' => '2015-01-20 04:15:00', )) ->execute(); - $connection->schema()->createTable('field_revision_field_date_with_end_time', array( 'fields' => array( 'entity_type' => array( @@ -10148,93 +9987,6 @@ $connection->insert('field_revision_field_date_with_end_time') 'field_date_with_end_time_value2' => '1421727300', )) ->execute(); - -$connection->schema()->createTable('field_revision_field_datetime_without_time', array( - 'fields' => array( - 'entity_type' => array( - 'type' => 'varchar', - 'not null' => TRUE, - 'length' => '128', - 'default' => '', - ), - 'bundle' => array( - 'type' => 'varchar', - 'not null' => TRUE, - 'length' => '128', - 'default' => '', - ), - 'deleted' => array( - 'type' => 'int', - 'not null' => TRUE, - 'size' => 'normal', - 'default' => '0', - ), - 'entity_id' => array( - 'type' => 'int', - 'not null' => TRUE, - 'size' => 'normal', - 'unsigned' => TRUE, - ), - 'revision_id' => array( - 'type' => 'int', - 'not null' => TRUE, - 'size' => 'normal', - 'unsigned' => TRUE, - ), - 'language' => array( - 'type' => 'varchar', - 'not null' => TRUE, - 'length' => '32', - 'default' => '', - ), - 'delta' => array( - 'type' => 'int', - 'not null' => TRUE, - 'size' => 'normal', - 'unsigned' => TRUE, - ), - 'field_datetime_without_time_value' => array( - 'mysql_type' => 'datetime', - 'pgsql_type' => 'timestamp without time zone', - 'sqlite_type' => 'varchar', - 'sqlsrv_type' => 'smalldatetime', - 'not null' => FALSE, - ), - ), - 'primary key' => array( - 'entity_type', - 'deleted', - 'entity_id', - 'revision_id', - 'language', - 'delta', - ), - 'mysql_character_set' => 'utf8', -)); - -$connection->insert('field_revision_field_datetime_without_time') -->fields(array( - 'entity_type', - 'bundle', - 'deleted', - 'entity_id', - 'revision_id', - 'language', - 'delta', - 'field_datetime_without_time_value', -)) -->values(array( - 'entity_type' => 'node', - 'bundle' => 'test_content_type', - 'deleted' => '0', - 'entity_id' => '1', - 'revision_id' => '1', - 'language' => 'und', - 'delta' => '0', - 'field_datetime_without_time_value' => '2015-01-20 00:00:00', -)) -->execute(); - $connection->schema()->createTable('field_revision_field_date_without_time', array( 'fields' => array( 'entity_type' => array( @@ -10318,7 +10070,92 @@ $connection->insert('field_revision_field_date_without_time') 'field_date_without_time_value' => '2015-01-20T00:00:00', )) ->execute(); +$connection->schema()->createTable('field_revision_field_datetime_without_time', array( + 'fields' => array( + 'entity_type' => array( + 'type' => 'varchar', + 'not null' => TRUE, + 'length' => '128', + 'default' => '', + ), + 'bundle' => array( + 'type' => 'varchar', + 'not null' => TRUE, + 'length' => '128', + 'default' => '', + ), + 'deleted' => array( + 'type' => 'int', + 'not null' => TRUE, + 'size' => 'normal', + 'default' => '0', + ), + 'entity_id' => array( + 'type' => 'int', + 'not null' => TRUE, + 'size' => 'normal', + 'unsigned' => TRUE, + ), + 'revision_id' => array( + 'type' => 'int', + 'not null' => TRUE, + 'size' => 'normal', + 'unsigned' => TRUE, + ), + 'language' => array( + 'type' => 'varchar', + 'not null' => TRUE, + 'length' => '32', + 'default' => '', + ), + 'delta' => array( + 'type' => 'int', + 'not null' => TRUE, + 'size' => 'normal', + 'unsigned' => TRUE, + ), + 'field_datetime_without_time_value' => array( + 'type' => 'datetime', + 'not null' => FALSE, + 'mysql_type' => 'datetime', + 'pgsql_type' => 'timestamp without time zone', + 'sqlite_type' => 'varchar', + 'sqlsrv_type' => 'smalldatetime', + ), + ), + 'primary key' => array( + 'entity_type', + 'deleted', + 'entity_id', + 'revision_id', + 'language', + 'delta', + ), + 'mysql_character_set' => 'utf8', +)); +$connection->insert('field_revision_field_datetime_without_time') +->fields(array( + 'entity_type', + 'bundle', + 'deleted', + 'entity_id', + 'revision_id', + 'language', + 'delta', + 'field_datetime_without_time_value', +)) +->values(array( + 'entity_type' => 'node', + 'bundle' => 'test_content_type', + 'deleted' => '0', + 'entity_id' => '1', + 'revision_id' => '1', + 'language' => 'und', + 'delta' => '0', + 'field_datetime_without_time_value' => '2015-01-20 00:00:00', +)) +->execute(); $connection->schema()->createTable('field_revision_field_email', array( 'fields' => array( 'entity_type' => array( @@ -10412,7 +10249,6 @@ $connection->insert('field_revision_field_email') 'field_email_email' => 'another@example.com', )) ->execute(); - $connection->schema()->createTable('field_revision_field_file', array( 'fields' => array( 'entity_type' => array( @@ -10525,7 +10361,6 @@ $connection->insert('field_revision_field_file') 'field_file_description' => 'file desc', )) ->execute(); - $connection->schema()->createTable('field_revision_field_float', array( 'fields' => array( 'entity_type' => array( @@ -10610,7 +10445,6 @@ $connection->insert('field_revision_field_float') 'field_float_value' => '1', )) ->execute(); - $connection->schema()->createTable('field_revision_field_float_list', array( 'fields' => array( 'entity_type' => array( @@ -10717,7 +10551,6 @@ $connection->insert('field_revision_field_float_list') 'field_float_list_value' => '3.1416', )) ->execute(); - $connection->schema()->createTable('field_revision_field_image', array( 'fields' => array( 'entity_type' => array( @@ -10916,7 +10749,6 @@ $connection->insert('field_revision_field_images') 'field_images_height' => '93', )) ->execute(); - $connection->schema()->createTable('field_revision_field_integer', array( 'fields' => array( 'entity_type' => array( @@ -11090,7 +10922,6 @@ $connection->insert('field_revision_field_integer') 'field_integer_value' => '4', )) ->execute(); - $connection->schema()->createTable('field_revision_field_integer_list', array( 'fields' => array( 'entity_type' => array( @@ -11174,7 +11005,6 @@ $connection->insert('field_revision_field_integer_list') 'field_integer_list_value' => '7', )) ->execute(); - $connection->schema()->createTable('field_revision_field_link', array( 'fields' => array( 'entity_type' => array( @@ -11296,7 +11126,6 @@ $connection->insert('field_revision_field_link') 'field_link_attributes' => 'a:1:{s:5:"title";s:0:"";}', )) ->execute(); - $connection->schema()->createTable('field_revision_field_long_text', array( 'fields' => array( 'entity_type' => array( @@ -11475,7 +11304,6 @@ $connection->insert('field_revision_field_node_entityreference') 'field_node_entityreference_target_id' => '2', )) ->execute(); - $connection->schema()->createTable('field_revision_field_phone', array( 'fields' => array( 'entity_type' => array( @@ -11569,7 +11397,6 @@ $connection->insert('field_revision_field_phone') 'field_phone_value' => '99-99-99-99', )) ->execute(); - $connection->schema()->createTable('field_revision_field_private_file', array( 'fields' => array( 'entity_type' => array( @@ -11693,7 +11520,6 @@ $connection->insert('field_revision_field_private_file') 'field_private_file_description' => '', )) ->execute(); - $connection->schema()->createTable('field_revision_field_reference', array( 'fields' => array( 'entity_type' => array( @@ -11831,7 +11657,6 @@ $connection->insert('field_revision_field_reference') 'field_reference_target_id' => '2', )) ->execute(); - $connection->schema()->createTable('field_revision_field_reference_2', array( 'fields' => array( 'entity_type' => array( @@ -11969,7 +11794,6 @@ $connection->insert('field_revision_field_reference_2') 'field_reference_2_target_id' => '2', )) ->execute(); - $connection->schema()->createTable('field_revision_field_tags', array( 'fields' => array( 'entity_type' => array( @@ -12104,7 +11928,6 @@ $connection->insert('field_revision_field_tags') 'field_tags_tid' => '17', )) ->execute(); - $connection->schema()->createTable('field_revision_field_term_entityreference', array( 'fields' => array( 'entity_type' => array( @@ -12222,7 +12045,6 @@ $connection->insert('field_revision_field_term_entityreference') 'field_term_entityreference_target_id' => '15', )) ->execute(); - $connection->schema()->createTable('field_revision_field_term_reference', array( 'fields' => array( 'entity_type' => array( @@ -12317,7 +12139,6 @@ $connection->insert('field_revision_field_term_reference') 'field_term_reference_tid' => '3', )) ->execute(); - $connection->schema()->createTable('field_revision_field_text', array( 'fields' => array( 'entity_type' => array( @@ -12408,7 +12229,6 @@ $connection->insert('field_revision_field_text') 'field_text_format' => NULL, )) ->execute(); - $connection->schema()->createTable('field_revision_field_text_filtered', array( 'fields' => array( 'entity_type' => array( @@ -12492,7 +12312,10 @@ $connection->schema()->createTable('field_revision_field_text_filtered', array( 'language', ), 'field_text_filtered_format' => array( - 'field_text_filtered_format', + array( + 'field_text_filtered_format', + '191', + ), ), ), 'mysql_character_set' => 'utf8', @@ -12581,7 +12404,6 @@ $connection->insert('field_revision_field_text_list') 'field_text_list_value' => 'Some more text', )) ->execute(); - $connection->schema()->createTable('field_revision_field_text_long_filtered', array( 'fields' => array( 'entity_type' => array( @@ -12665,7 +12487,10 @@ $connection->schema()->createTable('field_revision_field_text_long_filtered', ar 'language', ), 'field_text_long_filtered_format' => array( - 'field_text_long_filtered_format', + array( + 'field_text_long_filtered_format', + '191', + ), ), ), 'mysql_character_set' => 'utf8', @@ -12754,7 +12579,10 @@ $connection->schema()->createTable('field_revision_field_text_long_plain', array 'language', ), 'field_text_long_plain_format' => array( - 'field_text_long_plain_format', + array( + 'field_text_long_plain_format', + '191', + ), ), ), 'mysql_character_set' => 'utf8', @@ -12843,7 +12671,10 @@ $connection->schema()->createTable('field_revision_field_text_long_plain_filtere 'language', ), 'field_text_long_plain_filtered_format' => array( - 'field_text_long_plain_filtered_format', + array( + 'field_text_long_plain_filtered_format', + '191', + ), ), ), 'mysql_character_set' => 'utf8', @@ -12932,7 +12763,10 @@ $connection->schema()->createTable('field_revision_field_text_plain', array( 'language', ), 'field_text_plain_format' => array( - 'field_text_plain_format', + array( + 'field_text_plain_format', + '191', + ), ), ), 'mysql_character_set' => 'utf8', @@ -13021,7 +12855,10 @@ $connection->schema()->createTable('field_revision_field_text_plain_filtered', a 'language', ), 'field_text_plain_filtered_format' => array( - 'field_text_plain_filtered_format', + array( + 'field_text_plain_filtered_format', + '191', + ), ), ), 'mysql_character_set' => 'utf8', @@ -13115,7 +12952,10 @@ $connection->schema()->createTable('field_revision_field_text_sum_filtered', arr 'language', ), 'field_text_sum_filtered_format' => array( - 'field_text_sum_filtered_format', + array( + 'field_text_sum_filtered_format', + '191', + ), ), ), 'mysql_character_set' => 'utf8', @@ -13209,7 +13049,10 @@ $connection->schema()->createTable('field_revision_field_text_sum_plain', array( 'language', ), 'field_text_sum_plain_format' => array( - 'field_text_sum_plain_format', + array( + 'field_text_sum_plain_format', + '191', + ), ), ), 'mysql_character_set' => 'utf8', @@ -13303,7 +13146,10 @@ $connection->schema()->createTable('field_revision_field_text_sum_plain_filtered 'language', ), 'field_text_sum_plain_filtered_format' => array( - 'field_text_sum_plain_filtered_format', + array( + 'field_text_sum_plain_filtered_format', + '191', + ), ), ), 'mysql_character_set' => 'utf8', @@ -13394,28 +13240,6 @@ $connection->schema()->createTable('field_revision_field_user_entityreference', 'mysql_character_set' => 'utf8', )); -$connection->insert('field_revision_field_user_entityreference') -->fields(array( - 'entity_type', - 'bundle', - 'deleted', - 'entity_id', - 'revision_id', - 'language', - 'delta', - 'field_user_entityreference_target_id', -)) -->values(array( - 'entity_type' => 'node', - 'bundle' => 'test_content_type', - 'deleted' => '0', - 'entity_id' => '1', - 'revision_id' => '1', - 'language' => 'und', - 'delta' => '0', - 'field_user_entityreference_target_id' => '2', -)); - $connection->schema()->createTable('field_revision_name_field', array( 'fields' => array( 'entity_type' => array( @@ -13499,7 +13323,10 @@ $connection->schema()->createTable('field_revision_name_field', array( 'language', ), 'name_field_format' => array( - 'name_field_format', + array( + 'name_field_format', + '191', + ), ), ), 'mysql_character_set' => 'utf8', @@ -13558,7 +13385,7 @@ $connection->insert('field_revision_name_field') 'revision_id' => '4', 'language' => 'fr', 'delta' => '0', - 'name_field_value' => 'Term3 en français s\'il vous plaît', + 'name_field_value' => "Term3 en français s'il vous plaît", 'name_field_format' => NULL, )) ->values(array( @@ -13573,7 +13400,6 @@ $connection->insert('field_revision_name_field') 'name_field_format' => NULL, )) ->execute(); - $connection->schema()->createTable('field_revision_subject_field', array( 'fields' => array( 'entity_type' => array( @@ -13657,7 +13483,10 @@ $connection->schema()->createTable('field_revision_subject_field', array( 'language', ), 'subject_field_format' => array( - 'subject_field_format', + array( + 'subject_field_format', + '191', + ), ), ), 'mysql_character_set' => 'utf8', @@ -13731,7 +13560,6 @@ $connection->insert('field_revision_subject_field') 'subject_field_format' => NULL, )) ->execute(); - $connection->schema()->createTable('field_revision_taxonomy_forums', array( 'fields' => array( 'entity_type' => array( @@ -13826,7 +13654,6 @@ $connection->insert('field_revision_taxonomy_forums') 'taxonomy_forums_tid' => '1', )) ->execute(); - $connection->schema()->createTable('field_revision_title_field', array( 'fields' => array( 'entity_type' => array( @@ -13910,7 +13737,10 @@ $connection->schema()->createTable('field_revision_title_field', array( 'language', ), 'title_field_format' => array( - 'title_field_format', + array( + 'title_field_format', + '191', + ), ), ), 'mysql_character_set' => 'utf8', @@ -13962,7 +13792,6 @@ $connection->insert('field_revision_title_field') 'title_field_format' => NULL, )) ->execute(); - $connection->schema()->createTable('file_managed', array( 'fields' => array( 'fid' => array( @@ -14074,9 +13903,7 @@ $connection->insert('file_managed') 'status' => '1', 'timestamp' => '1421747516', )) - ->execute(); - $connection->schema()->createTable('file_usage', array( 'fields' => array( 'fid' => array( @@ -14158,7 +13985,6 @@ $connection->insert('file_usage') 'count' => '1', )) ->execute(); - $connection->schema()->createTable('filter', array( 'fields' => array( 'format' => array( @@ -14421,7 +14247,6 @@ $connection->insert('filter') 'settings' => 'a:1:{s:17:"filter_url_length";i:72;}', )) ->execute(); - $connection->schema()->createTable('filter_format', array( 'fields' => array( 'format' => array( @@ -14505,7 +14330,6 @@ $connection->insert('filter_format') 'weight' => '10', )) ->execute(); - $connection->schema()->createTable('flood', array( 'fields' => array( 'fid' => array( @@ -14591,7 +14415,6 @@ $connection->insert('forum') 'tid' => '1', )) ->execute(); - $connection->schema()->createTable('forum_index', array( 'fields' => array( 'nid' => array( @@ -14673,7 +14496,6 @@ $connection->insert('forum_index') 'comment_count' => '0', )) ->execute(); - $connection->schema()->createTable('history', array( 'fields' => array( 'uid' => array( @@ -14702,6 +14524,295 @@ $connection->schema()->createTable('history', array( 'mysql_character_set' => 'utf8', )); +$connection->schema()->createTable('i18n_block_language', array( + 'fields' => array( + 'module' => array( + 'type' => 'varchar', + 'not null' => TRUE, + 'length' => '64', + ), + 'delta' => array( + 'type' => 'varchar', + 'not null' => TRUE, + 'length' => '32', + ), + 'language' => array( + 'type' => 'varchar', + 'not null' => TRUE, + 'length' => '12', + 'default' => '', + ), + ), + 'primary key' => array( + 'module', + 'delta', + 'language', + ), + 'indexes' => array( + 'language' => array( + 'language', + ), + ), + 'mysql_character_set' => 'utf8', +)); + +$connection->schema()->createTable('i18n_string', array( + 'fields' => array( + 'lid' => array( + 'type' => 'int', + 'not null' => TRUE, + 'size' => 'normal', + 'default' => '0', + ), + 'textgroup' => array( + 'type' => 'varchar', + 'not null' => TRUE, + 'length' => '50', + 'default' => 'default', + ), + 'context' => array( + 'type' => 'varchar', + 'not null' => TRUE, + 'length' => '255', + 'default' => '', + ), + 'objectid' => array( + 'type' => 'varchar', + 'not null' => TRUE, + 'length' => '255', + 'default' => '', + ), + 'type' => array( + 'type' => 'varchar', + 'not null' => TRUE, + 'length' => '255', + 'default' => '', + ), + 'property' => array( + 'type' => 'varchar', + 'not null' => TRUE, + 'length' => '255', + 'default' => '', + ), + 'objectindex' => array( + 'type' => 'int', + 'not null' => TRUE, + 'size' => 'big', + 'default' => '0', + ), + 'format' => array( + 'type' => 'varchar', + 'not null' => FALSE, + 'length' => '255', + ), + ), + 'primary key' => array( + 'lid', + ), + 'indexes' => array( + 'group_context' => array( + 'textgroup', + array( + 'context', + '50', + ), + ), + ), + 'mysql_character_set' => 'utf8', +)); + +$connection->insert('i18n_string') +->fields(array( + 'lid', + 'textgroup', + 'context', + 'objectid', + 'type', + 'property', + 'objectindex', + 'format', +)) +->values(array( + 'lid' => '57', + 'textgroup' => 'blocks', + 'context' => 'block:1:title', + 'objectid' => '1', + 'type' => 'block', + 'property' => 'title', + 'objectindex' => '1', + 'format' => '', +)) +->values(array( + 'lid' => '60', + 'textgroup' => 'blocks', + 'context' => 'block:1:body', + 'objectid' => '1', + 'type' => 'block', + 'property' => 'body', + 'objectindex' => '1', + 'format' => 'filtered_html', +)) +->values(array( + 'lid' => '61', + 'textgroup' => 'node', + 'context' => 'type:article:name', + 'objectid' => 'article', + 'type' => 'type', + 'property' => 'name', + 'objectindex' => '0', + 'format' => '', +)) +->values(array( + 'lid' => '62', + 'textgroup' => 'node', + 'context' => 'type:article:title_label', + 'objectid' => 'article', + 'type' => 'type', + 'property' => 'title_label', + 'objectindex' => '0', + 'format' => '', +)) +->values(array( + 'lid' => '63', + 'textgroup' => 'node', + 'context' => 'type:article:description', + 'objectid' => 'article', + 'type' => 'type', + 'property' => 'description', + 'objectindex' => '0', + 'format' => '', +)) +->values(array( + 'lid' => '64', + 'textgroup' => 'node', + 'context' => 'type:article:help', + 'objectid' => 'article', + 'type' => 'type', + 'property' => 'help', + 'objectindex' => '0', + 'format' => '', +)) +->values(array( + 'lid' => '65', + 'textgroup' => 'node', + 'context' => 'type:book:name', + 'objectid' => 'book', + 'type' => 'type', + 'property' => 'name', + 'objectindex' => '0', + 'format' => '', +)) +->values(array( + 'lid' => '66', + 'textgroup' => 'node', + 'context' => 'type:book:title_label', + 'objectid' => 'book', + 'type' => 'type', + 'property' => 'title_label', + 'objectindex' => '0', + 'format' => '', +)) +->values(array( + 'lid' => '67', + 'textgroup' => 'node', + 'context' => 'type:book:description', + 'objectid' => 'book', + 'type' => 'type', + 'property' => 'description', + 'objectindex' => '0', + 'format' => '', +)) +->values(array( + 'lid' => '68', + 'textgroup' => 'node', + 'context' => 'type:page:name', + 'objectid' => 'page', + 'type' => 'type', + 'property' => 'name', + 'objectindex' => '0', + 'format' => '', +)) +->values(array( + 'lid' => '69', + 'textgroup' => 'node', + 'context' => 'type:page:title_label', + 'objectid' => 'page', + 'type' => 'type', + 'property' => 'title_label', + 'objectindex' => '0', + 'format' => '', +)) +->values(array( + 'lid' => '70', + 'textgroup' => 'node', + 'context' => 'type:page:description', + 'objectid' => 'page', + 'type' => 'type', + 'property' => 'description', + 'objectindex' => '0', + 'format' => '', +)) +->values(array( + 'lid' => '71', + 'textgroup' => 'node', + 'context' => 'type:page:help', + 'objectid' => 'page', + 'type' => 'type', + 'property' => 'help', + 'objectindex' => '0', + 'format' => '', +)) +->values(array( + 'lid' => '72', + 'textgroup' => 'node', + 'context' => 'type:test_content_type:name', + 'objectid' => 'test_content_type', + 'type' => 'type', + 'property' => 'name', + 'objectindex' => '0', + 'format' => '', +)) +->values(array( + 'lid' => '73', + 'textgroup' => 'node', + 'context' => 'type:test_content_type:title_label', + 'objectid' => 'test_content_type', + 'type' => 'type', + 'property' => 'title_label', + 'objectindex' => '0', + 'format' => '', +)) +->values(array( + 'lid' => '74', + 'textgroup' => 'node', + 'context' => 'type:test_content_type:description', + 'objectid' => 'test_content_type', + 'type' => 'type', + 'property' => 'description', + 'objectindex' => '0', + 'format' => '', +)) +->values(array( + 'lid' => '75', + 'textgroup' => 'node', + 'context' => 'type:test_content_type:help', + 'objectid' => 'test_content_type', + 'type' => 'type', + 'property' => 'help', + 'objectindex' => '0', + 'format' => '', +)) +->values(array( + 'lid' => '76', + 'textgroup' => 'blocks', + 'context' => 'user:login:title', + 'objectid' => 'login', + 'type' => 'user', + 'property' => 'title', + 'objectindex' => '0', + 'format' => '', +)) +->execute(); $connection->schema()->createTable('image_effects', array( 'fields' => array( 'ieid' => array( @@ -14791,7 +14902,6 @@ $connection->insert('image_effects') 'data' => 'a:3:{s:5:"width";s:2:"50";s:6:"height";s:2:"50";s:6:"anchor";s:8:"left-top";}', )) ->execute(); - $connection->schema()->createTable('image_styles', array( 'fields' => array( 'isid' => array( @@ -14840,7 +14950,6 @@ $connection->insert('image_styles') 'label' => 'Custom image style 3', )) ->execute(); - $connection->schema()->createTable('languages', array( 'fields' => array( 'language' => array( @@ -14970,7 +15079,6 @@ $connection->insert('languages') 'javascript' => '', )) ->execute(); - $connection->schema()->createTable('locales_source', array( 'fields' => array( 'lid' => array( @@ -15010,6 +15118,18 @@ $connection->schema()->createTable('locales_source', array( 'primary key' => array( 'lid', ), + 'indexes' => array( + 'textgroup_context' => array( + array( + 'textgroup', + '191', + ), + array( + 'context', + '50', + ), + ), + ), 'mysql_character_set' => 'utf8', )); @@ -15622,8 +15742,15 @@ $connection->insert('locales_source') 'context' => 'type:test_content_type:help', 'version' => '1', )) +->values(array( + 'lid' => '76', + 'location' => 'blocks:user:login:title', + 'textgroup' => 'blocks', + 'source' => 'User login title', + 'context' => 'user:login:title', + 'version' => '1', +)) ->execute(); - $connection->schema()->createTable('locales_target', array( 'fields' => array( 'lid' => array( @@ -15695,6 +15822,14 @@ $connection->insert('locales_target') 'plural' => '0', 'i18n_status' => '0', )) +->values(array( + 'lid' => '76', + 'translation' => 'fr - User login title', + 'language' => 'fr', + 'plid' => '0', + 'plural' => '0', + 'i18n_status' => '0', +)) ->values(array( 'lid' => '57', 'translation' => 'is - Mildly amusing limerick of the day', @@ -15704,7 +15839,6 @@ $connection->insert('locales_target') 'i18n_status' => '0', )) ->execute(); - $connection->schema()->createTable('menu_custom', array( 'fields' => array( 'menu_name' => array( @@ -15763,7 +15897,6 @@ $connection->insert('menu_custom') 'description' => "The User menu contains links related to the user's account, as well as the 'Log out' link.", )) ->execute(); - $connection->schema()->createTable('menu_links', array( 'fields' => array( 'menu_name' => array( @@ -26274,114 +26407,114 @@ $connection->insert('menu_links') 'p9' => '0', 'updated' => '0', )) - ->values(array( - 'menu_name' => 'book-toc-1', - 'mlid' => '480', - 'plid' => '0', - 'link_path' => 'node/4', - 'router_path' => 'node/%', - 'link_title' => 'Test top book title', - 'options' => 'a:0:{}', - 'module' => 'book', - 'hidden' => '0', - 'external' => '0', - 'has_children' => '1', - 'expanded' => '0', - 'weight' => '-10', - 'depth' => '1', - 'customized' => '0', - 'p1' => '480', - 'p2' => '0', - 'p3' => '0', - 'p4' => '0', - 'p5' => '0', - 'p6' => '0', - 'p7' => '0', - 'p8' => '0', - 'p9' => '0', - 'updated' => '0', - )) - ->values(array( - 'menu_name' => 'book-toc-1', - 'mlid' => '481', - 'plid' => '480', - 'link_path' => 'node/6', - 'router_path' => 'node/%', - 'link_title' => 'Test book title child 1', - 'options' => 'a:0:{}', - 'module' => 'book', - 'hidden' => '0', - 'external' => '0', - 'has_children' => '1', - 'expanded' => '0', - 'weight' => '0', - 'depth' => '2', - 'customized' => '0', - 'p1' => '480', - 'p2' => '481', - 'p3' => '0', - 'p4' => '0', - 'p5' => '0', - 'p6' => '0', - 'p7' => '0', - 'p8' => '0', - 'p9' => '0', - 'updated' => '0', - )) - ->values(array( - 'menu_name' => 'book-toc-1', - 'mlid' => '482', - 'plid' => '481', - 'link_path' => 'node/2', - 'router_path' => 'node/%', - 'link_title' => 'Test book title child 1.1', - 'options' => 'a:0:{}', - 'module' => 'book', - 'hidden' => '0', - 'external' => '0', - 'has_children' => '0', - 'expanded' => '0', - 'weight' => '0', - 'depth' => '3', - 'customized' => '0', - 'p1' => '480', - 'p2' => '481', - 'p3' => '482', - 'p4' => '0', - 'p5' => '0', - 'p6' => '0', - 'p7' => '0', - 'p8' => '0', - 'p9' => '0', - 'updated' => '0', - )) - ->values(array( - 'menu_name' => 'book-toc-2', - 'mlid' => '483', - 'plid' => '481', - 'link_path' => 'node/1', - 'router_path' => 'node/%', - 'link_title' => 'Test book title 2', - 'options' => 'a:0:{}', - 'module' => 'book', - 'hidden' => '0', - 'external' => '0', - 'has_children' => '0', - 'expanded' => '0', - 'weight' => '0', - 'depth' => '3', - 'customized' => '0', - 'p1' => '480', - 'p2' => '481', - 'p3' => '483', - 'p4' => '0', - 'p5' => '0', - 'p6' => '0', - 'p7' => '0', - 'p8' => '0', - 'p9' => '0', - 'updated' => '0', - )) +->values(array( + 'menu_name' => 'book-toc-1', + 'mlid' => '480', + 'plid' => '0', + 'link_path' => 'node/4', + 'router_path' => 'node/%', + 'link_title' => 'Test top book title', + 'options' => 'a:0:{}', + 'module' => 'book', + 'hidden' => '0', + 'external' => '0', + 'has_children' => '1', + 'expanded' => '0', + 'weight' => '-10', + 'depth' => '1', + 'customized' => '0', + 'p1' => '480', + 'p2' => '0', + 'p3' => '0', + 'p4' => '0', + 'p5' => '0', + 'p6' => '0', + 'p7' => '0', + 'p8' => '0', + 'p9' => '0', + 'updated' => '0', +)) +->values(array( + 'menu_name' => 'book-toc-1', + 'mlid' => '481', + 'plid' => '480', + 'link_path' => 'node/6', + 'router_path' => 'node/%', + 'link_title' => 'Test book title child 1', + 'options' => 'a:0:{}', + 'module' => 'book', + 'hidden' => '0', + 'external' => '0', + 'has_children' => '1', + 'expanded' => '0', + 'weight' => '0', + 'depth' => '2', + 'customized' => '0', + 'p1' => '480', + 'p2' => '481', + 'p3' => '0', + 'p4' => '0', + 'p5' => '0', + 'p6' => '0', + 'p7' => '0', + 'p8' => '0', + 'p9' => '0', + 'updated' => '0', +)) +->values(array( + 'menu_name' => 'book-toc-1', + 'mlid' => '482', + 'plid' => '481', + 'link_path' => 'node/2', + 'router_path' => 'node/%', + 'link_title' => 'Test book title child 1.1', + 'options' => 'a:0:{}', + 'module' => 'book', + 'hidden' => '0', + 'external' => '0', + 'has_children' => '0', + 'expanded' => '0', + 'weight' => '0', + 'depth' => '3', + 'customized' => '0', + 'p1' => '480', + 'p2' => '481', + 'p3' => '482', + 'p4' => '0', + 'p5' => '0', + 'p6' => '0', + 'p7' => '0', + 'p8' => '0', + 'p9' => '0', + 'updated' => '0', +)) +->values(array( + 'menu_name' => 'book-toc-2', + 'mlid' => '483', + 'plid' => '481', + 'link_path' => 'node/1', + 'router_path' => 'node/%', + 'link_title' => 'Test book title 2', + 'options' => 'a:0:{}', + 'module' => 'book', + 'hidden' => '0', + 'external' => '0', + 'has_children' => '0', + 'expanded' => '0', + 'weight' => '0', + 'depth' => '3', + 'customized' => '0', + 'p1' => '480', + 'p2' => '481', + 'p3' => '483', + 'p4' => '0', + 'p5' => '0', + 'p6' => '0', + 'p7' => '0', + 'p8' => '0', + 'p9' => '0', + 'updated' => '0', +)) ->values(array( 'menu_name' => 'navigation', 'mlid' => '484', @@ -26518,7 +26651,6 @@ $connection->insert('menu_links') 'updated' => '0', )) ->execute(); - $connection->schema()->createTable('menu_router', array( 'fields' => array( 'path' => array( @@ -37112,7 +37244,6 @@ $connection->insert('menu_router') 'include_file' => 'modules/user/user.pages.inc', )) ->execute(); - $connection->schema()->createTable('node', array( 'fields' => array( 'nid' => array( @@ -37337,7 +37468,6 @@ $connection->insert('node') 'translate' => '0', )) ->execute(); - $connection->schema()->createTable('node_access', array( 'fields' => array( 'nid' => array( @@ -37408,7 +37538,6 @@ $connection->insert('node_access') 'grant_delete' => '0', )) ->execute(); - $connection->schema()->createTable('node_comment_statistics', array( 'fields' => array( 'nid' => array( @@ -37513,7 +37642,6 @@ $connection->insert('node_comment_statistics') 'comment_count' => '0', )) ->execute(); - $connection->schema()->createTable('node_counter', array( 'fields' => array( 'nid' => array( @@ -37600,7 +37728,6 @@ $connection->insert('node_counter') 'timestamp' => '1504715438', )) ->execute(); - $connection->schema()->createTable('node_revision', array( 'fields' => array( 'nid' => array( @@ -37768,7 +37895,6 @@ $connection->insert('node_revision') 'sticky' => '0', )) ->execute(); - $connection->schema()->createTable('node_type', array( 'fields' => array( 'type' => array( @@ -37958,7 +38084,6 @@ $connection->insert('node_type') 'orig_type' => 'test_content_type', )) ->execute(); - $connection->schema()->createTable('queue', array( 'fields' => array( 'item_id' => array( @@ -38054,7 +38179,6 @@ $connection->insert('rdf_mapping') 'mapping' => 'a:9:{s:7:"rdftype";a:1:{i:0;s:13:"foaf:Document";}s:5:"title";a:1:{s:10:"predicates";a:1:{i:0;s:8:"dc:title";}}s:7:"created";a:3:{s:10:"predicates";a:2:{i:0;s:7:"dc:date";i:1;s:10:"dc:created";}s:8:"datatype";s:12:"xsd:dateTime";s:8:"callback";s:12:"date_iso8601";}s:7:"changed";a:3:{s:10:"predicates";a:1:{i:0;s:11:"dc:modified";}s:8:"datatype";s:12:"xsd:dateTime";s:8:"callback";s:12:"date_iso8601";}s:4:"body";a:1:{s:10:"predicates";a:1:{i:0;s:15:"content:encoded";}}s:3:"uid";a:2:{s:10:"predicates";a:1:{i:0;s:16:"sioc:has_creator";}s:4:"type";s:3:"rel";}s:4:"name";a:1:{s:10:"predicates";a:1:{i:0;s:9:"foaf:name";}}s:13:"comment_count";a:2:{s:10:"predicates";a:1:{i:0;s:16:"sioc:num_replies";}s:8:"datatype";s:11:"xsd:integer";}s:13:"last_activity";a:3:{s:10:"predicates";a:1:{i:0;s:23:"sioc:last_activity_date";}s:8:"datatype";s:12:"xsd:dateTime";s:8:"callback";s:12:"date_iso8601";}}', )) ->execute(); - $connection->schema()->createTable('registry', array( 'fields' => array( 'name' => array( @@ -38774,6 +38898,13 @@ $connection->insert('registry') 'module' => 'phone', 'weight' => '0', )) +->values(array( + 'name' => 'CSPhoneNumberTestCase', + 'type' => 'class', + 'filename' => 'sites/all/modules/phone/tests/phone.cs.test', + 'module' => 'phone', + 'weight' => '0', +)) ->values(array( 'name' => 'CtoolsContextKeywordsSubstitutionTestCase', 'type' => 'class', @@ -38879,14 +39010,6 @@ $connection->insert('registry') 'module' => 'ctools', 'weight' => '0', )) -->values(array( - 'name' => 'CSPhoneNumberTestCase', - 'type' => 'class', - 'filename' => 'sites/all/modules/phone/tests/phone.cs.test', - 'module' => 'phone', - 'weight' => '0', -)) - ->values(array( 'name' => 'DashboardBlocksTestCase', 'type' => 'class', @@ -44432,7 +44555,6 @@ $connection->insert('registry') 'weight' => '0', )) ->execute(); - $connection->schema()->createTable('registry_file', array( 'fields' => array( 'filename' => array( @@ -45786,7 +45908,6 @@ $connection->insert('registry_file') 'hash' => 'a52e010d27cc2eb29804a3acd30f574adf11fad1f5860e431178b61cddbdbb69', )) ->execute(); - $connection->schema()->createTable('role', array( 'fields' => array( 'rid' => array( @@ -45836,7 +45957,6 @@ $connection->insert('role') 'weight' => '2', )) ->execute(); - $connection->schema()->createTable('role_permission', array( 'fields' => array( 'rid' => array( @@ -46256,6 +46376,16 @@ $connection->insert('role_permission') 'permission' => 'switch shortcut sets', 'module' => 'shortcut', )) +->values(array( + 'rid' => '3', + 'permission' => 'translate admin strings', + 'module' => 'i18n_string', +)) +->values(array( + 'rid' => '3', + 'permission' => 'translate blocks', + 'module' => 'i18n_block', +)) ->values(array( 'rid' => '3', 'permission' => 'translate content', @@ -46266,6 +46396,11 @@ $connection->insert('role_permission') 'permission' => 'translate interface', 'module' => 'locale', )) +->values(array( + 'rid' => '3', + 'permission' => 'translate user-defined strings', + 'module' => 'i18n_string', +)) ->values(array( 'rid' => '3', 'permission' => 'use advanced search', @@ -46327,7 +46462,6 @@ $connection->insert('role_permission') 'module' => 'system', )) ->execute(); - $connection->schema()->createTable('search_dataset', array( 'fields' => array( 'sid' => array( @@ -46382,7 +46516,6 @@ $connection->insert('search_dataset') 'reindex' => '0', )) ->execute(); - $connection->schema()->createTable('search_index', array( 'fields' => array( 'word' => array( @@ -46708,7 +46841,6 @@ $connection->insert('search_index') 'score' => '1', )) ->execute(); - $connection->schema()->createTable('search_node_links', array( 'fields' => array( 'sid' => array( @@ -46956,7 +47088,6 @@ $connection->insert('search_total') 'count' => '0', )) ->execute(); - $connection->schema()->createTable('semaphore', array( 'fields' => array( 'name' => array( @@ -47007,7 +47138,6 @@ $connection->insert('sequences') 'value' => '2', )) ->execute(); - $connection->schema()->createTable('sessions', array( 'fields' => array( 'uid' => array( @@ -47093,7 +47223,6 @@ $connection->insert('shortcut_set') 'title' => 'Alternative shortcut set', )) ->execute(); - $connection->schema()->createTable('shortcut_set_users', array( 'fields' => array( 'uid' => array( @@ -47126,7 +47255,6 @@ $connection->insert('shortcut_set_users') 'set_name' => 'shortcut-set-2', )) ->execute(); - $connection->schema()->createTable('simpletest', array( 'fields' => array( 'message_id' => array( @@ -48917,11 +49045,11 @@ $connection->insert('system') 'name' => 'i18n_block', 'type' => 'module', 'owner' => '', - 'status' => '0', + 'status' => '1', 'bootstrap' => '0', - 'schema_version' => '-1', - 'weight' => '0', - 'info' => 'a:12:{s:4:"name";s:15:"Block languages";s:11:"description";s:68:"Enables language selector for blocks and optional block translation.";s:12:"dependencies";a:2:{i:0;s:5:"block";i:1;s:11:"i18n_string";}s:7:"package";s:35:"Multilingual - Internationalization";s:4:"core";s:3:"7.x";s:5:"files";a:2:{i:0;s:14:"i18n_block.inc";i:1;s:15:"i18n_block.test";}s:7:"version";s:8:"7.x-1.26";s:7:"project";s:4:"i18n";s:9:"datestamp";s:10:"1534531985";s:5:"mtime";i:1534531985;s:3:"php";s:5:"5.2.4";s:9:"bootstrap";i:0;}', + 'schema_version' => '7001', + 'weight' => '100', + 'info' => 'a:12:{s:4:"name";s:15:"Block languages";s:11:"description";s:68:"Enables language selector for blocks and optional block translation.";s:12:"dependencies";a:2:{i:0;s:5:"block";i:1;s:11:"i18n_string";}s:7:"package";s:35:"Multilingual - Internationalization";s:4:"core";s:3:"7.x";s:5:"files";a:2:{i:0;s:14:"i18n_block.inc";i:1;s:15:"i18n_block.test";}s:7:"version";s:8:"7.x-1.25";s:7:"project";s:4:"i18n";s:9:"datestamp";s:10:"1531342125";s:5:"mtime";i:1537747250;s:3:"php";s:5:"5.2.4";s:9:"bootstrap";i:0;}', )) ->values(array( 'filename' => 'sites/all/modules/i18n/i18n_contact/i18n_contact.module', @@ -49265,7 +49393,6 @@ $connection->insert('system') 'info' => "a:17:{s:4:\"name\";s:5:\"Stark\";s:11:\"description\";s:208:\"This theme demonstrates Drupal's default HTML markup and CSS styles. To learn how to build your own theme and override Drupal's default code, see the Theming Guide.\";s:7:\"package\";s:4:\"Core\";s:7:\"version\";s:4:\"7.40\";s:4:\"core\";s:3:\"7.x\";s:11:\"stylesheets\";a:1:{s:3:\"all\";a:1:{s:10:\"layout.css\";s:23:\"themes/stark/layout.css\";}}s:7:\"project\";s:6:\"drupal\";s:9:\"datestamp\";s:10:\"1444866674\";s:6:\"engine\";s:11:\"phptemplate\";s:7:\"regions\";a:9:{s:13:\"sidebar_first\";s:12:\"Left sidebar\";s:14:\"sidebar_second\";s:13:\"Right sidebar\";s:7:\"content\";s:7:\"Content\";s:6:\"header\";s:6:\"Header\";s:6:\"footer\";s:6:\"Footer\";s:11:\"highlighted\";s:11:\"Highlighted\";s:4:\"help\";s:4:\"Help\";s:8:\"page_top\";s:8:\"Page top\";s:11:\"page_bottom\";s:11:\"Page bottom\";}s:8:\"features\";a:9:{i:0;s:4:\"logo\";i:1;s:7:\"favicon\";i:2;s:4:\"name\";i:3;s:6:\"slogan\";i:4;s:17:\"node_user_picture\";i:5;s:20:\"comment_user_picture\";i:6;s:25:\"comment_user_verification\";i:7;s:9:\"main_menu\";i:8;s:14:\"secondary_menu\";}s:10:\"screenshot\";s:27:\"themes/stark/screenshot.png\";s:3:\"php\";s:5:\"5.2.4\";s:7:\"scripts\";a:0:{}s:5:\"mtime\";i:1444866674;s:14:\"regions_hidden\";a:2:{i:0;s:8:\"page_top\";i:1;s:11:\"page_bottom\";}s:28:\"overlay_supplemental_regions\";a:1:{i:0;s:8:\"page_top\";}}", )) ->execute(); - $connection->schema()->createTable('taxonomy_index', array( 'fields' => array( 'nid' => array( @@ -49378,7 +49505,6 @@ $connection->insert('taxonomy_index') 'created' => '1504715432', )) ->execute(); - $connection->schema()->createTable('taxonomy_term_data', array( 'fields' => array( 'tid' => array( @@ -49577,7 +49703,6 @@ $connection->insert('taxonomy_term_data') 'weight' => '0', )) ->execute(); - $connection->schema()->createTable('taxonomy_term_hierarchy', array( 'fields' => array( 'tid' => array( @@ -49680,7 +49805,6 @@ $connection->insert('taxonomy_term_hierarchy') 'parent' => '6', )) ->execute(); - $connection->schema()->createTable('taxonomy_vocabulary', array( 'fields' => array( 'vid' => array( @@ -49779,7 +49903,6 @@ $connection->insert('taxonomy_vocabulary') 'weight' => '0', )) ->execute(); - $connection->schema()->createTable('tracker_node', array( 'fields' => array( 'nid' => array( @@ -49821,7 +49944,6 @@ $connection->insert('tracker_node') 'changed' => '1421727536', )) ->execute(); - $connection->schema()->createTable('tracker_user', array( 'fields' => array( 'nid' => array( @@ -49872,7 +49994,6 @@ $connection->insert('tracker_user') 'changed' => '1421727536', )) ->execute(); - $connection->schema()->createTable('trigger_assignments', array( 'fields' => array( 'hook' => array( @@ -49913,7 +50034,6 @@ $connection->insert('trigger_assignments') 'weight' => '1', )) ->execute(); - $connection->schema()->createTable('url_alias', array( 'fields' => array( 'pid' => array( @@ -49991,7 +50111,6 @@ $connection->insert('url_alias') 'language' => 'und', )) ->execute(); - $connection->schema()->createTable('users', array( 'fields' => array( 'uid' => array( @@ -50169,7 +50288,6 @@ $connection->insert('users') 'data' => 'a:1:{s:7:"contact";i:1;}', )) ->execute(); - $connection->schema()->createTable('users_roles', array( 'fields' => array( 'uid' => array( @@ -50212,7 +50330,6 @@ $connection->insert('users_roles') 'rid' => '3', )) ->execute(); - $connection->schema()->createTable('variable', array( 'fields' => array( 'name' => array( @@ -50395,12 +50512,12 @@ $connection->insert('variable') 'value' => 'a:9:{s:3:"top";s:7:"#d0d0d0";s:6:"bottom";s:7:"#c2c4c5";s:2:"bg";s:7:"#ffffff";s:7:"sidebar";s:7:"#ffffff";s:14:"sidebarborders";s:7:"#cccccc";s:6:"footer";s:7:"#24272c";s:11:"titleslogan";s:7:"#000000";s:4:"text";s:7:"#4a4a4a";s:4:"link";s:7:"#019dbf";}', )) ->values(array( - 'name' => 'color_bartik_stylesheets', - 'value' => 'a:1:{i:0;s:41:"public://color/bartik-e0e23ad7/colors.css";}', + 'name' => 'color_bartik_screenshot', + 'value' => 's:72:"/var/www/drupal/sites/default/files/color/bartik-b69cfcec/screenshot.png";', )) ->values(array( - 'name' => 'color_bartik_screenshot', - 'value' => 's:72:"/var/www/drupal/sites/default/files/color/bartik-b69cfcec/screenshot.png";' + 'name' => 'color_bartik_stylesheets', + 'value' => 'a:1:{i:0;s:41:"public://color/bartik-e0e23ad7/colors.css";}', )) ->values(array( 'name' => 'color_garland_files', @@ -50408,7 +50525,7 @@ $connection->insert('variable') )) ->values(array( 'name' => 'color_garland_logo', - 'value' => 's:40:"public://color/garland-b69cfcec/logo.png";' + 'value' => 's:40:"public://color/garland-b69cfcec/logo.png";', )) ->values(array( 'name' => 'color_garland_palette', @@ -50416,7 +50533,7 @@ $connection->insert('variable') )) ->values(array( 'name' => 'color_garland_screenshot', - 'value' => 's:73:"/var/www/drupal/sites/default/files/color/garland-b69cfcec/screenshot.png";' + 'value' => 's:73:"/var/www/drupal/sites/default/files/color/garland-b69cfcec/screenshot.png";', )) ->values(array( 'name' => 'color_garland_stylesheets', @@ -50678,6 +50795,10 @@ $connection->insert('variable') 'name' => 'empty_timezone_message', 'value' => 'b:1;', )) +->values(array( + 'name' => 'entityreference:base-tables', + 'value' => 'a:6:{s:7:"comment";a:2:{i:0;s:7:"comment";i:1;s:3:"cid";}s:4:"node";a:2:{i:0;s:4:"node";i:1;s:3:"nid";}s:4:"file";a:2:{i:0;s:12:"file_managed";i:1;s:3:"fid";}s:13:"taxonomy_term";a:2:{i:0;s:18:"taxonomy_term_data";i:1;s:3:"tid";}s:19:"taxonomy_vocabulary";a:2:{i:0;s:19:"taxonomy_vocabulary";i:1;s:3:"vid";}s:4:"user";a:2:{i:0;s:5:"users";i:1;s:3:"uid";}}', +)) ->values(array( 'name' => 'entity_translation_entity_types', 'value' => 'a:4:{s:7:"comment";s:7:"comment";s:4:"node";s:4:"node";s:13:"taxonomy_term";s:13:"taxonomy_term";s:4:"user";s:4:"user";}', @@ -50714,10 +50835,6 @@ $connection->insert('variable') 'name' => 'feed_item_length', 'value' => 's:8:"fulltext";', )) -->values(array( - 'name' => 'entityreference:base-tables', - 'value' => 'a:6:{s:7:"comment";a:2:{i:0;s:7:"comment";i:1;s:3:"cid";}s:4:"node";a:2:{i:0;s:4:"node";i:1;s:3:"nid";}s:4:"file";a:2:{i:0;s:12:"file_managed";i:1;s:3:"fid";}s:13:"taxonomy_term";a:2:{i:0;s:18:"taxonomy_term_data";i:1;s:3:"tid";}s:19:"taxonomy_vocabulary";a:2:{i:0;s:19:"taxonomy_vocabulary";i:1;s:3:"vid";}s:4:"user";a:2:{i:0;s:5:"users";i:1;s:3:"uid";}}', -)) ->values(array( 'name' => 'field_bundle_settings_comment__comment_node_test_content_type', 'value' => 'a:2:{s:10:"view_modes";a:0:{}s:12:"extra_fields";a:2:{s:4:"form";a:2:{s:6:"author";a:1:{s:6:"weight";s:2:"-2";}s:7:"subject";a:1:{s:6:"weight";s:2:"-1";}}s:7:"display";a:0:{}}}', @@ -50794,6 +50911,10 @@ $connection->insert('variable') 'name' => 'forum_per_page', 'value' => 'i:25;', )) +->values(array( + 'name' => 'i18n_node_options_blog', + 'value' => 'a:2:{i:0;s:8:"required";i:1;s:4:"lock";}', +)) ->values(array( 'name' => 'image_jpeg_quality', 'value' => 'i:80;', @@ -50842,10 +50963,6 @@ $connection->insert('variable') 'name' => 'language_content_type_test_content_type', 'value' => 's:1:"4";', )) -->values(array( - 'name' => 'i18n_node_options_blog', - 'value' => 'a:2:{i:0;s:8:"required";i:1;s:4:"lock";}', -)) ->values(array( 'name' => 'language_count', 'value' => 'i:3;', @@ -51206,6 +51323,10 @@ $connection->insert('variable') 'name' => 'teaser_length', 'value' => 'i:1024;', )) +->values(array( + 'name' => 'theme_bartik_settings', + 'value' => 'a:18:{s:11:"toggle_logo";i:1;s:11:"toggle_name";i:1;s:13:"toggle_slogan";i:1;s:24:"toggle_node_user_picture";i:1;s:27:"toggle_comment_user_picture";i:1;s:32:"toggle_comment_user_verification";i:1;s:14:"toggle_favicon";i:1;s:16:"toggle_main_menu";i:1;s:21:"toggle_secondary_menu";i:1;s:12:"default_logo";i:0;s:9:"logo_path";s:16:"public://gnu.png";s:15:"default_favicon";i:1;s:12:"favicon_path";s:0:"";s:14:"favicon_upload";s:0:"";s:6:"scheme";s:7:"default";s:7:"palette";a:9:{s:3:"top";s:7:"#0779bf";s:6:"bottom";s:7:"#48a9e4";s:2:"bg";s:7:"#ffffff";s:7:"sidebar";s:7:"#f6f6f2";s:14:"sidebarborders";s:7:"#f9f9f9";s:6:"footer";s:7:"#292929";s:11:"titleslogan";s:7:"#fffeff";s:4:"text";s:7:"#3b3b3b";s:4:"link";s:7:"#0071B3";}s:5:"theme";s:6:"bartik";s:4:"info";a:12:{s:6:"fields";a:9:{s:3:"top";s:10:"Header top";s:6:"bottom";s:13:"Header bottom";s:2:"bg";s:15:"Main background";s:7:"sidebar";s:18:"Sidebar background";s:14:"sidebarborders";s:15:"Sidebar borders";s:6:"footer";s:17:"Footer background";s:11:"titleslogan";s:16:"Title and slogan";s:4:"text";s:10:"Text color";s:4:"link";s:10:"Link color";}s:7:"schemes";a:6:{s:7:"default";a:2:{s:5:"title";s:21:"Blue Lagoon (default)";s:6:"colors";a:9:{s:3:"top";s:7:"#0779bf";s:6:"bottom";s:7:"#48a9e4";s:2:"bg";s:7:"#ffffff";s:7:"sidebar";s:7:"#f6f6f2";s:14:"sidebarborders";s:7:"#f9f9f9";s:6:"footer";s:7:"#292929";s:11:"titleslogan";s:7:"#fffeff";s:4:"text";s:7:"#3b3b3b";s:4:"link";s:7:"#0071B3";}}s:9:"firehouse";a:2:{s:5:"title";s:9:"Firehouse";s:6:"colors";a:9:{s:3:"top";s:7:"#cd2d2d";s:6:"bottom";s:7:"#cf3535";s:2:"bg";s:7:"#ffffff";s:7:"sidebar";s:7:"#f1f4f0";s:14:"sidebarborders";s:7:"#ededed";s:6:"footer";s:7:"#1f1d1c";s:11:"titleslogan";s:7:"#fffeff";s:4:"text";s:7:"#3b3b3b";s:4:"link";s:7:"#d6121f";}}s:3:"ice";a:2:{s:5:"title";s:3:"Ice";s:6:"colors";a:9:{s:3:"top";s:7:"#d0d0d0";s:6:"bottom";s:7:"#c2c4c5";s:2:"bg";s:7:"#ffffff";s:7:"sidebar";s:7:"#ffffff";s:14:"sidebarborders";s:7:"#cccccc";s:6:"footer";s:7:"#24272c";s:11:"titleslogan";s:7:"#000000";s:4:"text";s:7:"#4a4a4a";s:4:"link";s:7:"#019dbf";}}s:4:"plum";a:2:{s:5:"title";s:4:"Plum";s:6:"colors";a:9:{s:3:"top";s:7:"#4c1c58";s:6:"bottom";s:7:"#593662";s:2:"bg";s:7:"#fffdf7";s:7:"sidebar";s:7:"#edede7";s:14:"sidebarborders";s:7:"#e7e7e7";s:6:"footer";s:7:"#2c2c28";s:11:"titleslogan";s:7:"#ffffff";s:4:"text";s:7:"#301313";s:4:"link";s:7:"#9d408d";}}s:5:"slate";a:2:{s:5:"title";s:5:"Slate";s:6:"colors";a:9:{s:3:"top";s:7:"#4a4a4a";s:6:"bottom";s:7:"#4e4e4e";s:2:"bg";s:7:"#ffffff";s:7:"sidebar";s:7:"#ffffff";s:14:"sidebarborders";s:7:"#d0d0d0";s:6:"footer";s:7:"#161617";s:11:"titleslogan";s:7:"#ffffff";s:4:"text";s:7:"#3b3b3b";s:4:"link";s:7:"#0073b6";}}s:0:"";a:2:{s:5:"title";s:6:"Custom";s:6:"colors";a:0:{}}}s:3:"css";a:1:{i:0;s:14:"css/colors.css";}s:4:"copy";a:1:{i:0;s:8:"logo.png";}s:9:"gradients";a:1:{i:0;a:3:{s:9:"dimension";a:4:{i:0;i:0;i:1;i:0;i:2;i:0;i:3;i:0;}s:9:"direction";s:8:"vertical";s:6:"colors";a:2:{i:0;s:3:"top";i:1;s:6:"bottom";}}}s:4:"fill";a:0:{}s:6:"slices";a:0:{}s:12:"blend_target";s:7:"#ffffff";s:11:"preview_css";s:17:"color/preview.css";s:10:"preview_js";s:16:"color/preview.js";s:12:"preview_html";s:18:"color/preview.html";s:10:"base_image";s:14:"color/base.png";}}', +)) ->values(array( 'name' => 'theme_default', 'value' => 's:6:"bartik";', @@ -51214,10 +51335,6 @@ $connection->insert('variable') 'name' => 'theme_settings', 'value' => 'a:16:{s:11:"toggle_logo";i:0;s:11:"toggle_name";i:1;s:13:"toggle_slogan";i:0;s:24:"toggle_node_user_picture";i:0;s:27:"toggle_comment_user_picture";i:0;s:32:"toggle_comment_user_verification";i:0;s:14:"toggle_favicon";i:0;s:16:"toggle_main_menu";i:0;s:21:"toggle_secondary_menu";i:0;s:12:"default_logo";i:1;s:9:"logo_path";s:23:"public://customlogo.png";s:11:"logo_upload";s:0:"";s:15:"default_favicon";i:0;s:12:"favicon_path";s:24:"public://somefavicon.png";s:14:"favicon_upload";s:0:"";s:16:"favicon_mimetype";s:9:"image/png";}', )) -->values(array( - 'name' => 'theme_bartik_settings', - 'value' => 'a:18:{s:11:"toggle_logo";i:1;s:11:"toggle_name";i:1;s:13:"toggle_slogan";i:1;s:24:"toggle_node_user_picture";i:1;s:27:"toggle_comment_user_picture";i:1;s:32:"toggle_comment_user_verification";i:1;s:14:"toggle_favicon";i:1;s:16:"toggle_main_menu";i:1;s:21:"toggle_secondary_menu";i:1;s:12:"default_logo";i:0;s:9:"logo_path";s:16:"public://gnu.png";s:15:"default_favicon";i:1;s:12:"favicon_path";s:0:"";s:14:"favicon_upload";s:0:"";s:6:"scheme";s:7:"default";s:7:"palette";a:9:{s:3:"top";s:7:"#0779bf";s:6:"bottom";s:7:"#48a9e4";s:2:"bg";s:7:"#ffffff";s:7:"sidebar";s:7:"#f6f6f2";s:14:"sidebarborders";s:7:"#f9f9f9";s:6:"footer";s:7:"#292929";s:11:"titleslogan";s:7:"#fffeff";s:4:"text";s:7:"#3b3b3b";s:4:"link";s:7:"#0071B3";}s:5:"theme";s:6:"bartik";s:4:"info";a:12:{s:6:"fields";a:9:{s:3:"top";s:10:"Header top";s:6:"bottom";s:13:"Header bottom";s:2:"bg";s:15:"Main background";s:7:"sidebar";s:18:"Sidebar background";s:14:"sidebarborders";s:15:"Sidebar borders";s:6:"footer";s:17:"Footer background";s:11:"titleslogan";s:16:"Title and slogan";s:4:"text";s:10:"Text color";s:4:"link";s:10:"Link color";}s:7:"schemes";a:6:{s:7:"default";a:2:{s:5:"title";s:21:"Blue Lagoon (default)";s:6:"colors";a:9:{s:3:"top";s:7:"#0779bf";s:6:"bottom";s:7:"#48a9e4";s:2:"bg";s:7:"#ffffff";s:7:"sidebar";s:7:"#f6f6f2";s:14:"sidebarborders";s:7:"#f9f9f9";s:6:"footer";s:7:"#292929";s:11:"titleslogan";s:7:"#fffeff";s:4:"text";s:7:"#3b3b3b";s:4:"link";s:7:"#0071B3";}}s:9:"firehouse";a:2:{s:5:"title";s:9:"Firehouse";s:6:"colors";a:9:{s:3:"top";s:7:"#cd2d2d";s:6:"bottom";s:7:"#cf3535";s:2:"bg";s:7:"#ffffff";s:7:"sidebar";s:7:"#f1f4f0";s:14:"sidebarborders";s:7:"#ededed";s:6:"footer";s:7:"#1f1d1c";s:11:"titleslogan";s:7:"#fffeff";s:4:"text";s:7:"#3b3b3b";s:4:"link";s:7:"#d6121f";}}s:3:"ice";a:2:{s:5:"title";s:3:"Ice";s:6:"colors";a:9:{s:3:"top";s:7:"#d0d0d0";s:6:"bottom";s:7:"#c2c4c5";s:2:"bg";s:7:"#ffffff";s:7:"sidebar";s:7:"#ffffff";s:14:"sidebarborders";s:7:"#cccccc";s:6:"footer";s:7:"#24272c";s:11:"titleslogan";s:7:"#000000";s:4:"text";s:7:"#4a4a4a";s:4:"link";s:7:"#019dbf";}}s:4:"plum";a:2:{s:5:"title";s:4:"Plum";s:6:"colors";a:9:{s:3:"top";s:7:"#4c1c58";s:6:"bottom";s:7:"#593662";s:2:"bg";s:7:"#fffdf7";s:7:"sidebar";s:7:"#edede7";s:14:"sidebarborders";s:7:"#e7e7e7";s:6:"footer";s:7:"#2c2c28";s:11:"titleslogan";s:7:"#ffffff";s:4:"text";s:7:"#301313";s:4:"link";s:7:"#9d408d";}}s:5:"slate";a:2:{s:5:"title";s:5:"Slate";s:6:"colors";a:9:{s:3:"top";s:7:"#4a4a4a";s:6:"bottom";s:7:"#4e4e4e";s:2:"bg";s:7:"#ffffff";s:7:"sidebar";s:7:"#ffffff";s:14:"sidebarborders";s:7:"#d0d0d0";s:6:"footer";s:7:"#161617";s:11:"titleslogan";s:7:"#ffffff";s:4:"text";s:7:"#3b3b3b";s:4:"link";s:7:"#0073b6";}}s:0:"";a:2:{s:5:"title";s:6:"Custom";s:6:"colors";a:0:{}}}s:3:"css";a:1:{i:0;s:14:"css/colors.css";}s:4:"copy";a:1:{i:0;s:8:"logo.png";}s:9:"gradients";a:1:{i:0;a:3:{s:9:"dimension";a:4:{i:0;i:0;i:1;i:0;i:2;i:0;i:3;i:0;}s:9:"direction";s:8:"vertical";s:6:"colors";a:2:{i:0;s:3:"top";i:1;s:6:"bottom";}}}s:4:"fill";a:0:{}s:6:"slices";a:0:{}s:12:"blend_target";s:7:"#ffffff";s:11:"preview_css";s:17:"color/preview.css";s:10:"preview_js";s:16:"color/preview.js";s:12:"preview_html";s:18:"color/preview.html";s:10:"base_image";s:14:"color/base.png";}}', -)) ->values(array( 'name' => 'theme_seven_settings', 'value' => 'a:15:{s:11:"toggle_logo";i:1;s:11:"toggle_name";i:1;s:13:"toggle_slogan";i:1;s:24:"toggle_node_user_picture";i:1;s:27:"toggle_comment_user_picture";i:0;s:32:"toggle_comment_user_verification";i:1;s:14:"toggle_favicon";i:1;s:16:"toggle_main_menu";i:1;s:21:"toggle_secondary_menu";i:0;s:12:"default_logo";i:1;s:9:"logo_path";s:0:"";s:11:"logo_upload";s:0:"";s:15:"default_favicon";i:1;s:12:"favicon_path";s:0:"";s:14:"favicon_upload";s:0:"";}', @@ -51407,7 +51524,6 @@ $connection->insert('variable') 'value' => 'a:3:{i:0;s:9:"site_name";i:1;s:11:"site_slogan";i:2;s:24:"maintenance_mode_message";}', )) ->execute(); - $connection->schema()->createTable('variable_store', array( 'fields' => array( 'realm' => array( @@ -51462,6 +51578,13 @@ $connection->insert('variable_store') 'value', 'serialized', )) +->values(array( + 'realm' => 'language', + 'realm_key' => 'is', + 'name' => 'anonymous', + 'value' => 'is - anonymous', + 'serialized' => '0', +)) ->values(array( 'realm' => 'language', 'realm_key' => 'is', @@ -51469,6 +51592,13 @@ $connection->insert('variable_store') 'value' => 'is - This is a custom maintenance mode message.', 'serialized' => '0', )) +->values(array( + 'realm' => 'language', + 'realm_key' => 'fr', + 'name' => 'site_403', + 'value' => 'node', + 'serialized' => '0', +)) ->values(array( 'realm' => 'language', 'realm_key' => 'is', @@ -51476,6 +51606,13 @@ $connection->insert('variable_store') 'value' => 'node/1', 'serialized' => '0', )) +->values(array( + 'realm' => 'language', + 'realm_key' => 'fr', + 'name' => 'site_404', + 'value' => 'node', + 'serialized' => '0', +)) ->values(array( 'realm' => 'language', 'realm_key' => 'is', @@ -51483,6 +51620,13 @@ $connection->insert('variable_store') 'value' => 'node/6', 'serialized' => '0', )) +->values(array( + 'realm' => 'language', + 'realm_key' => 'fr', + 'name' => 'site_frontpage', + 'value' => 'node', + 'serialized' => '0', +)) ->values(array( 'realm' => 'language', 'realm_key' => 'is', @@ -51490,41 +51634,6 @@ $connection->insert('variable_store') 'value' => 'node/4', 'serialized' => '0', )) -->values(array( - 'realm' => 'language', - 'realm_key' => 'is', - 'name' => 'site_name', - 'value' => 'is - The Site Name', - 'serialized' => '0', -)) -->values(array( - 'realm' => 'language', - 'realm_key' => 'is', - 'name' => 'site_slogan', - 'value' => 'is - The Slogan', - 'serialized' => '0', -)) - ->values(array( - 'realm' => 'language', - 'realm_key' => 'fr', - 'name' => 'site_403', - 'value' => 'node', - 'serialized' => '0', -)) -->values(array( - 'realm' => 'language', - 'realm_key' => 'fr', - 'name' => 'site_404', - 'value' => 'node', - 'serialized' => '0', -)) -->values(array( - 'realm' => 'language', - 'realm_key' => 'fr', - 'name' => 'site_frontpage', - 'value' => 'node', - 'serialized' => '0', -)) ->values(array( 'realm' => 'language', 'realm_key' => 'fr', @@ -51532,6 +51641,13 @@ $connection->insert('variable_store') 'value' => 'The Site Name', 'serialized' => '0', )) +->values(array( + 'realm' => 'language', + 'realm_key' => 'is', + 'name' => 'site_name', + 'value' => 'is - The Site Name', + 'serialized' => '0', +)) ->values(array( 'realm' => 'language', 'realm_key' => 'fr', @@ -51539,6 +51655,13 @@ $connection->insert('variable_store') 'value' => 'fr - The Slogan', 'serialized' => '0', )) +->values(array( + 'realm' => 'language', + 'realm_key' => 'is', + 'name' => 'site_slogan', + 'value' => 'is - The Slogan', + 'serialized' => '0', +)) ->values(array( 'realm' => 'language', 'realm_key' => 'en', @@ -51665,15 +51788,7 @@ $connection->insert('variable_store') 'value' => 'is - So long, bub', 'serialized' => '0', )) -->values(array( - 'realm' => 'language', - 'realm_key' => 'is', - 'name' => 'anonymous', - 'value' => 'is - anonymous', - 'serialized' => '0', -)) ->execute(); - $connection->schema()->createTable('watchdog', array( 'fields' => array( 'wid' => array( diff --git a/web/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/ContentEntityTest.php b/web/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/ContentEntityTest.php index 33e0197e2..cf5d3da4f 100644 --- a/web/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/ContentEntityTest.php +++ b/web/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/ContentEntityTest.php @@ -371,7 +371,7 @@ class ContentEntityTest extends KernelTestBase { $values = $media_source->current()->getSource(); $this->assertEquals(1, $values['mid']); $this->assertEquals('Foo media', $values['name'][0]['value']); - $this->assertEquals('Foo media', $values['thumbnail'][0]['title']); + $this->assertNull($values['thumbnail'][0]['title']); $this->assertEquals(1, $values['uid'][0]['target_id']); $this->assertEquals('image', $values['bundle'][0]['target_id']); } diff --git a/web/core/modules/migrate_drupal/tests/src/Unit/source/DrupalSqlBaseTest.php b/web/core/modules/migrate_drupal/tests/src/Unit/source/DrupalSqlBaseTest.php index ebd9334a2..fdaf4b10a 100644 --- a/web/core/modules/migrate_drupal/tests/src/Unit/source/DrupalSqlBaseTest.php +++ b/web/core/modules/migrate_drupal/tests/src/Unit/source/DrupalSqlBaseTest.php @@ -63,6 +63,22 @@ class DrupalSqlBaseTest extends MigrateTestCase { } } + /** + * @covers ::checkRequirements + */ + public function testSourceDatabaseError() { + $plugin_definition['requirements_met'] = TRUE; + $plugin_definition['source_module'] = 'module1'; + /** @var \Drupal\Core\State\StateInterface $state */ + $state = $this->getMock('Drupal\Core\State\StateInterface'); + /** @var \Drupal\Core\Entity\EntityManagerInterface $entity_manager */ + $entity_manager = $this->getMock('Drupal\Core\Entity\EntityManagerInterface'); + $plugin = new TestDrupalSqlBase([], 'test', $plugin_definition, $this->getMigration(), $state, $entity_manager); + $system_data = $plugin->getSystemData(); + $this->setExpectedException(RequirementsException::class, 'No database connection configured for source plugin test'); + $plugin->checkRequirements(); + } + } namespace Drupal\Tests\migrate_drupal\Unit\source; diff --git a/web/core/modules/migrate_drupal_ui/tests/src/Functional/d6/MigrateUpgrade6Test.php b/web/core/modules/migrate_drupal_ui/tests/src/Functional/d6/MigrateUpgrade6Test.php index 54ea5747a..b37b45b63 100644 --- a/web/core/modules/migrate_drupal_ui/tests/src/Functional/d6/MigrateUpgrade6Test.php +++ b/web/core/modules/migrate_drupal_ui/tests/src/Functional/d6/MigrateUpgrade6Test.php @@ -84,7 +84,7 @@ class MigrateUpgrade6Test extends MigrateUpgradeExecuteTestBase { 'shortcut_set' => 1, 'action' => 23, 'menu' => 8, - 'taxonomy_term' => 8, + 'taxonomy_term' => 15, 'taxonomy_vocabulary' => 7, 'tour' => 5, 'user' => 7, @@ -112,7 +112,7 @@ class MigrateUpgrade6Test extends MigrateUpgradeExecuteTestBase { $counts['file'] = 8; $counts['menu_link_content'] = 11; $counts['node'] = 19; - $counts['taxonomy_term'] = 9; + $counts['taxonomy_term'] = 16; $counts['user'] = 8; $counts['view'] = 16; return $counts; diff --git a/web/core/modules/migrate_drupal_ui/tests/src/Functional/d7/MigrateUpgrade7ReviewPageTest.php b/web/core/modules/migrate_drupal_ui/tests/src/Functional/d7/MigrateUpgrade7ReviewPageTest.php index 66b24c852..9e68d9dba 100644 --- a/web/core/modules/migrate_drupal_ui/tests/src/Functional/d7/MigrateUpgrade7ReviewPageTest.php +++ b/web/core/modules/migrate_drupal_ui/tests/src/Functional/d7/MigrateUpgrade7ReviewPageTest.php @@ -65,6 +65,7 @@ class MigrateUpgrade7ReviewPageTest extends MigrateUpgradeReviewPageTestBase { 'filter', 'forum', 'image', + 'i18n_block', 'language', 'link', 'list', @@ -141,7 +142,6 @@ class MigrateUpgrade7ReviewPageTest extends MigrateUpgradeReviewPageTestBase { 'entity_translation_i18n_menu', 'entity_translation_upgrade', 'i18n', - 'i18n_block', 'i18n_contact', 'i18n_field', 'i18n_forum', diff --git a/web/core/modules/node/node.api.php b/web/core/modules/node/node.api.php index e18cf66df..a5f4e9e36 100644 --- a/web/core/modules/node/node.api.php +++ b/web/core/modules/node/node.api.php @@ -338,19 +338,19 @@ function hook_node_access(\Drupal\node\NodeInterface $node, $op, \Drupal\Core\Se return AccessResult::allowedIfHasPermission($account, 'create ' . $type . ' content'); case 'update': - if ($account->hasPermission('edit any ' . $type . ' content', $account)) { + if ($account->hasPermission('edit any ' . $type . ' content')) { return AccessResult::allowed()->cachePerPermissions(); } else { - return AccessResult::allowedIf($account->hasPermission('edit own ' . $type . ' content', $account) && ($account->id() == $node->getOwnerId()))->cachePerPermissions()->cachePerUser()->addCacheableDependency($node); + return AccessResult::allowedIf($account->hasPermission('edit own ' . $type . ' content') && ($account->id() == $node->getOwnerId()))->cachePerPermissions()->cachePerUser()->addCacheableDependency($node); } case 'delete': - if ($account->hasPermission('delete any ' . $type . ' content', $account)) { + if ($account->hasPermission('delete any ' . $type . ' content')) { return AccessResult::allowed()->cachePerPermissions(); } else { - return AccessResult::allowedIf($account->hasPermission('delete own ' . $type . ' content', $account) && ($account->id() == $node->getOwnerId()))->cachePerPermissions()->cachePerUser()->addCacheableDependency($node); + return AccessResult::allowedIf($account->hasPermission('delete own ' . $type . ' content') && ($account->id() == $node->getOwnerId()))->cachePerPermissions()->cachePerUser()->addCacheableDependency($node); } default: diff --git a/web/core/modules/node/node.module b/web/core/modules/node/node.module index d9489f68b..b2df3783a 100644 --- a/web/core/modules/node/node.module +++ b/web/core/modules/node/node.module @@ -944,19 +944,19 @@ function node_node_access(NodeInterface $node, $op, $account) { return AccessResult::allowedIfHasPermission($account, 'create ' . $type . ' content'); case 'update': - if ($account->hasPermission('edit any ' . $type . ' content', $account)) { + if ($account->hasPermission('edit any ' . $type . ' content')) { return AccessResult::allowed()->cachePerPermissions(); } else { - return AccessResult::allowedIf($account->hasPermission('edit own ' . $type . ' content', $account) && ($account->id() == $node->getOwnerId()))->cachePerPermissions()->cachePerUser()->addCacheableDependency($node); + return AccessResult::allowedIf($account->hasPermission('edit own ' . $type . ' content') && ($account->id() == $node->getOwnerId()))->cachePerPermissions()->cachePerUser()->addCacheableDependency($node); } case 'delete': - if ($account->hasPermission('delete any ' . $type . ' content', $account)) { + if ($account->hasPermission('delete any ' . $type . ' content')) { return AccessResult::allowed()->cachePerPermissions(); } else { - return AccessResult::allowedIf($account->hasPermission('delete own ' . $type . ' content', $account) && ($account->id() == $node->getOwnerId()))->cachePerPermissions()->cachePerUser()->addCacheableDependency($node); + return AccessResult::allowedIf($account->hasPermission('delete own ' . $type . ' content') && ($account->id() == $node->getOwnerId()))->cachePerPermissions()->cachePerUser()->addCacheableDependency($node); } default: diff --git a/web/core/modules/node/node.post_update.php b/web/core/modules/node/node.post_update.php index 43e3cd6ac..913137757 100644 --- a/web/core/modules/node/node.post_update.php +++ b/web/core/modules/node/node.post_update.php @@ -27,3 +27,10 @@ function node_post_update_configure_status_field_widget() { ])->save(); } } + +/** + * Clear caches due to updated views data. + */ +function node_post_update_node_revision_views_data() { + // Empty post-update hook. +} diff --git a/web/core/modules/node/src/NodeViewsData.php b/web/core/modules/node/src/NodeViewsData.php index 2e095648c..35ef2978e 100644 --- a/web/core/modules/node/src/NodeViewsData.php +++ b/web/core/modules/node/src/NodeViewsData.php @@ -216,6 +216,10 @@ class NodeViewsData extends EntityViewsData { $data['node_field_revision']['nid']['relationship']['base field'] = 'nid'; $data['node_field_revision']['nid']['relationship']['title'] = $this->t('Content'); $data['node_field_revision']['nid']['relationship']['label'] = $this->t('Get the actual content from a content revision.'); + $data['node_field_revision']['nid']['relationship']['extra'][] = [ + 'field' => 'langcode', + 'left_field' => 'langcode', + ]; $data['node_field_revision']['vid'] = [ 'argument' => [ @@ -228,6 +232,12 @@ class NodeViewsData extends EntityViewsData { 'base field' => 'vid', 'title' => $this->t('Content'), 'label' => $this->t('Get the actual content from a content revision.'), + 'extra' => [ + [ + 'field' => 'langcode', + 'left_field' => 'langcode', + ], + ], ], ] + $data['node_field_revision']['vid']; diff --git a/web/core/modules/node/src/Plugin/migrate/source/d7/NodeType.php b/web/core/modules/node/src/Plugin/migrate/source/d7/NodeType.php index 44f0b5e06..e64b98908 100644 --- a/web/core/modules/node/src/Plugin/migrate/source/d7/NodeType.php +++ b/web/core/modules/node/src/Plugin/migrate/source/d7/NodeType.php @@ -40,7 +40,7 @@ class NodeType extends DrupalSqlBase { * {@inheritdoc} */ public function fields() { - return [ + $fields = [ 'type' => $this->t('Machine name of the node type.'), 'name' => $this->t('Human name of the node type.'), 'description' => $this->t('Description of the node type.'), diff --git a/web/core/modules/node/tests/modules/node_access_test/node_access_test.module b/web/core/modules/node/tests/modules/node_access_test/node_access_test.module index 5a9756b51..9fca50c4e 100644 --- a/web/core/modules/node/tests/modules/node_access_test/node_access_test.module +++ b/web/core/modules/node/tests/modules/node_access_test/node_access_test.module @@ -52,7 +52,7 @@ use Drupal\node\NodeInterface; function node_access_test_node_grants($account, $op) { $grants = []; $grants['node_access_test_author'] = [$account->id()]; - if ($op == 'view' && $account->hasPermission('node test view', $account)) { + if ($op == 'view' && $account->hasPermission('node test view')) { $grants['node_access_test'] = [8888, 8889]; } diff --git a/web/core/modules/node/tests/modules/node_test_views/test_views/views.view.test_node_revision_nid.yml b/web/core/modules/node/tests/modules/node_test_views/test_views/views.view.test_node_revision_nid.yml index 179e1401c..8c5d4cb4b 100644 --- a/web/core/modules/node/tests/modules/node_test_views/test_views/views.view.test_node_revision_nid.yml +++ b/web/core/modules/node/tests/modules/node_test_views/test_views/views.view.test_node_revision_nid.yml @@ -44,6 +44,13 @@ display: plugin_id: field entity_type: node entity_field: nid + langcode: + id: langcode + table: node_field_revision + field: langcode + plugin_id: field + entity_type: node + entity_field: langcode arguments: nid: id: nid @@ -61,6 +68,21 @@ display: plugin_id: field entity_type: node entity_field: vid + langcode: + id: langcode + table: node_field_revision + field: langcode + relationship: none + group_type: group + admin_label: '' + order: DESC + exposed: false + expose: + label: '' + entity_type: node + entity_field: langcode + plugin_id: standard + display_extenders: { } display_plugin: default display_title: Master id: default diff --git a/web/core/modules/node/tests/modules/node_test_views/test_views/views.view.test_node_revision_vid.yml b/web/core/modules/node/tests/modules/node_test_views/test_views/views.view.test_node_revision_vid.yml index a2783a56d..3c9aac56f 100644 --- a/web/core/modules/node/tests/modules/node_test_views/test_views/views.view.test_node_revision_vid.yml +++ b/web/core/modules/node/tests/modules/node_test_views/test_views/views.view.test_node_revision_vid.yml @@ -44,6 +44,13 @@ display: plugin_id: field entity_type: node entity_field: nid + langcode: + id: langcode + table: node_field_revision + field: langcode + entity_type: node + entity_field: langcode + plugin_id: field arguments: nid: id: nid @@ -52,6 +59,22 @@ display: plugin_id: node_nid entity_type: node entity_field: nid + display_extenders: { } + sorts: + langcode: + id: langcode + table: node_field_revision + field: langcode + relationship: none + group_type: group + admin_label: '' + order: ASC + exposed: false + expose: + label: '' + entity_type: node + entity_field: langcode + plugin_id: standard display_plugin: default display_title: Master id: default diff --git a/web/core/modules/node/tests/src/Functional/NodeRevisionPermissionsTest.php b/web/core/modules/node/tests/src/Functional/NodeRevisionPermissionsTest.php index ed632a7e9..d0aa88efb 100644 --- a/web/core/modules/node/tests/src/Functional/NodeRevisionPermissionsTest.php +++ b/web/core/modules/node/tests/src/Functional/NodeRevisionPermissionsTest.php @@ -153,7 +153,7 @@ class NodeRevisionPermissionsTest extends NodeTestBase { foreach ($permutations as $case) { // Skip this test if there are no revisions for the node. if (!($revision->isDefaultRevision() && (db_query('SELECT COUNT(vid) FROM {node_field_revision} WHERE nid = :nid', [':nid' => $revision->id()])->fetchField() == 1 || $case['op'] == 'update' || $case['op'] == 'delete'))) { - if (!empty($case['account']->is_admin) || $case['account']->hasPermission($this->typeMap[$case['op']], $case['account'])) { + if (!empty($case['account']->is_admin) || $case['account']->hasPermission($this->typeMap[$case['op']])) { $this->assertTrue($node_revision_access->checkAccess($revision, $case['account'], $case['op']), "{$this->typeMap[$case['op']]} granted."); } else { diff --git a/web/core/modules/node/tests/src/Kernel/Views/RevisionRelationshipsTest.php b/web/core/modules/node/tests/src/Kernel/Views/RevisionRelationshipsTest.php index e47bdd038..b21610c5f 100644 --- a/web/core/modules/node/tests/src/Kernel/Views/RevisionRelationshipsTest.php +++ b/web/core/modules/node/tests/src/Kernel/Views/RevisionRelationshipsTest.php @@ -2,6 +2,7 @@ namespace Drupal\Tests\node\Kernel\Views; +use Drupal\language\Entity\ConfigurableLanguage; use Drupal\node\Entity\Node; use Drupal\node\Entity\NodeType; use Drupal\Tests\views\Kernel\ViewsKernelTestBase; @@ -20,7 +21,12 @@ class RevisionRelationshipsTest extends ViewsKernelTestBase { * * @var array */ - public static $modules = ['node' , 'node_test_views']; + public static $modules = [ + 'node', + 'node_test_views', + 'language', + 'content_translation', + ]; /** * {@inheritdoc} @@ -33,6 +39,8 @@ class RevisionRelationshipsTest extends ViewsKernelTestBase { $this->installEntitySchema('user'); $this->installEntitySchema('node'); + ConfigurableLanguage::createFromLangcode('fr')->save(); + ViewTestData::createTestViews(get_class($this), ['node_test_views']); } @@ -51,16 +59,22 @@ class RevisionRelationshipsTest extends ViewsKernelTestBase { $type->save(); $node = Node::create(['type' => 'page', 'title' => 'test', 'uid' => 1]); $node->save(); + + // Add a translation. + $translation = $node->addTranslation('fr', $node->toArray()); + $translation->save(); // Create revision of the node. $node->setNewRevision(TRUE); $node->save(); + $column_map = [ 'vid' => 'vid', 'node_field_data_node_field_revision_nid' => 'node_node_revision_nid', 'nid_1' => 'nid_1', + 'node_field_revision_langcode' => 'node_field_revision_langcode', ]; - // Here should be two rows. + // Here should be two rows for each translation. $view_nid = Views::getView('test_node_revision_nid'); $this->executeView($view_nid, [$node->id()]); $resultset_nid = [ @@ -68,17 +82,32 @@ class RevisionRelationshipsTest extends ViewsKernelTestBase { 'vid' => '1', 'node_node_revision_nid' => '1', 'nid_1' => '1', + 'node_field_revision_langcode' => 'fr', + ], + [ + 'vid' => '1', + 'node_node_revision_nid' => '1', + 'nid_1' => '1', + 'node_field_revision_langcode' => 'en', ], [ 'vid' => '2', 'node_revision_nid' => '1', 'node_node_revision_nid' => '1', 'nid_1' => '1', + 'node_field_revision_langcode' => 'fr', + ], + [ + 'vid' => '2', + 'node_revision_nid' => '1', + 'node_node_revision_nid' => '1', + 'nid_1' => '1', + 'node_field_revision_langcode' => 'en', ], ]; $this->assertIdenticalResultset($view_nid, $resultset_nid, $column_map); - // There should be only one row with active revision 2. + // There should be one row with active revision 2 for each translation. $view_vid = Views::getView('test_node_revision_vid'); $this->executeView($view_vid, [$node->id()]); $resultset_vid = [ @@ -86,6 +115,13 @@ class RevisionRelationshipsTest extends ViewsKernelTestBase { 'vid' => '2', 'node_node_revision_nid' => '1', 'nid_1' => '1', + 'node_field_revision_langcode' => 'en', + ], + [ + 'vid' => '2', + 'node_node_revision_nid' => '1', + 'nid_1' => '1', + 'node_field_revision_langcode' => 'fr', ], ]; $this->assertIdenticalResultset($view_vid, $resultset_vid, $column_map); diff --git a/web/core/modules/path/src/Plugin/Field/FieldType/PathFieldItemList.php b/web/core/modules/path/src/Plugin/Field/FieldType/PathFieldItemList.php index 41cc99441..1985499de 100644 --- a/web/core/modules/path/src/Plugin/Field/FieldType/PathFieldItemList.php +++ b/web/core/modules/path/src/Plugin/Field/FieldType/PathFieldItemList.php @@ -4,6 +4,7 @@ namespace Drupal\path\Plugin\Field\FieldType; use Drupal\Core\Access\AccessResult; use Drupal\Core\Field\FieldItemList; +use Drupal\Core\Language\LanguageInterface; use Drupal\Core\Session\AccountInterface; use Drupal\Core\TypedData\ComputedItemListTrait; @@ -26,12 +27,18 @@ class PathFieldItemList extends FieldItemList { $entity = $this->getEntity(); if (!$entity->isNew()) { - // @todo Support loading language neutral aliases in - // https://www.drupal.org/node/2511968. - $alias = \Drupal::service('path.alias_storage')->load([ + $conditions = [ 'source' => '/' . $entity->toUrl()->getInternalPath(), 'langcode' => $this->getLangcode(), - ]); + ]; + $alias = \Drupal::service('path.alias_storage')->load($conditions); + if ($alias === FALSE) { + // Fall back to non-specific language. + if ($this->getLangcode() !== LanguageInterface::LANGCODE_NOT_SPECIFIED) { + $conditions['langcode'] = LanguageInterface::LANGCODE_NOT_SPECIFIED; + $alias = \Drupal::service('path.alias_storage')->load($conditions); + } + } if ($alias) { $value = $alias; diff --git a/web/core/modules/path/src/Plugin/Field/FieldType/PathItem.php b/web/core/modules/path/src/Plugin/Field/FieldType/PathItem.php index cd62bea66..fc263ce60 100644 --- a/web/core/modules/path/src/Plugin/Field/FieldType/PathItem.php +++ b/web/core/modules/path/src/Plugin/Field/FieldType/PathItem.php @@ -63,10 +63,15 @@ class PathItem extends FieldItemBase { * {@inheritdoc} */ public function postSave($update) { + // If specified, rely on the langcode property for the language, so that the + // existing language of an alias can be kept. That could for example be + // unspecified even if the field/entity has a specific langcode. + $alias_langcode = ($this->langcode && $this->pid) ? $this->langcode : $this->getLangcode(); + if (!$update) { if ($this->alias) { $entity = $this->getEntity(); - if ($path = \Drupal::service('path.alias_storage')->save('/' . $entity->urlInfo()->getInternalPath(), $this->alias, $this->getLangcode())) { + if ($path = \Drupal::service('path.alias_storage')->save('/' . $entity->urlInfo()->getInternalPath(), $this->alias, $alias_langcode)) { $this->pid = $path['pid']; } } @@ -79,7 +84,7 @@ class PathItem extends FieldItemBase { // Only save a non-empty alias. elseif ($this->alias) { $entity = $this->getEntity(); - \Drupal::service('path.alias_storage')->save('/' . $entity->urlInfo()->getInternalPath(), $this->alias, $this->getLangcode(), $this->pid); + \Drupal::service('path.alias_storage')->save('/' . $entity->urlInfo()->getInternalPath(), $this->alias, $alias_langcode, $this->pid); } } } diff --git a/web/core/modules/path/src/Plugin/Validation/Constraint/PathAliasConstraintValidator.php b/web/core/modules/path/src/Plugin/Validation/Constraint/PathAliasConstraintValidator.php index e6771f76d..be6350f75 100644 --- a/web/core/modules/path/src/Plugin/Validation/Constraint/PathAliasConstraintValidator.php +++ b/web/core/modules/path/src/Plugin/Validation/Constraint/PathAliasConstraintValidator.php @@ -48,8 +48,14 @@ class PathAliasConstraintValidator extends ConstraintValidator implements Contai if ($entity && !$entity->isNew() && !$entity->isDefaultRevision()) { /** @var \Drupal\Core\Entity\ContentEntityInterface $original */ $original = $this->entityTypeManager->getStorage($entity->getEntityTypeId())->loadUnchanged($entity->id()); - if ($value->alias != $original->path->alias) { - $this->context->addViolation($constraint->message); + $entity_langcode = $entity->language()->getId(); + + // Only add the violation if the current translation does not have the + // same path alias. + if ($original->hasTranslation($entity_langcode)) { + if ($value->alias != $original->getTranslation($entity_langcode)->path->alias) { + $this->context->addViolation($constraint->message); + } } } } diff --git a/web/core/modules/path/tests/src/Functional/PathContentModerationTest.php b/web/core/modules/path/tests/src/Functional/PathContentModerationTest.php index 953f1116b..b69a5dbe5 100644 --- a/web/core/modules/path/tests/src/Functional/PathContentModerationTest.php +++ b/web/core/modules/path/tests/src/Functional/PathContentModerationTest.php @@ -2,7 +2,7 @@ namespace Drupal\Tests\path\Functional; -use Drupal\node\Entity\NodeType; +use Drupal\language\Entity\ConfigurableLanguage; use Drupal\Tests\BrowserTestBase; use Drupal\Tests\content_moderation\Traits\ContentModerationTestTrait; @@ -21,17 +21,26 @@ class PathContentModerationTest extends BrowserTestBase { * * @var array */ - public static $modules = ['node', 'path', 'content_moderation']; + public static $modules = [ + 'node', + 'path', + 'content_moderation', + 'content_translation', + ]; /** * {@inheritdoc} */ protected function setUp() { parent::setUp(); + ConfigurableLanguage::createFromLangcode('fr')->save(); + $this->rebuildContainer(); // Created a content type. - $node_type = NodeType::create(['name' => 'moderated', 'type' => 'moderated']); - $node_type->save(); + $this->drupalCreateContentType([ + 'name' => 'moderated', + 'type' => 'moderated', + ]); // Set the content type as moderated. $workflow = $this->createEditorialWorkflow(); @@ -39,6 +48,21 @@ class PathContentModerationTest extends BrowserTestBase { $workflow->save(); $this->drupalLogin($this->rootUser); + + // Enable URL language detection and selection. + $edit = ['language_interface[enabled][language-url]' => 1]; + $this->drupalPostForm('admin/config/regional/language/detection', $edit, 'Save settings'); + + // Enable translation for moderated node. + $edit = [ + 'entity_types[node]' => 1, + 'settings[node][moderated][translatable]' => 1, + 'settings[node][moderated][fields][path]' => 1, + 'settings[node][moderated][fields][body]' => 1, + 'settings[node][moderated][settings][language][language_alterable]' => 1, + ]; + $this->drupalPostForm('admin/config/regional/content-language', $edit, 'Save configuration'); + \Drupal::entityTypeManager()->clearCachedDefinitions(); } /** @@ -106,4 +130,104 @@ class PathContentModerationTest extends BrowserTestBase { $this->assertSession()->pageTextNotContains('You can only change the URL alias for the published version of this content.'); } + /** + * Tests that translated and moderated node can get new draft revision. + */ + public function testTranslatedModeratedNodeAlias() { + // Create one node with a random alias. + $default_node = $this->drupalCreateNode([ + 'type' => 'moderated', + 'langcode' => 'en', + 'moderation_state' => 'published', + 'path' => '/' . $this->randomMachineName(), + ]); + + // Add published translation with another alias. + $this->drupalGet('node/' . $default_node->id()); + $this->drupalGet('node/' . $default_node->id() . '/translations'); + $this->clickLink('Add'); + $edit_translation = [ + 'body[0][value]' => $this->randomMachineName(), + 'moderation_state[0][state]' => 'published', + 'path[0][alias]' => '/' . $this->randomMachineName(), + ]; + $this->drupalPostForm(NULL, $edit_translation, 'Save (this translation)'); + // Confirm that the alias works. + $this->drupalGet('fr' . $edit_translation['path[0][alias]']); + $this->assertSession()->pageTextContains($edit_translation['body[0][value]']); + + $default_path = $default_node->path->alias; + $translation_path = 'fr' . $edit_translation['path[0][alias]']; + + $this->assertPathsAreAccessible([$default_path, $translation_path]); + + // Try to create new draft revision for translation with a new path alias. + $edit_new_translation_draft_with_alias = [ + 'moderation_state[0][state]' => 'draft', + 'path[0][alias]' => '/' . $this->randomMachineName(), + ]; + $this->drupalPostForm('fr/node/' . $default_node->id() . '/edit', $edit_new_translation_draft_with_alias, 'Save (this translation)'); + // Confirm the expected error. + $this->assertSession()->pageTextContains('You can only change the URL alias for the published version of this content.'); + + // Create new draft revision for translation without changing path alias. + $edit_new_translation_draft = [ + 'body[0][value]' => $this->randomMachineName(), + 'moderation_state[0][state]' => 'draft', + ]; + $this->drupalPostForm('fr/node/' . $default_node->id() . '/edit', $edit_new_translation_draft, t('Save (this translation)')); + // Confirm that the new draft revision was created. + $this->assertSession()->pageTextNotContains('You can only change the URL alias for the published version of this content.'); + $this->assertSession()->pageTextContains($edit_new_translation_draft['body[0][value]']); + $this->assertPathsAreAccessible([$default_path, $translation_path]); + + // Try to create a new draft revision for translation with path alias from + // the original language's default revision. + $edit_new_translation_draft_with_defaults_alias = [ + 'moderation_state[0][state]' => 'draft', + 'path[0][alias]' => $default_node->path->alias, + ]; + $this->drupalPostForm('fr/node/' . $default_node->id() . '/edit', $edit_new_translation_draft_with_defaults_alias, 'Save (this translation)'); + // Verify the expected error. + $this->assertSession()->pageTextContains('You can only change the URL alias for the published version of this content.'); + + // Try to create new draft revision for translation with deleted (empty) + // path alias. + $edit_new_translation_draft_empty_alias = [ + 'body[0][value]' => $this->randomMachineName(), + 'moderation_state[0][state]' => 'draft', + 'path[0][alias]' => '', + ]; + $this->drupalPostForm('fr/node/' . $default_node->id() . '/edit', $edit_new_translation_draft_empty_alias, 'Save (this translation)'); + // Confirm the expected error. + $this->assertSession()->pageTextContains('You can only change the URL alias for the published version of this content.'); + + // Create new default (published) revision for translation with new path + // alias. + $edit_new_translation = [ + 'body[0][value]' => $this->randomMachineName(), + 'moderation_state[0][state]' => 'published', + 'path[0][alias]' => '/' . $this->randomMachineName(), + ]; + $this->drupalPostForm('fr/node/' . $default_node->id() . '/edit', $edit_new_translation, 'Save (this translation)'); + // Confirm that the new published revision was created. + $this->assertSession()->pageTextNotContains('You can only change the URL alias for the published version of this content.'); + $this->assertSession()->pageTextContains($edit_new_translation['body[0][value]']); + $this->assertSession()->addressEquals('fr' . $edit_new_translation['path[0][alias]']); + $this->assertPathsAreAccessible([$default_path]); + } + + /** + * Helper callback to verify paths are responding with status 200. + * + * @param string[] $paths + * An array of paths to check for. + */ + public function assertPathsAreAccessible(array $paths) { + foreach ($paths as $path) { + $this->drupalGet($path); + $this->assertSession()->statusCodeEquals(200); + } + } + } diff --git a/web/core/modules/path/tests/src/Functional/PathLanguageUiTest.php b/web/core/modules/path/tests/src/Functional/PathLanguageUiTest.php index c2e327624..c76284515 100644 --- a/web/core/modules/path/tests/src/Functional/PathLanguageUiTest.php +++ b/web/core/modules/path/tests/src/Functional/PathLanguageUiTest.php @@ -2,6 +2,8 @@ namespace Drupal\Tests\path\Functional; +use Drupal\Core\Language\LanguageInterface; + /** * Confirm that the Path module user interface works with languages. * @@ -78,4 +80,36 @@ class PathLanguageUiTest extends PathTestBase { $this->assertText(t('Filter aliases'), 'Foreign URL alias works'); } + /** + * Test that language unspecific aliases are shown and saved in the node form. + */ + public function testNotSpecifiedNode() { + // Create test node. + $node = $this->drupalCreateNode(); + + // Create a language-unspecific alias in the admin UI, ensure that is + // displayed and the langcode is not changed when saving. + $edit = [ + 'source' => '/node/' . $node->id(), + 'alias' => '/' . $this->getRandomGenerator()->word(8), + 'langcode' => LanguageInterface::LANGCODE_NOT_SPECIFIED, + ]; + $this->drupalPostForm('admin/config/search/path/add', $edit, t('Save')); + + $this->drupalGet($node->toUrl('edit-form')); + $this->assertSession()->fieldValueEquals('path[0][alias]', $edit['alias']); + $this->drupalPostForm(NULL, [], t('Save')); + + $this->drupalGet('admin/config/search/path'); + $this->assertSession()->pageTextContains('None'); + $this->assertSession()->pageTextNotContains('English'); + + // Create another node, with no alias, to ensure non-language specific + // aliases are loaded correctly. + $node = $this->drupalCreateNode(); + $this->drupalget($node->toUrl('edit-form')); + $this->drupalPostForm(NULL, [], t('Save')); + $this->assertSession()->pageTextNotContains(t('The alias is already in use.')); + } + } diff --git a/web/core/modules/shortcut/src/ShortcutForm.php b/web/core/modules/shortcut/src/ShortcutForm.php index 26a52629b..f41ba2531 100644 --- a/web/core/modules/shortcut/src/ShortcutForm.php +++ b/web/core/modules/shortcut/src/ShortcutForm.php @@ -19,6 +19,16 @@ class ShortcutForm extends ContentEntityForm { */ protected $entity; + /** + * {@inheritdoc} + */ + public function form(array $form, FormStateInterface $form_state) { + $form = parent::form($form, $form_state); + $form['#attached']['library'][] = 'core/drupal.form'; + + return $form; + } + /** * {@inheritdoc} */ diff --git a/web/core/modules/simpletest/simpletest.module b/web/core/modules/simpletest/simpletest.module index 0814d882d..35fdd92cc 100644 --- a/web/core/modules/simpletest/simpletest.module +++ b/web/core/modules/simpletest/simpletest.module @@ -855,6 +855,7 @@ function simpletest_phpunit_testcase_to_row($test_id, \SimpleXMLElement $testcas $attributes = $testcase->attributes(); + $function = $attributes->class . '->' . $attributes->name . '()'; $record = [ 'test_id' => $test_id, 'test_class' => (string) $attributes->class, @@ -862,9 +863,11 @@ function simpletest_phpunit_testcase_to_row($test_id, \SimpleXMLElement $testcas 'message' => $message, // @todo: Check on the proper values for this. 'message_group' => 'Other', - 'function' => $attributes->class . '->' . $attributes->name . '()', + 'function' => $function, 'line' => $attributes->line ?: 0, - 'file' => $attributes->file, + // There are situations when the file will not be present because a PHPUnit + // @requires has caused a test to be skipped. + 'file' => $attributes->file ?: $function, ]; return $record; } diff --git a/web/core/modules/system/src/Tests/Ajax/ElementValidationTest.php b/web/core/modules/system/src/Tests/Ajax/ElementValidationTest.php deleted file mode 100644 index 169a38900..000000000 --- a/web/core/modules/system/src/Tests/Ajax/ElementValidationTest.php +++ /dev/null @@ -1,39 +0,0 @@ - t('some dumb text')]; - - // Post with 'drivertext' as the triggering element. - $this->drupalPostAjaxForm('ajax_validation_test', $edit, 'drivertext'); - // Look for a validation failure in the resultant JSON. - $this->assertNoText(t('Error message'), 'No error message in resultant JSON'); - $this->assertText('ajax_forms_test_validation_form_callback invoked', 'The correct callback was invoked'); - - $this->drupalGet('ajax_validation_test'); - $edit = ['drivernumber' => 12345]; - - // Post with 'drivernumber' as the triggering element. - $this->drupalPostAjaxForm('ajax_validation_test', $edit, 'drivernumber'); - // Look for a validation failure in the resultant JSON. - $this->assertNoText(t('Error message'), 'No error message in resultant JSON'); - $this->assertText('ajax_forms_test_validation_number_form_callback invoked', 'The correct callback was invoked'); - } - -} diff --git a/web/core/modules/system/src/Tests/Ajax/FormValuesTest.php b/web/core/modules/system/src/Tests/Ajax/FormValuesTest.php deleted file mode 100644 index 358db8933..000000000 --- a/web/core/modules/system/src/Tests/Ajax/FormValuesTest.php +++ /dev/null @@ -1,65 +0,0 @@ -drupalLogin($this->drupalCreateUser(['access content'])); - } - - /** - * Submits forms with select and checkbox elements via Ajax. - */ - public function testSimpleAjaxFormValue() { - // Verify form values of a select element. - foreach (['red', 'green', 'blue'] as $item) { - $edit = [ - 'select' => $item, - ]; - $commands = $this->drupalPostAjaxForm('ajax_forms_test_get_form', $edit, 'select'); - $expected = new DataCommand('#ajax_selected_color', 'form_state_value_select', $item); - $this->assertCommand($commands, $expected->render(), 'Verification of AJAX form values from a selectbox issued with a correct value.'); - } - - // Verify form values of a checkbox element. - foreach ([FALSE, TRUE] as $item) { - $edit = [ - 'checkbox' => $item, - ]; - $commands = $this->drupalPostAjaxForm('ajax_forms_test_get_form', $edit, 'checkbox'); - $expected = new DataCommand('#ajax_checkbox_value', 'form_state_value_select', (int) $item); - $this->assertCommand($commands, $expected->render(), 'Verification of AJAX form values from a checkbox issued with a correct value.'); - } - - // Verify that AJAX elements with invalid callbacks return error code 500. - // Ensure the test error log is empty before these tests. - $this->assertNoErrorsLogged(); - // We don't need to check for the X-Drupal-Ajax-Token header with these - // invalid requests. - $this->assertAjaxHeader = FALSE; - foreach (['null', 'empty', 'nonexistent'] as $key) { - $element_name = 'select_' . $key . '_callback'; - $edit = [ - $element_name => 'red', - ]; - $commands = $this->drupalPostAjaxForm('ajax_forms_test_get_form', $edit, $element_name); - $this->assertResponse(500); - } - // Switch this back to the default. - $this->assertAjaxHeader = TRUE; - // The exceptions are expected. Do not interpret them as a test failure. - // Not using File API; a potential error must trigger a PHP warning. - unlink(\Drupal::root() . '/' . $this->siteDirectory . '/error.log'); - } - -} diff --git a/web/core/modules/system/src/Tests/Ajax/FrameworkTest.php b/web/core/modules/system/src/Tests/Ajax/FrameworkTest.php deleted file mode 100644 index 507493b7d..000000000 --- a/web/core/modules/system/src/Tests/Ajax/FrameworkTest.php +++ /dev/null @@ -1,216 +0,0 @@ -drupalGetAjax('ajax-test/render'); - $expected = new SettingsCommand(['ajax' => 'test'], TRUE); - $this->assertCommand($commands, $expected->render(), 'JavaScript settings command is present.'); - } - - /** - * Tests AjaxResponse::prepare() AJAX commands ordering. - */ - public function testOrder() { - $expected_commands = []; - - // Expected commands, in a very specific order. - $asset_resolver = \Drupal::service('asset.resolver'); - $css_collection_renderer = \Drupal::service('asset.css.collection_renderer'); - $js_collection_renderer = \Drupal::service('asset.js.collection_renderer'); - $renderer = \Drupal::service('renderer'); - $expected_commands[0] = new SettingsCommand(['ajax' => 'test'], TRUE); - $build['#attached']['library'][] = 'ajax_test/order-css-command'; - $assets = AttachedAssets::createFromRenderArray($build); - $css_render_array = $css_collection_renderer->render($asset_resolver->getCssAssets($assets, FALSE)); - $expected_commands[1] = new AddCssCommand($renderer->renderRoot($css_render_array)); - $build['#attached']['library'][] = 'ajax_test/order-header-js-command'; - $build['#attached']['library'][] = 'ajax_test/order-footer-js-command'; - $assets = AttachedAssets::createFromRenderArray($build); - list($js_assets_header, $js_assets_footer) = $asset_resolver->getJsAssets($assets, FALSE); - $js_header_render_array = $js_collection_renderer->render($js_assets_header); - $js_footer_render_array = $js_collection_renderer->render($js_assets_footer); - $expected_commands[2] = new PrependCommand('head', $js_header_render_array); - $expected_commands[3] = new AppendCommand('body', $js_footer_render_array); - $expected_commands[4] = new HtmlCommand('body', 'Hello, world!'); - - // Load any page with at least one CSS file, at least one JavaScript file - // and at least one #ajax-powered element. The latter is an assumption of - // drupalPostAjaxForm(), the two former are assumptions of the Ajax - // renderer. - // @todo refactor AJAX Framework + tests to make less assumptions. - $this->drupalGet('ajax_forms_test_lazy_load_form'); - - // Verify AJAX command order — this should always be the order: - // 1. JavaScript settings - // 2. CSS files - // 3. JavaScript files in the header - // 4. JavaScript files in the footer - // 5. Any other AJAX commands, in whatever order they were added. - $commands = $this->drupalPostAjaxForm(NULL, [], NULL, 'ajax-test/order', [], [], NULL, []); - $this->assertCommand(array_slice($commands, 0, 1), $expected_commands[0]->render(), 'Settings command is first.'); - $this->assertCommand(array_slice($commands, 1, 1), $expected_commands[1]->render(), 'CSS command is second (and CSS files are ordered correctly).'); - $this->assertCommand(array_slice($commands, 2, 1), $expected_commands[2]->render(), 'Header JS command is third.'); - $this->assertCommand(array_slice($commands, 3, 1), $expected_commands[3]->render(), 'Footer JS command is fourth.'); - $this->assertCommand(array_slice($commands, 4, 1), $expected_commands[4]->render(), 'HTML command is fifth.'); - } - - /** - * Tests the behavior of an error alert command. - */ - public function testAJAXRenderError() { - // Verify custom error message. - $edit = [ - 'message' => 'Custom error message.', - ]; - $commands = $this->drupalGetAjax('ajax-test/render-error', ['query' => $edit]); - $expected = new AlertCommand($edit['message']); - $this->assertCommand($commands, $expected->render(), 'Custom error message is output.'); - } - - /** - * Tests that new JavaScript and CSS files are lazy-loaded on an AJAX request. - */ - public function testLazyLoad() { - $asset_resolver = \Drupal::service('asset.resolver'); - $css_collection_renderer = \Drupal::service('asset.css.collection_renderer'); - $js_collection_renderer = \Drupal::service('asset.js.collection_renderer'); - $renderer = \Drupal::service('renderer'); - - $expected = [ - 'setting_name' => 'ajax_forms_test_lazy_load_form_submit', - 'setting_value' => 'executed', - 'library_1' => 'system/admin', - 'library_2' => 'system/drupal.system', - ]; - - // Get the base page. - $this->drupalGet('ajax_forms_test_lazy_load_form'); - $original_settings = $this->getDrupalSettings(); - $original_libraries = explode(',', $original_settings['ajaxPageState']['libraries']); - - // Verify that the base page doesn't have the settings and files that are to - // be lazy loaded as part of the next requests. - $this->assertTrue(!isset($original_settings[$expected['setting_name']]), format_string('Page originally lacks the %setting, as expected.', ['%setting' => $expected['setting_name']])); - $this->assertTrue(!in_array($expected['library_1'], $original_libraries), format_string('Page originally lacks the %library library, as expected.', ['%library' => $expected['library_1']])); - $this->assertTrue(!in_array($expected['library_2'], $original_libraries), format_string('Page originally lacks the %library library, as expected.', ['%library' => $expected['library_2']])); - - // Calculate the expected CSS and JS. - $assets = new AttachedAssets(); - $assets->setLibraries([$expected['library_1']]) - ->setAlreadyLoadedLibraries($original_libraries); - $css_render_array = $css_collection_renderer->render($asset_resolver->getCssAssets($assets, FALSE)); - $expected_css_html = $renderer->renderRoot($css_render_array); - - $assets->setLibraries([$expected['library_2']]) - ->setAlreadyLoadedLibraries($original_libraries); - $js_assets = $asset_resolver->getJsAssets($assets, FALSE)[1]; - unset($js_assets['drupalSettings']); - $js_render_array = $js_collection_renderer->render($js_assets); - $expected_js_html = $renderer->renderRoot($js_render_array); - - // Submit the AJAX request without triggering files getting added. - $commands = $this->drupalPostAjaxForm(NULL, ['add_files' => FALSE], ['op' => t('Submit')]); - $new_settings = $this->getDrupalSettings(); - $new_libraries = explode(',', $new_settings['ajaxPageState']['libraries']); - - // Verify the setting was not added when not expected. - $this->assertTrue(!isset($new_settings[$expected['setting_name']]), format_string('Page still lacks the %setting, as expected.', ['%setting' => $expected['setting_name']])); - $this->assertTrue(!in_array($expected['library_1'], $new_libraries), format_string('Page still lacks the %library library, as expected.', ['%library' => $expected['library_1']])); - $this->assertTrue(!in_array($expected['library_2'], $new_libraries), format_string('Page still lacks the %library library, as expected.', ['%library' => $expected['library_2']])); - // Verify a settings command does not add CSS or scripts to drupalSettings - // and no command inserts the corresponding tags on the page. - $found_settings_command = FALSE; - $found_markup_command = FALSE; - foreach ($commands as $command) { - if ($command['command'] == 'settings' && (array_key_exists('css', $command['settings']['ajaxPageState']) || array_key_exists('js', $command['settings']['ajaxPageState']))) { - $found_settings_command = TRUE; - } - if (isset($command['data']) && ($command['data'] == $expected_js_html || $command['data'] == $expected_css_html)) { - $found_markup_command = TRUE; - } - } - $this->assertFalse($found_settings_command, format_string('Page state still lacks the %library_1 and %library_2 libraries, as expected.', ['%library_1' => $expected['library_1'], '%library_2' => $expected['library_2']])); - $this->assertFalse($found_markup_command, format_string('Page still lacks the %library_1 and %library_2 libraries, as expected.', ['%library_1' => $expected['library_1'], '%library_2' => $expected['library_2']])); - - // Submit the AJAX request and trigger adding files. - $commands = $this->drupalPostAjaxForm(NULL, ['add_files' => TRUE], ['op' => t('Submit')]); - $new_settings = $this->getDrupalSettings(); - $new_libraries = explode(',', $new_settings['ajaxPageState']['libraries']); - - // Verify the expected setting was added, both to drupalSettings, and as - // the first AJAX command. - $this->assertIdentical($new_settings[$expected['setting_name']], $expected['setting_value'], format_string('Page now has the %setting.', ['%setting' => $expected['setting_name']])); - $expected_command = new SettingsCommand([$expected['setting_name'] => $expected['setting_value']], TRUE); - $this->assertCommand(array_slice($commands, 0, 1), $expected_command->render(), 'The settings command was first.'); - - // Verify the expected CSS file was added, both to drupalSettings, and as - // the second AJAX command for inclusion into the HTML. - $this->assertTrue(in_array($expected['library_1'], $new_libraries), format_string('Page state now has the %library library.', ['%library' => $expected['library_1']])); - $this->assertCommand(array_slice($commands, 1, 1), ['data' => $expected_css_html], format_string('Page now has the %library library.', ['%library' => $expected['library_1']])); - - // Verify the expected JS file was added, both to drupalSettings, and as - // the third AJAX command for inclusion into the HTML. By testing for an - // exact HTML string containing the SCRIPT tag, we also ensure that - // unexpected JavaScript code, such as a jQuery.extend() that would - // potentially clobber rather than properly merge settings, didn't - // accidentally get added. - $this->assertTrue(in_array($expected['library_2'], $new_libraries), format_string('Page state now has the %library library.', ['%library' => $expected['library_2']])); - $this->assertCommand(array_slice($commands, 2, 1), ['data' => $expected_js_html], format_string('Page now has the %library library.', ['%library' => $expected['library_2']])); - } - - /** - * Tests that drupalSettings.currentPath is not updated on AJAX requests. - */ - public function testCurrentPathChange() { - $commands = $this->drupalPostAjaxForm('ajax_forms_test_lazy_load_form', ['add_files' => FALSE], ['op' => t('Submit')]); - foreach ($commands as $command) { - if ($command['command'] == 'settings') { - $this->assertFalse(isset($command['settings']['currentPath']), 'Value of drupalSettings.currentPath is not updated after an AJAX request.'); - } - } - } - - /** - * Tests that overridden CSS files are not added during lazy load. - */ - public function testLazyLoadOverriddenCSS() { - // The test theme overrides js.module.css without an implementation, - // thereby removing it. - \Drupal::service('theme_handler')->install(['test_theme']); - $this->config('system.theme') - ->set('default', 'test_theme') - ->save(); - - // This gets the form, and emulates an Ajax submission on it, including - // adding markup to the HEAD and BODY for any lazy loaded JS/CSS files. - $this->drupalPostAjaxForm('ajax_forms_test_lazy_load_form', ['add_files' => TRUE], ['op' => t('Submit')]); - - // Verify that the resulting HTML does not load the overridden CSS file. - // We add a "?" to the assertion, because drupalSettings may include - // information about the file; we only really care about whether it appears - // in a LINK or STYLE tag, for which Drupal always adds a query string for - // cache control. - $this->assertNoText('js.module.css?', 'Ajax lazy loading does not add overridden CSS files.'); - } - -} diff --git a/web/core/modules/system/src/Tests/Form/TriggeringElementTest.php b/web/core/modules/system/src/Tests/Form/TriggeringElementTest.php deleted file mode 100644 index fb59cb5e8..000000000 --- a/web/core/modules/system/src/Tests/Form/TriggeringElementTest.php +++ /dev/null @@ -1,97 +0,0 @@ -drupalPostForm($path, $edit, NULL, [], [], $form_html_id); - $this->assertText('There is no clicked button.', '$form_state->getTriggeringElement() set to NULL.'); - $this->assertNoText('Submit handler for form_test_clicked_button executed.', 'Form submit handler did not execute.'); - - // Ensure submitting a form with one or more submit buttons results in the - // triggering element being set to the first one the user has access to. An - // argument with 'r' in it indicates a restricted (#access=FALSE) button. - $this->drupalPostForm($path . '/s', $edit, NULL, [], [], $form_html_id); - $this->assertText('The clicked button is button1.', '$form_state->getTriggeringElement() set to only button.'); - $this->assertText('Submit handler for form_test_clicked_button executed.', 'Form submit handler executed.'); - - $this->drupalPostForm($path . '/s/s', $edit, NULL, [], [], $form_html_id); - $this->assertText('The clicked button is button1.', '$form_state->getTriggeringElement() set to first button.'); - $this->assertText('Submit handler for form_test_clicked_button executed.', 'Form submit handler executed.'); - - $this->drupalPostForm($path . '/rs/s', $edit, NULL, [], [], $form_html_id); - $this->assertText('The clicked button is button2.', '$form_state->getTriggeringElement() set to first available button.'); - $this->assertText('Submit handler for form_test_clicked_button executed.', 'Form submit handler executed.'); - - // Ensure submitting a form with buttons of different types results in the - // triggering element being set to the first button, regardless of type. For - // the FAPI 'button' type, this should result in the submit handler not - // executing. The types are 's'(ubmit), 'b'(utton), and 'i'(mage_button). - $this->drupalPostForm($path . '/s/b/i', $edit, NULL, [], [], $form_html_id); - $this->assertText('The clicked button is button1.', '$form_state->getTriggeringElement() set to first button.'); - $this->assertText('Submit handler for form_test_clicked_button executed.', 'Form submit handler executed.'); - - $this->drupalPostForm($path . '/b/s/i', $edit, NULL, [], [], $form_html_id); - $this->assertText('The clicked button is button1.', '$form_state->getTriggeringElement() set to first button.'); - $this->assertNoText('Submit handler for form_test_clicked_button executed.', 'Form submit handler did not execute.'); - - $this->drupalPostForm($path . '/i/s/b', $edit, NULL, [], [], $form_html_id); - $this->assertText('The clicked button is button1.', '$form_state->getTriggeringElement() set to first button.'); - $this->assertText('Submit handler for form_test_clicked_button executed.', 'Form submit handler executed.'); - } - - /** - * Test that the triggering element does not get set to a button with - * #access=FALSE. - */ - public function testAttemptAccessControlBypass() { - $path = 'form-test/clicked-button'; - $form_html_id = 'form-test-clicked-button'; - - // Retrieve a form where 'button1' has #access=FALSE and 'button2' doesn't. - $this->drupalGet($path . '/rs/s'); - - // Submit the form with 'button1=button1' in the POST data, which someone - // trying to get around security safeguards could easily do. We have to do - // a little trickery here, to work around the safeguards in drupalPostForm(): by - // renaming the text field that is in the form to 'button1', we can get the - // data we want into \Drupal::request()->request. - $elements = $this->xpath('//form[@id="' . $form_html_id . '"]//input[@name="text"]'); - $elements[0]['name'] = 'button1'; - $this->drupalPostForm(NULL, ['button1' => 'button1'], NULL, [], [], $form_html_id); - - // Ensure that the triggering element was not set to the restricted button. - // Do this with both a negative and positive assertion, because negative - // assertions alone can be brittle. See testNoButtonInfoInPost() for why the - // triggering element gets set to 'button2'. - $this->assertNoText('The clicked button is button1.', '$form_state->getTriggeringElement() not set to a restricted button.'); - $this->assertText('The clicked button is button2.', '$form_state->getTriggeringElement() not set to a restricted button.'); - } - -} diff --git a/web/core/modules/system/src/Tests/Session/StackSessionHandlerIntegrationTest.php b/web/core/modules/system/src/Tests/Session/StackSessionHandlerIntegrationTest.php deleted file mode 100644 index ac368685d..000000000 --- a/web/core/modules/system/src/Tests/Session/StackSessionHandlerIntegrationTest.php +++ /dev/null @@ -1,47 +0,0 @@ -drupalGetAjax('session-test/trace-handler'); - $expect_trace = [ - ['BEGIN', 'test_argument', 'open'], - ['BEGIN', NULL, 'open'], - ['END', NULL, 'open'], - ['END', 'test_argument', 'open'], - ['BEGIN', 'test_argument', 'read', $this->sessionId], - ['BEGIN', NULL, 'read', $this->sessionId], - ['END', NULL, 'read', $this->sessionId], - ['END', 'test_argument', 'read', $this->sessionId], - ['BEGIN', 'test_argument', 'write', $this->sessionId], - ['BEGIN', NULL, 'write', $this->sessionId], - ['END', NULL, 'write', $this->sessionId], - ['END', 'test_argument', 'write', $this->sessionId], - ['BEGIN', 'test_argument', 'close'], - ['BEGIN', NULL, 'close'], - ['END', NULL, 'close'], - ['END', 'test_argument', 'close'], - ]; - $this->assertEqual($expect_trace, $actual_trace); - } - -} diff --git a/web/core/modules/system/tests/modules/ajax_forms_test/src/Callbacks.php b/web/core/modules/system/tests/modules/ajax_forms_test/src/Callbacks.php index 71350305f..cf821515b 100644 --- a/web/core/modules/system/tests/modules/ajax_forms_test/src/Callbacks.php +++ b/web/core/modules/system/tests/modules/ajax_forms_test/src/Callbacks.php @@ -50,7 +50,7 @@ class Callbacks { */ public function checkboxCallback($form, FormStateInterface $form_state) { $response = new AjaxResponse(); - $response->addCommand(new HtmlCommand('#ajax_checkbox_value', (int) $form_state->getValue('checkbox'))); + $response->addCommand(new HtmlCommand('#ajax_checkbox_value', $form_state->getValue('checkbox') ? 'checked' : 'unchecked')); $response->addCommand(new DataCommand('#ajax_checkbox_value', 'form_state_value_select', (int) $form_state->getValue('checkbox'))); return $response; } diff --git a/web/core/modules/system/tests/modules/ajax_forms_test/src/Form/AjaxFormsTestSimpleForm.php b/web/core/modules/system/tests/modules/ajax_forms_test/src/Form/AjaxFormsTestSimpleForm.php index 3cb810531..35e0b08e2 100644 --- a/web/core/modules/system/tests/modules/ajax_forms_test/src/Form/AjaxFormsTestSimpleForm.php +++ b/web/core/modules/system/tests/modules/ajax_forms_test/src/Form/AjaxFormsTestSimpleForm.php @@ -65,7 +65,7 @@ class AjaxFormsTestSimpleForm extends FormBase { $form['select_' . $key . '_callback'] = [ '#type' => 'select', '#title' => $this->t('Test %key callbacks', ['%key' => $key]), - '#options' => ['red' => 'red'], + '#options' => ['red' => 'red', 'green' => 'green'], '#ajax' => ['callback' => $value], ]; } diff --git a/web/core/modules/system/tests/modules/form_test/src/Form/FormTestFileForm.php b/web/core/modules/system/tests/modules/form_test/src/Form/FormTestFileForm.php new file mode 100644 index 000000000..985a59c98 --- /dev/null +++ b/web/core/modules/system/tests/modules/form_test/src/Form/FormTestFileForm.php @@ -0,0 +1,42 @@ + 'file', + '#multiple' => TRUE, + '#attributes' => [ + 'class' => ['cagatio'], + ], + ]; + return $form; + } + + /** + * {@inheritdoc} + */ + public function submitForm(array &$form, FormStateInterface $form_state) { + } + +} diff --git a/web/core/modules/system/tests/src/Functional/Ajax/FrameworkTest.php b/web/core/modules/system/tests/src/Functional/Ajax/FrameworkTest.php new file mode 100644 index 000000000..cc7b782d5 --- /dev/null +++ b/web/core/modules/system/tests/src/Functional/Ajax/FrameworkTest.php @@ -0,0 +1,158 @@ +drupalGetAjax('ajax-test/render'); + $expected = new SettingsCommand(['ajax' => 'test'], TRUE); + $this->assertCommand($commands, $expected->render(), 'JavaScript settings command is present.'); + } + + /** + * Tests AjaxResponse::prepare() AJAX commands ordering. + */ + public function testOrder() { + $expected_commands = []; + + // Expected commands, in a very specific order. + $asset_resolver = \Drupal::service('asset.resolver'); + $css_collection_renderer = \Drupal::service('asset.css.collection_renderer'); + $js_collection_renderer = \Drupal::service('asset.js.collection_renderer'); + $renderer = \Drupal::service('renderer'); + $build['#attached']['library'][] = 'ajax_test/order-css-command'; + $assets = AttachedAssets::createFromRenderArray($build); + $css_render_array = $css_collection_renderer->render($asset_resolver->getCssAssets($assets, FALSE)); + $expected_commands[1] = new AddCssCommand($renderer->renderRoot($css_render_array)); + $build['#attached']['library'][] = 'ajax_test/order-header-js-command'; + $build['#attached']['library'][] = 'ajax_test/order-footer-js-command'; + $assets = AttachedAssets::createFromRenderArray($build); + list($js_assets_header, $js_assets_footer) = $asset_resolver->getJsAssets($assets, FALSE); + $js_header_render_array = $js_collection_renderer->render($js_assets_header); + $js_footer_render_array = $js_collection_renderer->render($js_assets_footer); + $expected_commands[2] = new PrependCommand('head', $js_header_render_array); + $expected_commands[3] = new AppendCommand('body', $js_footer_render_array); + $expected_commands[4] = new HtmlCommand('body', 'Hello, world!'); + + // Load any page with at least one CSS file, at least one JavaScript file + // and at least one #ajax-powered element. The latter is an assumption of + // drupalPostAjaxForm(), the two former are assumptions of the Ajax + // renderer. + // @todo refactor AJAX Framework + tests to make less assumptions. + $this->drupalGet('ajax_forms_test_lazy_load_form'); + + // Verify AJAX command order — this should always be the order: + // 1. CSS files + // 2. JavaScript files in the header + // 3. JavaScript files in the footer + // 4. Any other AJAX commands, in whatever order they were added. + $commands = $this->drupalGetAjax('ajax-test/order'); + $this->assertCommand(array_slice($commands, 0, 1), $expected_commands[1]->render()); + $this->assertCommand(array_slice($commands, 1, 1), $expected_commands[2]->render()); + $this->assertCommand(array_slice($commands, 2, 1), $expected_commands[3]->render()); + $this->assertCommand(array_slice($commands, 3, 1), $expected_commands[4]->render()); + } + + /** + * Tests the behavior of an error alert command. + */ + public function testAJAXRenderError() { + // Verify custom error message. + $edit = [ + 'message' => 'Custom error message.', + ]; + $commands = $this->drupalGetAjax('ajax-test/render-error', ['query' => $edit]); + $expected = new AlertCommand($edit['message']); + $this->assertCommand($commands, $expected->render(), 'Custom error message is output.'); + } + + /** + * Asserts the array of Ajax commands contains the searched command. + * + * An AjaxResponse object stores an array of Ajax commands. This array + * sometimes includes commands automatically provided by the framework in + * addition to commands returned by a particular controller. During testing, + * we're usually interested that a particular command is present, and don't + * care whether other commands precede or follow the one we're interested in. + * Additionally, the command we're interested in may include additional data + * that we're not interested in. Therefore, this function simply asserts that + * one of the commands in $haystack contains all of the keys and values in + * $needle. Furthermore, if $needle contains a 'settings' key with an array + * value, we simply assert that all keys and values within that array are + * present in the command we're checking, and do not consider it a failure if + * the actual command contains additional settings that aren't part of + * $needle. + * + * @param $haystack + * An array of rendered Ajax commands returned by the server. + * @param $needle + * Array of info we're expecting in one of those commands. + */ + protected function assertCommand($haystack, $needle) { + $found = FALSE; + foreach ($haystack as $command) { + // If the command has additional settings that we're not testing for, do + // not consider that a failure. + if (isset($command['settings']) && is_array($command['settings']) && isset($needle['settings']) && is_array($needle['settings'])) { + $command['settings'] = array_intersect_key($command['settings'], $needle['settings']); + } + // If the command has additional data that we're not testing for, do not + // consider that a failure. Also, == instead of ===, because we don't + // require the key/value pairs to be in any particular order + // (http://php.net/manual/language.operators.array.php). + if (array_intersect_key($command, $needle) == $needle) { + $found = TRUE; + break; + } + } + $this->assertTrue($found); + } + + /** + * Requests a path or URL in drupal_ajax format and JSON-decodes the response. + * + * @param \Drupal\Core\Url|string $path + * Drupal path or URL to request from. + * @param array $options + * Array of URL options. + * @param array $headers + * Array of headers. + * + * @return array + * Decoded JSON. + */ + protected function drupalGetAjax($path, array $options = [], array $headers = []) { + $headers[] = 'X-Requested-With: XMLHttpRequest'; + if (!isset($options['query'][MainContentViewSubscriber::WRAPPER_FORMAT])) { + $options['query'][MainContentViewSubscriber::WRAPPER_FORMAT] = 'drupal_ajax'; + } + return Json::decode($this->drupalGet($path, $options, $headers)); + } + +} diff --git a/web/core/modules/system/src/Tests/Form/ElementsTableSelectTest.php b/web/core/modules/system/tests/src/Functional/Form/ElementsTableSelectTest.php similarity index 65% rename from web/core/modules/system/src/Tests/Form/ElementsTableSelectTest.php rename to web/core/modules/system/tests/src/Functional/Form/ElementsTableSelectTest.php index 030526eef..f377c0abf 100644 --- a/web/core/modules/system/src/Tests/Form/ElementsTableSelectTest.php +++ b/web/core/modules/system/tests/src/Functional/Form/ElementsTableSelectTest.php @@ -1,17 +1,16 @@ drupalGet('form_test/tableselect/multiple-true'); - $this->assertNoText(t('Empty text.'), 'Empty text should not be displayed.'); + $this->assertSession()->responseNotContains('Empty text.', 'Empty text should not be displayed.'); // Test for the presence of the Select all rows tableheader. - $this->assertFieldByXPath('//th[@class="select-all"]', NULL, 'Presence of the "Select all" checkbox.'); + $this->assertNotEmpty($this->xpath('//th[@class="select-all"]'), 'Presence of the "Select all" checkbox.'); $rows = ['row1', 'row2', 'row3']; foreach ($rows as $row) { - $this->assertFieldByXPath('//input[@type="checkbox"]', $row, format_string('Checkbox for value @row.', ['@row' => $row])); - } - } - - /** - * Test the presence of ajax functionality for all options. - */ - public function testAjax() { - $rows = ['row1', 'row2', 'row3']; - // Test checkboxes (#multiple == TRUE). - foreach ($rows as $row) { - $element = 'tableselect[' . $row . ']'; - $edit = [$element => TRUE]; - $result = $this->drupalPostAjaxForm('form_test/tableselect/multiple-true', $edit, $element); - $this->assertFalse(empty($result), t('Ajax triggers on checkbox for @row.', ['@row' => $row])); - } - // Test radios (#multiple == FALSE). - $element = 'tableselect'; - foreach ($rows as $row) { - $edit = [$element => $row]; - $result = $this->drupalPostAjaxForm('form_test/tableselect/multiple-false', $edit, $element); - $this->assertFalse(empty($result), t('Ajax triggers on radio for @row.', ['@row' => $row])); + $this->assertNotEmpty($this->xpath('//input[@type="checkbox"]', [$row]), "Checkbox for the value $row."); } } @@ -65,40 +43,39 @@ class ElementsTableSelectTest extends WebTestBase { public function testMultipleFalse() { $this->drupalGet('form_test/tableselect/multiple-false'); - $this->assertNoText(t('Empty text.'), 'Empty text should not be displayed.'); + $this->assertSession()->pageTextNotContains('Empty text.'); // Test for the absence of the Select all rows tableheader. - $this->assertNoFieldByXPath('//th[@class="select-all"]', '', 'Absence of the "Select all" checkbox.'); + $this->assertFalse($this->xpath('//th[@class="select-all"]')); $rows = ['row1', 'row2', 'row3']; foreach ($rows as $row) { - $this->assertFieldByXPath('//input[@type="radio"]', $row, format_string('Radio button for value @row.', ['@row' => $row])); + $this->assertNotEmpty($this->xpath('//input[@type="radio"]', [$row], "Radio button value: $row")); } } /** * Tests the display when #colspan is set. */ - public function testTableselectColSpan() { + public function testTableSelectColSpan() { $this->drupalGet('form_test/tableselect/colspan'); - $this->assertText(t('Three'), 'Presence of the third column'); - $this->assertNoText(t('Four'), 'Absence of a fourth column'); + $this->assertSession()->pageTextContains('Three', 'Presence of the third column'); + $this->assertSession()->pageTextNotContains('Four', 'Absence of a fourth column'); // There should be three labeled column headers and 1 for the input. - $table_head = $this->xpath('//thead'); - $this->assertEqual(count($table_head[0]->tr->th), 4, 'There are four column headers'); + $table_head = $this->xpath('//thead/tr/th'); + $this->assertEquals(count($table_head), 4, 'There are four column headers'); - $table_body = $this->xpath('//tbody'); // The first two body rows should each have 5 table cells: One for the // radio, one cell in the first column, one cell in the second column, // and two cells in the third column which has colspan 2. for ($i = 0; $i <= 1; $i++) { - $this->assertEqual(count($table_body[0]->tr[$i]->td), 5, format_string('There are five cells in row @row.', ['@row' => $i])); + $this->assertEquals(count($this->xpath('//tbody/tr[' . ($i + 1) . ']/td')), 5, 'There are five cells in row ' . $i); } // The third row should have 3 cells, one for the radio, one spanning the // first and second column, and a third in column 3 (which has colspan 3). - $this->assertEqual(count($table_body[0]->tr[2]->td), 3, 'There are three cells in row 3.'); + $this->assertEquals(count($this->xpath('//tbody/tr[3]/td')), 3, 'There are three cells in row 3.'); } /** @@ -106,7 +83,7 @@ class ElementsTableSelectTest extends WebTestBase { */ public function testEmptyText() { $this->drupalGet('form_test/tableselect/empty-text'); - $this->assertText(t('Empty text.'), 'Empty text should be displayed.'); + $this->assertSession()->pageTextContains('Empty text.', 'Empty text should be displayed.'); } /** @@ -119,18 +96,19 @@ class ElementsTableSelectTest extends WebTestBase { $edit['tableselect[row1]'] = TRUE; $this->drupalPostForm('form_test/tableselect/multiple-true', $edit, 'Submit'); - $this->assertText(t('Submitted: row1 = row1'), 'Checked checkbox row1'); - $this->assertText(t('Submitted: row2 = 0'), 'Unchecked checkbox row2.'); - $this->assertText(t('Submitted: row3 = 0'), 'Unchecked checkbox row3.'); + $assert_session = $this->assertSession(); + $assert_session->pageTextContains('Submitted: row1 = row1', 'Checked checkbox row1'); + $assert_session->pageTextContains('Submitted: row2 = 0', 'Unchecked checkbox row2.'); + $assert_session->pageTextContains('Submitted: row3 = 0', 'Unchecked checkbox row3.'); // Test a submission with multiple checkboxes checked. $edit['tableselect[row1]'] = TRUE; $edit['tableselect[row3]'] = TRUE; $this->drupalPostForm('form_test/tableselect/multiple-true', $edit, 'Submit'); - $this->assertText(t('Submitted: row1 = row1'), 'Checked checkbox row1.'); - $this->assertText(t('Submitted: row2 = 0'), 'Unchecked checkbox row2.'); - $this->assertText(t('Submitted: row3 = row3'), 'Checked checkbox row3.'); + $assert_session->pageTextContains('Submitted: row1 = row1', 'Checked checkbox row1.'); + $assert_session->pageTextContains('Submitted: row2 = 0', 'Unchecked checkbox row2.'); + $assert_session->pageTextContains('Submitted: row3 = row3', 'Checked checkbox row3.'); } @@ -140,7 +118,7 @@ class ElementsTableSelectTest extends WebTestBase { public function testMultipleFalseSubmit() { $edit['tableselect'] = 'row1'; $this->drupalPostForm('form_test/tableselect/multiple-false', $edit, 'Submit'); - $this->assertText(t('Submitted: row1'), 'Selected radio button'); + $this->assertSession()->pageTextContains('Submitted: row1', 'Selected radio button'); } /** @@ -149,18 +127,18 @@ class ElementsTableSelectTest extends WebTestBase { public function testAdvancedSelect() { // When #multiple = TRUE a Select all checkbox should be displayed by default. $this->drupalGet('form_test/tableselect/advanced-select/multiple-true-default'); - $this->assertFieldByXPath('//th[@class="select-all"]', NULL, 'Display a "Select all" checkbox by default when #multiple is TRUE.'); + $this->xpath('//th[@class="select-all"]'); // When #js_select is set to FALSE, a "Select all" checkbox should not be displayed. $this->drupalGet('form_test/tableselect/advanced-select/multiple-true-no-advanced-select'); - $this->assertNoFieldByXPath('//th[@class="select-all"]', NULL, 'Do not display a "Select all" checkbox when #js_select is FALSE.'); + $this->assertFalse($this->xpath('//th[@class="select-all"]')); // A "Select all" checkbox never makes sense when #multiple = FALSE, regardless of the value of #js_select. $this->drupalGet('form_test/tableselect/advanced-select/multiple-false-default'); - $this->assertNoFieldByXPath('//th[@class="select-all"]', NULL, 'Do not display a "Select all" checkbox when #multiple is FALSE.'); + $this->assertFalse($this->xpath('//th[@class="select-all"]')); $this->drupalGet('form_test/tableselect/advanced-select/multiple-false-advanced-select'); - $this->assertNoFieldByXPath('//th[@class="select-all"]', NULL, 'Do not display a "Select all" checkbox when #multiple is FALSE, even when #js_select is TRUE.'); + $this->assertFalse($this->xpath('//th[@class="select-all"]')); } /** diff --git a/web/core/modules/system/tests/src/Functional/Form/RebuildTest.php b/web/core/modules/system/tests/src/Functional/Form/RebuildTest.php new file mode 100644 index 000000000..3e951e2e8 --- /dev/null +++ b/web/core/modules/system/tests/src/Functional/Form/RebuildTest.php @@ -0,0 +1,61 @@ +drupalCreateContentType(['type' => 'page', 'name' => 'Basic page']); + + $this->webUser = $this->drupalCreateUser(['access content']); + $this->drupalLogin($this->webUser); + } + + /** + * Tests preservation of values. + */ + public function testRebuildPreservesValues() { + $edit = [ + 'checkbox_1_default_off' => TRUE, + 'checkbox_1_default_on' => FALSE, + 'text_1' => 'foo', + ]; + $this->drupalPostForm('form-test/form-rebuild-preserve-values', $edit, 'Add more'); + + $assert_session = $this->assertSession(); + + // Verify that initial elements retained their submitted values. + $assert_session->checkboxChecked('edit-checkbox-1-default-off'); + $assert_session->checkboxNotChecked('edit-checkbox-1-default-on'); + $assert_session->fieldValueEquals('edit-text-1', 'foo'); + + // Verify that newly added elements were initialized with their default values. + $assert_session->checkboxChecked('edit-checkbox-2-default-on'); + $assert_session->checkboxNotChecked('edit-checkbox-2-default-off'); + $assert_session->fieldValueEquals('edit-text-2', 'DEFAULT 2'); + } + +} diff --git a/web/core/modules/system/src/Tests/Form/StorageTest.php b/web/core/modules/system/tests/src/Functional/Form/StorageTest.php similarity index 61% rename from web/core/modules/system/src/Tests/Form/StorageTest.php rename to web/core/modules/system/tests/src/Functional/Form/StorageTest.php index a1f7fee3d..95969fde5 100644 --- a/web/core/modules/system/src/Tests/Form/StorageTest.php +++ b/web/core/modules/system/tests/src/Functional/Form/StorageTest.php @@ -1,8 +1,10 @@ drupalGet('form_test/form-storage'); - $this->assertText('Form constructions: 1'); + + $assert_session = $this->assertSession(); + $assert_session->pageTextContains('Form constructions: 1'); $edit = ['title' => 'new', 'value' => 'value_is_set']; // Use form rebuilding triggered by a submit button. $this->drupalPostForm(NULL, $edit, 'Continue submit'); - $this->assertText('Form constructions: 2'); - $this->assertText('Form constructions: 3'); + $assert_session->pageTextContains('Form constructions: 2'); + $assert_session->pageTextContains('Form constructions: 3'); // Reset the form to the values of the storage, using a form rebuild // triggered by button of type button. $this->drupalPostForm(NULL, ['title' => 'changed'], 'Reset'); - $this->assertFieldByName('title', 'new', 'Values have been reset.'); + $assert_session->fieldValueEquals('title', 'new'); // After rebuilding, the form has been cached. - $this->assertText('Form constructions: 4'); + $assert_session->pageTextContains('Form constructions: 4'); $this->drupalPostForm(NULL, $edit, 'Save'); - $this->assertText('Form constructions: 4'); - $this->assertText('Title: new', 'The form storage has stored the values.'); + $assert_session->pageTextContains('Form constructions: 4'); + $assert_session->pageTextContains('Title: new', 'The form storage has stored the values.'); } /** @@ -62,26 +69,26 @@ class StorageTest extends WebTestBase { */ public function testFormCached() { $this->drupalGet('form_test/form-storage', ['query' => ['cache' => 1]]); - $this->assertText('Form constructions: 1'); + $this->assertSession()->pageTextContains('Form constructions: 1'); $edit = ['title' => 'new', 'value' => 'value_is_set']; // Use form rebuilding triggered by a submit button. $this->drupalPostForm(NULL, $edit, 'Continue submit'); // The first one is for the building of the form. - $this->assertText('Form constructions: 2'); + $this->assertSession()->pageTextContains('Form constructions: 2'); // The second one is for the rebuilding of the form. - $this->assertText('Form constructions: 3'); + $this->assertSession()->pageTextContains('Form constructions: 3'); // Reset the form to the values of the storage, using a form rebuild // triggered by button of type button. $this->drupalPostForm(NULL, ['title' => 'changed'], 'Reset'); - $this->assertFieldByName('title', 'new', 'Values have been reset.'); - $this->assertText('Form constructions: 4'); + $this->assertSession()->fieldValueEquals('title', 'new'); + $this->assertSession()->pageTextContains('Form constructions: 4'); $this->drupalPostForm(NULL, $edit, 'Save'); - $this->assertText('Form constructions: 4'); - $this->assertText('Title: new', 'The form storage has stored the values.'); + $this->assertSession()->pageTextContains('Form constructions: 4'); + $this->assertSession()->pageTextContains('Title: new', 'The form storage has stored the values.'); } /** @@ -124,7 +131,7 @@ class StorageTest extends WebTestBase { // validation error. Post again and verify that the rebuilt form contains // the values of the updated form storage. $this->drupalPostForm(NULL, ['title' => 'foo', 'value' => 'bar'], 'Save'); - $this->assertText("The thing has been changed.", 'The altered form storage value was updated in cache and taken over.'); + $this->assertSession()->pageTextContains("The thing has been changed.", 'The altered form storage value was updated in cache and taken over.'); } /** @@ -135,27 +142,27 @@ class StorageTest extends WebTestBase { // Request the form with 'cache' query parameter to enable form caching. $this->drupalGet('form_test/form-storage', ['query' => ['cache' => 1, 'immutable' => 1]]); $buildIdFields = $this->xpath('//input[@name="form_build_id"]'); - $this->assertEqual(count($buildIdFields), 1, 'One form build id field on the page'); - $buildId = (string) $buildIdFields[0]['value']; + $this->assertEquals(count($buildIdFields), 1, 'One form build id field on the page'); + $buildId = $buildIdFields[0]->getValue(); // Trigger validation error by submitting an empty title. $edit = ['title' => '']; $this->drupalPostForm(NULL, $edit, 'Continue submit'); // Verify that the build-id did change. - $this->assertNoFieldByName('form_build_id', $buildId, 'Build id changes when form validation fails'); + $this->assertSession()->hiddenFieldValueNotEquals('form_build_id', $buildId); // Retrieve the new build-id. $buildIdFields = $this->xpath('//input[@name="form_build_id"]'); - $this->assertEqual(count($buildIdFields), 1, 'One form build id field on the page'); - $buildId = (string) $buildIdFields[0]['value']; + $this->assertEquals(count($buildIdFields), 1, 'One form build id field on the page'); + $buildId = (string) $buildIdFields[0]->getValue(); // Trigger validation error by again submitting an empty title. $edit = ['title' => '']; $this->drupalPostForm(NULL, $edit, 'Continue submit'); // Verify that the build-id does not change the second time. - $this->assertFieldByName('form_build_id', $buildId, 'Build id remains the same when form validation fails subsequently'); + $this->assertSession()->hiddenFieldValueEquals('form_build_id', $buildId); } /** @@ -164,25 +171,28 @@ class StorageTest extends WebTestBase { public function testImmutableFormLegacyProtection() { $this->drupalGet('form_test/form-storage', ['query' => ['cache' => 1, 'immutable' => 1]]); $build_id_fields = $this->xpath('//input[@name="form_build_id"]'); - $this->assertEqual(count($build_id_fields), 1, 'One form build id field on the page'); - $build_id = (string) $build_id_fields[0]['value']; + $this->assertEquals(count($build_id_fields), 1, 'One form build id field on the page'); + $build_id = $build_id_fields[0]->getValue(); // Try to poison the form cache. - $original = $this->drupalGetAjax('form-test/form-storage-legacy/' . $build_id); - $this->assertEqual($original['form']['#build_id_old'], $build_id, 'Original build_id was recorded'); - $this->assertNotEqual($original['form']['#build_id'], $build_id, 'New build_id was generated'); + $response = $this->drupalGet('form-test/form-storage-legacy/' . $build_id, ['query' => [MainContentViewSubscriber::WRAPPER_FORMAT => 'drupal_ajax']], ['X-Requested-With: XMLHttpRequest']); + $original = json_decode($response, TRUE); + + $this->assertEquals($original['form']['#build_id_old'], $build_id, 'Original build_id was recorded'); + $this->assertNotEquals($original['form']['#build_id'], $build_id, 'New build_id was generated'); // Assert that a watchdog message was logged by // \Drupal::formBuilder()->setCache(). - $status = (bool) db_query_range('SELECT 1 FROM {watchdog} WHERE message = :message', 0, 1, [':message' => 'Form build-id mismatch detected while attempting to store a form in the cache.']); - $this->assert($status, 'A watchdog message was logged by \Drupal::formBuilder()->setCache'); + $status = (bool) Database::getConnection()->queryRange('SELECT 1 FROM {watchdog} WHERE message = :message', 0, 1, [':message' => 'Form build-id mismatch detected while attempting to store a form in the cache.']); + $this->assertTrue($status, 'A watchdog message was logged by \Drupal::formBuilder()->setCache'); // Ensure that the form state was not poisoned by the preceding call. - $original = $this->drupalGetAjax('form-test/form-storage-legacy/' . $build_id); - $this->assertEqual($original['form']['#build_id_old'], $build_id, 'Original build_id was recorded'); - $this->assertNotEqual($original['form']['#build_id'], $build_id, 'New build_id was generated'); - $this->assert(empty($original['form']['#poisoned']), 'Original form structure was preserved'); - $this->assert(empty($original['form_state']['poisoned']), 'Original form state was preserved'); + $response = $this->drupalGet('form-test/form-storage-legacy/' . $build_id, ['query' => [MainContentViewSubscriber::WRAPPER_FORMAT => 'drupal_ajax']], ['X-Requested-With: XMLHttpRequest']); + $original = json_decode($response, TRUE); + $this->assertEquals($original['form']['#build_id_old'], $build_id, 'Original build_id was recorded'); + $this->assertNotEquals($original['form']['#build_id'], $build_id, 'New build_id was generated'); + $this->assertTrue(empty($original['form']['#poisoned']), 'Original form structure was preserved'); + $this->assertTrue(empty($original['form_state']['poisoned']), 'Original form state was preserved'); } } diff --git a/web/core/modules/system/tests/src/Functional/Mail/MailTest.php b/web/core/modules/system/tests/src/Functional/Mail/MailTest.php index 6f3253924..ef59d0128 100644 --- a/web/core/modules/system/tests/src/Functional/Mail/MailTest.php +++ b/web/core/modules/system/tests/src/Functional/Mail/MailTest.php @@ -107,6 +107,32 @@ class MailTest extends BrowserTestBase { $this->assertEquals('Drépal this is a very long test sentence to te ', Unicode::mimeHeaderDecode($sent_message['headers']['From']), 'From header is correctly encoded.'); $this->assertFalse(isset($sent_message['headers']['Reply-to']), 'Message reply-to is not set if not specified.'); $this->assertFalse(isset($sent_message['headers']['Errors-To']), 'Errors-to header must not be set, it is deprecated.'); + + // Test RFC-2822 rules are respected for 'display-name' component of + // 'From:' header. Specials characters are not allowed, so randomly add one + // of them to the site name and check the string is wrapped in quotes. Also + // hardcode some double-quotes and backslash to validate these are escaped + // properly too. + $specials = '()<>[]:;@\,."'; + $site_name = 'Drupal' . $specials[rand(0, strlen($specials) - 1)] . ' "si\te"'; + $this->config('system.site')->set('name', $site_name)->save(); + // Send an email and check that the From-header contains the site name + // within double-quotes. Also make sure double-quotes and "\" are escaped. + \Drupal::service('plugin.manager.mail')->mail('simpletest', 'from_test', 'from_test@example.com', $language); + $captured_emails = \Drupal::state()->get('system.test_mail_collector'); + $sent_message = end($captured_emails); + $escaped_site_name = str_replace(['\\', '"'], ['\\\\', '\\"'], $site_name); + $this->assertEquals('"' . $escaped_site_name . '" ', $sent_message['headers']['From'], 'From header is correctly quoted.'); + + // Make sure display-name is not quoted nor escaped if part on an encoding. + $site_name = 'Drépal, "si\te"'; + $this->config('system.site')->set('name', $site_name)->save(); + // Send an email and check that the From-header contains the site name. + \Drupal::service('plugin.manager.mail')->mail('simpletest', 'from_test', 'from_test@example.com', $language); + $captured_emails = \Drupal::state()->get('system.test_mail_collector'); + $sent_message = end($captured_emails); + $this->assertEquals('=?UTF-8?B?RHLDqXBhbCwgInNpXHRlIg==?= ', $sent_message['headers']['From'], 'From header is correctly encoded.'); + $this->assertEquals($site_name . ' ', Unicode::mimeHeaderDecode($sent_message['headers']['From']), 'From header is correctly encoded.'); } /** diff --git a/web/core/modules/system/src/Tests/Routing/RouterTest.php b/web/core/modules/system/tests/src/Functional/Routing/RouterTest.php similarity index 79% rename from web/core/modules/system/src/Tests/Routing/RouterTest.php rename to web/core/modules/system/tests/src/Functional/Routing/RouterTest.php index 8d7c43e86..0cb10bd80 100644 --- a/web/core/modules/system/src/Tests/Routing/RouterTest.php +++ b/web/core/modules/system/tests/src/Functional/Routing/RouterTest.php @@ -1,11 +1,11 @@ drupalGet('router_test/test1'); $this->assertRaw('test1', 'The correct string was returned because the route was successful.'); // Check expected headers from FinishResponseSubscriber. - $headers = $this->drupalGetHeaders(); - $this->assertEqual($headers['x-ua-compatible'], 'IE=edge'); - $this->assertEqual($headers['content-language'], 'en'); - $this->assertEqual($headers['x-content-type-options'], 'nosniff'); - $this->assertEqual($headers['x-frame-options'], 'SAMEORIGIN'); + $headers = $this->getSession()->getResponseHeaders(); + + $this->assertEquals($headers['X-UA-Compatible'], ['IE=edge']); + $this->assertEquals($headers['Content-language'], ['en']); + $this->assertEquals($headers['X-Content-Type-Options'], ['nosniff']); + $this->assertEquals($headers['X-Frame-Options'], ['SAMEORIGIN']); $this->drupalGet('router_test/test2'); $this->assertRaw('test2', 'The correct string was returned because the route was successful.'); // Check expected headers from FinishResponseSubscriber. $headers = $this->drupalGetHeaders(); - $this->assertEqual($headers['x-drupal-cache-contexts'], implode(' ', $expected_cache_contexts)); - $this->assertEqual($headers['x-drupal-cache-tags'], 'config:user.role.anonymous http_response rendered'); + $this->assertEqual($headers['X-Drupal-Cache-Contexts'], [implode(' ', $expected_cache_contexts)]); + $this->assertEqual($headers['X-Drupal-Cache-Tags'], ['config:user.role.anonymous http_response rendered']); // Confirm that the page wrapping is being added, so we're not getting a // raw body returned. $this->assertRaw('', 'Page markup was found.'); // In some instances, the subrequest handling may get confused and render // a page inception style. This test verifies that is not happening. - $this->assertNoPattern('#.*#s', 'There was no double-page effect from a misrendered subrequest.'); + $this->assertSession()->responseNotMatches('#.*#s', 'There was no double-page effect from a misrendered subrequest.'); // Confirm that route-level access check's cacheability is applied to the // X-Drupal-Cache-Contexts and X-Drupal-Cache-Tags headers. // 1. controller result: render array, globally cacheable route access. $this->drupalGet('router_test/test18'); $headers = $this->drupalGetHeaders(); - $this->assertEqual($headers['x-drupal-cache-contexts'], implode(' ', Cache::mergeContexts($renderer_required_cache_contexts, ['url']))); - $this->assertEqual($headers['x-drupal-cache-tags'], 'config:user.role.anonymous foo http_response rendered'); + $this->assertEqual($headers['X-Drupal-Cache-Contexts'], [implode(' ', Cache::mergeContexts($renderer_required_cache_contexts, ['url']))]); + $this->assertEqual($headers['X-Drupal-Cache-Tags'], ['config:user.role.anonymous foo http_response rendered']); // 2. controller result: render array, per-role cacheable route access. $this->drupalGet('router_test/test19'); $headers = $this->drupalGetHeaders(); - $this->assertEqual($headers['x-drupal-cache-contexts'], implode(' ', Cache::mergeContexts($renderer_required_cache_contexts, ['url', 'user.roles']))); - $this->assertEqual($headers['x-drupal-cache-tags'], 'config:user.role.anonymous foo http_response rendered'); + $this->assertEqual($headers['X-Drupal-Cache-Contexts'], [implode(' ', Cache::mergeContexts($renderer_required_cache_contexts, ['url', 'user.roles']))]); + $this->assertEqual($headers['X-Drupal-Cache-Tags'], ['config:user.role.anonymous foo http_response rendered']); // 3. controller result: Response object, globally cacheable route access. $this->drupalGet('router_test/test1'); $headers = $this->drupalGetHeaders(); - $this->assertFalse(isset($headers['x-drupal-cache-contexts'])); - $this->assertFalse(isset($headers['x-drupal-cache-tags'])); + $this->assertFalse(isset($headers['X-Drupal-Cache-Contexts'])); + $this->assertFalse(isset($headers['X-Drupal-Cache-Tags'])); // 4. controller result: Response object, per-role cacheable route access. $this->drupalGet('router_test/test20'); $headers = $this->drupalGetHeaders(); - $this->assertFalse(isset($headers['x-drupal-cache-contexts'])); - $this->assertFalse(isset($headers['x-drupal-cache-tags'])); + $this->assertFalse(isset($headers['X-Drupal-Cache-Contexts'])); + $this->assertFalse(isset($headers['X-Drupal-Cache-Tags'])); // 5. controller result: CacheableResponse object, globally cacheable route access. $this->drupalGet('router_test/test21'); $headers = $this->drupalGetHeaders(); - $this->assertEqual($headers['x-drupal-cache-contexts'], ''); - $this->assertEqual($headers['x-drupal-cache-tags'], 'http_response'); + $this->assertEqual($headers['X-Drupal-Cache-Contexts'], ['']); + $this->assertEqual($headers['X-Drupal-Cache-Tags'], ['http_response']); // 6. controller result: CacheableResponse object, per-role cacheable route access. $this->drupalGet('router_test/test22'); $headers = $this->drupalGetHeaders(); - $this->assertEqual($headers['x-drupal-cache-contexts'], 'user.roles'); - $this->assertEqual($headers['x-drupal-cache-tags'], 'http_response'); + $this->assertEqual($headers['X-Drupal-Cache-Contexts'], ['user.roles']); + $this->assertEqual($headers['X-Drupal-Cache-Tags'], ['http_response']); // Finally, verify that the X-Drupal-Cache-Contexts and X-Drupal-Cache-Tags // headers are not sent when their container parameter is set to FALSE. $this->drupalGet('router_test/test18'); $headers = $this->drupalGetHeaders(); - $this->assertTrue(isset($headers['x-drupal-cache-contexts'])); - $this->assertTrue(isset($headers['x-drupal-cache-tags'])); - $this->setHttpResponseDebugCacheabilityHeaders(FALSE); + $this->assertTrue(isset($headers['X-Drupal-Cache-Contexts'])); + $this->assertTrue(isset($headers['X-Drupal-Cache-Tags'])); + $this->setContainerParameter('http.response.debug_cacheability_headers', FALSE); + $this->rebuildContainer(); + $this->resetAll(); $this->drupalGet('router_test/test18'); $headers = $this->drupalGetHeaders(); - $this->assertFalse(isset($headers['x-drupal-cache-contexts'])); - $this->assertFalse(isset($headers['x-drupal-cache-tags'])); + $this->assertFalse(isset($headers['X-Drupal-Cache-Contexts'])); + $this->assertFalse(isset($headers['X-Drupal-Cache-Tags'])); } /** @@ -145,7 +148,7 @@ class RouterTest extends WebTestBase { // In some instances, the subrequest handling may get confused and render // a page inception style. This test verifies that is not happening. - $this->assertNoPattern('#.*#s', 'There was no double-page effect from a misrendered subrequest.'); + $this->assertSession()->responseNotMatches('#.*#s', 'There was no double-page effect from a misrendered subrequest.'); } /** @@ -162,7 +165,7 @@ class RouterTest extends WebTestBase { // In some instances, the subrequest handling may get confused and render // a page inception style. This test verifies that is not happening. - $this->assertNoPattern('#.*#s', 'There was no double-page effect from a misrendered subrequest.'); + $this->assertSession()->responseNotMatches('#.*#s', 'There was no double-page effect from a misrendered subrequest.'); } /** @@ -179,7 +182,7 @@ class RouterTest extends WebTestBase { // In some instances, the subrequest handling may get confused and render // a page inception style. This test verifies that is not happening. - $this->assertNoPattern('#.*#s', 'There was no double-page effect from a misrendered subrequest.'); + $this->assertSession()->responseNotMatches('#.*#s', 'There was no double-page effect from a misrendered subrequest.'); } /** @@ -208,7 +211,7 @@ class RouterTest extends WebTestBase { // In some instances, the subrequest handling may get confused and render // a page inception style. This test verifies that is not happening. - $this->assertNoPattern('#.*#s', 'There was no double-page effect from a misrendered subrequest.'); + $this->assertSession()->responseNotMatches('#.*#s', 'There was no double-page effect from a misrendered subrequest.'); } /** @@ -277,7 +280,9 @@ class RouterTest extends WebTestBase { public function testControllerResolutionAjax() { // This will fail with a JSON parse error if the request is not routed to // The correct controller. - $this->drupalGetAjax('/router_test/test10'); + $options['query'][MainContentViewSubscriber::WRAPPER_FORMAT] = 'drupal_ajax'; + $headers[] = 'X-Requested-With: XMLHttpRequest'; + $this->drupalGet('/router_test/test10', $options, $headers); $this->assertEqual($this->drupalGetHeader('Content-Type'), 'application/json', 'Correct mime content type was returned'); @@ -311,21 +316,18 @@ class RouterTest extends WebTestBase { $request = $this->container->get('request_stack')->getCurrentRequest(); $url = $request->getUriForPath('//router_test/test1'); $this->drupalGet($url); - $this->assertEqual(1, $this->redirectCount, $url . " redirected to " . $this->url); $this->assertUrl($request->getUriForPath('/router_test/test1')); // It should not matter how many leading slashes are used and query strings // should be preserved. $url = $request->getUriForPath('/////////////////////////////////////////////////router_test/test1') . '?qs=test'; $this->drupalGet($url); - $this->assertEqual(1, $this->redirectCount, $url . " redirected to " . $this->url); $this->assertUrl($request->getUriForPath('/router_test/test1') . '?qs=test'); // Ensure that external URLs in destination query params are not redirected // to. $url = $request->getUriForPath('/////////////////////////////////////////////////router_test/test1') . '?qs=test&destination=http://www.example.com%5c@drupal8alt.test'; $this->drupalGet($url); - $this->assertEqual(1, $this->redirectCount, $url . " redirected to " . $this->url); $this->assertUrl($request->getUriForPath('/router_test/test1') . '?qs=test'); } diff --git a/web/core/modules/system/src/Tests/Session/SessionAuthenticationTest.php b/web/core/modules/system/tests/src/Functional/Session/SessionAuthenticationTest.php similarity index 77% rename from web/core/modules/system/src/Tests/Session/SessionAuthenticationTest.php rename to web/core/modules/system/tests/src/Functional/Session/SessionAuthenticationTest.php index ffdc08d19..10a35020e 100644 --- a/web/core/modules/system/src/Tests/Session/SessionAuthenticationTest.php +++ b/web/core/modules/system/tests/src/Functional/Session/SessionAuthenticationTest.php @@ -1,17 +1,17 @@ drupalGet($protected_url); + $session = $this->getSession(); $this->assertResponse(401, 'An anonymous user cannot access a route protected with basic authentication.'); // We should be able to access the route with basic authentication. - $this->basicAuthGet($protected_url, $this->user->getUsername(), $this->user->pass_raw); + $this->basicAuthGet($protected_url, $this->user->getAccountName(), $this->user->passRaw); $this->assertResponse(200, 'A route protected with basic authentication can be accessed by an authenticated user.'); // Check that the correct user is logged in. - $this->assertEqual($this->user->id(), json_decode($this->getRawContent())->user, 'The correct user is authenticated on a route with basic authentication.'); + $this->assertEqual($this->user->id(), json_decode($session->getPage()->getContent())->user, 'The correct user is authenticated on a route with basic authentication.'); + $session->restart(); // If we now try to access a page without basic authentication then we // should no longer be logged in. $this->drupalGet($unprotected_url); $this->assertResponse(200, 'An unprotected route can be accessed without basic authentication.'); - $this->assertFalse(json_decode($this->getRawContent())->user, 'The user is no longer authenticated after visiting a page without basic authentication.'); + $this->assertFalse(json_decode($session->getPage()->getContent())->user, 'The user is no longer authenticated after visiting a page without basic authentication.'); // If we access the protected page again without basic authentication we // should get 401 Unauthorized. @@ -113,20 +115,24 @@ class SessionAuthenticationTest extends WebTestBase { $no_cookie_url = Url::fromRoute('session_test.get_session_basic_auth'); // A route that is authorized with standard cookie authentication. - $cookie_url = ''; + $cookie_url = 'user/login'; // If we authenticate with a third party authentication system then no // session cookie should be set, the third party system is responsible for // sustaining the session. - $this->basicAuthGet($no_cookie_url, $this->user->getUsername(), $this->user->pass_raw); + $this->basicAuthGet($no_cookie_url, $this->user->getAccountName(), $this->user->passRaw); $this->assertResponse(200, 'The user is successfully authenticated using basic authentication.'); - $this->assertFalse($this->drupalGetHeader('set-cookie', TRUE), 'No cookie is set on a route protected with basic authentication.'); + $this->assertEmpty($this->getSessionCookies()); + // Mink stores some information in the session that breaks the next check if + // not reset. + $this->getSession()->restart(); // On the other hand, authenticating using Cookie sets a cookie. - $edit = ['name' => $this->user->getUsername(), 'pass' => $this->user->pass_raw]; + $this->drupalGet($cookie_url); + $this->assertEmpty($this->getSessionCookies()); + $edit = ['name' => $this->user->getAccountName(), 'pass' => $this->user->passRaw]; $this->drupalPostForm($cookie_url, $edit, t('Log in')); - $this->assertResponse(200, 'The user is successfully authenticated using cookie authentication.'); - $this->assertTrue($this->drupalGetHeader('set-cookie', TRUE), 'A cookie is set on a route protected with cookie authentication.'); + $this->assertNotEmpty($this->getSessionCookies()); } } diff --git a/web/core/modules/system/src/Tests/Session/SessionTest.php b/web/core/modules/system/tests/src/Functional/Session/SessionTest.php similarity index 89% rename from web/core/modules/system/src/Tests/Session/SessionTest.php rename to web/core/modules/system/tests/src/Functional/Session/SessionTest.php index 0f219c503..f0ce98cef 100644 --- a/web/core/modules/system/src/Tests/Session/SessionTest.php +++ b/web/core/modules/system/tests/src/Functional/Session/SessionTest.php @@ -1,15 +1,15 @@ drupalCreateUser(); // Enable sessions. - $this->sessionReset($user->id()); + $this->sessionReset(); - // Make sure the session cookie is set as HttpOnly. - $this->drupalLogin($user); + // Make sure the session cookie is set as HttpOnly. We can only test this in + // the header, with the test setup + // \GuzzleHttp\Cookie\SetCookie::getHttpOnly() always returns FALSE. + // Start a new session by setting a message. + $this->drupalGet('session-test/set-message'); + $this->assertSessionCookie(TRUE); $this->assertTrue(preg_match('/HttpOnly/i', $this->drupalGetHeader('Set-Cookie', TRUE)), 'Session cookie is set as HttpOnly.'); - $this->drupalLogout(); // Verify that the session is regenerated if a module calls exit // in hook_user_login(). @@ -49,15 +52,15 @@ class SessionTest extends WebTestBase { $user->save(); $this->drupalGet('session-test/id'); $matches = []; - preg_match('/\s*session_id:(.*)\n/', $this->getRawContent(), $matches); + preg_match('/\s*session_id:(.*)\n/', $this->getSession()->getPage()->getContent(), $matches); $this->assertTrue(!empty($matches[1]), 'Found session ID before logging in.'); $original_session = $matches[1]; // We cannot use $this->drupalLogin($user); because we exit in // session_test_user_login() which breaks a normal assertion. $edit = [ - 'name' => $user->getUsername(), - 'pass' => $user->pass_raw, + 'name' => $user->getAccountName(), + 'pass' => $user->passRaw, ]; $this->drupalPostForm('user/login', $edit, t('Log in')); $this->drupalGet('user'); @@ -66,7 +69,7 @@ class SessionTest extends WebTestBase { $this->drupalGet('session-test/id'); $matches = []; - preg_match('/\s*session_id:(.*)\n/', $this->getRawContent(), $matches); + preg_match('/\s*session_id:(.*)\n/', $this->getSession()->getPage()->getContent(), $matches); $this->assertTrue(!empty($matches[1]), 'Found session ID after logging in.'); $this->assertTrue($matches[1] != $original_session, 'Session ID changed after login.'); } @@ -91,14 +94,22 @@ class SessionTest extends WebTestBase { // properly, val_1 will still be set. $value_2 = $this->randomMachineName(); $this->drupalGet('session-test/no-set/' . $value_2); + $session = $this->getSession(); $this->assertText($value_2, 'The session value was correctly passed to session-test/no-set.', 'Session'); $this->drupalGet('session-test/get'); $this->assertText($value_1, 'Session data is not saved for drupal_save_session(FALSE).', 'Session'); // Switch browser cookie to anonymous user, then back to user 1. - $this->sessionReset(); - $this->sessionReset($user->id()); + $session_cookie_name = $this->getSessionName(); + $session_cookie_value = $session->getCookie($session_cookie_name); + $session->restart(); + $this->initFrontPage(); + // Session restart always resets all the cookies by design, so we need to + // add the old session cookie again. + $session->setCookie($session_cookie_name, $session_cookie_value); + $this->drupalGet('session-test/get'); $this->assertText($value_1, 'Session data persists through browser close.', 'Session'); + $this->mink->setDefaultSessionName('default'); // Logout the user and make sure the stored value no longer persists. $this->drupalLogout(); @@ -242,8 +253,6 @@ class SessionTest extends WebTestBase { $this->assertEqual($times4->timestamp, $times3->timestamp, 'Sessions table was not updated.'); // Force updating of users and sessions table once per second. - $this->settingsSet('session_write_interval', 0); - // Write that value also into the test settings.php file. $settings['settings']['session_write_interval'] = (object) [ 'value' => 0, 'required' => TRUE, @@ -270,8 +279,7 @@ class SessionTest extends WebTestBase { // Send a blank sid in the session cookie, and the session should no longer // be valid. Closing the curl handler will stop the previous session ID // from persisting. - $this->curlClose(); - $this->additionalCurlOptions[CURLOPT_COOKIE] = rawurlencode($this->getSessionName()) . '=;'; + $this->mink->resetSessions(); $this->drupalGet('session-test/id-from-cookie'); $this->assertRaw("session_id:\n", 'Session ID is blank as sent from cookie header.'); // Assert that we have an anonymous session now. @@ -281,19 +289,13 @@ class SessionTest extends WebTestBase { /** * Reset the cookie file so that it refers to the specified user. - * - * @param $uid - * User id to set as the active session. */ - public function sessionReset($uid = 0) { + public function sessionReset() { // Close the internal browser. - $this->curlClose(); + $this->mink->resetSessions(); $this->loggedInUser = FALSE; // Change cookie file for user. - $this->cookieFile = \Drupal::service('stream_wrapper_manager')->getViaScheme('temporary')->getDirectoryPath() . '/cookie.' . $uid . '.txt'; - $this->additionalCurlOptions[CURLOPT_COOKIEFILE] = $this->cookieFile; - $this->additionalCurlOptions[CURLOPT_COOKIESESSION] = TRUE; $this->drupalGet('session-test/get'); $this->assertResponse(200, 'Session test module is correctly enabled.', 'Session'); } @@ -303,10 +305,10 @@ class SessionTest extends WebTestBase { */ public function assertSessionCookie($sent) { if ($sent) { - $this->assertNotNull($this->sessionId, 'Session cookie was sent.'); + $this->assertNotEmpty($this->getSessionCookies()->count(), 'Session cookie was sent.'); } else { - $this->assertNull($this->sessionId, 'Session cookie was not sent.'); + $this->assertEmpty($this->getSessionCookies()->count(), 'Session cookie was not sent.'); } } diff --git a/web/core/modules/system/tests/src/Functional/Session/StackSessionHandlerIntegrationTest.php b/web/core/modules/system/tests/src/Functional/Session/StackSessionHandlerIntegrationTest.php new file mode 100644 index 000000000..d65ba4216 --- /dev/null +++ b/web/core/modules/system/tests/src/Functional/Session/StackSessionHandlerIntegrationTest.php @@ -0,0 +1,49 @@ +drupalGet('session-test/trace-handler', $options, $headers)); + $sessionId = $this->getSessionCookies()->getCookieByName($this->getSessionName())->getValue(); + $expect_trace = [ + ['BEGIN', 'test_argument', 'open'], + ['BEGIN', NULL, 'open'], + ['END', NULL, 'open'], + ['END', 'test_argument', 'open'], + ['BEGIN', 'test_argument', 'read', $sessionId], + ['BEGIN', NULL, 'read', $sessionId], + ['END', NULL, 'read', $sessionId], + ['END', 'test_argument', 'read', $sessionId], + ['BEGIN', 'test_argument', 'write', $sessionId], + ['BEGIN', NULL, 'write', $sessionId], + ['END', NULL, 'write', $sessionId], + ['END', 'test_argument', 'write', $sessionId], + ['BEGIN', 'test_argument', 'close'], + ['BEGIN', NULL, 'close'], + ['END', NULL, 'close'], + ['END', 'test_argument', 'close'], + ]; + $this->assertEqual($expect_trace, $actual_trace); + } + +} diff --git a/web/core/modules/system/src/Tests/System/ErrorHandlerTest.php b/web/core/modules/system/tests/src/Functional/System/ErrorHandlerTest.php similarity index 68% rename from web/core/modules/system/src/Tests/System/ErrorHandlerTest.php rename to web/core/modules/system/tests/src/Functional/System/ErrorHandlerTest.php index dc661fec9..3ab502e86 100644 --- a/web/core/modules/system/src/Tests/System/ErrorHandlerTest.php +++ b/web/core/modules/system/tests/src/Functional/System/ErrorHandlerTest.php @@ -1,16 +1,16 @@ 'Drupal\error_test\Controller\ErrorTestController->generateWarnings()', '%file' => drupal_get_path('module', 'error_test') . '/error_test.module', ]; - $fatal_error = [ - '%type' => 'Recoverable fatal error', - '%function' => 'Drupal\error_test\Controller\ErrorTestController->Drupal\error_test\Controller\{closure}()', - '@message' => 'Argument 1 passed to Drupal\error_test\Controller\ErrorTestController::Drupal\error_test\Controller\{closure}() must be of the type array, string given, called in ' . \Drupal::root() . '/core/modules/system/tests/modules/error_test/src/Controller/ErrorTestController.php on line 62 and defined', - ]; - if (version_compare(PHP_VERSION, '7.0.0-dev') >= 0) { - // In PHP 7, instead of a recoverable fatal error we get a TypeError. - $fatal_error['%type'] = 'TypeError'; - // The error message also changes in PHP 7. - $fatal_error['@message'] = 'Argument 1 passed to Drupal\error_test\Controller\ErrorTestController::Drupal\error_test\Controller\{closure}() must be of the type array, string given, called in ' . \Drupal::root() . '/core/modules/system/tests/modules/error_test/src/Controller/ErrorTestController.php on line 62'; - } // Set error reporting to display verbose notices. $this->config('system.logging')->set('error_level', ERROR_REPORTING_DISPLAY_VERBOSE)->save(); @@ -68,25 +57,6 @@ class ErrorHandlerTest extends WebTestBase { // Set error reporting to display verbose notices. $this->config('system.logging')->set('error_level', ERROR_REPORTING_DISPLAY_VERBOSE)->save(); - $this->drupalGet('error-test/generate-fatals'); - $this->assertResponse(500, 'Received expected HTTP status code.'); - $this->assertErrorMessage($fatal_error); - $this->assertRaw('
', 'Found pre element with backtrace class.');
-    // Ensure we are escaping but not double escaping.
-    $this->assertRaw(''');
-    $this->assertNoRaw('&#039;');
-
-    // Remove the recoverable fatal error from the assertions, it's wanted here.
-    // Ensure that we just remove this one recoverable fatal error (in PHP 7 this
-    // is a TypeError).
-    foreach ($this->assertions as $key => $assertion) {
-      if (in_array($assertion['message_group'], ['Recoverable fatal error', 'TypeError']) && strpos($assertion['message'], 'Argument 1 passed to Drupal\error_test\Controller\ErrorTestController::Drupal\error_test\Controller\{closure}() must be of the type array, string given, called in') !== FALSE) {
-        unset($this->assertions[$key]);
-        $this->deleteAssert($assertion['message_id']);
-      }
-    }
-    // Drop the single exception.
-    $this->results['#exception']--;
 
     // Set error reporting to collect notices.
     $config->set('error_level', ERROR_REPORTING_DISPLAY_ALL)->save();
@@ -96,7 +66,6 @@ class ErrorHandlerTest extends WebTestBase {
     $this->assertErrorMessage($error_warning);
     $this->assertErrorMessage($error_user_notice);
     $this->assertNoRaw('
', 'Did not find pre element with backtrace class.');
-    $this->assertErrorLogged($fatal_error['@message']);
 
     // Set error reporting to not collect notices.
     $config->set('error_level', ERROR_REPORTING_DISPLAY_SOME)->save();
@@ -122,9 +91,6 @@ class ErrorHandlerTest extends WebTestBase {
    * Test the exception handler.
    */
   public function testExceptionHandler() {
-    // Ensure the test error log is empty before these tests.
-    $this->assertNoErrorsLogged();
-
     $error_exception = [
       '%type' => 'Exception',
       '@message' => 'Drupal & awesome',
@@ -148,11 +114,11 @@ class ErrorHandlerTest extends WebTestBase {
     ];
 
     $this->drupalGet('error-test/trigger-exception');
-    $this->assertTrue(strpos($this->drupalGetHeader(':status'), '500 Service unavailable (with message)'), 'Received expected HTTP status line.');
+    $this->assertSession()->statusCodeEquals(500);
     $this->assertErrorMessage($error_exception);
 
     $this->drupalGet('error-test/trigger-pdo-exception');
-    $this->assertTrue(strpos($this->drupalGetHeader(':status'), '500 Service unavailable (with message)'), 'Received expected HTTP status line.');
+    $this->assertSession()->statusCodeEquals(500);
     // We cannot use assertErrorMessage() since the exact error reported
     // varies from database to database. Check that the SQL string is displayed.
     $this->assertText($error_pdo_exception['%type'], format_string('Found %type in error page.', $error_pdo_exception));
@@ -161,7 +127,7 @@ class ErrorHandlerTest extends WebTestBase {
     $this->assertRaw($error_details, format_string("Found '@message' in error page.", ['@message' => $error_details]));
 
     $this->drupalGet('error-test/trigger-renderer-exception');
-    $this->assertTrue(strpos($this->drupalGetHeader(':status'), '500 Service unavailable (with message)'), 'Received expected HTTP status line.');
+    $this->assertSession()->statusCodeEquals(500);
     $this->assertErrorMessage($error_renderer_exception);
 
     // Disable error reporting, ensure that 5xx responses are not cached.
@@ -172,12 +138,8 @@ class ErrorHandlerTest extends WebTestBase {
     $this->drupalGet('error-test/trigger-exception');
     $this->assertFalse($this->drupalGetHeader('X-Drupal-Cache'));
     $this->assertIdentical(strpos($this->drupalGetHeader('Cache-Control'), 'public'), FALSE, 'Received expected HTTP status line.');
-    $this->assertTrue(strpos($this->drupalGetHeader(':status'), '500 Service unavailable (with message)'), 'Received expected HTTP status line.');
+    $this->assertSession()->statusCodeEquals(500);
     $this->assertNoErrorMessage($error_exception);
-
-    // The exceptions are expected. Do not interpret them as a test failure.
-    // Not using File API; a potential error must trigger a PHP warning.
-    unlink(\Drupal::root() . '/' . $this->siteDirectory . '/error.log');
   }
 
   /**
diff --git a/web/core/modules/system/tests/src/Functional/Theme/ThemeTest.php b/web/core/modules/system/tests/src/Functional/Theme/ThemeTest.php
index 3d534d8e7..b70ee859c 100644
--- a/web/core/modules/system/tests/src/Functional/Theme/ThemeTest.php
+++ b/web/core/modules/system/tests/src/Functional/Theme/ThemeTest.php
@@ -94,7 +94,11 @@ class ThemeTest extends BrowserTestBase {
     $config->set('css.preprocess', 0);
     $config->save();
     $this->drupalGet('theme-test/suggestion');
-    $this->assertNoText('js.module.css', 'The theme\'s .info.yml file is able to override a module CSS file from being added to the page.');
+    // We add a "?" to the assertion, because drupalSettings may include
+    // information about the file; we only really care about whether it appears
+    // in a LINK or STYLE tag, for which Drupal always adds a query string for
+    // cache control.
+    $this->assertSession()->responseNotContains('js.module.css?');
 
     // Also test with aggregation enabled, simply ensuring no PHP errors are
     // triggered during drupal_build_css_cache() when a source file doesn't
diff --git a/web/core/modules/system/tests/src/FunctionalJavascript/Form/ElementsTableSelectTest.php b/web/core/modules/system/tests/src/FunctionalJavascript/Form/ElementsTableSelectTest.php
new file mode 100644
index 000000000..b565bfd74
--- /dev/null
+++ b/web/core/modules/system/tests/src/FunctionalJavascript/Form/ElementsTableSelectTest.php
@@ -0,0 +1,58 @@
+drupalGet('form_test/tableselect/multiple-true');
+    $session = $this->getSession();
+    $page = $session->getPage();
+    for ($i = 1; $i <= 3; $i++) {
+      $row = 'row' . $i;
+      $page->hasUncheckedField($row);
+      $page->checkField($row);
+      $this->assertSession()->assertWaitOnAjaxRequest();
+      // Check current row and previous rows are checked.
+      for ($j = 1; $j <= $i; $j++) {
+        $other_row = 'row' . $j;
+        $page->hasCheckedField($other_row);
+      }
+    }
+
+    // Test radios (#multiple == FALSE).
+    $this->drupalGet('form_test/tableselect/multiple-false');
+    for ($i = 1; $i <= 3; $i++) {
+      $row = 'input[value="row' . $i . '"]';
+      $page->hasUncheckedField($row);
+      $this->click($row);
+      $this->assertSession()->assertWaitOnAjaxRequest();
+      $page->hasCheckedField($row);
+      // Check other rows are not checked
+      for ($j = 1; $j <= 3; $j++) {
+        if ($j == $i) {
+          continue;
+        }
+        $other_row = 'edit-tableselect-row' . $j;
+        $page->hasUncheckedField($other_row);
+      }
+    }
+  }
+
+}
diff --git a/web/core/modules/system/src/Tests/Form/RebuildTest.php b/web/core/modules/system/tests/src/FunctionalJavascript/Form/RebuildTest.php
similarity index 53%
rename from web/core/modules/system/src/Tests/Form/RebuildTest.php
rename to web/core/modules/system/tests/src/FunctionalJavascript/Form/RebuildTest.php
index 2e138bdfb..caf52094d 100644
--- a/web/core/modules/system/src/Tests/Form/RebuildTest.php
+++ b/web/core/modules/system/tests/src/FunctionalJavascript/Form/RebuildTest.php
@@ -1,12 +1,12 @@
 drupalLogin($this->webUser);
   }
 
-  /**
-   * Tests preservation of values.
-   */
-  public function testRebuildPreservesValues() {
-    $edit = [
-      'checkbox_1_default_off' => TRUE,
-      'checkbox_1_default_on' => FALSE,
-      'text_1' => 'foo',
-    ];
-    $this->drupalPostForm('form-test/form-rebuild-preserve-values', $edit, 'Add more');
-
-    // Verify that initial elements retained their submitted values.
-    $this->assertFieldChecked('edit-checkbox-1-default-off', 'A submitted checked checkbox retained its checked state during a rebuild.');
-    $this->assertNoFieldChecked('edit-checkbox-1-default-on', 'A submitted unchecked checkbox retained its unchecked state during a rebuild.');
-    $this->assertFieldById('edit-text-1', 'foo', 'A textfield retained its submitted value during a rebuild.');
-
-    // Verify that newly added elements were initialized with their default values.
-    $this->assertFieldChecked('edit-checkbox-2-default-on', 'A newly added checkbox was initialized with a default checked state.');
-    $this->assertNoFieldChecked('edit-checkbox-2-default-off', 'A newly added checkbox was initialized with a default unchecked state.');
-    $this->assertFieldById('edit-text-2', 'DEFAULT 2', 'A newly added textfield was initialized with its default value.');
-  }
-
   /**
    * Tests that a form's action is retained after an Ajax submission.
    *
@@ -68,6 +47,7 @@ class RebuildTest extends WebTestBase {
    * followed by a non-Ajax submission, which triggers a validation error.
    */
   public function testPreserveFormActionAfterAJAX() {
+    $page = $this->getSession()->getPage();
     // Create a multi-valued field for 'page' nodes to use for Ajax testing.
     $field_name = 'field_ajax_test';
     FieldStorageConfig::create([
@@ -81,8 +61,26 @@ class RebuildTest extends WebTestBase {
       'entity_type' => 'node',
       'bundle' => 'page',
     ])->save();
+
+    // Also create a file field to test server side validation error.
+    $field_file_name = 'field_file_test';
+    FieldStorageConfig::create([
+      'field_name' => $field_file_name,
+      'entity_type' => 'node',
+      'type' => 'file',
+      'cardinality' => 1,
+    ])->save();
+    FieldConfig::create([
+      'field_name' => $field_file_name,
+      'entity_type' => 'node',
+      'bundle' => 'page',
+      'label' => 'Test file',
+      'required' => TRUE,
+    ])->save();
+
     entity_get_form_display('node', 'page', 'default')
       ->setComponent($field_name, ['type' => 'text_textfield'])
+      ->setComponent($field_file_name, ['type' => 'file_generic'])
       ->save();
 
     // Log in a user who can create 'page' nodes.
@@ -93,27 +91,31 @@ class RebuildTest extends WebTestBase {
     // submission and verify it worked by ensuring the updated page has two text
     // field items in the field for which we just added an item.
     $this->drupalGet('node/add/page');
-    $this->drupalPostAjaxForm(NULL, [], ['field_ajax_test_add_more' => t('Add another item')], NULL, [], [], 'node-page-form');
-    $this->assert(count($this->xpath('//div[contains(@class, "field--name-field-ajax-test")]//input[@type="text"]')) == 2, 'AJAX submission succeeded.');
+    $page->find('css', '[value="Add another item"]')->click();
+    $this->assertSession()->assertWaitOnAjaxRequest();
+    $this->assertTrue(count($this->xpath('//div[contains(@class, "field--name-field-ajax-test")]//input[@type="text"]')) == 2, 'AJAX submission succeeded.');
 
-    // Submit the form with the non-Ajax "Save" button, leaving the title field
+    // Submit the form with the non-Ajax "Save" button, leaving the file field
     // blank to trigger a validation error, and ensure that a validation error
     // occurred, because this test is for testing what happens when a form is
     // re-rendered without being re-built, which is what happens when there's
-    // a validation error.
-    $this->drupalPostForm(NULL, [], t('Save'));
-    $this->assertText('Title field is required.', 'Non-AJAX submission correctly triggered a validation error.');
+    // a server side validation error.
+    $edit = [
+      'title[0][value]' => $this->randomString(),
+    ];
+    $this->drupalPostForm(NULL, $edit, 'Save');
+    $this->assertSession()->pageTextContains('Test file field is required.', 'Non-AJAX submission correctly triggered a validation error.');
 
     // Ensure that the form contains two items in the multi-valued field, so we
     // know we're testing a form that was correctly retrieved from cache.
-    $this->assert(count($this->xpath('//form[contains(@id, "node-page-form")]//div[contains(@class, "js-form-item-field-ajax-test")]//input[@type="text"]')) == 2, 'Form retained its state from cache.');
+    $this->assertTrue(count($this->xpath('//form[contains(@id, "node-page-form")]//div[contains(@class, "js-form-item-field-ajax-test")]//input[@type="text"]')) == 2, 'Form retained its state from cache.');
 
     // Ensure that the form's action is correct.
     $forms = $this->xpath('//form[contains(@class, "node-page-form")]');
-    $this->assertEqual(1, count($forms));
+    $this->assertEquals(1, count($forms));
     // Strip query params off the action before asserting.
-    $url = parse_url($forms[0]['action'])['path'];
-    $this->assertEqual(Url::fromRoute('node.add', ['node_type' => 'page'])->toString(), $url);
+    $url = parse_url($forms[0]->getAttribute('action'))['path'];
+    $this->assertEquals(Url::fromRoute('node.add', ['node_type' => 'page'])->toString(), $url);
   }
 
 }
diff --git a/web/core/modules/system/tests/src/FunctionalJavascript/Form/TriggeringElementTest.php b/web/core/modules/system/tests/src/FunctionalJavascript/Form/TriggeringElementTest.php
new file mode 100644
index 000000000..41733ec46
--- /dev/null
+++ b/web/core/modules/system/tests/src/FunctionalJavascript/Form/TriggeringElementTest.php
@@ -0,0 +1,111 @@
+drupalGet($path);
+
+    $assert_session = $this->assertSession();
+    $this->getSession()->getDriver()->submitForm('//form[@id="' . $form_html_id . '"]');
+    $assert_session->pageTextContains('There is no clicked button.');
+    $assert_session->pageTextNotContains('Submit handler for form_test_clicked_button executed.');
+
+    // Ensure submitting a form with one or more submit buttons results in the
+    // triggering element being set to the first one the user has access to. An
+    // argument with 'r' in it indicates a restricted (#access=FALSE) button.
+    $this->drupalGet($path . '/s');
+    $this->getSession()->getDriver()->submitForm('//form[@id="' . $form_html_id . '"]');
+    $assert_session->pageTextContains('The clicked button is button1.');
+    $assert_session->pageTextContains('Submit handler for form_test_clicked_button executed.');
+
+    $this->drupalGet($path . '/s/s');
+    $this->getSession()->getDriver()->submitForm('//form[@id="' . $form_html_id . '"]');
+    $assert_session->pageTextContains('The clicked button is button1.');
+    $assert_session->pageTextContains('Submit handler for form_test_clicked_button executed.');
+
+    $this->drupalGet($path . '/rs/s');
+    $this->getSession()->getDriver()->submitForm('//form[@id="' . $form_html_id . '"]');
+    $assert_session->pageTextContains('The clicked button is button2.');
+    $assert_session->pageTextContains('Submit handler for form_test_clicked_button executed.');
+
+    // Ensure submitting a form with buttons of different types results in the
+    // triggering element being set to the first button, regardless of type. For
+    // the FAPI 'button' type, this should result in the submit handler not
+    // executing. The types are 's'(ubmit), 'b'(utton), and 'i'(mage_button).
+    $this->drupalGet($path . '/s/b/i');
+    $this->getSession()->getDriver()->submitForm('//form[@id="' . $form_html_id . '"]');
+    $assert_session->pageTextContains('The clicked button is button1.');
+    $assert_session->pageTextContains('Submit handler for form_test_clicked_button executed.');
+
+    $this->drupalGet($path . '/b/s/i');
+    $this->getSession()->getDriver()->submitForm('//form[@id="' . $form_html_id . '"]');
+    $assert_session->pageTextContains('The clicked button is button1.');
+    $assert_session->pageTextNotContains('Submit handler for form_test_clicked_button executed.');
+
+    $this->drupalGet($path . '/i/s/b');
+    $this->getSession()->getDriver()->submitForm('//form[@id="' . $form_html_id . '"]');
+    $assert_session->pageTextContains('The clicked button is button1.');
+    $assert_session->pageTextContains('Submit handler for form_test_clicked_button executed.');
+  }
+
+  /**
+   * Tests attempts to bypass access control.
+   *
+   * Test that the triggering element does not get set to a button with
+   * #access=FALSE.
+   */
+  public function testAttemptAccessControlBypass() {
+    $path = 'form-test/clicked-button';
+    $form_html_id = 'form-test-clicked-button';
+
+    // Retrieve a form where 'button1' has #access=FALSE and 'button2' doesn't.
+    $this->drupalGet($path . '/rs/s');
+
+    // Submit the form with 'button1=button1' in the POST data, which someone
+    // trying to get around security safeguards could easily do. We have to do
+    // a little trickery here, to work around the safeguards in drupalPostForm()
+    // by renaming the text field and value that is in the form to 'button1',
+    // we can get the data we want into \Drupal::request()->request.
+    $page = $this->getSession()->getPage();
+    $input = $page->find('css', 'input[name="text"]');
+    $this->assertNotNull($input, 'text input located.');
+
+    $input->setValue('name', 'button1');
+    $input->setValue('value', 'button1');
+    $this->xpath('//form[@id="' . $form_html_id . '"]//input[@type="submit"]')[0]->click();
+
+    // Ensure that the triggering element was not set to the restricted button.
+    // Do this with both a negative and positive assertion, because negative
+    // assertions alone can be brittle. See testNoButtonInfoInPost() for why the
+    // triggering element gets set to 'button2'.
+    $this->assertSession()->pageTextNotContains('The clicked button is button1.');
+    $this->assertSession()->pageTextContains('The clicked button is button2.');
+  }
+
+}
diff --git a/web/core/modules/system/tests/src/FunctionalJavascript/FrameworkTest.php b/web/core/modules/system/tests/src/FunctionalJavascript/FrameworkTest.php
new file mode 100644
index 000000000..60f10b35f
--- /dev/null
+++ b/web/core/modules/system/tests/src/FunctionalJavascript/FrameworkTest.php
@@ -0,0 +1,122 @@
+ 'ajax_forms_test_lazy_load_form_submit',
+      'setting_value' => 'executed',
+      'library_1' => 'system/admin',
+      'library_2' => 'system/drupal.system',
+    ];
+
+    // Get the base page.
+    $this->drupalGet('ajax_forms_test_lazy_load_form');
+    $page = $this->getSession()->getPage();
+    $assert = $this->assertSession();
+
+    $original_settings = $this->getDrupalSettings();
+    $original_libraries = explode(',', $original_settings['ajaxPageState']['libraries']);
+
+    // Verify that the base page doesn't have the settings and files that are to
+    // be lazy loaded as part of the next requests.
+    $this->assertTrue(!isset($original_settings[$expected['setting_name']]), format_string('Page originally lacks the %setting, as expected.', ['%setting' => $expected['setting_name']]));
+    $this->assertTrue(!in_array($expected['library_1'], $original_libraries), format_string('Page originally lacks the %library library, as expected.', ['%library' => $expected['library_1']]));
+    $this->assertTrue(!in_array($expected['library_2'], $original_libraries), format_string('Page originally lacks the %library library, as expected.', ['%library' => $expected['library_2']]));
+
+    // Submit the AJAX request without triggering files getting added.
+    $page->pressButton('Submit');
+    $assert->assertWaitOnAjaxRequest();
+    $new_settings = $this->getDrupalSettings();
+    $new_libraries = explode(',', $new_settings['ajaxPageState']['libraries']);
+
+    // Verify the setting was not added when not expected.
+    $this->assertTrue(!isset($new_settings[$expected['setting_name']]), format_string('Page still lacks the %setting, as expected.', ['%setting' => $expected['setting_name']]));
+    $this->assertTrue(!in_array($expected['library_1'], $new_libraries), format_string('Page still lacks the %library library, as expected.', ['%library' => $expected['library_1']]));
+    $this->assertTrue(!in_array($expected['library_2'], $new_libraries), format_string('Page still lacks the %library library, as expected.', ['%library' => $expected['library_2']]));
+
+    // Submit the AJAX request and trigger adding files.
+    $page->checkField('add_files');
+    $page->pressButton('Submit');
+    $assert->assertWaitOnAjaxRequest();
+    $new_settings = $this->getDrupalSettings();
+    $new_libraries = explode(',', $new_settings['ajaxPageState']['libraries']);
+
+    // Verify the expected setting was added, both to drupalSettings, and as
+    // the first AJAX command.
+    $this->assertIdentical($new_settings[$expected['setting_name']], $expected['setting_value'], format_string('Page now has the %setting.', ['%setting' => $expected['setting_name']]));
+
+    // Verify the expected CSS file was added, both to drupalSettings, and as
+    // the second AJAX command for inclusion into the HTML.
+    $this->assertTrue(in_array($expected['library_1'], $new_libraries), format_string('Page state now has the %library library.', ['%library' => $expected['library_1']]));
+
+    // Verify the expected JS file was added, both to drupalSettings, and as
+    // the third AJAX command for inclusion into the HTML. By testing for an
+    // exact HTML string containing the SCRIPT tag, we also ensure that
+    // unexpected JavaScript code, such as a jQuery.extend() that would
+    // potentially clobber rather than properly merge settings, didn't
+    // accidentally get added.
+    $this->assertTrue(in_array($expected['library_2'], $new_libraries), format_string('Page state now has the %library library.', ['%library' => $expected['library_2']]));
+  }
+
+  /**
+   * Tests that drupalSettings.currentPath is not updated on AJAX requests.
+   */
+  public function testCurrentPathChange() {
+    $this->drupalGet('ajax_forms_test_lazy_load_form');
+    $page = $this->getSession()->getPage();
+    $assert = $this->assertSession();
+
+    $old_settings = $this->getDrupalSettings();
+    $page->pressButton('Submit');
+    $assert->assertWaitOnAjaxRequest();
+    $new_settings = $this->getDrupalSettings();
+    $this->assertEquals($old_settings['path']['currentPath'], $new_settings['path']['currentPath']);
+  }
+
+  /**
+   * Tests that overridden CSS files are not added during lazy load.
+   */
+  public function testLazyLoadOverriddenCSS() {
+    // The test theme overrides js.module.css without an implementation,
+    // thereby removing it.
+    \Drupal::service('theme_handler')->install(['test_theme']);
+    $this->config('system.theme')
+      ->set('default', 'test_theme')
+      ->save();
+
+    // This gets the form, and does an Ajax submission on it.
+    $this->drupalGet('ajax_forms_test_lazy_load_form');
+    $page = $this->getSession()->getPage();
+    $assert = $this->assertSession();
+
+    $page->checkField('add_files');
+    $page->pressButton('Submit');
+    $assert->assertWaitOnAjaxRequest();
+
+    // Verify that the resulting HTML does not load the overridden CSS file.
+    // We add a "?" to the assertion, because drupalSettings may include
+    // information about the file; we only really care about whether it appears
+    // in a LINK or STYLE tag, for which Drupal always adds a query string for
+    // cache control.
+    $assert->responseNotContains('js.module.css?', 'Ajax lazy loading does not add overridden CSS files.');
+  }
+
+}
diff --git a/web/core/modules/system/tests/src/Kernel/Extension/ModuleHandlerTest.php b/web/core/modules/system/tests/src/Kernel/Extension/ModuleHandlerTest.php
index 708d517a3..fd22de139 100644
--- a/web/core/modules/system/tests/src/Kernel/Extension/ModuleHandlerTest.php
+++ b/web/core/modules/system/tests/src/Kernel/Extension/ModuleHandlerTest.php
@@ -233,11 +233,11 @@ class ModuleHandlerTest extends KernelTestBase {
     $result = $this->moduleInstaller()->uninstall([$non_dependency]);
     $this->assertTrue($result, 'ModuleInstaller::uninstall() returns TRUE.');
     $this->assertFalse($this->moduleHandler()->moduleExists($non_dependency));
-    $this->assertEquals(drupal_get_installed_schema_version($non_dependency), SCHEMA_UNINSTALLED, "$dependency module was uninstalled.");
+    $this->assertEquals(drupal_get_installed_schema_version($non_dependency), SCHEMA_UNINSTALLED, "$non_dependency module was uninstalled.");
 
     // Verify that the installation profile itself was not uninstalled.
     $uninstalled_modules = \Drupal::state()->get('module_test.uninstall_order') ?: [];
-    $this->assertContains($non_dependency, $uninstalled_modules, "$dependency module is in the list of uninstalled modules.");
+    $this->assertContains($non_dependency, $uninstalled_modules, "$non_dependency module is in the list of uninstalled modules.");
     $this->assertNotContains($profile, $uninstalled_modules, 'The installation profile is not in the list of uninstalled modules.');
 
     // Try uninstalling the required module.
diff --git a/web/core/modules/system/tests/src/Kernel/Form/FileElementTest.php b/web/core/modules/system/tests/src/Kernel/Form/FileElementTest.php
new file mode 100644
index 000000000..267489f4c
--- /dev/null
+++ b/web/core/modules/system/tests/src/Kernel/Form/FileElementTest.php
@@ -0,0 +1,32 @@
+container->get('form_builder')
+      ->getForm(FormTestFileForm::class);
+
+    $this->assertSame('file', $form['file']['#type']);
+    $this->assertTrue($form['file']['#multiple']);
+    $this->assertContains('cagatio', $form['file']['#attributes']['class']);
+  }
+
+}
diff --git a/web/core/modules/system/tests/themes/test_theme/test_theme.info.yml b/web/core/modules/system/tests/themes/test_theme/test_theme.info.yml
index b73a45d7c..b9660a45f 100644
--- a/web/core/modules/system/tests/themes/test_theme/test_theme.info.yml
+++ b/web/core/modules/system/tests/themes/test_theme/test_theme.info.yml
@@ -16,7 +16,7 @@ base theme: classy
 core: 8.x
 logo: images/logo2.svg
 stylesheets-remove:
-  - '@system/css/js.module.css'
+  - '@stable/css/system/components/js.module.css'
 libraries:
   - test_theme/global-styling
 libraries-override:
diff --git a/web/core/modules/system/tests/themes/test_theme_settings/config/schema/test_theme_settings.schema.yml b/web/core/modules/system/tests/themes/test_theme_settings/config/schema/test_theme_settings.schema.yml
index a53e94a0c..482577f2d 100644
--- a/web/core/modules/system/tests/themes/test_theme_settings/config/schema/test_theme_settings.schema.yml
+++ b/web/core/modules/system/tests/themes/test_theme_settings/config/schema/test_theme_settings.schema.yml
@@ -10,3 +10,9 @@ test_theme_settings.settings:
       sequence:
         type: integer
         label: 'fids'
+    multi_file:
+      type: sequence
+      label: 'Multiple file field with all file extensions'
+      sequence:
+        type: integer
+        label: 'fids'
diff --git a/web/core/modules/system/tests/themes/test_theme_settings/theme-settings.php b/web/core/modules/system/tests/themes/test_theme_settings/theme-settings.php
index 7f3c1395f..1255c6537 100644
--- a/web/core/modules/system/tests/themes/test_theme_settings/theme-settings.php
+++ b/web/core/modules/system/tests/themes/test_theme_settings/theme-settings.php
@@ -24,6 +24,17 @@ function test_theme_settings_form_system_theme_settings_alter(&$form, FormStateI
     ],
   ];
 
+  $form['multi_file'] = [
+    '#type' => 'managed_file',
+    '#title' => t('Multiple file field with all file extensions'),
+    '#multiple' => TRUE,
+    '#default_value' => theme_get_setting('multi_file'),
+    '#upload_location' => 'public://test',
+    '#upload_validators'  => [
+      'file_validate_extensions' => [],
+    ],
+  ];
+
   $form['#submit'][] = 'test_theme_settings_form_system_theme_settings_submit';
 }
 
diff --git a/web/core/modules/taxonomy/src/Plugin/migrate/source/d6/TermLocalizedTranslation.php b/web/core/modules/taxonomy/src/Plugin/migrate/source/d6/TermLocalizedTranslation.php
new file mode 100644
index 000000000..5348ee23e
--- /dev/null
+++ b/web/core/modules/taxonomy/src/Plugin/migrate/source/d6/TermLocalizedTranslation.php
@@ -0,0 +1,100 @@
+addField('td', 'language', 'td.language');
+
+    // Add in the property, which is either name or description.
+    // Cast td.tid as char for PostgreSQL compatibility.
+    $query->leftJoin('i18n_strings', 'i18n', 'CAST(td.tid AS CHAR(255)) = i18n.objectid');
+    $query->isNotNull('i18n.lid');
+    $query->addField('i18n', 'lid');
+    $query->addField('i18n', 'property');
+
+    // Add in the translation for the property.
+    $query->innerJoin('locales_target', 'lt', 'i18n.lid = lt.lid');
+    $query->addField('lt', 'language', 'lt.language');
+    $query->addField('lt', 'translation');
+    return $query;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function prepareRow(Row $row) {
+    $language = $row->getSourceProperty('ltlanguage');
+    $row->setSourceProperty('language', $language);
+    $tid = $row->getSourceProperty('tid');
+
+    // If this row has been migrated it is a duplicate then skip it.
+    if ($this->idMap->lookupDestinationIds(['tid' => $tid, 'language' => $language])) {
+      return FALSE;
+    }
+
+    // Save the translation for this property.
+    $property = $row->getSourceProperty('property');
+    $row->setSourceProperty($property . '_translated', $row->getSourceProperty('translation'));
+
+    // Get the translation, if one exists, for the property not already in the
+    // row.
+    $other_property = ($property == 'name') ? 'description' : 'name';
+    $query = $this->select('i18n_strings', 'i18n')
+      ->fields('i18n', ['lid'])
+      ->condition('i18n.property', $other_property)
+      ->condition('i18n.objectid', $tid);
+    $query->leftJoin('locales_target', 'lt', 'i18n.lid = lt.lid');
+    $query->condition('lt.language', $language);
+    $query->addField('lt', 'translation');
+    $results = $query->execute()->fetchAssoc();
+    $row->setSourceProperty($other_property . '_translated', $results['translation']);
+
+    parent::prepareRow($row);
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function fields() {
+    $fields = [
+      'language' => $this->t('Language for this term.'),
+      'name_translated' => $this->t('Term name translation.'),
+      'description_translated' => $this->t('Term description translation.'),
+    ];
+    return parent::fields() + $fields;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getIds() {
+    $ids['language']['type'] = 'string';
+    $ids['language']['alias'] = 'lt';
+    return parent::getIds() + $ids;
+  }
+
+}
diff --git a/web/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTaxonomyTermTest.php b/web/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTaxonomyTermTest.php
index 75c79241e..20ecb6390 100644
--- a/web/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTaxonomyTermTest.php
+++ b/web/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTaxonomyTermTest.php
@@ -104,7 +104,14 @@ class MigrateTaxonomyTermTest extends MigrateDrupal6TestBase {
 
       $this->assertArrayHasKey($tid, $tree_terms, "Term $tid exists in vocabulary tree");
       $tree_term = $tree_terms[$tid];
-      $this->assertEquals($values['parent'], $tree_term->parents, "Term $tid has correct parents in vocabulary tree");
+
+      // PostgreSQL, MySQL and SQLite may not return the parent terms in the
+      // same order so sort before testing.
+      $expected_parents = $values['parent'];
+      sort($expected_parents);
+      $actual_parents = $tree_term->parents;
+      sort($actual_parents);
+      $this->assertEquals($expected_parents, $actual_parents, "Term $tid has correct parents in vocabulary tree");
     }
   }
 
diff --git a/web/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTermLocalizedTranslationTest.php b/web/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTermLocalizedTranslationTest.php
new file mode 100644
index 000000000..b051ce689
--- /dev/null
+++ b/web/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTermLocalizedTranslationTest.php
@@ -0,0 +1,142 @@
+installEntitySchema('taxonomy_term');
+    $this->installConfig(static::$modules);
+    $this->executeMigrations([
+      'language',
+      'd6_node_type',
+      'd6_field',
+      'd6_taxonomy_vocabulary',
+      'd6_field_instance',
+      'd6_taxonomy_term',
+      'd6_taxonomy_term_localized_translation',
+    ]);
+  }
+
+  /**
+   * Validates a migrated term contains the expected values.
+   *
+   * @param int $id
+   *   Entity ID to load and check.
+   * @param string $expected_language
+   *   The language code for this term.
+   * @param string $expected_label
+   *   The label the migrated entity should have.
+   * @param string $expected_vid
+   *   The parent vocabulary the migrated entity should have.
+   * @param string $expected_description
+   *   The description the migrated entity should have.
+   * @param string $expected_format
+   *   The format the migrated entity should have.
+   * @param int $expected_weight
+   *   The weight the migrated entity should have.
+   * @param array $expected_parents
+   *   The parent terms the migrated entity should have.
+   * @param int $expected_field_integer_value
+   *   The value the migrated entity field should have.
+   * @param int $expected_term_reference_tid
+   *   The term reference ID the migrated entity field should have.
+   */
+  protected function assertEntity($id, $expected_language, $expected_label, $expected_vid, $expected_description = '', $expected_format = NULL, $expected_weight = 0, array $expected_parents = [], $expected_field_integer_value = NULL, $expected_term_reference_tid = NULL) {
+    /** @var \Drupal\taxonomy\TermInterface $entity */
+    $entity = Term::load($id);
+    $this->assertInstanceOf(TermInterface::class, $entity);
+    $this->assertSame($expected_language, $entity->language()->getId());
+    $this->assertSame($expected_label, $entity->label());
+    $this->assertSame($expected_vid, $entity->bundle());
+    $this->assertSame($expected_description, $entity->getDescription());
+    $this->assertSame($expected_format, $entity->getFormat());
+    $this->assertSame($expected_weight, $entity->getWeight());
+    $this->assertHierarchy($expected_vid, $id, $expected_parents);
+  }
+
+  /**
+   * Asserts that a term is present in the tree storage, with the right parents.
+   *
+   * @param string $vid
+   *   Vocabulary ID.
+   * @param int $tid
+   *   ID of the term to check.
+   * @param array $parent_ids
+   *   The expected parent term IDs.
+   */
+  protected function assertHierarchy($vid, $tid, array $parent_ids) {
+    if (!isset($this->treeData[$vid])) {
+      $tree = \Drupal::entityTypeManager()->getStorage('taxonomy_term')->loadTree($vid);
+      $this->treeData[$vid] = [];
+      foreach ($tree as $item) {
+        $this->treeData[$vid][$item->tid] = $item;
+      }
+    }
+
+    $this->assertArrayHasKey($tid, $this->treeData[$vid], "Term $tid exists in taxonomy tree");
+    $term = $this->treeData[$vid][$tid];
+    $this->assertEquals($parent_ids, array_filter($term->parents), "Term $tid has correct parents in taxonomy tree");
+  }
+
+  /**
+   * Tests the Drupal 6 i18n localized taxonomy term to Drupal 8 migration.
+   */
+  public function testTranslatedLocalizedTaxonomyTerms() {
+    $this->assertEntity(14, 'en', 'Talos IV', 'vocabulary_name_much_longer_than', 'The home of Captain Christopher Pike.', NULL, '0', []);
+    $this->assertEntity(15, 'en', 'Vulcan', 'vocabulary_name_much_longer_than', NULL, NULL, '0', []);
+
+    /** @var \Drupal\taxonomy\TermInterface $entity */
+    $entity = Term::load(14);
+    $this->assertTrue($entity->hasTranslation('fr'));
+    $translation = $entity->getTranslation('fr');
+    $this->assertSame('fr - Talos IV', $translation->label());
+    $this->assertSame('fr - The home of Captain Christopher Pike.', $translation->getDescription());
+
+    $this->assertTrue($entity->hasTranslation('zu'));
+    $translation = $entity->getTranslation('zu');
+    $this->assertSame('Talos IV', $translation->label());
+    $this->assertSame('zu - The home of Captain Christopher Pike.', $translation->getDescription());
+
+    $entity = Term::load(15);
+    $this->assertFalse($entity->hasTranslation('fr'));
+    $this->assertTrue($entity->hasTranslation('zu'));
+    $translation = $entity->getTranslation('zu');
+    $this->assertSame('zu - Vulcan', $translation->label());
+    $this->assertSame('', $translation->getDescription());
+  }
+
+}
diff --git a/web/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateVocabularyFieldInstanceTest.php b/web/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateVocabularyFieldInstanceTest.php
index c29e3d1e8..46d60a639 100644
--- a/web/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateVocabularyFieldInstanceTest.php
+++ b/web/core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateVocabularyFieldInstanceTest.php
@@ -81,13 +81,13 @@ class MigrateVocabularyFieldInstanceTest extends MigrateDrupal6TestBase {
     $field_id = 'node.story.field_vocabulary_3_i_2_';
     $field = FieldConfig::load($field_id);
     $this->assertFalse($field->isRequired(), 'Field is not required');
-    $this->assertFalse($field->isTranslatable());
+    $this->assertTrue($field->isTranslatable());
 
     // Tests that a vocabulary named like a D8 base field will be migrated and
     // prefixed with 'field_' to avoid conflicts.
     $field_type = FieldConfig::load('node.sponsor.field_type');
     $this->assertInstanceOf(FieldConfig::class, $field_type);
-    $this->assertFalse($field->isTranslatable());
+    $this->assertTrue($field->isTranslatable());
   }
 
   /**
diff --git a/web/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/TermLocalizedTranslationTest.php b/web/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/TermLocalizedTranslationTest.php
new file mode 100644
index 000000000..c2fea26d1
--- /dev/null
+++ b/web/core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d6/TermLocalizedTranslationTest.php
@@ -0,0 +1,179 @@
+ 1,
+        'vid' => 5,
+        'name' => 'name value 1',
+        'description' => 'description value 1',
+        'weight' => 0,
+        'language' => NULL,
+      ],
+      [
+        'tid' => 2,
+        'vid' => 6,
+        'name' => 'name value 2',
+        'description' => 'description value 2',
+        'weight' => 0,
+        'language' => NULL,
+      ],
+      [
+        'tid' => 3,
+        'vid' => 6,
+        'name' => 'name value 3',
+        'description' => 'description value 3',
+        'weight' => 0,
+        'language' => NULL,
+      ],
+      [
+        'tid' => 4,
+        'vid' => 5,
+        'name' => 'name value 4',
+        'description' => 'description value 4',
+        'weight' => 1,
+        'language' => NULL,
+      ],
+    ];
+    $tests[0]['source_data']['term_hierarchy'] = [
+      [
+        'tid' => 1,
+        'parent' => 0,
+      ],
+      [
+        'tid' => 2,
+        'parent' => 0,
+      ],
+      [
+        'tid' => 3,
+        'parent' => 0,
+      ],
+      [
+        'tid' => 4,
+        'parent' => 1,
+      ],
+    ];
+    $tests[0]['source_data']['i18n_strings'] = [
+      [
+        'lid' => 6,
+        'objectid' => 1,
+        'type' => 'term',
+        'property' => 'name',
+        'objectindex' => '1',
+        'format' => 0,
+      ],
+      [
+        'lid' => 7,
+        'objectid' => 1,
+        'type' => 'term',
+        'property' => 'description',
+        'objectindex' => '1',
+        'format' => 0,
+      ],
+      [
+        'lid' => 8,
+        'objectid' => 3,
+        'type' => 'term',
+        'property' => 'name',
+        'objectindex' => '3',
+        'format' => 0,
+      ],
+    ];
+    $tests[0]['source_data']['locales_target'] = [
+      [
+        'lid' => 6,
+        'language' => 'fr',
+        'translation' => 'fr - name value 1 translation',
+        'plid' => 0,
+        'plural' => 0,
+        'i18n_status' => 0,
+      ],
+      [
+        'lid' => 7,
+        'language' => 'fr',
+        'translation' => 'fr - description value 1 translation',
+        'plid' => 0,
+        'plural' => 0,
+        'i18n_status' => 0,
+      ],
+      [
+        'lid' => 8,
+        'language' => 'zu',
+        'translation' => 'zu - description value 2 translation',
+        'plid' => 0,
+        'plural' => 0,
+        'i18n_status' => 0,
+      ],
+    ];
+
+    // The expected results.
+    $tests[0]['expected_data'] = [
+      [
+        'tid' => 1,
+        'vid' => 5,
+        'name' => 'name value 1',
+        'description' => 'description value 1',
+        'weight' => 0,
+        'parent' => [0],
+        'property' => 'name',
+        'language' => 'fr',
+        'name_translated' => 'fr - name value 1 translation',
+        'description_translated' => 'fr - description value 1 translation',
+      ],
+      [
+        'tid' => 1,
+        'vid' => 5,
+        'name' => 'name value 1',
+        'description' => 'description value 1',
+        'weight' => 0,
+        'parent' => [0],
+        'property' => 'description',
+        'language' => 'fr',
+        'name_translated' => 'fr - name value 1 translation',
+        'description_translated' => 'fr - description value 1 translation',
+      ],
+      [
+        'tid' => 3,
+        'vid' => 6,
+        'name' => 'name value 3',
+        'description' => 'description value 3',
+        'weight' => 0,
+        'parent' => [0],
+        'property' => 'name',
+        'language' => 'zu',
+        'name_translated' => 'zu - description value 2 translation',
+        'description_translated' => NULL,
+      ],
+    ];
+
+    $tests[0]['expected_count'] = NULL;
+    // Empty configuration will return terms for all vocabularies.
+    $tests[0]['configuration'] = [];
+
+    return $tests;
+  }
+
+}
diff --git a/web/core/modules/user/src/Tests/RestRegisterUserTest.php b/web/core/modules/user/src/Tests/RestRegisterUserTest.php
deleted file mode 100644
index 31bcce4d2..000000000
--- a/web/core/modules/user/src/Tests/RestRegisterUserTest.php
+++ /dev/null
@@ -1,173 +0,0 @@
-enableService('user_registration', 'POST', 'hal_json');
-
-    Role::load(RoleInterface::ANONYMOUS_ID)
-      ->grantPermission('restful post user_registration')
-      ->save();
-
-    Role::load(RoleInterface::AUTHENTICATED_ID)
-      ->grantPermission('restful post user_registration')
-      ->save();
-  }
-
-  /**
-   * Tests that only anonymous users can register users.
-   */
-  public function testRegisterUser() {
-    // Verify that an authenticated user cannot register a new user, despite
-    // being granted permission to do so because only anonymous users can
-    // register themselves, authenticated users with the necessary permissions
-    // can POST a new user to the "user" REST resource.
-    $user = $this->createUser();
-    $this->drupalLogin($user);
-    $this->registerRequest('palmer.eldritch');
-    $this->assertResponse('403', 'Only anonymous users can register users.');
-    $this->drupalLogout();
-
-    $user_settings = $this->config('user.settings');
-
-    // Test out different setting User Registration and Email Verification.
-    // Allow visitors to register with no email verification.
-    $user_settings->set('register', USER_REGISTER_VISITORS);
-    $user_settings->set('verify_mail', 0);
-    $user_settings->save();
-    $user = $this->registerUser('Palmer.Eldritch');
-    $this->assertFalse($user->isBlocked());
-    $this->assertFalse(empty($user->getPassword()));
-    $email_count = count($this->drupalGetMails());
-    $this->assertEqual(0, $email_count);
-
-    // Attempt to register without sending a password.
-    $this->registerRequest('Rick.Deckard', FALSE);
-    $this->assertResponse('422', 'No password provided');
-
-    // Allow visitors to register with email verification.
-    $user_settings->set('register', USER_REGISTER_VISITORS);
-    $user_settings->set('verify_mail', 1);
-    $user_settings->save();
-    $user = $this->registerUser('Jason.Taverner', FALSE);
-    $this->assertTrue(empty($user->getPassword()));
-    $this->assertTrue($user->isBlocked());
-    $this->assertMailString('body', 'You may now log in by clicking this link', 1);
-
-    // Attempt to register with a password when e-mail verification is on.
-    $this->registerRequest('Estraven', TRUE);
-    $this->assertResponse('422', 'A Password cannot be specified. It will be generated on login.');
-
-    // Allow visitors to register with Admin approval and e-mail verification.
-    $user_settings->set('register', USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL);
-    $user_settings->set('verify_mail', 1);
-    $user_settings->save();
-    $user = $this->registerUser('Bob.Arctor', FALSE);
-    $this->assertTrue(empty($user->getPassword()));
-    $this->assertTrue($user->isBlocked());
-    $this->assertMailString('body', 'Your application for an account is', 2);
-    $this->assertMailString('body', 'Bob.Arctor has applied for an account', 2);
-
-    // Attempt to register with a password when e-mail verification is on.
-    $this->registerRequest('Ursula', TRUE);
-    $this->assertResponse('422', 'A Password cannot be specified. It will be generated on login.');
-
-    // Allow visitors to register with Admin approval and no email verification.
-    $user_settings->set('register', USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL);
-    $user_settings->set('verify_mail', 0);
-    $user_settings->save();
-    $user = $this->registerUser('Argaven');
-    $this->assertFalse(empty($user->getPassword()));
-    $this->assertTrue($user->isBlocked());
-    $this->assertMailString('body', 'Your application for an account is', 2);
-    $this->assertMailString('body', 'Argaven has applied for an account', 2);
-
-    // Attempt to register without sending a password.
-    $this->registerRequest('Tibe', FALSE);
-    $this->assertResponse('422', 'No password provided');
-  }
-
-  /**
-   * Creates serialize user values.
-   *
-   * @param string $name
-   *   The name of the user. Use only valid values for emails.
-   *
-   * @param bool $include_password
-   *   Whether to include a password in the user values.
-   *
-   * @return string
-   *   Serialized user values.
-   */
-  protected function createSerializedUser($name, $include_password = TRUE) {
-    global $base_url;
-    // New user info to be serialized.
-    $data = [
-      "_links" => ["type" => ["href" => $base_url . "/rest/type/user/user"]],
-      "langcode" => [["value" => "en"]],
-      "name" => [["value" => $name]],
-      "mail" => [["value" => "$name@example.com"]],
-    ];
-    if ($include_password) {
-      $data['pass']['value'] = 'SuperSecretPassword';
-    }
-
-    // Create a HAL+JSON version for the user entity we want to create.
-    $serialized = $this->container->get('serializer')
-      ->serialize($data, 'hal_json');
-    return $serialized;
-  }
-
-  /**
-   * Registers a user via REST resource.
-   *
-   * @param $name
-   *   User name.
-   *
-   * @param bool $include_password
-   *
-   * @return bool|\Drupal\user\Entity\User
-   */
-  protected function registerUser($name, $include_password = TRUE) {
-    // Verify that an anonymous user can register.
-    $this->registerRequest($name, $include_password);
-    $this->assertResponse('200', 'HTTP response code is correct.');
-    $user = user_load_by_name($name);
-    $this->assertFalse(empty($user), 'User was create as expected');
-    return $user;
-  }
-
-  /**
-   * Make a REST user registration request.
-   *
-   * @param $name
-   * @param $include_password
-   */
-  protected function registerRequest($name, $include_password = TRUE) {
-    $serialized = $this->createSerializedUser($name, $include_password);
-    $this->httpRequest(Url::fromRoute('rest.user_registration.POST', ['_format' => 'hal_json']), 'POST', $serialized, 'application/hal+json');
-  }
-
-}
diff --git a/web/core/modules/user/tests/src/Functional/RestRegisterUserTest.php b/web/core/modules/user/tests/src/Functional/RestRegisterUserTest.php
new file mode 100644
index 000000000..32e875cc3
--- /dev/null
+++ b/web/core/modules/user/tests/src/Functional/RestRegisterUserTest.php
@@ -0,0 +1,270 @@
+provisionResource([static::$format], $auth);
+
+    $this->setUpAuthorization('POST');
+  }
+
+  /**
+   * Tests that only anonymous users can register users.
+   */
+  public function testRegisterUser() {
+    $config = $this->config('user.settings');
+
+    // Test out different setting User Registration and Email Verification.
+    // Allow visitors to register with no email verification.
+    $config->set('register', USER_REGISTER_VISITORS);
+    $config->set('verify_mail', 0);
+    $config->save();
+    $user = $this->registerUser('Palmer.Eldritch');
+    $this->assertFalse($user->isBlocked());
+    $this->assertFalse(empty($user->getPassword()));
+    $email_count = count($this->drupalGetMails());
+
+    $this->assertEquals($email_count, 0);
+
+    // Attempt to register without sending a password.
+    $response = $this->registerRequest('Rick.Deckard', FALSE);
+    $this->assertResourceErrorResponse(422, "No password provided.", $response);
+
+    // Attempt to register with a password when e-mail verification is on.
+    $config->set('register', USER_REGISTER_VISITORS);
+    $config->set('verify_mail', 1);
+    $config->save();
+    $response = $this->registerRequest('Estraven', TRUE);
+    $this->assertResourceErrorResponse(422, 'A Password cannot be specified. It will be generated on login.', $response);
+
+    // Allow visitors to register with email verification.
+    $config->set('register', USER_REGISTER_VISITORS);
+    $config->set('verify_mail', 1);
+    $config->save();
+    $name = 'Jason.Taverner';
+    $user = $this->registerUser($name, FALSE);
+    $this->assertTrue(empty($user->getPassword()));
+    $this->assertTrue($user->isBlocked());
+    $this->resetAll();
+
+    $this->assertMailString('body', 'You may now log in by clicking this link', 1);
+
+    // Allow visitors to register with Admin approval and no email verification.
+    $config->set('register', USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL);
+    $config->set('verify_mail', 0);
+    $config->save();
+    $name = 'Argaven';
+    $user = $this->registerUser($name);
+    $this->resetAll();
+    $this->assertFalse(empty($user->getPassword()));
+    $this->assertTrue($user->isBlocked());
+    $this->assertMailString('body', 'Your application for an account is', 2);
+    $this->assertMailString('body', 'Argaven has applied for an account', 2);
+
+    // Allow visitors to register with Admin approval and e-mail verification.
+    $config->set('register', USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL);
+    $config->set('verify_mail', 1);
+    $config->save();
+    $name = 'Bob.Arctor';
+    $user = $this->registerUser($name, FALSE);
+    $this->resetAll();
+    $this->assertTrue(empty($user->getPassword()));
+    $this->assertTrue($user->isBlocked());
+
+    $this->assertMailString('body', 'Your application for an account is', 2);
+    $this->assertMailString('body', 'Bob.Arctor has applied for an account', 2);
+
+    // Verify that an authenticated user cannot register a new user, despite
+    // being granted permission to do so because only anonymous users can
+    // register themselves, authenticated users with the necessary permissions
+    // can POST a new user to the "user" REST resource.
+    $this->initAuthentication();
+    $response = $this->registerRequest($this->account->getAccountName());
+    $this->assertResourceErrorResponse(403, "Only anonymous users can register a user.", $response);
+  }
+
+  /**
+   * Create the request body.
+   *
+   * @param string $name
+   *   Name.
+   * @param bool $include_password
+   *   Include Password.
+   * @param bool $include_email
+   *   Include Email.
+   *
+   * @return array
+   *   Return the request body.
+   */
+  protected function createRequestBody($name, $include_password = TRUE, $include_email = TRUE) {
+    global $base_url;
+    $request_body = [
+      '_links' => ['type' => ["href" => $base_url . "/rest/type/user/user"]],
+      'langcode' => [['value' => 'en']],
+      'name' => [['value' => $name]],
+    ];
+
+    if ($include_email) {
+      $request_body['mail'] = [['value' => $name . self::USER_EMAIL_DOMAIN]];
+    }
+
+    if ($include_password) {
+      $request_body['pass']['value'] = 'SuperSecretPassword';
+    }
+
+    return $request_body;
+  }
+
+  /**
+   * Helper function to generate the request body.
+   *
+   * @param array $request_body
+   *   The request body array.
+   *
+   * @return array
+   *   Return the request options.
+   */
+  protected function createRequestOptions(array $request_body) {
+    $request_options = $this->getAuthenticationRequestOptions('POST');
+    $request_options[RequestOptions::BODY] = $this->serializer->encode($request_body, static::$format);
+    $request_options[RequestOptions::HEADERS]['Content-Type'] = static::$mimeType;
+
+    return $request_options;
+  }
+
+  /**
+   * Registers a user via REST resource.
+   *
+   * @param string $name
+   *   User name.
+   * @param bool $include_password
+   *   Include the password.
+   * @param bool $include_email
+   *   Include the email?
+   *
+   * @return bool|\Drupal\user\Entity\User
+   *   Return bool or the user.
+   */
+  protected function registerUser($name, $include_password = TRUE, $include_email = TRUE) {
+    // Verify that an anonymous user can register.
+    $response = $this->registerRequest($name, $include_password, $include_email);
+    $this->assertResourceResponse(200, FALSE, $response);
+    $user = user_load_by_name($name);
+    $this->assertFalse(empty($user), 'User was create as expected');
+    return $user;
+  }
+
+  /**
+   * Make a REST user registration request.
+   *
+   * @param string $name
+   *   The name.
+   * @param bool $include_password
+   *   Include the password?
+   * @param bool $include_email
+   *   Include the email?
+   *
+   * @return \Psr\Http\Message\ResponseInterface
+   *   Return the Response.
+   */
+  protected function registerRequest($name, $include_password = TRUE, $include_email = TRUE) {
+
+    $user_register_url = Url::fromRoute('user.register')
+      ->setRouteParameter('_format', static::$format);
+    $request_body = $this->createRequestBody($name, $include_password, $include_email);
+    $request_options = $this->createRequestOptions($request_body);
+    $response = $this->request('POST', $user_register_url, $request_options);
+
+    return $response;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function setUpAuthorization($method) {
+    switch ($method) {
+      case 'POST':
+        $this->grantPermissionsToAuthenticatedRole(['restful post user_registration']);
+        $this->grantPermissionsToAnonymousRole(['restful post user_registration']);
+        break;
+
+      default:
+        throw new \UnexpectedValueException();
+    }
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function assertNormalizationEdgeCases($method, Url $url, array $request_options) {}
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function getExpectedUnauthorizedAccessMessage($method) {}
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function getExpectedBcUnauthorizedAccessMessage($method) {}
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function getExpectedUnauthorizedAccessCacheability() {}
+
+}
diff --git a/web/core/modules/user/user.api.php b/web/core/modules/user/user.api.php
index 1fc0140fe..01e460233 100644
--- a/web/core/modules/user/user.api.php
+++ b/web/core/modules/user/user.api.php
@@ -110,7 +110,8 @@ function hook_user_cancel_methods_alter(&$methods) {
  *
  * Called by $account->getDisplayName() to allow modules to alter the username
  * that is displayed. Can be used to ensure user privacy in situations where
- * $account->getDisplayName() is too revealing.
+ * $account->getDisplayName() is too revealing. This hook is invoked both for
+ * user entities and the anonymous user session object.
  *
  * @param string|Drupal\Component\Render\MarkupInterface $name
  *   The username that is displayed for a user. If a hook implementation changes
@@ -118,7 +119,14 @@ function hook_user_cancel_methods_alter(&$methods) {
  *   the implementation to ensure the user's name is escaped properly. String
  *   values will be autoescaped.
  * @param \Drupal\Core\Session\AccountInterface $account
- *   The user object on which the operation is being performed.
+ *   The object on which the operation is being performed. This object may be a
+ *   user entity. If the object is an implementation of UserInterface you can
+ *   use instanceof operator before accessing user entity methods. For example:
+ *   @code
+ *   if ($account instanceof UserInterface) {
+ *      // Access user entity methods.
+ *   }
+ *   @endcode
  *
  * @see \Drupal\Core\Session\AccountInterface::getDisplayName()
  * @see sanitization
diff --git a/web/core/modules/views/src/Plugin/Block/ViewsBlockBase.php b/web/core/modules/views/src/Plugin/Block/ViewsBlockBase.php
index 4e3020ca0..9ed369c04 100644
--- a/web/core/modules/views/src/Plugin/Block/ViewsBlockBase.php
+++ b/web/core/modules/views/src/Plugin/Block/ViewsBlockBase.php
@@ -105,6 +105,13 @@ abstract class ViewsBlockBase extends BlockBase implements ContainerFactoryPlugi
     return ['views_label' => ''];
   }
 
+  /**
+   * {@inheritdoc}
+   */
+  public function getPreviewFallbackString() {
+    return $this->t('Placeholder for the "@view" views block', ['@view' => $this->view->storage->label()]);
+  }
+
   /**
    * {@inheritdoc}
    */
diff --git a/web/core/modules/views/src/Plugin/views/filter/Date.php b/web/core/modules/views/src/Plugin/views/filter/Date.php
index 92e77dff7..b7d1821bf 100644
--- a/web/core/modules/views/src/Plugin/views/filter/Date.php
+++ b/web/core/modules/views/src/Plugin/views/filter/Date.php
@@ -148,11 +148,15 @@ class Date extends NumericFilter {
     }
 
     if ($operators[$operator]['values'] == 1) {
+      // When the operator is either <, <=, =, !=, >=, > or regular_expression
+      // the input contains only one value.
       if ($this->value['value'] == '') {
         return FALSE;
       }
     }
-    else {
+    elseif ($operators[$operator]['values'] == 2) {
+      // When the operator is either between or not between the input contains
+      // two values.
       if ($this->value['min'] == '' || $this->value['max'] == '') {
         return FALSE;
       }
diff --git a/web/core/modules/views/src/Plugin/views/query/PostgresqlDateSql.php b/web/core/modules/views/src/Plugin/views/query/PostgresqlDateSql.php
index c03c41645..c919fadb6 100644
--- a/web/core/modules/views/src/Plugin/views/query/PostgresqlDateSql.php
+++ b/web/core/modules/views/src/Plugin/views/query/PostgresqlDateSql.php
@@ -3,6 +3,7 @@
 namespace Drupal\views\Plugin\views\query;
 
 use Drupal\Core\Database\Connection;
+use Drupal\Core\DependencyInjection\DependencySerializationTrait;
 
 /**
  * PostgreSQL-specific date handling.
@@ -14,6 +15,8 @@ use Drupal\Core\Database\Connection;
  */
 class PostgresqlDateSql implements DateSqlInterface {
 
+  use DependencySerializationTrait;
+
   /**
    * The database connection.
    *
diff --git a/web/core/modules/views/src/Plugin/views/query/SqliteDateSql.php b/web/core/modules/views/src/Plugin/views/query/SqliteDateSql.php
index 628e1c68f..2275d4c6c 100644
--- a/web/core/modules/views/src/Plugin/views/query/SqliteDateSql.php
+++ b/web/core/modules/views/src/Plugin/views/query/SqliteDateSql.php
@@ -3,6 +3,7 @@
 namespace Drupal\views\Plugin\views\query;
 
 use Drupal\Core\Database\Connection;
+use Drupal\Core\DependencyInjection\DependencySerializationTrait;
 
 /**
  * SQLite-specific date handling.
@@ -14,6 +15,8 @@ use Drupal\Core\Database\Connection;
  */
 class SqliteDateSql implements DateSqlInterface {
 
+  use DependencySerializationTrait;
+
   /**
    * The database connection.
    *
diff --git a/web/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_click_sort_ajax.yml b/web/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_click_sort_ajax.yml
new file mode 100644
index 000000000..514655f9f
--- /dev/null
+++ b/web/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_click_sort_ajax.yml
@@ -0,0 +1,65 @@
+langcode: en
+status: true
+dependencies: {  }
+id: test_click_sort_ajax
+module: views
+description: ''
+tag: ''
+base_table: views_test_data
+base_field: nid
+core: '8'
+display:
+  default:
+    display_options:
+      use_ajax: true
+      fields:
+        id:
+          id: id
+          table: views_test_data
+          field: id
+          label: ID
+          plugin_id: numeric
+        name:
+          id: name
+          table: views_test_data
+          field: name
+          label: Name
+          plugin_id: string
+        created:
+          id: created
+          table: views_test_data
+          field: created
+          label: created
+          plugin_id: field
+          type: timestamp
+          settings:
+            date_format: medium
+            custom_date_format: ''
+            timezone: ''
+      access:
+        type: none
+      cache:
+        type: tag
+      style:
+        type: table
+        options:
+          info:
+            id:
+              sortable: true
+              default_sort_order: asc
+            name:
+              sortable: true
+              default_sort_order: desc
+            created:
+              sortable: false
+    display_plugin: default
+    display_title: Master
+    id: default
+    position: 0
+  page_1:
+    display_options:
+      path: test_click_sort
+    display_plugin: page
+    display_title: Page
+    id: page_1
+    position: 0
diff --git a/web/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_mini_pager_ajax.yml b/web/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_mini_pager_ajax.yml
new file mode 100644
index 000000000..c49ef340e
--- /dev/null
+++ b/web/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_mini_pager_ajax.yml
@@ -0,0 +1,88 @@
+langcode: en
+status: true
+dependencies:
+  module:
+    - node
+    - user
+id: test_mini_pager_ajax
+label: test_mini_pager
+module: views
+description: ''
+tag: ''
+base_table: node_field_data
+base_field: nid
+core: 8.x
+display:
+  default:
+    display_plugin: default
+    id: default
+    display_title: Master
+    position: null
+    display_options:
+      use_ajax: true
+      access:
+        type: perm
+      cache:
+        type: tag
+      query:
+        type: views_query
+      exposed_form:
+        type: basic
+      pager:
+        type: mini
+        options:
+          items_per_page: 3
+          offset: 0
+          id: 0
+          total_pages: null
+          tags:
+            previous: '‹‹ test'
+            next: '›› test'
+          expose:
+            items_per_page: false
+            items_per_page_label: 'Items per page'
+            items_per_page_options: '5, 10, 25, 50'
+            items_per_page_options_all: false
+            items_per_page_options_all_label: '- All -'
+            offset: false
+            offset_label: Offset
+      style:
+        type: default
+      row:
+        type: 'entity:node'
+        options:
+          view_mode: teaser
+      fields:
+        title:
+          id: title
+          table: node_field_data
+          field: title
+          label: ''
+          alter:
+            alter_text: false
+            make_link: false
+            absolute: false
+            trim: false
+            word_boundary: false
+            ellipsis: false
+            strip_tags: false
+            html: false
+          hide_empty: false
+          empty_zero: false
+          plugin_id: field
+          entity_type: node
+          entity_field: title
+      filters: {  }
+      sorts:
+        nid:
+          id: nid
+          table: node_field_data
+          field: nid
+          plugin_id: standard
+          order: ASC
+          entity_type: node
+          entity_field: nid
+      title: test_mini_pager
+      filter_groups:
+        operator: AND
+        groups: {  }
diff --git a/web/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_pager_full_ajax.yml b/web/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_pager_full_ajax.yml
new file mode 100644
index 000000000..31b4a26ac
--- /dev/null
+++ b/web/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_pager_full_ajax.yml
@@ -0,0 +1,37 @@
+langcode: en
+status: true
+dependencies:
+  module:
+    - node
+id: test_pager_full_ajax
+label: ''
+module: views
+description: ''
+tag: ''
+base_table: node_field_data
+base_field: nid
+core: '8'
+display:
+  default:
+    display_options:
+      use_ajax: true
+      access:
+        type: none
+      cache:
+        type: tag
+      exposed_form:
+        type: basic
+      pager:
+        options:
+          id: 0
+          items_per_page: 5
+          offset: 0
+        type: full
+      style:
+        type: default
+      row:
+        type: 'entity:node'
+    display_plugin: default
+    display_title: Master
+    id: default
+    position: 0
diff --git a/web/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_user_path.yml b/web/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_user_path.yml
new file mode 100644
index 000000000..a5e629f06
--- /dev/null
+++ b/web/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_user_path.yml
@@ -0,0 +1,158 @@
+langcode: en
+status: true
+dependencies:
+  module:
+    - user
+id: test_user_path
+label: 'user break'
+module: views
+description: ''
+tag: ''
+base_table: users_field_data
+base_field: uid
+core: 8.x
+display:
+  default:
+    display_plugin: default
+    id: default
+    display_title: Master
+    position: 0
+    display_options:
+      access:
+        type: perm
+        options:
+          perm: 'access user profiles'
+      cache:
+        type: tag
+        options: {  }
+      query:
+        type: views_query
+        options:
+          disable_sql_rewrite: false
+          distinct: false
+          replica: false
+          query_comment: ''
+          query_tags: {  }
+      exposed_form:
+        type: basic
+        options:
+          submit_button: Toepassen
+          reset_button: false
+          reset_button_label: Reset
+          exposed_sorts_label: 'Sorteren op'
+          expose_sort_order: true
+          sort_asc_label: Oplopend
+          sort_desc_label: Aflopend
+      pager:
+        type: mini
+        options:
+          items_per_page: 10
+          offset: 0
+          id: 0
+          total_pages: null
+          expose:
+            items_per_page: false
+            items_per_page_label: 'Items per pagina'
+            items_per_page_options: '5, 10, 25, 50'
+            items_per_page_options_all: false
+            items_per_page_options_all_label: '- Alle -'
+            offset: false
+            offset_label: Startpunt
+          tags:
+            previous: ‹‹
+            next: ››
+      style:
+        type: default
+      row:
+        type: fields
+      fields:
+        name:
+          id: name
+          table: users_field_data
+          field: name
+          entity_type: user
+          entity_field: name
+          label: ''
+          alter:
+            alter_text: false
+            make_link: false
+            absolute: false
+            trim: false
+            word_boundary: false
+            ellipsis: false
+            strip_tags: false
+            html: false
+          hide_empty: false
+          empty_zero: false
+          plugin_id: field
+          relationship: none
+          group_type: group
+          admin_label: ''
+          exclude: false
+          element_type: ''
+          element_class: ''
+          element_label_type: ''
+          element_label_class: ''
+          element_label_colon: true
+          element_wrapper_type: ''
+          element_wrapper_class: ''
+          element_default_classes: true
+          empty: ''
+          hide_alter_empty: true
+          click_sort_column: value
+          type: user_name
+          settings: {  }
+          group_column: value
+          group_columns: {  }
+          group_rows: true
+          delta_limit: 0
+          delta_offset: 0
+          delta_reversed: false
+          delta_first_last: false
+          multi_type: separator
+          separator: ', '
+          field_api_classes: false
+      filters:
+        status:
+          value: '1'
+          table: users_field_data
+          field: status
+          plugin_id: boolean
+          entity_type: user
+          entity_field: status
+          id: status
+          expose:
+            operator: ''
+          group: 1
+      sorts: {  }
+      title: 'user break'
+      header: {  }
+      footer: {  }
+      empty: {  }
+      relationships: {  }
+      arguments: {  }
+      display_extenders: {  }
+    cache_metadata:
+      max-age: -1
+      contexts:
+        - 'languages:language_content'
+        - 'languages:language_interface'
+        - url.query_args
+        - user.permissions
+      tags: {  }
+  page_1:
+    display_plugin: page
+    id: page_1
+    display_title: Page
+    position: 1
+    display_options:
+      display_extenders: {  }
+      path: user/%
+    cache_metadata:
+      max-age: -1
+      contexts:
+        - 'languages:language_content'
+        - 'languages:language_interface'
+        - url.query_args
+        - user.permissions
+      tags: {  }
diff --git a/web/core/modules/views/tests/src/Functional/UserPathTest.php b/web/core/modules/views/tests/src/Functional/UserPathTest.php
new file mode 100644
index 000000000..27a0f27a9
--- /dev/null
+++ b/web/core/modules/views/tests/src/Functional/UserPathTest.php
@@ -0,0 +1,32 @@
+drupalGet('user/login');
+    $this->assertSession()->statusCodeEquals(200);
+  }
+
+}
diff --git a/web/core/modules/views/tests/src/Kernel/ViewElementTest.php b/web/core/modules/views/tests/src/Kernel/ViewElementTest.php
index c6149e90e..2dbc31ca0 100644
--- a/web/core/modules/views/tests/src/Kernel/ViewElementTest.php
+++ b/web/core/modules/views/tests/src/Kernel/ViewElementTest.php
@@ -82,6 +82,9 @@ class ViewElementTest extends ViewsKernelTestBase {
     $this->assertEqual($render['#embed'], TRUE);
     $this->setRawContent($renderer->renderRoot($render));
 
+    // Ensure that the render array can be serialized.
+    serialize($render);
+
     $xpath = $this->xpath('//div[@class="views-element-container"]');
     $this->assertTrue($xpath, 'The view container has been found in the rendered output.');
 
diff --git a/web/core/modules/views_ui/src/Tests/PreviewTest.php b/web/core/modules/views_ui/src/Tests/PreviewTest.php
deleted file mode 100644
index c8bd7bd14..000000000
--- a/web/core/modules/views_ui/src/Tests/PreviewTest.php
+++ /dev/null
@@ -1,386 +0,0 @@
-install(['contextual']);
-    $this->resetAll();
-
-    $this->drupalGet('admin/structure/views/view/test_preview/edit');
-    $this->assertResponse(200);
-    $this->drupalPostForm(NULL, $edit = [], t('Update preview'));
-
-    $elements = $this->xpath('//div[@id="views-live-preview"]//ul[contains(@class, :ul-class)]/li[contains(@class, :li-class)]', [':ul-class' => 'contextual-links', ':li-class' => 'filter-add']);
-    $this->assertEqual(count($elements), 1, 'The contextual link to add a new field is shown.');
-
-    $this->drupalPostForm(NULL, $edit = ['view_args' => '100'], t('Update preview'));
-
-    // Test that area text and exposed filters are present and rendered.
-    $this->assertFieldByName('id', NULL, 'ID exposed filter field found.');
-    $this->assertText('Test header text', 'Rendered header text found');
-    $this->assertText('Test footer text', 'Rendered footer text found.');
-    $this->assertText('Test empty text', 'Rendered empty text found.');
-  }
-
-  /**
-   * Tests arguments in the preview form.
-   */
-  public function testPreviewUI() {
-    $this->drupalGet('admin/structure/views/view/test_preview/edit');
-    $this->assertResponse(200);
-
-    $this->drupalPostForm(NULL, $edit = [], t('Update preview'));
-
-    $elements = $this->xpath('//div[@class = "view-content"]/div[contains(@class, views-row)]');
-    $this->assertEqual(count($elements), 5);
-
-    // Filter just the first result.
-    $this->drupalPostForm(NULL, $edit = ['view_args' => '1'], t('Update preview'));
-
-    $elements = $this->xpath('//div[@class = "view-content"]/div[contains(@class, views-row)]');
-    $this->assertEqual(count($elements), 1);
-
-    // Filter for no results.
-    $this->drupalPostForm(NULL, $edit = ['view_args' => '100'], t('Update preview'));
-
-    $elements = $this->xpath('//div[@class = "view-content"]/div[contains(@class, views-row)]');
-    $this->assertEqual(count($elements), 0);
-
-    // Test that area text and exposed filters are present and rendered.
-    $this->assertFieldByName('id', NULL, 'ID exposed filter field found.');
-    $this->assertText('Test header text', 'Rendered header text found');
-    $this->assertText('Test footer text', 'Rendered footer text found.');
-    $this->assertText('Test empty text', 'Rendered empty text found.');
-
-    // Test feed preview.
-    $view = [];
-    $view['label'] = $this->randomMachineName(16);
-    $view['id'] = strtolower($this->randomMachineName(16));
-    $view['page[create]'] = 1;
-    $view['page[title]'] = $this->randomMachineName(16);
-    $view['page[path]'] = $this->randomMachineName(16);
-    $view['page[feed]'] = 1;
-    $view['page[feed_properties][path]'] = $this->randomMachineName(16);
-    $this->drupalPostForm('admin/structure/views/add', $view, t('Save and edit'));
-    $this->clickLink(t('Feed'));
-    $this->drupalPostForm(NULL, [], t('Update preview'));
-    $result = $this->xpath('//div[@id="views-live-preview"]/pre');
-    $this->assertTrue(strpos($result[0], '' . $view['page[title]'] . ''), 'The Feed RSS preview was rendered.');
-
-    // Test the non-default UI display options.
-    // Statistics only, no query.
-    $settings = \Drupal::configFactory()->getEditable('views.settings');
-    $settings->set('ui.show.performance_statistics', TRUE)->save();
-    $this->drupalGet('admin/structure/views/view/test_preview/edit');
-    $this->drupalPostForm(NULL, $edit = ['view_args' => '100'], t('Update preview'));
-    $this->assertText(t('Query build time'));
-    $this->assertText(t('Query execute time'));
-    $this->assertText(t('View render time'));
-    $this->assertNoRaw('Query');
-
-    // Statistics and query.
-    $settings->set('ui.show.sql_query.enabled', TRUE)->save();
-    $this->drupalPostForm(NULL, $edit = ['view_args' => '100'], t('Update preview'));
-    $this->assertText(t('Query build time'));
-    $this->assertText(t('Query execute time'));
-    $this->assertText(t('View render time'));
-    $this->assertRaw('Query');
-    $query_string = <<assertEscaped($query_string);
-
-    // Test that the statistics and query are rendered above the preview.
-    $this->assertTrue(strpos($this->getRawContent(), 'views-query-info') < strpos($this->getRawContent(), 'view-test-preview'), 'Statistics shown above the preview.');
-
-    // Test that statistics and query rendered below the preview.
-    $settings->set('ui.show.sql_query.where', 'below')->save();
-    $this->drupalPostForm(NULL, $edit = ['view_args' => '100'], t('Update preview'));
-    $this->assertTrue(strpos($this->getRawContent(), 'view-test-preview') < strpos($this->getRawContent(), 'views-query-info'), 'Statistics shown below the preview.');
-
-    // Test that the preview title isn't double escaped.
-    $this->drupalPostForm("admin/structure/views/nojs/display/test_preview/default/title", $edit = ['title' => 'Double & escaped'], t('Apply'));
-    $this->drupalPostForm(NULL, [], t('Update preview'));
-    $elements = $this->xpath('//div[@id="views-live-preview"]/div[contains(@class, views-query-info)]//td[text()=:text]', [':text' => t('Double & escaped')]);
-    $this->assertEqual(1, count($elements));
-  }
-
-  /**
-   * Tests the taxonomy term preview AJAX.
-   *
-   * This tests a specific regression in the taxonomy term view preview.
-   *
-   * @see https://www.drupal.org/node/2452659
-   */
-  public function testTaxonomyAJAX() {
-    \Drupal::service('module_installer')->install(['taxonomy']);
-    $this->getPreviewAJAX('taxonomy_term', 'page_1', 0);
-  }
-
-  /**
-   * Tests pagers in the preview form.
-   */
-  public function testPreviewWithPagersUI() {
-
-    // Create 11 nodes and make sure that everyone is returned.
-    $this->drupalCreateContentType(['type' => 'page']);
-    for ($i = 0; $i < 11; $i++) {
-      $this->drupalCreateNode();
-    }
-
-    // Test Full Pager.
-    $this->getPreviewAJAX('test_pager_full', 'default', 5);
-
-    // Test that the pager is present and rendered.
-    $elements = $this->xpath('//ul[contains(@class, :class)]/li', [':class' => 'pager__items']);
-    $this->assertTrue(!empty($elements), 'Full pager found.');
-
-    // Verify elements and links to pages.
-    // We expect to find 5 elements: current page == 1, links to pages 2 and
-    // and 3, links to 'next >' and 'last >>' pages.
-    $this->assertClass($elements[0], 'is-active', 'Element for current page has .is-active class.');
-    $this->assertTrue($elements[0]->a, 'Element for current page has link.');
-
-    $this->assertClass($elements[1], 'pager__item', 'Element for page 2 has .pager__item class.');
-    $this->assertTrue($elements[1]->a, 'Link to page 2 found.');
-
-    $this->assertClass($elements[2], 'pager__item', 'Element for page 3 has .pager__item class.');
-    $this->assertTrue($elements[2]->a, 'Link to page 3 found.');
-
-    $this->assertClass($elements[3], 'pager__item--next', 'Element for next page has .pager__item--next class.');
-    $this->assertTrue($elements[3]->a, 'Link to next page found.');
-
-    $this->assertClass($elements[4], 'pager__item--last', 'Element for last page has .pager__item--last class.');
-    $this->assertTrue($elements[4]->a, 'Link to last page found.');
-
-    // Navigate to next page.
-    $elements = $this->xpath('//li[contains(@class, :class)]/a', [':class' => 'pager__item--next']);
-    $this->clickPreviewLinkAJAX($elements[0]['href'], 5);
-
-    // Test that the pager is present and rendered.
-    $elements = $this->xpath('//ul[contains(@class, :class)]/li', [':class' => 'pager__items']);
-    $this->assertTrue(!empty($elements), 'Full pager found.');
-
-    // Verify elements and links to pages.
-    // We expect to find 7 elements: links to '<< first' and '< previous'
-    // pages, link to page 1, current page == 2, link to page 3 and links
-    // to 'next >' and 'last >>' pages.
-    $this->assertClass($elements[0], 'pager__item--first', 'Element for first page has .pager__item--first class.');
-    $this->assertTrue($elements[0]->a, 'Link to first page found.');
-
-    $this->assertClass($elements[1], 'pager__item--previous', 'Element for previous page has .pager__item--previous class.');
-    $this->assertTrue($elements[1]->a, 'Link to previous page found.');
-
-    $this->assertClass($elements[2], 'pager__item', 'Element for page 1 has .pager__item class.');
-    $this->assertTrue($elements[2]->a, 'Link to page 1 found.');
-
-    $this->assertClass($elements[3], 'is-active', 'Element for current page has .is-active class.');
-    $this->assertTrue($elements[3]->a, 'Element for current page has link.');
-
-    $this->assertClass($elements[4], 'pager__item', 'Element for page 3 has .pager__item class.');
-    $this->assertTrue($elements[4]->a, 'Link to page 3 found.');
-
-    $this->assertClass($elements[5], 'pager__item--next', 'Element for next page has .pager__item--next class.');
-    $this->assertTrue($elements[5]->a, 'Link to next page found.');
-
-    $this->assertClass($elements[6], 'pager__item--last', 'Element for last page has .pager__item--last class.');
-    $this->assertTrue($elements[6]->a, 'Link to last page found.');
-
-    // Test Mini Pager.
-    $this->getPreviewAJAX('test_mini_pager', 'default', 3);
-
-    // Test that the pager is present and rendered.
-    $elements = $this->xpath('//ul[contains(@class, :class)]/li', [':class' => 'pager__items']);
-    $this->assertTrue(!empty($elements), 'Mini pager found.');
-
-    // Verify elements and links to pages.
-    // We expect to find current pages element with no link, next page element
-    // with a link, and not to find previous page element.
-    $this->assertClass($elements[0], 'is-active', 'Element for current page has .is-active class.');
-
-    $this->assertClass($elements[1], 'pager__item--next', 'Element for next page has .pager__item--next class.');
-    $this->assertTrue($elements[1]->a, 'Link to next page found.');
-
-    // Navigate to next page.
-    $elements = $this->xpath('//li[contains(@class, :class)]/a', [':class' => 'pager__item--next']);
-    $this->clickPreviewLinkAJAX($elements[0]['href'], 3);
-
-    // Test that the pager is present and rendered.
-    $elements = $this->xpath('//ul[contains(@class, :class)]/li', [':class' => 'pager__items']);
-    $this->assertTrue(!empty($elements), 'Mini pager found.');
-
-    // Verify elements and links to pages.
-    // We expect to find 3 elements: previous page with a link, current
-    // page with no link, and next page with a link.
-    $this->assertClass($elements[0], 'pager__item--previous', 'Element for previous page has .pager__item--previous class.');
-    $this->assertTrue($elements[0]->a, 'Link to previous page found.');
-
-    $this->assertClass($elements[1], 'is-active', 'Element for current page has .is-active class.');
-    $this->assertFalse(isset($elements[1]->a), 'Element for current page has no link.');
-
-    $this->assertClass($elements[2], 'pager__item--next', 'Element for next page has .pager__item--next class.');
-    $this->assertTrue($elements[2]->a, 'Link to next page found.');
-  }
-
-  /**
-   * Tests the additional information query info area.
-   */
-  public function testPreviewAdditionalInfo() {
-    \Drupal::service('module_installer')->install(['views_ui_test']);
-    $this->resetAll();
-
-    $this->drupalGet('admin/structure/views/view/test_preview/edit');
-    $this->assertResponse(200);
-
-    $this->drupalPostForm(NULL, $edit = [], t('Update preview'));
-
-    // Check for implementation of hook_views_preview_info_alter().
-    // @see views_ui_test.module
-    $elements = $this->xpath('//div[@id="views-live-preview"]/div[contains(@class, views-query-info)]//td[text()=:text]', [':text' => t('Test row count')]);
-    $this->assertEqual(count($elements), 1, 'Views Query Preview Info area altered.');
-    // Check that additional assets are attached.
-    $this->assertTrue(strpos($this->getDrupalSettings()['ajaxPageState']['libraries'], 'views_ui_test/views_ui_test.test') !== FALSE, 'Attached library found.');
-    $this->assertRaw('css/views_ui_test.test.css', 'Attached CSS asset found.');
-  }
-
-  /**
-   * Tests view validation error messages in the preview.
-   */
-  public function testPreviewError() {
-    $this->drupalGet('admin/structure/views/view/test_preview_error/edit');
-    $this->assertResponse(200);
-
-    $this->drupalPostForm(NULL, $edit = [], t('Update preview'));
-
-    $this->assertText('Unable to preview due to validation errors.', 'Preview error text found.');
-  }
-
-  /**
-   * Tests the link to sort in the preview form.
-   */
-  public function testPreviewSortLink() {
-
-    // Get the preview.
-    $this->getPreviewAJAX('test_click_sort', 'page_1', 0);
-
-    // Test that the header label is present.
-    $elements = $this->xpath('//th[contains(@class, :class)]/a', [':class' => 'views-field views-field-name']);
-    $this->assertTrue(!empty($elements), 'The header label is present.');
-
-    // Verify link.
-    $this->assertLinkByHref('preview/page_1?_wrapper_format=drupal_ajax&order=name&sort=desc', 0, 'The output URL is as expected.');
-
-    // Click link to sort.
-    $this->clickPreviewLinkAJAX($elements[0]['href'], 0);
-
-    // Test that the header label is present.
-    $elements = $this->xpath('//th[contains(@class, :class)]/a', [':class' => 'views-field views-field-name is-active']);
-    $this->assertTrue(!empty($elements), 'The header label is present.');
-
-    // Verify link.
-    $this->assertLinkByHref('preview/page_1?_wrapper_format=drupal_ajax&order=name&sort=asc', 0, 'The output URL is as expected.');
-  }
-
-  /**
-   * Get the preview form and force an AJAX preview update.
-   *
-   * @param string $view_name
-   *   The view to test.
-   * @param string $panel_id
-   *   The view panel to test.
-   * @param int $row_count
-   *   The expected number of rows in the preview.
-   */
-  protected function getPreviewAJAX($view_name, $panel_id, $row_count) {
-    $this->drupalGet('admin/structure/views/view/' . $view_name . '/preview/' . $panel_id);
-    $result = $this->drupalPostAjaxForm(NULL, [], ['op' => t('Update preview')]);
-    $this->assertPreviewAJAX($result, $row_count);
-  }
-
-  /**
-   * Mimic clicking on a preview link.
-   *
-   * @param string $url
-   *   The url to navigate to.
-   * @param int $row_count
-   *   The expected number of rows in the preview.
-   */
-  protected function clickPreviewLinkAJAX($url, $row_count) {
-    $content = $this->content;
-    $drupal_settings = $this->drupalSettings;
-    $ajax_settings = [
-      'wrapper' => 'views-preview-wrapper',
-      'method' => 'replaceWith',
-    ];
-    $url = $this->getAbsoluteUrl($url);
-    $post = ['js' => 'true'] + $this->getAjaxPageStatePostData();
-    $result = Json::decode($this->drupalPost($url, '', $post, ['query' => [MainContentViewSubscriber::WRAPPER_FORMAT => 'drupal_ajax']]));
-    if (!empty($result)) {
-      $this->drupalProcessAjaxResponse($content, $result, $ajax_settings, $drupal_settings);
-    }
-    $this->assertPreviewAJAX($result, $row_count);
-  }
-
-  /**
-   * Assert that the AJAX response contains expected data.
-   *
-   * @param array $result
-   *   An array of AJAX commands.
-   * @param int $row_count
-   *   The expected number of rows in the preview.
-   */
-  protected function assertPreviewAJAX($result, $row_count) {
-    // Has AJAX callback replied with an insert command? If so, we can
-    // assume that the page content was updated with AJAX returned data.
-    $result_commands = [];
-    foreach ($result as $command) {
-      $result_commands[$command['command']] = $command;
-    }
-    $this->assertTrue(isset($result_commands['insert']), 'AJAX insert command received.');
-
-    // Test if preview contains the expected number of rows.
-    $elements = $this->xpath('//div[@class = "view-content"]/div[contains(@class, views-row)]');
-    $this->assertEqual(count($elements), $row_count, 'Expected items found on page.');
-  }
-
-  /**
-   * Asserts that an element has a given class.
-   *
-   * @param \SimpleXMLElement $element
-   *   The element to test.
-   * @param string $class
-   *   The class to assert.
-   * @param string $message
-   *   (optional) A verbose message to output.
-   */
-  protected function assertClass(\SimpleXMLElement $element, $class, $message = NULL) {
-    if (!isset($message)) {
-      $message = "Class .$class found.";
-    }
-    $this->assertTrue(strpos($element['class'], $class) !== FALSE, $message);
-  }
-
-}
diff --git a/web/core/modules/views_ui/tests/src/Functional/PreviewTest.php b/web/core/modules/views_ui/tests/src/Functional/PreviewTest.php
new file mode 100644
index 000000000..b76e464c8
--- /dev/null
+++ b/web/core/modules/views_ui/tests/src/Functional/PreviewTest.php
@@ -0,0 +1,161 @@
+install(['contextual']);
+    $this->resetAll();
+
+    $this->drupalGet('admin/structure/views/view/test_preview/edit');
+    $this->assertResponse(200);
+    $this->drupalPostForm(NULL, $edit = [], t('Update preview'));
+
+    $elements = $this->xpath('//div[@id="views-live-preview"]//ul[contains(@class, :ul-class)]/li[contains(@class, :li-class)]', [':ul-class' => 'contextual-links', ':li-class' => 'filter-add']);
+    $this->assertEqual(count($elements), 1, 'The contextual link to add a new field is shown.');
+
+    $this->drupalPostForm(NULL, $edit = ['view_args' => '100'], t('Update preview'));
+
+    // Test that area text and exposed filters are present and rendered.
+    $this->assertFieldByName('id', NULL, 'ID exposed filter field found.');
+    $this->assertText('Test header text', 'Rendered header text found');
+    $this->assertText('Test footer text', 'Rendered footer text found.');
+    $this->assertText('Test empty text', 'Rendered empty text found.');
+  }
+
+  /**
+   * Tests arguments in the preview form.
+   */
+  public function testPreviewUI() {
+    $this->drupalGet('admin/structure/views/view/test_preview/edit');
+    $this->assertResponse(200);
+
+    $this->drupalPostForm(NULL, $edit = [], t('Update preview'));
+
+    $elements = $this->xpath('//div[@class = "view-content"]/div[contains(@class, views-row)]');
+    $this->assertEqual(count($elements), 5);
+
+    // Filter just the first result.
+    $this->drupalPostForm(NULL, $edit = ['view_args' => '1'], t('Update preview'));
+
+    $elements = $this->xpath('//div[@class = "view-content"]/div[contains(@class, views-row)]');
+    $this->assertEqual(count($elements), 1);
+
+    // Filter for no results.
+    $this->drupalPostForm(NULL, $edit = ['view_args' => '100'], t('Update preview'));
+
+    $elements = $this->xpath('//div[@class = "view-content"]/div[contains(@class, views-row)]');
+    $this->assertEqual(count($elements), 0);
+
+    // Test that area text and exposed filters are present and rendered.
+    $this->assertFieldByName('id', NULL, 'ID exposed filter field found.');
+    $this->assertText('Test header text', 'Rendered header text found');
+    $this->assertText('Test footer text', 'Rendered footer text found.');
+    $this->assertText('Test empty text', 'Rendered empty text found.');
+
+    // Test feed preview.
+    $view = [];
+    $view['label'] = $this->randomMachineName(16);
+    $view['id'] = strtolower($this->randomMachineName(16));
+    $view['page[create]'] = 1;
+    $view['page[title]'] = $this->randomMachineName(16);
+    $view['page[path]'] = $this->randomMachineName(16);
+    $view['page[feed]'] = 1;
+    $view['page[feed_properties][path]'] = $this->randomMachineName(16);
+    $this->drupalPostForm('admin/structure/views/add', $view, t('Save and edit'));
+    $this->clickLink(t('Feed'));
+    $this->drupalPostForm(NULL, [], t('Update preview'));
+    $result = $this->xpath('//div[@id="views-live-preview"]/pre');
+    $this->assertTrue(strpos($result[0]->getText(), '' . $view['page[title]'] . ''), 'The Feed RSS preview was rendered.');
+
+    // Test the non-default UI display options.
+    // Statistics only, no query.
+    $settings = \Drupal::configFactory()->getEditable('views.settings');
+    $settings->set('ui.show.performance_statistics', TRUE)->save();
+    $this->drupalGet('admin/structure/views/view/test_preview/edit');
+    $this->drupalPostForm(NULL, $edit = ['view_args' => '100'], t('Update preview'));
+    $this->assertText(t('Query build time'));
+    $this->assertText(t('Query execute time'));
+    $this->assertText(t('View render time'));
+    $this->assertNoRaw('Query');
+
+    // Statistics and query.
+    $settings->set('ui.show.sql_query.enabled', TRUE)->save();
+    $this->drupalPostForm(NULL, $edit = ['view_args' => '100'], t('Update preview'));
+    $this->assertText(t('Query build time'));
+    $this->assertText(t('Query execute time'));
+    $this->assertText(t('View render time'));
+    $this->assertRaw('Query');
+    $query_string = <<assertEscaped($query_string);
+
+    // Test that the statistics and query are rendered above the preview.
+    $this->assertTrue(strpos($this->getSession()->getPage()->getContent(), 'views-query-info') < strpos($this->getSession()->getPage()->getContent(), 'view-test-preview'), 'Statistics shown above the preview.');
+
+    // Test that statistics and query rendered below the preview.
+    $settings->set('ui.show.sql_query.where', 'below')->save();
+    $this->drupalPostForm(NULL, $edit = ['view_args' => '100'], t('Update preview'));
+    $this->assertTrue(strpos($this->getSession()->getPage()->getContent(), 'view-test-preview') < strpos($this->getSession()->getPage()->getContent(), 'views-query-info'), 'Statistics shown below the preview.');
+
+    // Test that the preview title isn't double escaped.
+    $this->drupalPostForm("admin/structure/views/nojs/display/test_preview/default/title", $edit = ['title' => 'Double & escaped'], t('Apply'));
+    $this->drupalPostForm(NULL, [], t('Update preview'));
+    $elements = $this->xpath('//div[@id="views-live-preview"]/div[contains(@class, views-query-info)]//td[text()=:text]', [':text' => 'Double & escaped']);
+    $this->assertEqual(1, count($elements));
+  }
+
+  /**
+   * Tests the additional information query info area.
+   */
+  public function testPreviewAdditionalInfo() {
+    \Drupal::service('module_installer')->install(['views_ui_test']);
+    $this->resetAll();
+
+    $this->drupalGet('admin/structure/views/view/test_preview/edit');
+    $this->assertResponse(200);
+
+    $this->drupalPostForm(NULL, $edit = [], t('Update preview'));
+
+    // Check for implementation of hook_views_preview_info_alter().
+    // @see views_ui_test.module
+    $elements = $this->xpath('//div[@id="views-live-preview"]/div[contains(@class, views-query-info)]//td[text()=:text]', [':text' => 'Test row count']);
+    $this->assertEqual(count($elements), 1, 'Views Query Preview Info area altered.');
+    // Check that additional assets are attached.
+    $this->assertTrue(strpos($this->getDrupalSettings()['ajaxPageState']['libraries'], 'views_ui_test/views_ui_test.test') !== FALSE, 'Attached library found.');
+    $this->assertRaw('css/views_ui_test.test.css', 'Attached CSS asset found.');
+  }
+
+  /**
+   * Tests view validation error messages in the preview.
+   */
+  public function testPreviewError() {
+    $this->drupalGet('admin/structure/views/view/test_preview_error/edit');
+    $this->assertResponse(200);
+
+    $this->drupalPostForm(NULL, $edit = [], t('Update preview'));
+
+    $this->assertText('Unable to preview due to validation errors.', 'Preview error text found.');
+  }
+
+}
diff --git a/web/core/modules/views_ui/tests/src/FunctionalJavascript/PreviewTest.php b/web/core/modules/views_ui/tests/src/FunctionalJavascript/PreviewTest.php
new file mode 100644
index 000000000..489a3748d
--- /dev/null
+++ b/web/core/modules/views_ui/tests/src/FunctionalJavascript/PreviewTest.php
@@ -0,0 +1,304 @@
+enableViewsTestModule();
+
+    $admin_user = $this->drupalCreateUser([
+      'administer site configuration',
+      'administer views',
+      'administer nodes',
+      'access content overview',
+    ]);
+
+    // Disable automatic live preview to make the sequence of calls clearer.
+    \Drupal::configFactory()->getEditable('views.settings')->set('ui.always_live_preview', FALSE)->save();
+    $this->drupalLogin($admin_user);
+  }
+
+  /**
+   * Sets up the views_test_data.module.
+   *
+   * Because the schema of views_test_data.module is dependent on the test
+   * using it, it cannot be enabled normally.
+   */
+  protected function enableViewsTestModule() {
+    // Define the schema and views data variable before enabling the test module.
+    \Drupal::state()->set('views_test_data_schema', $this->schemaDefinition());
+    \Drupal::state()->set('views_test_data_views_data', $this->viewsData());
+
+    \Drupal::service('module_installer')->install(['views_test_data']);
+    $this->resetAll();
+    $this->rebuildContainer();
+    $this->container->get('module_handler')->reload();
+
+    // Load the test dataset.
+    $data_set = $this->dataSet();
+    $query = Database::getConnection()->insert('views_test_data')
+      ->fields(array_keys($data_set[0]));
+    foreach ($data_set as $record) {
+      $query->values($record);
+    }
+    $query->execute();
+  }
+
+  /**
+   * Returns the schema definition.
+   *
+   * @internal
+   */
+  protected function schemaDefinition() {
+    return ViewTestData::schemaDefinition();
+  }
+
+  /**
+   * Returns the views data definition.
+   */
+  protected function viewsData() {
+    return ViewTestData::viewsData();
+  }
+
+  /**
+   * Returns a very simple test dataset.
+   */
+  protected function dataSet() {
+    return ViewTestData::dataSet();
+  }
+
+  /**
+   * Tests the taxonomy term preview AJAX.
+   *
+   * This tests a specific regression in the taxonomy term view preview.
+   *
+   * @see https://www.drupal.org/node/2452659
+   */
+  public function testTaxonomyAJAX() {
+    \Drupal::service('module_installer')->install(['taxonomy']);
+    $this->getPreviewAJAX('taxonomy_term', 'page_1', 0);
+  }
+
+  /**
+   * Tests pagers in the preview form.
+   */
+  public function testPreviewWithPagersUI() {
+    // Create 11 nodes and make sure that everyone is returned.
+    $this->drupalCreateContentType(['type' => 'page']);
+    for ($i = 0; $i < 11; $i++) {
+      $this->drupalCreateNode();
+    }
+
+    // Test Full Pager.
+    $this->getPreviewAJAX('test_pager_full_ajax', 'default', 5);
+
+    // Test that the pager is present and rendered.
+    $elements = $this->xpath('//ul[contains(@class, :class)]/li', [':class' => 'pager__items']);
+    $this->assertTrue(!empty($elements), 'Full pager found.');
+
+    // Verify elements and links to pages.
+    // We expect to find 5 elements: current page == 1, links to pages 2 and
+    // and 3, links to 'next >' and 'last >>' pages.
+    $this->assertClass($elements[0], 'is-active', 'Element for current page has .is-active class.');
+    $this->assertTrue($elements[0]->find('css', 'a'), 'Element for current page has link.');
+
+    $this->assertClass($elements[1], 'pager__item', 'Element for page 2 has .pager__item class.');
+    $this->assertTrue($elements[1]->find('css', 'a'), 'Link to page 2 found.');
+
+    $this->assertClass($elements[2], 'pager__item', 'Element for page 3 has .pager__item class.');
+    $this->assertTrue($elements[2]->find('css', 'a'), 'Link to page 3 found.');
+
+    $this->assertClass($elements[3], 'pager__item--next', 'Element for next page has .pager__item--next class.');
+    $this->assertTrue($elements[3]->find('css', 'a'), 'Link to next page found.');
+
+    $this->assertClass($elements[4], 'pager__item--last', 'Element for last page has .pager__item--last class.');
+    $this->assertTrue($elements[4]->find('css', 'a'), 'Link to last page found.');
+
+    // Navigate to next page.
+    $elements = $this->xpath('//li[contains(@class, :class)]/a', [':class' => 'pager__item--next']);
+    $this->clickPreviewLinkAJAX($elements[0], 5);
+
+    // Test that the pager is present and rendered.
+    $elements = $this->xpath('//ul[contains(@class, :class)]/li', [':class' => 'pager__items']);
+    $this->assertTrue(!empty($elements), 'Full pager found.');
+
+    // Verify elements and links to pages.
+    // We expect to find 7 elements: links to '<< first' and '< previous'
+    // pages, link to page 1, current page == 2, link to page 3 and links
+    // to 'next >' and 'last >>' pages.
+    $this->assertClass($elements[0], 'pager__item--first', 'Element for first page has .pager__item--first class.');
+    $this->assertTrue($elements[0]->find('css', 'a'), 'Link to first page found.');
+
+    $this->assertClass($elements[1], 'pager__item--previous', 'Element for previous page has .pager__item--previous class.');
+    $this->assertTrue($elements[1]->find('css', 'a'), 'Link to previous page found.');
+
+    $this->assertClass($elements[2], 'pager__item', 'Element for page 1 has .pager__item class.');
+    $this->assertTrue($elements[2]->find('css', 'a'), 'Link to page 1 found.');
+
+    $this->assertClass($elements[3], 'is-active', 'Element for current page has .is-active class.');
+    $this->assertTrue($elements[3]->find('css', 'a'), 'Element for current page has link.');
+
+    $this->assertClass($elements[4], 'pager__item', 'Element for page 3 has .pager__item class.');
+    $this->assertTrue($elements[4]->find('css', 'a'), 'Link to page 3 found.');
+
+    $this->assertClass($elements[5], 'pager__item--next', 'Element for next page has .pager__item--next class.');
+    $this->assertTrue($elements[5]->find('css', 'a'), 'Link to next page found.');
+
+    $this->assertClass($elements[6], 'pager__item--last', 'Element for last page has .pager__item--last class.');
+    $this->assertTrue($elements[6]->find('css', 'a'), 'Link to last page found.');
+
+    // Test Mini Pager.
+    $this->getPreviewAJAX('test_mini_pager_ajax', 'default', 3);
+
+    // Test that the pager is present and rendered.
+    $elements = $this->xpath('//ul[contains(@class, :class)]/li', [':class' => 'pager__items']);
+    $this->assertTrue(!empty($elements), 'Mini pager found.');
+
+    // Verify elements and links to pages.
+    // We expect to find current pages element with no link, next page element
+    // with a link, and not to find previous page element.
+    $this->assertClass($elements[0], 'is-active', 'Element for current page has .is-active class.');
+
+    $this->assertClass($elements[1], 'pager__item--next', 'Element for next page has .pager__item--next class.');
+    $this->assertTrue($elements[1]->find('css', 'a'), 'Link to next page found.');
+
+    // Navigate to next page.
+    $elements = $this->xpath('//li[contains(@class, :class)]/a', [':class' => 'pager__item--next']);
+    $this->clickPreviewLinkAJAX($elements[0], 3);
+
+    // Test that the pager is present and rendered.
+    $elements = $this->xpath('//ul[contains(@class, :class)]/li', [':class' => 'pager__items']);
+    $this->assertTrue(!empty($elements), 'Mini pager found.');
+
+    // Verify elements and links to pages.
+    // We expect to find 3 elements: previous page with a link, current
+    // page with no link, and next page with a link.
+    $this->assertClass($elements[0], 'pager__item--previous', 'Element for previous page has .pager__item--previous class.');
+    $this->assertTrue($elements[0]->find('css', 'a'), 'Link to previous page found.');
+
+    $this->assertClass($elements[1], 'is-active', 'Element for current page has .is-active class.');
+    $this->assertEmpty($elements[1]->find('css', 'a'), 'Element for current page has no link.');
+
+    $this->assertClass($elements[2], 'pager__item--next', 'Element for next page has .pager__item--next class.');
+    $this->assertTrue($elements[2]->find('css', 'a'), 'Link to next page found.');
+  }
+
+  /**
+   * Tests the link to sort in the preview form.
+   */
+  public function testPreviewSortLink() {
+    // Get the preview.
+    $this->getPreviewAJAX('test_click_sort_ajax', 'page_1', 0);
+
+    // Test that the header label is present.
+    $elements = $this->xpath('//th[contains(@class, :class)]/a', [':class' => 'views-field views-field-name']);
+    $this->assertTrue(!empty($elements), 'The header label is present.');
+
+    // Verify link.
+    $this->assertLinkByHref('preview/page_1?_wrapper_format=drupal_ajax&order=name&sort=desc', 0, 'The output URL is as expected.');
+
+    // Click link to sort.
+    $elements[0]->click();
+    $sort_link = $this->assertSession()->waitForElement('xpath', '//th[contains(@class, \'views-field views-field-name is-active\')]/a');
+
+    $this->assertNotEmpty($sort_link);
+
+    // Verify link.
+    $this->assertLinkByHref('preview/page_1?_wrapper_format=drupal_ajax&order=name&sort=asc', 0, 'The output URL is as expected.');
+  }
+
+  /**
+   * Get the preview form and force an AJAX preview update.
+   *
+   * @param string $view_name
+   *   The view to test.
+   * @param string $panel_id
+   *   The view panel to test.
+   * @param int $row_count
+   *   The expected number of rows in the preview.
+   */
+  protected function getPreviewAJAX($view_name, $panel_id, $row_count) {
+    $this->drupalGet('admin/structure/views/view/' . $view_name . '/edit/' . $panel_id);
+    $this->getSession()->getPage()->pressButton('Update preview');
+    $this->assertSession()->assertWaitOnAjaxRequest();
+    $this->assertPreviewAJAX($row_count);
+  }
+
+  /**
+   * Click on a preview link.
+   *
+   * @param \Behat\Mink\Element\NodeElement $element
+   *   The element to click.
+   * @param int $row_count
+   *   The expected number of rows in the preview.
+   */
+  protected function clickPreviewLinkAJAX(NodeElement $element, $row_count) {
+    $element->click();
+    $this->assertSession()->assertWaitOnAjaxRequest();
+    $this->assertPreviewAJAX($row_count);
+  }
+
+  /**
+   * Assert that the preview contains expected data.
+   *
+   * @param int $row_count
+   *   The expected number of rows in the preview.
+   */
+  protected function assertPreviewAJAX($row_count) {
+    $elements = $this->getSession()->getPage()->findAll('css', '.view-content .views-row');
+    $this->assertCount($row_count, $elements, 'Expected items found on page.');
+  }
+
+  /**
+   * Asserts that an element has a given class.
+   *
+   * @param \Behat\Mink\Element\NodeElement $element
+   *   The element to test.
+   * @param string $class
+   *   The class to assert.
+   * @param string $message
+   *   (optional) A verbose message to output.
+   */
+  protected function assertClass(NodeElement $element, $class, $message = NULL) {
+    if (!isset($message)) {
+      $message = "Class .$class found.";
+    }
+    $this->assertTrue(strpos($element->getAttribute('class'), $class) !== FALSE, $message);
+  }
+
+}
diff --git a/web/core/modules/workspaces/src/EntityTypeInfo.php b/web/core/modules/workspaces/src/EntityTypeInfo.php
index 3b91f84e5..5495c7fa4 100644
--- a/web/core/modules/workspaces/src/EntityTypeInfo.php
+++ b/web/core/modules/workspaces/src/EntityTypeInfo.php
@@ -70,4 +70,18 @@ class EntityTypeInfo implements ContainerInjectionInterface {
     }
   }
 
+  /**
+   * Alters field plugin definitions.
+   *
+   * @param array[] $definitions
+   *   An array of field plugin definitions.
+   *
+   * @see hook_field_info_alter()
+   */
+  public function fieldInfoAlter(&$definitions) {
+    if (isset($definitions['entity_reference'])) {
+      $definitions['entity_reference']['constraints']['EntityReferenceSupportedNewEntities'] = [];
+    }
+  }
+
 }
diff --git a/web/core/modules/workspaces/src/Plugin/Validation/Constraint/EntityReferenceSupportedNewEntitiesConstraint.php b/web/core/modules/workspaces/src/Plugin/Validation/Constraint/EntityReferenceSupportedNewEntitiesConstraint.php
new file mode 100644
index 000000000..894e34374
--- /dev/null
+++ b/web/core/modules/workspaces/src/Plugin/Validation/Constraint/EntityReferenceSupportedNewEntitiesConstraint.php
@@ -0,0 +1,24 @@
+workspaceManager = $workspaceManager;
+    $this->entityTypeManager = $entityTypeManager;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public static function create(ContainerInterface $container) {
+    return new static(
+      $container->get('workspaces.manager'),
+      $container->get('entity_type.manager')
+    );
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function validate($value, Constraint $constraint) {
+    if ($this->workspaceManager->getActiveWorkspace()->isDefaultWorkspace()) {
+      return;
+    }
+
+    $target_entity_type_id = $value->getFieldDefinition()->getFieldStorageDefinition()->getSetting('target_type');
+    $target_entity_type = $this->entityTypeManager->getDefinition($target_entity_type_id);
+
+    if ($value->hasNewEntity() && !$this->workspaceManager->isEntityTypeSupported($target_entity_type)) {
+      $this->context->addViolation($constraint->message, ['%collection_label' => $target_entity_type->getCollectionLabel()]);
+    }
+  }
+
+}
diff --git a/web/core/modules/workspaces/src/WorkspaceManager.php b/web/core/modules/workspaces/src/WorkspaceManager.php
index faa5f8ffa..837edefe8 100644
--- a/web/core/modules/workspaces/src/WorkspaceManager.php
+++ b/web/core/modules/workspaces/src/WorkspaceManager.php
@@ -2,6 +2,7 @@
 
 namespace Drupal\workspaces;
 
+use Drupal\Core\Cache\MemoryCache\MemoryCacheInterface;
 use Drupal\Core\DependencyInjection\ClassResolverInterface;
 use Drupal\Core\Entity\EntityPublishedInterface;
 use Drupal\Core\Entity\EntityTypeInterface;
@@ -47,6 +48,13 @@ class WorkspaceManager implements WorkspaceManagerInterface {
    */
   protected $entityTypeManager;
 
+  /**
+   * The entity memory cache service.
+   *
+   * @var \Drupal\Core\Cache\MemoryCache\MemoryCacheInterface
+   */
+  protected $entityMemoryCache;
+
   /**
    * The current user.
    *
@@ -96,6 +104,8 @@ class WorkspaceManager implements WorkspaceManagerInterface {
    *   The request stack.
    * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
    *   The entity type manager.
+   * @param \Drupal\Core\Cache\MemoryCache\MemoryCacheInterface $entity_memory_cache
+   *   The entity memory cache service.
    * @param \Drupal\Core\Session\AccountProxyInterface $current_user
    *   The current user.
    * @param \Drupal\Core\State\StateInterface $state
@@ -107,9 +117,10 @@ class WorkspaceManager implements WorkspaceManagerInterface {
    * @param array $negotiator_ids
    *   The workspace negotiator service IDs.
    */
-  public function __construct(RequestStack $request_stack, EntityTypeManagerInterface $entity_type_manager, AccountProxyInterface $current_user, StateInterface $state, LoggerInterface $logger, ClassResolverInterface $class_resolver, array $negotiator_ids) {
+  public function __construct(RequestStack $request_stack, EntityTypeManagerInterface $entity_type_manager, MemoryCacheInterface $entity_memory_cache, AccountProxyInterface $current_user, StateInterface $state, LoggerInterface $logger, ClassResolverInterface $class_resolver, array $negotiator_ids) {
     $this->requestStack = $request_stack;
     $this->entityTypeManager = $entity_type_manager;
+    $this->entityMemoryCache = $entity_memory_cache;
     $this->currentUser = $current_user;
     $this->state = $state;
     $this->logger = $logger;
@@ -167,6 +178,31 @@ class WorkspaceManager implements WorkspaceManagerInterface {
    * {@inheritdoc}
    */
   public function setActiveWorkspace(WorkspaceInterface $workspace) {
+    $this->doSwitchWorkspace($workspace);
+
+    // Set the workspace on the proper negotiator.
+    $request = $this->requestStack->getCurrentRequest();
+    foreach ($this->negotiatorIds as $negotiator_id) {
+      $negotiator = $this->classResolver->getInstanceFromDefinition($negotiator_id);
+      if ($negotiator->applies($request)) {
+        $negotiator->setActiveWorkspace($workspace);
+        break;
+      }
+    }
+
+    return $this;
+  }
+
+  /**
+   * Switches the current workspace.
+   *
+   * @param \Drupal\workspaces\WorkspaceInterface $workspace
+   *   The workspace to set as active.
+   *
+   * @throws \Drupal\workspaces\WorkspaceAccessException
+   *   Thrown when the current user doesn't have access to view the workspace.
+   */
+  protected function doSwitchWorkspace(WorkspaceInterface $workspace) {
     // If the current user doesn't have access to view the workspace, they
     // shouldn't be allowed to switch to it.
     if (!$workspace->access('view') && !$workspace->isDefaultWorkspace()) {
@@ -179,22 +215,30 @@ class WorkspaceManager implements WorkspaceManagerInterface {
 
     $this->activeWorkspace = $workspace;
 
-    // Set the workspace on the proper negotiator.
-    $request = $this->requestStack->getCurrentRequest();
-    foreach ($this->negotiatorIds as $negotiator_id) {
-      $negotiator = $this->classResolver->getInstanceFromDefinition($negotiator_id);
-      if ($negotiator->applies($request)) {
-        $negotiator->setActiveWorkspace($workspace);
-        break;
-      }
+    // Clear the static entity cache for the supported entity types.
+    $cache_tags_to_invalidate = array_map(function ($entity_type_id) {
+      return 'entity.memory_cache:' . $entity_type_id;
+    }, array_keys($this->getSupportedEntityTypes()));
+    $this->entityMemoryCache->invalidateTags($cache_tags_to_invalidate);
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function executeInWorkspace($workspace_id, callable $function) {
+    /** @var \Drupal\workspaces\WorkspaceInterface $workspace */
+    $workspace = $this->entityTypeManager->getStorage('workspace')->load($workspace_id);
+
+    if (!$workspace) {
+      throw new \InvalidArgumentException('The ' . $workspace_id . ' workspace does not exist.');
     }
 
-    $supported_entity_types = $this->getSupportedEntityTypes();
-    foreach ($supported_entity_types as $supported_entity_type) {
-      $this->entityTypeManager->getStorage($supported_entity_type->id())->resetCache();
-    }
+    $previous_active_workspace = $this->getActiveWorkspace();
+    $this->doSwitchWorkspace($workspace);
+    $result = $function();
+    $this->doSwitchWorkspace($previous_active_workspace);
 
-    return $this;
+    return $result;
   }
 
   /**
diff --git a/web/core/modules/workspaces/src/WorkspaceManagerInterface.php b/web/core/modules/workspaces/src/WorkspaceManagerInterface.php
index 9ce720b3f..006a2bd86 100644
--- a/web/core/modules/workspaces/src/WorkspaceManagerInterface.php
+++ b/web/core/modules/workspaces/src/WorkspaceManagerInterface.php
@@ -49,6 +49,19 @@ interface WorkspaceManagerInterface {
    */
   public function setActiveWorkspace(WorkspaceInterface $workspace);
 
+  /**
+   * Executes the given callback function in the context of a workspace.
+   *
+   * @param string $workspace_id
+   *   The ID of a workspace.
+   * @param callable $function
+   *   The callback to be executed.
+   *
+   * @return mixed
+   *   The callable's return value.
+   */
+  public function executeInWorkspace($workspace_id, callable $function);
+
   /**
    * Determines whether runtime entity operations should be altered.
    *
diff --git a/web/core/modules/workspaces/tests/src/Functional/WorkspaceTest.php b/web/core/modules/workspaces/tests/src/Functional/WorkspaceTest.php
index 5c7bea6e6..00276ce0b 100644
--- a/web/core/modules/workspaces/tests/src/Functional/WorkspaceTest.php
+++ b/web/core/modules/workspaces/tests/src/Functional/WorkspaceTest.php
@@ -16,7 +16,7 @@ class WorkspaceTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['workspaces'];
+  public static $modules = ['workspaces', 'toolbar'];
 
   /**
    * A test user.
@@ -43,6 +43,8 @@ class WorkspaceTest extends BrowserTestBase {
       'create workspace',
       'edit own workspace',
       'edit any workspace',
+      'view own workspace',
+      'access toolbar',
     ];
 
     $this->editor1 = $this->drupalCreateUser($permissions);
@@ -69,6 +71,36 @@ class WorkspaceTest extends BrowserTestBase {
     $page->hasContent("This value is not valid");
   }
 
+  /**
+   * Test that the toolbar correctly shows the active workspace.
+   */
+  public function testWorkspaceToolbar() {
+    $this->drupalLogin($this->editor1);
+
+    $this->drupalPostForm('/admin/config/workflow/workspaces/add', [
+      'id' => 'test_workspace',
+      'label' => 'Test workspace',
+    ], 'Save');
+
+    // Activate the test workspace.
+    $this->drupalPostForm('/admin/config/workflow/workspaces/manage/test_workspace/activate', [], 'Confirm');
+
+    $this->drupalGet('');
+    $page = $this->getSession()->getPage();
+    // Toolbar should show the correct label.
+    $this->assertTrue($page->hasLink('Test workspace'));
+
+    // Change the workspace label.
+    $this->drupalPostForm('/admin/config/workflow/workspaces/manage/test_workspace/edit', [
+      'label' => 'New name',
+    ], 'Save');
+
+    $this->drupalGet('');
+    $page = $this->getSession()->getPage();
+    // Toolbar should show the new label.
+    $this->assertTrue($page->hasLink('New name'));
+  }
+
   /**
    * Test changing the owner of a workspace.
    */
diff --git a/web/core/modules/workspaces/tests/src/Kernel/EntityReferenceSupportedNewEntitiesConstraintValidatorTest.php b/web/core/modules/workspaces/tests/src/Kernel/EntityReferenceSupportedNewEntitiesConstraintValidatorTest.php
new file mode 100644
index 000000000..5cef79df9
--- /dev/null
+++ b/web/core/modules/workspaces/tests/src/Kernel/EntityReferenceSupportedNewEntitiesConstraintValidatorTest.php
@@ -0,0 +1,81 @@
+installEntitySchema('user');
+    $this->installSchema('system', ['sequences']);
+    $this->createUser();
+
+    $fields['supported_reference'] = BaseFieldDefinition::create('entity_reference')->setSetting('target_type', 'entity_test_mulrevpub');
+    $fields['unsupported_reference'] = BaseFieldDefinition::create('entity_reference')->setSetting('target_type', 'entity_test');
+    $this->container->get('state')->set('entity_test_mulrevpub.additional_base_field_definitions', $fields);
+
+    $this->installEntitySchema('entity_test_mulrevpub');
+    $this->initializeWorkspacesModule();
+  }
+
+  /**
+   * @covers ::validate
+   */
+  public function testNewEntitiesAllowedInDefaultWorkspace() {
+    $entity = EntityTestMulRevPub::create([
+      'unsupported_reference' => [
+        'entity' => EntityTest::create([]),
+      ],
+      'supported_reference' => [
+        'entity' => EntityTest::create([]),
+      ],
+    ]);
+    $this->assertCount(0, $entity->validate());
+  }
+
+  /**
+   * @covers ::validate
+   */
+  public function testNewEntitiesForbiddenInNonDefaultWorkspace() {
+    $this->switchToWorkspace('stage');
+    $entity = EntityTestMulRevPub::create([
+      'unsupported_reference' => [
+        'entity' => EntityTest::create([]),
+      ],
+      'supported_reference' => [
+        'entity' => EntityTestMulRevPub::create([]),
+      ],
+    ]);
+    $violations = $entity->validate();
+    $this->assertCount(1, $violations);
+    $this->assertEquals('Test entity entities can only be created in the default workspace.', $violations[0]->getMessage());
+  }
+
+}
diff --git a/web/core/modules/workspaces/tests/src/Kernel/WorkspaceIntegrationTest.php b/web/core/modules/workspaces/tests/src/Kernel/WorkspaceIntegrationTest.php
index 9d77cdf00..39c365b94 100644
--- a/web/core/modules/workspaces/tests/src/Kernel/WorkspaceIntegrationTest.php
+++ b/web/core/modules/workspaces/tests/src/Kernel/WorkspaceIntegrationTest.php
@@ -14,7 +14,6 @@ use Drupal\Tests\node\Traits\NodeCreationTrait;
 use Drupal\Tests\user\Traits\UserCreationTrait;
 use Drupal\views\Tests\ViewResultAssertionTrait;
 use Drupal\views\Views;
-use Drupal\workspaces\Entity\Workspace;
 
 /**
  * Tests a complete deployment scenario across different workspaces.
@@ -28,6 +27,7 @@ class WorkspaceIntegrationTest extends KernelTestBase {
   use NodeCreationTrait;
   use UserCreationTrait;
   use ViewResultAssertionTrait;
+  use WorkspaceTestTrait;
 
   /**
    * The entity type manager.
@@ -36,13 +36,6 @@ class WorkspaceIntegrationTest extends KernelTestBase {
    */
   protected $entityTypeManager;
 
-  /**
-   * An array of test workspaces, keyed by workspace ID.
-   *
-   * @var \Drupal\workspaces\WorkspaceInterface[]
-   */
-  protected $workspaces = [];
-
   /**
    * Creation timestamp that should be incremented for each new entity.
    *
@@ -93,34 +86,6 @@ class WorkspaceIntegrationTest extends KernelTestBase {
     $this->createNode(['title' => 'live - 2 - r2 - unpublished', 'created' => $this->createdTimestamp++, 'status' => FALSE]);
   }
 
-  /**
-   * Enables the Workspaces module and creates two workspaces.
-   */
-  protected function initializeWorkspacesModule() {
-    // Enable the Workspaces module here instead of the static::$modules array
-    // so we can test it with default content.
-    $this->enableModules(['workspaces']);
-    $this->container = \Drupal::getContainer();
-    $this->entityTypeManager = \Drupal::entityTypeManager();
-
-    $this->installEntitySchema('workspace');
-    $this->installEntitySchema('workspace_association');
-
-    // Create two workspaces by default, 'live' and 'stage'.
-    $this->workspaces['live'] = Workspace::create(['id' => 'live']);
-    $this->workspaces['live']->save();
-    $this->workspaces['stage'] = Workspace::create(['id' => 'stage']);
-    $this->workspaces['stage']->save();
-
-    $permissions = [
-      'administer nodes',
-      'create workspace',
-      'edit any workspace',
-      'view any workspace',
-    ];
-    $this->setCurrentUser($this->createUser($permissions));
-  }
-
   /**
    * Tests various scenarios for creating and deploying content in workspaces.
    */
@@ -492,6 +457,57 @@ class WorkspaceIntegrationTest extends KernelTestBase {
     $entity_test->delete();
   }
 
+  /**
+   * @covers \Drupal\workspaces\WorkspaceManager::executeInWorkspace
+   */
+  public function testExecuteInWorkspaceContext() {
+    $this->initializeWorkspacesModule();
+
+    // Create an entity in the default workspace.
+    $this->switchToWorkspace('live');
+    $node = $this->createNode([
+      'title' => 'live node 1',
+    ]);
+    $node->save();
+
+    // Switch to the 'stage' workspace and change some values for the referenced
+    // entities.
+    $this->switchToWorkspace('stage');
+    $node->title->value = 'stage node 1';
+    $node->save();
+
+    // Switch back to the default workspace and run the baseline assertions.
+    $this->switchToWorkspace('live');
+    $storage = $this->entityTypeManager->getStorage('node');
+
+    $this->assertEquals('live', $this->workspaceManager->getActiveWorkspace()->id());
+
+    $live_node = $storage->loadUnchanged($node->id());
+    $this->assertEquals('live node 1', $live_node->title->value);
+
+    $result = $storage->getQuery()
+      ->condition('title', 'live node 1')
+      ->execute();
+    $this->assertEquals([$live_node->getRevisionId() => $node->id()], $result);
+
+    // Try the same assertions in the context of the 'stage' workspace.
+    $this->workspaceManager->executeInWorkspace('stage', function () use ($node, $storage) {
+      $this->assertEquals('stage', $this->workspaceManager->getActiveWorkspace()->id());
+
+      $stage_node = $storage->loadUnchanged($node->id());
+      $this->assertEquals('stage node 1', $stage_node->title->value);
+
+      $result = $storage->getQuery()
+        ->condition('title', 'stage node 1')
+        ->execute();
+      $this->assertEquals([$stage_node->getRevisionId() => $stage_node->id()], $result);
+    });
+
+    // Check that the 'stage' workspace was not persisted by the workspace
+    // manager.
+    $this->assertEquals('live', $this->workspaceManager->getActiveWorkspace()->id());
+  }
+
   /**
    * Checks entity load, entity queries and views results for a test scenario.
    *
@@ -681,18 +697,6 @@ class WorkspaceIntegrationTest extends KernelTestBase {
     }
   }
 
-  /**
-   * Sets a given workspace as active.
-   *
-   * @param string $workspace_id
-   *   The ID of the workspace to switch to.
-   */
-  protected function switchToWorkspace($workspace_id) {
-    // Switch the test runner's context to the specified workspace.
-    $workspace = $this->entityTypeManager->getStorage('workspace')->load($workspace_id);
-    \Drupal::service('workspaces.manager')->setActiveWorkspace($workspace);
-  }
-
   /**
    * Flattens the expectations array defined by testWorkspaces().
    *
diff --git a/web/core/modules/workspaces/tests/src/Kernel/WorkspaceTestTrait.php b/web/core/modules/workspaces/tests/src/Kernel/WorkspaceTestTrait.php
new file mode 100644
index 000000000..13cff6a3d
--- /dev/null
+++ b/web/core/modules/workspaces/tests/src/Kernel/WorkspaceTestTrait.php
@@ -0,0 +1,67 @@
+enableModules(['workspaces']);
+    $this->container = \Drupal::getContainer();
+    $this->entityTypeManager = \Drupal::entityTypeManager();
+    $this->workspaceManager = \Drupal::service('workspaces.manager');
+
+    $this->installEntitySchema('workspace');
+    $this->installEntitySchema('workspace_association');
+
+    // Create two workspaces by default, 'live' and 'stage'.
+    $this->workspaces['live'] = Workspace::create(['id' => 'live']);
+    $this->workspaces['live']->save();
+    $this->workspaces['stage'] = Workspace::create(['id' => 'stage']);
+    $this->workspaces['stage']->save();
+
+    $permissions = array_intersect([
+      'administer nodes',
+      'create workspace',
+      'edit any workspace',
+      'view any workspace',
+    ], array_keys($this->container->get('user.permissions')->getPermissions()));
+    $this->setCurrentUser($this->createUser($permissions));
+  }
+
+  /**
+   * Sets a given workspace as active.
+   *
+   * @param string $workspace_id
+   *   The ID of the workspace to switch to.
+   */
+  protected function switchToWorkspace($workspace_id) {
+    // Switch the test runner's context to the specified workspace.
+    $workspace = $this->entityTypeManager->getStorage('workspace')->load($workspace_id);
+    \Drupal::service('workspaces.manager')->setActiveWorkspace($workspace);
+  }
+
+}
diff --git a/web/core/modules/workspaces/workspaces.module b/web/core/modules/workspaces/workspaces.module
index f279c4389..8f4f2fa2e 100644
--- a/web/core/modules/workspaces/workspaces.module
+++ b/web/core/modules/workspaces/workspaces.module
@@ -56,6 +56,15 @@ function workspaces_form_alter(&$form, FormStateInterface $form_state, $form_id)
     ->formAlter($form, $form_state, $form_id);
 }
 
+/**
+ * Implements hook_field_info_alter().
+ */
+function workspaces_field_info_alter(&$definitions) {
+  \Drupal::service('class_resolver')
+    ->getInstanceFromDefinition(EntityTypeInfo::class)
+    ->fieldInfoAlter($definitions);
+}
+
 /**
  * Implements hook_entity_load().
  */
@@ -154,15 +163,15 @@ function workspaces_toolbar() {
 
   $current_user = \Drupal::currentUser();
   if (!$current_user->hasPermission('administer workspaces')
-    || !$current_user->hasPermission('view own workspace')
-    || !$current_user->hasPermission('view any workspace')) {
+    && !$current_user->hasPermission('view own workspace')
+    && !$current_user->hasPermission('view any workspace')) {
     return $items;
   }
 
   /** @var \Drupal\workspaces\WorkspaceInterface $active_workspace */
   $active_workspace = \Drupal::service('workspaces.manager')->getActiveWorkspace();
 
-  $items['workspace'] = [
+  $items['workspace'] += [
     '#type' => 'toolbar_item',
     'tab' => [
       '#type' => 'link',
@@ -180,6 +189,7 @@ function workspaces_toolbar() {
           ],
         ]),
       ],
+      '#cache' => ['tags' => $active_workspace->getCacheTags()],
     ],
     '#wrapper_attributes' => [
       'class' => ['workspaces-toolbar-tab'],
diff --git a/web/core/modules/workspaces/workspaces.services.yml b/web/core/modules/workspaces/workspaces.services.yml
index a238473d1..ab9e8bf89 100644
--- a/web/core/modules/workspaces/workspaces.services.yml
+++ b/web/core/modules/workspaces/workspaces.services.yml
@@ -1,7 +1,7 @@
 services:
   workspaces.manager:
     class: Drupal\workspaces\WorkspaceManager
-    arguments: ['@request_stack', '@entity_type.manager', '@current_user', '@state', '@logger.channel.workspaces', '@class_resolver']
+    arguments: ['@request_stack', '@entity_type.manager', '@entity.memory_cache', '@current_user', '@state', '@logger.channel.workspaces', '@class_resolver']
     tags:
       - { name: service_id_collector, tag: workspace_negotiator }
   workspaces.operation_factory:
diff --git a/web/core/profiles/demo_umami/config/install/views.view.articles_aside.yml b/web/core/profiles/demo_umami/config/install/views.view.articles_aside.yml
index 8a4357f84..d65688686 100644
--- a/web/core/profiles/demo_umami/config/install/views.view.articles_aside.yml
+++ b/web/core/profiles/demo_umami/config/install/views.view.articles_aside.yml
@@ -144,6 +144,20 @@ display:
           expose:
             label: ''
           granularity: second
+        nid:
+          id: nid
+          table: node_field_data
+          field: nid
+          relationship: none
+          group_type: group
+          admin_label: ''
+          order: ASC
+          exposed: false
+          expose:
+            label: ''
+          entity_type: node
+          entity_field: nid
+          plugin_id: standard
       title: 'More featured articles'
       header: {  }
       footer: {  }
diff --git a/web/core/profiles/demo_umami/config/install/views.view.featured_articles.yml b/web/core/profiles/demo_umami/config/install/views.view.featured_articles.yml
index 3ddc61bb7..9ce6c4cab 100644
--- a/web/core/profiles/demo_umami/config/install/views.view.featured_articles.yml
+++ b/web/core/profiles/demo_umami/config/install/views.view.featured_articles.yml
@@ -158,6 +158,20 @@ display:
           expose:
             label: ''
           granularity: second
+        nid:
+          id: nid
+          table: node_field_data
+          field: nid
+          relationship: none
+          group_type: group
+          admin_label: ''
+          order: ASC
+          exposed: false
+          expose:
+            label: ''
+          entity_type: node
+          entity_field: nid
+          plugin_id: standard
       title: Articles
       header: {  }
       footer: {  }
diff --git a/web/core/profiles/demo_umami/config/install/views.view.frontpage.yml b/web/core/profiles/demo_umami/config/install/views.view.frontpage.yml
index 7f4f0db3f..a97299283 100644
--- a/web/core/profiles/demo_umami/config/install/views.view.frontpage.yml
+++ b/web/core/profiles/demo_umami/config/install/views.view.frontpage.yml
@@ -249,6 +249,20 @@ display:
           granularity: second
           entity_type: node
           entity_field: created
+        nid:
+          id: nid
+          table: node_field_data
+          field: nid
+          relationship: none
+          group_type: group
+          admin_label: ''
+          order: ASC
+          exposed: false
+          expose:
+            label: ''
+          entity_type: node
+          entity_field: nid
+          plugin_id: standard
       style:
         type: default
         options:
diff --git a/web/core/profiles/demo_umami/config/install/views.view.recipes.yml b/web/core/profiles/demo_umami/config/install/views.view.recipes.yml
index e7cf9fd6f..7e273c970 100644
--- a/web/core/profiles/demo_umami/config/install/views.view.recipes.yml
+++ b/web/core/profiles/demo_umami/config/install/views.view.recipes.yml
@@ -158,6 +158,20 @@ display:
           expose:
             label: ''
           granularity: second
+        nid:
+          id: nid
+          table: node_field_data
+          field: nid
+          relationship: none
+          group_type: group
+          admin_label: ''
+          order: ASC
+          exposed: false
+          expose:
+            label: ''
+          entity_type: node
+          entity_field: nid
+          plugin_id: standard
       title: Recipes
       header: {  }
       footer: {  }
diff --git a/web/core/profiles/demo_umami/modules/demo_umami_content/default_content/LICENCE.txt b/web/core/profiles/demo_umami/modules/demo_umami_content/default_content/LICENCE.txt
index 8585bbe9c..72077fc14 100644
--- a/web/core/profiles/demo_umami/modules/demo_umami_content/default_content/LICENCE.txt
+++ b/web/core/profiles/demo_umami/modules/demo_umami_content/default_content/LICENCE.txt
@@ -13,6 +13,7 @@ pineapple-placeholder-10.jpg by Keith Jay
 pizza-umami.jpg by Keith Jay
 supermarket-savvy-umami.jpg by Keith Jay
 thai-green-curry-umami.jpg by Keith Jay
+vegan-chocolate.jpg by Keith Jay
 veggie-pasta-bake-hero-umami.jpg by Keith Jay
 veggie-pasta-bake-umami.jpg by Keith Jay
 victoria-sponge-umami.jpg by Keith Jay
diff --git a/web/core/profiles/demo_umami/modules/demo_umami_content/default_content/article_body/dairy-free-delicious-milk-chocolate.html b/web/core/profiles/demo_umami/modules/demo_umami_content/default_content/article_body/dairy-free-delicious-milk-chocolate.html
new file mode 100644
index 000000000..ee137ff89
--- /dev/null
+++ b/web/core/profiles/demo_umami/modules/demo_umami_content/default_content/article_body/dairy-free-delicious-milk-chocolate.html
@@ -0,0 +1,12 @@
+

The calendar is full of excuses for chocolate-lovers to indulge, from religious festivals to birthdays - and even World Chocolate Day on the 7th July. But for those who are vegan, or on dairy-free diets, there is no need to miss out, because there are plenty of delicious vegan chocolate varieties on offer.

+

Dairy-free milk chocolate is made in largely the same way as regular chocolate, until the point when the milk is added. Cacao beans are roasted for a couple of hours until they develop a rich flavor. The outer shells are removed, and the interior nibs are ground to make a paste that can be mixed with cocoa butter to produce the desired percentage of chocolate. Flavorings, sugar and milk are added in different quantities to get the type of chocolate being produced. The chocolate is grainy at this point and needs to be mashed until it is smooth - this can take days! Finally, it is tempered through a process of heating and cooling until it is ready to eat.

+

So, how do vegan chocolatiers get that creamy milk flavor and texture into their products?

+

Rice milk

+

The flavor of rice milk perfectly complements the cocoa beans and it was one of the first dairy milk alternatives to be used to create vegan milk chocolate. Rice milk is made from rice powder and is sometimes combined with hazelnut milk to create the correct texture and taste that is ideal for producing all kinds of chocolate bars.

+

Coconut milk

+

Coconut milk has to be the perfect ingredient for adding creaminess into a chocolate bar. With high fat levels, a sweet, but not overpowering taste and the correct consistency, coconut milk is a great choice for vegan milk chocolate. Chocolate made in this way will melt wonderfully for drizzling or dipping, and the coconut milk adds a slight tropical flavor that works well with other fruit flavors and nuts.

+

Soy milk

+

Soy has long been the mainstay of vegan and vegetarian diets, as it is rich in protein and is available in a wide variety of textures suitable for all kinds of dishes. Soy milk is widely available and is a great alternative to dairy milk in chocolate. It isn’t as rich in fat as some vegan milks, but does have a neutral taste that makes it easy to combine with almost any other flavor.

+

Nut milks

+

Milks made from almonds and hazelnuts are easy to find on supermarket shelves, and are perfect for chocolate production. Like soy milk, they can be quite low in fat and therefore a little less creamy, but they have that nutty taste that goes so well with chocolate of all kinds.

+

Many manufacturers will use a combination of the above milks to create the perfect consistency for their product. Using this milk mixture they are able to produce all kinds of milk chocolates, including white chocolate.

diff --git a/web/core/profiles/demo_umami/modules/demo_umami_content/default_content/articles.csv b/web/core/profiles/demo_umami/modules/demo_umami_content/default_content/articles.csv index 74ae81fd7..484965489 100644 --- a/web/core/profiles/demo_umami/modules/demo_umami_content/default_content/articles.csv +++ b/web/core/profiles/demo_umami/modules/demo_umami_content/default_content/articles.csv @@ -1,7 +1,8 @@ title,body,author,slug,image,alt,tags Give it a go and grow your own herbs,give-it-a-go-and-grow-your-own-herbs.html,Holly Foat,articles/give-it-a-go-and-grow-your-own-herbs,home-grown-herbs.jpg,"Fresh cut herbs including mint, parsley, thyme and dill","Grow your own,Seasonal,Herbs" +Dairy-free and delicious milk chocolate,dairy-free-delicious-milk-chocolate.html,Umami,articles/dairy-free-and-delicious-milk-chocolate,vegan-chocolate.jpg,"A delicious bar of dairy-free milk chocolate, broken into pieces.","Vegan,Chocolate" The real deal for supermarket savvy shopping,the-real-deal-for-supermarket-savvy-shopping.html,Megan Collins Quinlan,articles/the-real-deal-for-supermarket-savvy-shopping,supermarket-savvy-umami.jpg,Products presented on supermarket shelving.,"Supermarkets,Shopping" -The umami guide to our favorite mushrooms,the-umami-guide-to-our-favourite-mushrooms.html,Umami,articles/the-umami-guide-to-our-favourite-mushrooms,mushrooms-umami.jpg,A delightful selection of mushroom varieties laid out on a simple wooden plate.,"Mushrooms,Vegetarian" +The Umami guide to our favorite mushrooms,the-umami-guide-to-our-favourite-mushrooms.html,Umami,articles/the-umami-guide-to-our-favourite-mushrooms,mushrooms-umami.jpg,A delightful selection of mushroom varieties laid out on a simple wooden plate.,"Mushrooms,Vegetarian" Let's hear it for carrots,lets-hear-it-for-carrots.html,Umami,articles/lets-hear-it-for-carrots,heritage-carrots.jpg,"Purple, orange, yellow and white heritage carrots.","Carrots,Vegetarian,Healthy" Baking mishaps - our troubleshooting tips,baking-mishaps-our-troubleshooting-tips.html,"Umami",articles/baking-mishaps-our-troubleshooting-tips,chocolate-brownie-umami.jpg,"A delicious chocolate brownie","Baking,Learn to cook" Skip the spirits with delicious mocktails,skip-the-spirits-with-delicious-mocktails.html,Megan Collins Quinlan,articles/skip-the-spirits-with-delicious-mocktails,mojito-mocktail.jpg,"Fresh mojito mocktail with garnish of mint leaves, ice, and sliced lime","Alcohol free,Drinks,Party,Cocktail party,Dinner party" diff --git a/web/core/profiles/demo_umami/modules/demo_umami_content/default_content/images/vegan-chocolate.jpg b/web/core/profiles/demo_umami/modules/demo_umami_content/default_content/images/vegan-chocolate.jpg new file mode 100644 index 0000000000000000000000000000000000000000..673589f3bc6bff3af6b3016e08504a9f6eec978d GIT binary patch literal 65650 zcmY(q1ymeC(=NOVgg^ob5FmJvh2ZY)?Bee3wh%lxBm~#R7k7tXi$n0h;tq=>!98e# z=I4FC```23nlsgX&Qy2T^qf95PxaIPmj3+!;3>*OcFaQSnf8i<$ejAzfVo@2d!@!~b%t5>fG z|D#?J;{VqI|9=Xc|5N<0R{yK|uMdEa1^kB&KnLIhfcQW(eBi$U03`qbcncuJ8*W(a`O z{Hcc!02&|^Ac_A;iSN?jz`w)bf?g@HQ6n>hc?_zYmC_t2q@)hPDE?*`8w!s_=i#(< z{BJXWBmgUv1P}shL@P|IQxMmh9PyPe!bGQ-P2OqeklMaKY`+vq50Qp|0Ghpk5_D=H zIv>D@IH!F{$(&a|p%53^pHyQ#XfYEBE zV0}ulm13eUVX{R7a29a_0KHEmOMZu?(GGq#aiG6>-QG;Xi5^fj&Uel)%xwFqsf)+S z{y-f9){Kq(G>1cgC-3Mc*#{>5`~nb~0RTvbP|GUICt%`cN38og@c>9Fe~5Y=#z0OL zB3DXI{Yt+KB+)ag18E#F3Br5fX+_+$nC1j208C&ARtPNswrXpkvknd%eDW8QJJ)T* zcp1z``v!BTs?KqX6$8H5;KA7KT*yUlUu5HHyd3fQo?6_5da)Ol;~gv={1}=HDiV z5Rk2P*c-PU#nw;hUPYqvPA? zidbXcp5}Xugwq_Ko{5JuCE5AAM&=iQ`SNzIeq7y#X-iH~C|!?dqhow3X#kI0)rOhM zhjDpF&TvM1nBMLCZ;G0>SO6z=PMmL?1S$Dsp#ABV$Rk_geFKtJ{LbKaU^0xWo?2d0V7H8?DJQo6&j6#eMVf)$2XV^l_#o2 za?{>wcsy?MSkFi}u^FYM${9rM7)Z;XKKdg2#lk-T*pD)s-Txi5qTF8{dyvA#x0id( zr+h^X{wq$J-9tcsWZ2P+XJ~p3X_C4Yp*@St61T2spm>_0-jEc2*bCfm)u}=9wm1N< z)pyuE@W(RCW1K9#wzvodtQYt^_vtxa>^Zh~JA`yvl5rZ!bMp0VvDLyj@xeCTDfeFp zK5eOHwe5Ex|Kl5CCYg7*s@%sB_!$r~=DS~Gjf`Wj4X|c1COBA6lOPmV4=pd8*?OXnwML zIjB?8F@xH#CXe)5CH8TvFYNUg9rb;EByxW}gUiKYzNo7;-{5=H!DY|3HadsQa(?(# zNyj;ZwZPHQVv&(=A^LeF$7qgcmaMy-RTYMZf;OO3hIUskAim}9JGXuoY44Ji7QZ2B zVIZexP7gpP7?6l}?(&M0uI=@EDTtT(K;&13EIhuq zm-iLP9of8W{rT7Z3g4Wn;1{Rn9N{uR7%eiUb=QOVV(q_UsMKVK7w!@tE; zH~tP?W4S>)DZ?U6OKSojj1Mz>ZEdtR)E$yi!qzm7>HXNfQQFI(AE%Tya(6gEQK961 zhxn5@p|f4T+Nl+T^hQkIMsEUH0S8i#MoV~`cu9?-cXYaX2u z58ux2_&(aL)*{k%DG1c@8oS{&R5`||qDKLCr5M?gzXJ7RIg-r4Y{P`0Y3@WU*4 zb|Tzp&9UHzn_>Luq2#H)4;Pi8VH~LzC$Afop3EMy-66UgUrH@+Mf$yI(p&h&{-0-w z`|1vbOc_ZSK19q&xke&`Ra3`dnHg%`xVOQTpEYF6^j>x@(C=n`e(O|IS-Jag>!|L* zmcMR&u*%Q6UN&e=XxUQ-{pn!SKjN!9q^mmN;pi_mMsvt_%W}#z0FTaeFC;i}_4067 z^s*CLPB$jc`Xjr;MjS8-p&g(Z8-tWxf3 z5E|oQ3p3&2~tXBsS~Y1W-q$G zWX#y_a~!Q2N7#O!{9Um~K_=>HcByjtS%5M~4p+@{mvG^uPoX=oXwK25`yLTUAe+*t zlUK2F;KytbkMy8JHtm?;jv-F<^acb+(YX(f{3)wl;PE~?qG|N;XBJkktYHGnHC0JX zo2ddMuS_ryIf_?1^E67CAlXB!aA67zl;mY6C@WxvtIb>=p?baSTAZJNLqeSOtAk0 z)F^#eaLjy{>y`7Cxv^w6hyCSi&D9$$7rB-)x@LStp-y_>lBW}{%ut~f@?LyY^Ea7*(gVVjnQMlOX^f??N`G%$NB%M@J8>X(`L4kNwVEPo5?`jMn<10a@N_ zU|-xbV_ppskQVbbf}2Rf%}bSFS2gc7YwPxm zd9P{*$6p0|^BVP9-fwHWf9bXvZx$Z;c4nMR1ko|tHu5DMGVk~&=&@n*U^(hGRvTuP zlLryREwZ)~cVzqy==3S`H1eruJP1RF5G~Z%k0&Fy7ZOCN3qP?o)lJMZ$ zEv9kdia%1AWV=9-3-ifFW=uKMcz#{n?*|d!AyxN%{IN%Qp8Zk{Epp*Kaf6`25b{;Q z!WCT$pKhfCEVsLy4M$gYh+SH;hHV^S`Ny@>Q3O|MuSPU#v^D&xj2QlKw;rsjJzu;U zPl2Ulm)ySSQ-V==eVY`lIi#F$3o&N#;vr2R-d?hZRJZo5k@r!kYHLqBP5F(x*k{eO zlu2P5q*DW{*js@jyOeL*h0@pP&~-Jx!d;R=L(xK8-+UbPF@gD;bD|zw5UDiFufqnn zm#`?S+J&ts2IJL8wZdv_g-LD2h6*{rv#TcJe{wr-Rle-H6S42{YOW^QKI5b3gGM9x zVeQqcMV{m4!nU9B+9St@lJn+FlFG9f&$~Yf6P9VGEpH30nU?z@1_cvtZ2qfrNGyexe;YZ<0XmN0v+-joCG7gXBLw_j_=9+ zq|hW~^&Vqk#E#N$$ln?p*(LBk7B`ZRWJH&u91w7uwD!q@s*-(B)$?uVT69tqi7G>~ zUbrSDV@0OT1Y30ybehL&AIHv**of;L6>{PBOPiB1M}eL~>_5QtCulzp!%_(nydW08 zyVhr6b*3$ZWxGOVQEKQ^<_Em1${)@al=-+|>C9mTVgz7gCvdyGU{6|VKW1>qSLt$! zt+i!4d7gVc(%Z+QNLSCX7p;OBK@2WKsl_wco*3 z1k!c+_%|$igVjA?p2fC>_^=LITw)ESX%V=kPnCAYG8bXlVK49 z7TcKi8b6{ou8A6!lEt;^*PU7AJ>!$UplQPAS97~eoNU54H13)w`ZG!uRd|hjK}@d% z+l$fAQBc80+zAAQ1wWZv{{tSHC0&Up)T7<%ZH%ccra-ADU&_5T0CuE zbHJ+ptpM525@lKJQElUQ>8;JYLCr^UmdDN;8m;G_taLQgM~_!_l}P}RdcKR}cb$V@ zj>EkHn2jXjF|Ct!*s7T1(%@hGGc1h<6(ymRVIfwBkDpXLS)wzca>ktz92e~3&E&z- zE|+PIpe!~TAR{z#1y^|<4S>h6Y11m}=lv#08a(z!Osd+%54?ak1JNkZ)BRSH@Ct$B zO$u$IJErWIaTKam+2qH#Le> znvS0=_w%eU|HQeHIxS7PPlpg7GDHTf{L1Om#LpigrDN$fUV5q})V=)Jt$e9E&TnMZ ztDFjkElS}EOHNt$eDW#o~_a)S23C5)7k zCVq9_+UG)v;mc&?XdOH+X3nQCupx3a6&2CgX#^SSKcwRO*|;~BXuWD}H{=_4dFOSt zZ-N5jhSeA4Y{H5GIPor<6<0L{MRlITK>9T0EJo3eXEN|lGXzUS%K>eWrk>X9UvCI% z<11JgGAv4qhQ7RFVdX`d=`|ZyzQi6${%GU^%|L1`4nfc{ZOtRU$Bu4VG#*oZpUI>T zH&OQdwq-!VoB20V(ROv`W>P>tZ9=7ayu7BmG)!KFd(7Lwkr!OQ8-5NRwP&!5r1ert> zj_A?jkK?pFCl9Yks+|^{#m#c&4JU<`>RWIvyYPB{k7lY+@{^5vrT8%`f`A1=$BmJ~ z{~0j$4TE0-d>5Od@IfwtJmVK<_H8{Ds5ncOg!9)+J#tV1!T_3UWkcMF6=EpMjCQ=IzPoLx;Ix5RsoUi+ieo#(I#DEz&4@b_R;jNHC zOQ*t74#m7EC?c%5sjjmazEJdGCF%vC_Y}@I43+%Q@^63;s^~w9lAZ!YtpPoW=YE*q zVQBbdtRK0+S&DdJ^i2p9vyctZQtXMEQ|lu!O0cEXQ+QGKP%K3-9sqCcd*C2}w2?!am27Mu0f2{E ziU}w=_Kj9iZJKI#AGRVRIyn)r&EzP8=g7ot`3VdvX`*3!!V*lh)Bp?s`cs;Y90))| z|9{eSKs3OA({%q$(gE?FQeZciPE^P`#IQGL%0z=mHnC4zS_v#=8#|8mC8H67kq7`K zX+KkcNg(HGGpR!)7VC^SbZ%aTv*A-6-LQM$gq6dHVbVijWf;NO4A=q>iyDoV5!7a( zW3X2zM$E&P5SZ4%Ba@X@C3n>MV+iqIO4EjFv}MKuGOQE(v29rmoGP2~QWOVCJ@v;7qF85>%=EmEysnzgeUD44 zngm25W)DjY_SNY~z&dq;Ejp#(;yzi<42UhOrH&y8M9U^rYv(?u#8s7y3J|458=*^me!j_#EXx&@YE;520|u`+vhczA%NQGYCCUBgZv$e zRlgQ!Z`G71d++!Rbf$HA+GoA(w;m2dwT=)La#XlV(&w5z3^oQ}J(*xB!Iuqn7;Aso z!9$>894G2**dfB@F5;g)?tFp`MeGi;%~y6Bq{ydgvV<`IYE+Hh7TRmkTDo2ioES*= zc2AiL0lX2{n4(`w#vU1Oi4z0OWFwEM&>N2oXoPO`J90eIg@G>?Y&=txlTG79nl9R+ z%W<@82(N^1m)DjZO9-)=b|!Kx2cuxBAE$?x=lk1NwMWh$d!}lPJG=D+_}0s&=GE~f z0WS`sa;pS3s_KUO^=qWKu{=xziB7EqE92!>@)dcsyDasS0E+%^Z`Rtv*GTJC?Z*9r zAsv~!AE);lr~FC{s3nQ;b!}^EI=DSES&9S`Y{J3$lQN}44LZZU1DAKteD|xpl)15J z502e#ytRsKt~`d5&lYauU0Ez4NO-1T;yN|UK>s20kw-hW}OuK!A} zEA`AnTwJXR(O#vqkEj1lYQHX*bAR6N;^1bIDYx20jA-7-ODtVpFV{dhEJ|1C8C&Np zA3JRe-nY?xm(=@z041j$32GfA^0HS)FTZ37f*EJ*2!;xC2)f_bu`Felsa85QDttYn z$NAkvU(qYmYrcrf?*6rv6q^j!Kx+z$SlF4VY`u9nNAo0#f1d5p zH+i*q55GHdF_tomggxPOLmJTVNLZ8=iIx(#h2L>#tj*HZ=t0<8<=PUAaffOQ?u53( z#a6&KQ;xQ%mwXehrZAIAuU7e(-iaD8Do83Z-fl;H?Wcwh8l*;o`uzA7r?%#%t7liL z#6TFoJcawFSrE&ti{I;NLM@p`%<|4iT=#284}$Wh{no8so9f~_OOnqpuf7fXZdW0aiC(#DN#XC&-huUX#IY&(-19tq1fKGmIpylOHw z;TOD*Q@%D>o>fm4^Yrpv7s1WR?e5UaG5KRM$zDYrb|u0yw6PqjTY*m%XHq>st2#DQ zV8Z8fR9ur)^?hmtXvFQ6^)@k|4tP{6i9Iwsw3X)NXUIXvCg9v}6c(al(j`=GiX{2; z4c9oxYkkyuGHS-MEYHZbMalD4xjSeGjaMp5_t7=ELb^-$c3crymhsVell9QkOi6Cs zH0x$TlBhk<@LWJEE+~QM`yam(Y(#1N8-x{oNG@}Rq0C0 zy-WYFgt6V+STpDZYuf;|9FRRZl7rq1J+y7K~>G-`G-%akDq>XI8bXPIhP?JB_(=B4h z@lDW$(5Is^#h9l@_RMFE+WqcNk=)0Dw@1q}i-i|yP93lCq@VXd)QOAP_V4sQ ze2hlRG+4~M+Fa8*T&wNRZ9wLxfrh_sQGI?*>O4bE9IexES^rmpm|@)LbkEbvzVSKq zU_6;wtYr!B85S8zt7>-7_t9CMHcLgAss>E<06*#aZHF?|qKTpB@Dc1oOw1-m#^+s5)tNTEW>j*JEOwJ33)xAUe@Oc1l)aNQhT`H07K=o~9)=*(4CZFr3nPInYE z>KKn!mu2U(s=Fe+vyHfPru5jLi<^VF-FH%GUtD(L3HE%VzU{9xT?o#=QQ6|!-410&QoaGL8sF=BpnNRcHq`Y72aany`d$+@|HX|8bCkYp2b=p#|{_p zYO*=I`VOK+r+-@Es!sYJh=D#ZpF_=sF)G+7~uE z8ED!;(`J<^5?7QNBMgF$S2a7Xq3mY}@$WjG`f9rcQpj-W%FQ#?2UDA>#ka^f%pTQb z2(AWM>qr85>{K88RY;HELUvR>VGt0g@-p1qVKSfe*~(bzrHH9w8wgY1{#u@-7tQ*& zA>S=K`=lvy;>TIzmuLXq@xD`|ceJ}>Z;rEJc`3IPnS7mU_18X;GG;ClOcYQ3Ek`?z7|=c~ z?BM8JRK`%S&v=-JDQ5G$6Bm0QK^d&_CSj|QISS_`=1GepWm}_}EjA%mvq$7J1`p?G&}3}i{xq+2=i&B)`s;-#uq-&3DGtf;OV8f|e(`Hf$C5&{MoR7;J{q=o8lyi`1R`cZW zv>Dz{L~K29uUZ?xd*DHxTrn|dn}lI+jZ3oOzBeD3Cep-~#L>YIUmrx;`n!6VrS#^w z&U*r-0Y%=&0&)NVL3QW0a=(3;wCfIkcsO84it@-?z-bzqCS+ShGneX8KNEYZ)f}Jj znd3EX7cM>#ApqgHR;m3-PF8!1d1j%o^9xg*+|&p)XIg!9f01p~QT;N!`nmaJ!~J46 zIpa+AApUVoZmhvPOKoeTo`Pp>2@vnuuYp&^QM6g9bl5mwklYar4}MRW#mBLJ>(F5v zx*UB3uNrSJWdqv8-@aw1QWd>%6c%0+Fm#j*wLI%%;_M?=lRLM{m$vq{j5eL|G%LN! z9ri(*@c&839bcRG;ZN=6;+CetQ0VS7Hj_y4x?Qm`I4~f5CB0CClejUp_Lg6CKAiQ0 z#lR*_1m*PyWfOlIle5mDJ3uaEs2v4*f?hCb`iR#8V*bmF1z`17#&MHznkw;=7KeJx zHg0v3(P}oEw53z81(a1+T(YJYcb_Dh6etl4VgSpAWchZ+Syu1$0tSr6EHVyovz9&6VroOQ+qX*sdFD+MI zI3)J9O}JKF@h8`9h@ti&&<2P=S`yHUfd(P@N(-b(R)bd_I5-&AQrH=NQik!En2+dK z#4Md!HHyWXprM08q(Jn=F(4Rea2lHi5%cCqnR>`)kR*hF%iG7!@?_#k z1`_kX0y3Vwr%nWqW1xYp6GZzt75gkFYX>>MD{(Q%TaFE8=47trWGB<4RQ7`yNUR{# zpCH(@01$Pir7vt>Uzz9t1~x?1HbAf~2V+D;c(_0#pk(1M7?~t}N)Ql%qy-)r2qSLj z;Ud)$daoQiX>;pB{e(*_$HpK}mN1CK6TGDW0{(+;|2M$>|5+&i#kXkx!MC>#>F0n~WZC$|zZ?|6iM4r!8; zqgeyN*jUnFNdVv*z{Z0UcUiSna2lxy-?YMc^09B?ikU%hi3sh`Q zgGB}W?JKFI>m%sBz( z*Ly1!Lk3oGu%y}gY0us>xz>wY!lu7e0l2J1ZE$Git zkJN<({`M$xV*7a=12^Fe<_pOu<5A3ka8QUOwKMQ@m*<9yaw7zU#&HyEkudofh;h>? z=aeEV8!O4J{;DEMInr4Y4U9)kZVos(b;-rq#*+M8b{RY?suptb4T;?Gm$&!7@F)h% z`@F#|q3sKIDz~?b5`6P3iM@)zHOIzG zuqU+)VI*D%IkcEa^?ElY6z$C)3EA1*fWN%PR6Y`vKgX#ON-lZ?_U}wQ0Wc}O+JTF$ zFWOj`Pw5is=c+K37C+0xL>e-`$4^l5T)V7+qzDd~-|d0@c~u{t7M8=pXgupIQ=~Z) z7=s$~Ana3)0}L#U;pMkRILm7)5t^4@!s>o}eRrRSCMz;{`CgOxSO7tGZW$Qa-|I4)vX=VB>QUt zetH6Quq2U=v?5}`Hw=bB=GWD3+PUtM(@EuUFd09RT32+iIB^pwc7aXj0*4Be)pz^O zk?TEYwIkh)_h1A|yVQohovyqHrN;2Q&04hjb?$N0PkLMHn$9S{9#Qv>E5T_5Yf<+k zv#x69Yl>-23NN<1uegtBq{{rP%wnJ#2m>IF`f(i;F}ZW@%U|4mk^HN%=Ha#8+(82Q zb~H%MvGf3WC43QS;H8hk40+A*`YmCI&;G@)w+MI-#T%yC=JR#eL-C#%DmALC+PbdY zzox-5Yu5%!qkr$&!>%hUy*CQh1Rc8E4pp1RD!>+^*;M>Y=+|Ad+h=|bB|X$t9Wy7B z8Gp^{AFKv^tFF;Dkno{vu#*nZ#zk9o_70 zh~V90^66u;kGSi0-aCqU9X&tjQ6R0~Z0tlydK6i}qYTEa7}bb7Xi$w&*mgT#X4EyM zAlxAH77aJx6}K2i(Vbe+q1(;r4yh@q-E;d-puo&JUc7%mu0m6{02$g{m$0IKVqYmQ z8yW^l>#ko2cRxSL>%fdk?jZ5$7C`D26WHD0 zSw?+b6V@`$eieP~_4AhGTA+@6>!vZNtb$97JL8+|R=X>}653gXBaFFS<lYMvgwHyBQ5U~a|6W^DZFKx=PvNZ^`NDMW`*E8n(}+@==BUqF`0|}!85qc*bveTb zxc<09caT<@v2SUQ%c)1MuX~WsnTb(DrtHiGrzcg}-hDQ_Dc~Pqa)N2GY9r;6mseIe zSG7DHRH^KzTTi-~y5A|hQI)9p<{`O6*5jtzbtquiGzA5H&5lF<{`4WPRXbrPKnvU7 zPt5RVNl1ZC+l5^rw@P}=s}}b)_E$l3eOX;RQ4b=JafQ^MAA?j|3fq|-dA4@!-dsNR zucTt!_oN!1nI;&`+f2>Gv_Jb?E&5xns4}OWOt3mA2<~M0#?RpzRAl-t>s+w$Lb%<} zXL{VS?FK!@%;#9RL^?0^f`#JYojkp#?PYzu{)KL55mB9OKe?wG@xX-*nN!J9*2W>q zD<~NGcU3T80eXBz6`zDxzZ2{KIJx``o{)Nx&g*?U%6(Mj@Y%sic)B<3WnE3Ig)0@5 zcbL)5dre38A0U6tgya48qyP8e9XnSQg&McL?_Ymz><1xcvlk@T`qSPn?;A1k?@##l zmLkS(T0JhCtuSlON4kZov&Ih#J~|fIUd7;8>PQ8cr{ywH9BKn zcyTfKdmmq6PkWW-@!d!yAKNENI3*+p2EOxw3iG4%Sa!QTSa-VPe_duok=Vs!3;16e zGLl)fZm#h4ZDhCKg7~I*?&C*anobMTsdg6ERA$Xd^qPU z%Rew!YC}f_VQR)PC{(h1G)7`qR?g25j-JBw*?>{Vg?D$#1j-O%yO9TG$P$w7YOmhe(3MpQJ%TXcCG3edk}Day%lgIR`<1`0>LkI6HLxL#$viYF_A`J zgaDKqh}LO`@^V%fq$&32;mnwc_=+`^5K!izGB!=bC$$F(n`V{re|HCG5&$HWR+rLC z^8tJ?!!`gOr@Ug6zGVUZMN(5*eSO8r@&3kV@qYj<(OClWE^k!Ut{@E-=6F}IS^)2Q zF@RX3^lJu9@weD;PzsaMre76nyU>ZvVa~0I;kvMk(1;0Q&&$*&XCeesWH#8;ufzE3 zb3xTV*pXx^$`$6NwwkHu{u#QRzEz9LhrvpQmPQV_LLD6qId;2llD%I{7E5}}oT63A zNGJ(H09Yx>7F=(bm~KoqgrTde@F`K=(KPGQQ&;>s8MM99>Pq0~5CF7F z^2rZl%mhX?71C-~+?4s=@Etj9du%V)DJah*z*LGXQ|d*asZ+nQAKBqXk$)){&J+Dz7%I-esoNCo+Edq9QlBa~!6nnh z>>-Vr5k`;CtbPArDgv!-=YQhOn}-0*cR%OR>=&m^Oq{G&zEPo1Co*!0A_;LQj>-sw zZI^y~`k!_NSgHU<$r5;2*A7|ay?uPH(0~}5(FN@)SoRoSScDSw0n}hj6r(+mn%v5n z>%uL10hjUU(%%c9f?GanWR4AZ&zMrEse~sD1@kYVfVk8oDDw$533?Ahf#v-x`wRf* zgcd+1QCbnAS*ocykc^i_G73bO#vDSC8B=5;YsinU{6fsXFdJH0N-{x|D>Ol2Ttdpg zugcC~b82W@eF=r=G+%+qBVs=!Wvmnn2#U&tJneV_E%B!KMi3r68H}=YW~ZD(=(nh%1XUJ@e#;w1m_QW1HURLhQV->Pbo%O0&mPjTq`7g( zpQx|(Wd8W)$u#&V+u8ZU!D#*yllfhhomHY4y@wKS+V%J|;aMldl}mBYp9u$no3^zgX8%-`>%o;D<7l4wWnMlEE5hbe(sny;K4=VtP#Pgxc+K6Z_;MQ!PsB6*l#3qw~~FRar+&9Yxv&s>#AfP*u?C_n<6&^*gKt46oPT09f<6Ga-%+*Fd zq{;WVG{ZHb@ErYANr3NRZDaRUOX30i?ck?uGqHTmP_jpj!SM*oKn}$#-lRl z3Ps@&JUp!57X6zkllY`+AABj>5+}x{%T1dSjPt~>Qjm*63~;=wVK7{h^&rR$9#$8^tPieSjG{u8?(f4J6q~wZ0CAJq z>2KvE}2HSet%+BrXsOj0Wb8A&{nGs z8LI;(J{=rC>~y#~@l6)-@CYRzUh`lMv9WsPYThtw=B@@Su|T4%$-}n&tn5Xv9U3p$3tpkT7lZpWy)xB~@ zLU#A-2Rh{}CeFSb1b)9jfZ@a2Md*YTuvb<<)#c@= zFUxFI^_iyUHGSQ<eB8IHg8 zmw5_eP_U$gww8RK8lxyol7ZYK95zfIHXN&ebEIEyYikn@DQ!&xT>N=>h3-zW9+y_0 zX`)K>v;Z2vOc&u?+7#iXW^A&QWbk{n&KZA>NM53j*fbL6zvofC9^Zm<{tSHk=a;4j}P#0ZmLCAa3(q+F&(e>qxYx!j< zoC|))+o#-j1lH;}!9v=#y^~79XA*zjG^#$nAQq2Ix6V`GJf-bSO>zQng8@IWzQnt; zO6>we@Imd_j<>xxUt3r3R{KA|h}m6553C}XZf;wtv0(?hQcSmq@>yC=ja{0&Vo9fkfM!K$eoqo3$+wc6OnU5X!PHlv6R zJ1O3Hv@V?TNezTvosU?l^o08!^WCuV5Z>JH*BGZB#;actbP?a&cZsXZpUd$hDqj`H z%T2pDA0GdnD=xEYNK+6tE|-D}S=6VUWILF*(c!(QrxH2Eq-d*e9{IbKv+ztY_3ALc z&Cl zE97p9M4U@)ZCiPc`pkQZv3iP7I8FJ~w85qT`Xcs5ISxG0mj>g*7| z%a(F4svW$uVZJjxzm9y;gkTpO5AchyU5UGvr#p1~_*ld8t6Y z)!$or)8GLcNg45piATi3ak9AqanJj630f9T{in#AHFC`n?*;d3jykM7q=QWtdKyt0 z;M4gds+a9ZUmOrq#6{AMo5Yt|3%Rp-h4<-v_WyX@)!NglUsz)zM7)&SKJZEu=Y*W- z&lSSYX|=+t`PJh6IBv`s1+T~aR?~G&`TUZL^~QH{vKrMNAN{l}9UTQXK|V2R4otO#Ai60&zbQbrJTRu6V{h2_o~ zF1riZR}DYQ!gnFpVlPy&$X{6~pJJAci3|yFs3sV;*jE~S{{!){7yszT2Dr}PKwN8^ zxBB~JWxAFX`0D-UX3S_fK32r9X>Kp67>q5QAAY(#wGD*cI^k?7j{eRzCABTOhJTK| zONXRKSDH^03dcxXoSjQc+?Ctlhitj)>wj9juetiQw2Wkk8z@~+I=WnJ%MyIvldbn( zT5ckL_nIlL_}A-UjZm9UBeN5fR00<<1B$D#*Otp%D8~cOT+b@#r2h8RZ3giyz#8>R zDVwG*bUEr!n(gvHf(|J>lgiLo__3(YkyKmSKvzWon;u_p>~U@Kir$vqv2}~%N&`(w zZnb_(b6tMTz~SMi+puaOFS$Y{sDm#~rXgJGZ#5Wc-m^(*+KNuNWA%^Kh#d z$ArW>ly-v6m?c#&9BhwcTig9FSVzize+pM#23d#^bLPb?vKQb)QQBAQT)L8F2wtgP zeD%k{QR!YjBxYEfq%y3ysQ+HPU|RO9+!xnH0XJLOSjyq$1s0FW7La;cwG3mcpKjvZ!r8&?M6D(+5Ec6w2fFZxY|F+&$7>+a3+-fuIdmd<-PLgP_2u?R{knpi?4 zd|C}8ycce`>g+4NX+hW7Y0(vEKujISa!l@Y76FEzBGVnOWyq@3Z13Q(;ndA9BF7VM?Xx_x5#3v_I{~8jX5+uyxIG?c1i{IO44B z^P7O6cL{%cB5+kcE)L_e_tZ|QqE-8?_=&lVzG4qQU`zA<`hQF$~*aS?Ds`>&>fZe!AgzA$Vxi8(a^E4~uwb2}f(Y2?f4;yxj;BglKYaj|+nr+0HZ zJGG6vO@{xhwPCl}1a(c*f;-($OCs54DB%eFL@YTA zbwi&U0|WYhIJLskb{+uQKX9sBA{)}=I(bKd1ZB`B+i?kvMmcOM-kT| zHGxzoD!j2S$^rP(zoq)bF0pmfNAao--rk@^zD#3Z+t6=bXf(i;dRvCvzPP!6Kzo*W zm0HlHs#rnxElP$hTbHFn5h*RA>7RMvs>?AHIYRwSCjbY%C@!_J!Ji8A9Y&*BC=8$A zPZnhwB0VnI`WX8AXMYafho60dVd}*dhD0F>i%jq*rlY%%W1Oh4qo-J)^wna8nI>Ia z(c!c?T&+oFcTEGk@qNewjM*&)Ho#xKYVfhqg=T9sz@TL&^8W+-Km@<3SZ>&yui*Ia zzi#m33kx`)oo3H&xm|p0n=MHp^U=eH4j&w9YSQ{t^CA99*i*S_7{?+=77+aVM?dT&IOW0G7jt393E4h8Du!#No;E ze5sPX?UOYGOzE>^WNR)*sq%2)!-o!OGg+RIVDUKT*EN#=0EXFClq_O&*+;St(0WCz zO&|V${{TFA{{Z+CqHQj|zTTqgW7afIBFa(Pd~EN&`-a8%%I;uRwImj;ooc&`KhWVP z#Wd?XBw<`0A0^3!X0ttq%`yxbA=u>XL%lo@qKQuUh02GecP+ZKaMsUel42_YR0hqZ0A|t4-(|bs-#xSliz)uK28ic zLBf94#4jb8E=e;=WH0yppUeE;&Wx@)R+{QCuoRg?{y}eRmA2aESB-O3$Ti!zCWY4( zL|+3`!Snh2{R$Y&Un-_1AE@EYwzass)Sd*(4Krt7(oCzbt6s}ke?9kvXI*sI?(#IR zV3Mw`8x9;l);zKirEQ}lMVIy!=7Tp48${slV6=^l73$rq%b@4f`K?YxUuPAuCKPCj zcq&nrHig&q964ZIG8>rE%{vsr5A=d6vAmZiC;In?!N!(JWR>P;@I&O7*l^*)hs}nz z@Z`(Mny7Sv9&hCdF#h`%<{=BlQf+lCm$al8x9;eaQLYEIlI-% zz1i84&J5kytr~8BE@`En&R@xlu3cwoq_k``qiou1F>EPwO?UFfulZJ&FpF%{Ns=>I zr*f3v+rH168F0#N8A1O3(@#C2YAZ2LvUu;uPVz}4&o*_34}#2J9~%xFIB@vm$*q@= zZFPfRxvR)%-?y`$arG3gTfKj8vpXwS?B09E>so6cPjAr;%3RxB{I9S6MqT;Y3wk@q ze4IE)!{)|cX>!1o2tU)WoW|7hSXmXJvlWDyU&pgaEV9nd1`c&tY<%JRIjPbA0BWRh5t#FE8}VZ(zQ5Vu<}_s#N6I)Uc31(eaZFt{Jvj5PhVcWdh4#gY!m+g9CK=xe7Avz8^rmuM^|ez zG3%q^Cl+l>YAuuuwXMNr93*mynt3b}o%ifmv0}uQELoV7hY9|c`4GHh?>hAeBUpq2 zABl*e1aSZ#SrF)UhS?fY;OB{sznLF&U zZ(_xZ7A#n?Zpp)qhx+yF>F6U7h}JO}jZ@R27&af#(Zl<=_V*yQH) z^WHaqH}gL$^1mzcO^>{o&^1$4VvUU6-rnWQm-jAP-`m`=Z*Ix#lZVfEBlUq3*K zp?yYlak25R{-cNYaL!T3w}|=H9B&im&o0fgu-VsN-?B>=X-oV4KA%sg(7AH{{>94{ zE$!}K+_`UWZu{&gK_Ac4)6gz-JT@_6*ne65-S94Fr`)8T4j&U{&}?4wk=I>y)^tlq zWos{J%k=sg44+S@)9LT;?qvFX42DmkkiWmTw|)2I1ps>b`ug?Pf=Oc7aQ^_bt-?9R zn|BU3J%8XI*vIm2MTyG`qN_!a9&{hUAs#f=q^Yo=Y;@dp-B$8Mia9Zfd;uW2HDJkuTL=A(EX|Dq`9IyV< z!qgbYW{lIh+X+S{*%BPQO)`xpdA3*&x6&L8G~ZCbZh=ujYaO0A<;wT#$v(SMR>2Mzy0|6Y1IunuAAn z%_xFwY@XA{^;p1H{es9J^_(myI(uJcBa(C0SJ`Ej%x?`$-(w@d5Gwu^Bxf*+DQAK)6CN zi$L7g@s}ERLxqZlt%oetLY{-N>;3t~MWV8i2?rz1g1S)s572kzV<# zs;8U|z|N|sLA&0#{MHv)9tldTXtB*Y;}|wj)B$H^gT=@CU7D~)?9ra7 z&(}3ztQE?+2o|i9ockb6?3&IQ{Z$*ZmA_R^?H)d=6Y&Kf;!Qdq*)#XJT2=1Q zv%fWAvgKOKC5ZxWWCtV$%yn$1ALTO_&C3uh<~z+C)J)aNj>WEc3K_3}hYux=RBRQR zJ;jlB+bbQSF?8t;7L-`qtY0J3t9#$GNHJ#K zYL2nEnnl#Kvf;;yGor@8eZU!&+0-(Krj!SsN(#0I!tmgFdy5};V7N-hF(}_HQAOv; zVekExhI#q5rw^&fD~w-MVwJAwP<%l(x~QTC?pVRyW~GtDz1uG)%PZ6cXvcorZMOSt zEEmM&$zOz=kc4i5xlfqlIRc=JUfABRcpf+p!l~Ty`0_m#?BVIPh2GOe36ls0$h_p! zWFn6q@DC!Mb8dc$L8w;mO-mRtI?hwX(e|9}%~93bGVmYJsO4?iZ{Lry;4nbz)jz^I zDXJwiO7iI(Zb?$m*~Qn3;%bVr7R?d3Ke2GFRo&)M!W`k6E_IV)YQKMXK-h+|zduH< zT(&j{Z1Z9hsvKi(US&*V$0Lbp@i2gib(7{dBOsc_ zhPPETGH)YsYleg>%7^`$ql*q$mL>z-juzvQ*g)#2s2KWsCvU2B;m~@jiuv79Q2cT` zGqIHK!!O;H3=;?=ekfh}CQ8ueoqg4|`JvSgsC8T`5l)^!_Y9W^04U+hn!mW-Rx$yk zP5jEuWUO$N?J)!=i$4%WuEOt!Peo_nkywJZ-OW=En#CJV(A36rOb1mN8m9GLYW&sv zmI%D35oV@0$C*xkO%@6$j~=Vp@OV}S-3j8tQH|y!&qUffvAq|JuF4D-b3*L<;g5*< zE%f!o1g- zDapysDB(`3o5?m70#${Wu6@Op^R#AmxvQ)JV|CXsh$`a{)Gg#*Y}3=bVh=@lS#!xY z*G*v6TH&QjA0(M)^M>GW`vC_axutR(P1HDV3oR{ z_Fv;_JApG3rI!`*ZfMCNaYT^Osai(UlXBU8m)B<{pOU%1=8Uy&b9@nGoDM}uEN_}@ zfHG0Ud8p{B068?MC1A6HW3(t8koJW$>E>JBj?k_$fZiTFMTq{22 z2V0YtUCW}z3mlOQQc2IN|ZVCi~rxB0ABMFbFER5aKrsa*cLBZlWwn&wdi4y$=9+&nDd zY9Up__j0%a%Idly$Jz}-zGJ-{NYG-W-&T(=_(# z6_5xGmdxmlWVSv5q76W1oY8Tn%&c|WcHg4q&uBRn%qJ0Itj&YEHWz5QxkncadAUh3 z&rXWN6SP5s%tZHo6QR{^B`o+(ZALdCSxi20^4SzAh{{ZE&$HJWK z%4{t2P2O2vJY7*~BfjTmbWl?a^KyLoHz0}3>Z6QY>WjS<`@FV&q6?23bXu|AAdGGu zIfWZ#HTq!|Z>d)|D-+!@@W+#VRnBYZv)gUB80ij;7e;AcG5C&4G}vNv&(Wgx>Z>cJ zw5}zNcMM~~)%JM5i$9jYQ&&W9WYP+7y_8Pvh~cR4Ns=_w4ebgshz}SY6_0jWdZtH; z&39DEMjSw%?e4F1Zi*?+AO&XL*{cPH$kWluDAl6s7~Q+9jlq}kYP%Y=4b5D4KM6K> z(5Ri8Tn~Eco?jaQRL8-QQ&Vy3&Zr(Bu-p)fbl3{9$zpBBp>yQnm_^43T*_oDO<*7! zxabjdn9iiF`r__bjnwj8x61ZnA6Wu&@O9nD#U@wozvXG&|-m zq4ZdTDaY|Y`6fXo`d8hlR{_Bmti~B=OYtANU0is!YX`la&_!}iiS&XqkBGA{TE`@0fwo7^l`W9s9)iohyMT&RFzck zjL6e*)Guu2j{r7ZGYTWh$ovlas@Vgb3@&?F;&TP;q=?z#*5p)k3trFYk0dosiKs9T zHBXS^c4c#1AqVEHtctL@WO{0(nC5cmiA;!RsxCfW?=?-i!8x;?lzyqt?I_rM47=WX zHMyfa?wQ^v8|1f>nNQupr|~Sw*PZr_q^s(M*V?;5);tmLkCM$?ta3hgd|F?kjpiuf zX~7WUI^Equ7>i>Uhn7DQjm@*i%|KFHISJ@?Zvw7iE z{j);oq-Y`IBB$(X=hI3!Z|vRFY`(^}TbJQ*@S!}A@!{eD&FE7pss#-4hc>{m{{YE0 zW`YgY8|J*$C5Zxp2nka|Rn4|w?1@$%i|ho#e7 zri-W52aEkkPGL6D9?YqX5q`Di?-;TS}jt+ zb~#N&Qu=AzhDI9@tagzjU8=Skw!XxS$2Aqj9aH()k6P!jAc7kJlq`^RfG!)9(b=wT z^+cZ~Z57n@(guO-uf*j`O$dps2dOHN+QbzLwTLPwWr0y)y{xHAwN!A<86OcErnR{( z0ykNltcC&z)iK$Q6VVt;dory1GnG82Kz|MY08gT2GYdiEIwEg0hlrribI2n*i_ghf z2a5$_xHey7>}{e1`J&Q^Vs$-5o#1i~0mDs}?`5%(0$yyG%f(B?{{Y3wPgMMKIJlJO z5CF{N0u(f~eVoBzNef#0{{Y%MiT?nZ{FNtXS*(&&mG)@R^nhT)r$_ zdIcZ<0IYttP;-Eesy^7KvKdZ#ym&LP8>qG8GT`KZs5sF;%n5gvBcc9lM%!_+CfFOL!QP&&o! z!*s{d%*MDJCuiE5{pCc@Y~L6h!en@w{{Xxh0kf*5qR#lF=&GkDI|VFnX}R;wXWz5J zBx=2=B?dQDzmIYX%J}GS-}+ZRODsb>d?jD?Dq3j-khrz&=A#@n zv1W6}AM{;yxF-yPEf*^MvQ0;qB_x+|$|0Mb(FYv714JWct9ndrKC3lrKhDbS zC=4-$!qsMlVzD;+SYtT!Q9)6F9EuL(Y7b&GwHNqKs1}C~edwTWC%V=}*N&I}05X<$ z;*gg(uc`q>O549)iOuZ_dWYoX5fT~*0@li>(4ROgHQBgA@Q(Hooi zhw7hSd|73y%Qk-bt>H1BNF4 z7l7cqE~JxDMGKsAxNZaWWtU;k_fDFa{_BI=^l-oCrp(dTMDfY8wb7rb#20TY7@}&Q>3p&0+xCAf1^SbXBgC zd}Wh*b1%8Ye6zpFcD)A#uKQG9_qW79@eKaAQTDHA#Ze<$d0Goi!FBpO^j(bkWPnye z*`s-DqQ)Jh(}^gdEuRH(y^7r0nV{z3- zP&bXkgnksmV$ujiqKYV@iXg2On2hrX$2Im@7}5AbV`>>B;FzzN3Z7bamxsb z2usGL872eGS)o~>S!0A9q9`1lHA9`|gPXdL=B#{>zDs!?>Botx#S~SA$;m@X+$}eH zsH}C~>o@SHKR~Kv0J0)STPY9UI52b>l}QL38^hJ#@VhFcIy#ytpK+PPnE9z_tEwPi zyCZv=JubUOFn-SW#txyT!B^=eOV1)Mri4aWE3Dz2)mQzgU8dUx)k*;6joiL#w54fe zwJ&=dEL!7nZhf3|Ttd!gOx9WwjdeD9NAM$tOIDsC%()AL`@LV_^;5 zg8N)N*r{5^w{T@(aW`Sad2$|z2pdUHO7Sb5cfHIlBd8Z1L-R$g4d|?!&m_~$9;#4s zDf2f4WNds^Ck%}b{{Y=}46S!*_FO_RE@~;+;kEp29K6TRs&Cri-y9L+7>Ux?QBB6j z0@r+3zvzv@)2hA~I9-k@ui?H(Jca?x;T~>MQB}B6%IMhFTm#`GbF%*Th7#&lM_j^j zR7aL3^s?)!enB;dU2lGx~ z-qFk&?M@upRPDC*5aaYc>+JGaO5s8Ec-^2w?Laq7A!lNx?CEkhg!q`Dt&B+-zQT!E zMb;v&Zn*?Rtv1zUGR&Y#zMAV~=}3~GS|j0SGNX<#z|b4fL;*IkhMkT#PL@LR^4Xfc zHuV<@)XnOzFji<;Y{MQD3Tp+*4hA-q8*-$ETutPgS56)^TB8K*e=cY}f$iqGsNiln z3aF_&x?pYOyH2R$b1+{#Psv2fI;LDl@U!}=I((vpW$_%!BwpS@bLNR14>GVxmPkX| ztf+5>se$MC+rod6WQ}}=%yeTGwl2=uC~;hZN$R7YvK=H*hRsUsM%?2$AJ4c#GDz0- zEA4%w6)4fp;`AD*SS$d^N92Mwzdt1Qo3xS9K`-Az$sNtaX1gi*m@u7kB~nWEHUj32 z9MhROs41p=k}>hnwBf}da5uNYYyni#N*KpvPOGt~VQi(Qs-TPUaIk#2phVBGX?F{4 zkj+`n9~H0DUoSO76m-=T(C*zKlYL`$<%ZVjsax7MPXmiwd4<|^ZaL#0yg#CBHWg7h ztiEq&5Wl8MhG&T>>RQB#(E$| zdUa2R7Su%{1f3hvSH|Y=PAJ`<5YF2I2q1zBHD@j2FgoeIuE91dKh0J!-aOTGdd9m; zvn0gE93K-`+M*7&e8Jgsq5xT3tRWkxJ*|62i}FNfGYUtz28+0yli37&?B%x+RzfBd zbn2>t(0CeE#>~;dh-%!`+BzWVT0*l%%ucd7S0+M$ZIb0R0`#k%X9tUW# z3`0V*Q%E;YVJ#ff{tGlHC3Y#XO74W%eFBCNW=0wOAzL69Gp57xK$P=ha&JI`yt<+ys=QlvEQy$|C-*GT8%lt1EQc~1QO*T@(;>V9Rn{3ZvmS;ZM zMlP^cOIM1|iMU6r)y~Y8Rtrs>kq*B;O0H=eL}xCij0YI6ka8}azN-v3@?HpsGl|}s z57l(c8(l|HOB_-Q>f!TUrP)99ZpR2W-8oavTE|ekPitZ>)8rLDXuxVIIHNf@9YN?q zeH7*wjJ0o~s;9Q%XENM@%jm14BYGP!8U7RbDkqyv$3S}coAnv~N}i}0G& zY1LwGFOslB!*wha*ra~)R~s;SA+#Wd+c{zZXb=?b*b0TiiZFgk24==#^h6yH0_9w* z=7SrF#?1bdO8JrQBU%aZoXglyhQn#kJTyBjQSHqAPcXEgYEEQ)#1D$2Ts zwiXim-8rzel`gxv;Z(8by9ECBXa?jh&~jMHVAqnjC2bRqg5hXgVScKHpC>#y#q0l{A&`#ZQ_eDYsosgd+&c~5h1M0F!Ip$XB|McR-z*wul& z{{Z?le>Ctj+kzU0oei3|RDy4cVqNmkD{ReJ_ciic>X~HxPRr!6$%yh;V#2qzZ~fj8 z^3@DjS`c%rJT2iF-$d7i4E%Pp#*P^k+MSm2=q5OM;upWFe`pBZGy#*xtDB((1N}Ay zY}=9LW!e_ztiZUuZ@$liYI2$f8|(MD+{3vZqGF7|s4kh|I4=aQ;^P(~O!s_LH`ijd~zNdWe*8GO|h zIQDVkK59d7%)Jz^%#>6w%(sa2L8S6;nxL=jf3XP0^@KYt^J=HXf**u_XvS=IZm6S- zc;A`za^1rmV@9^$O{0;xSJVFh^_M080K#N(#6*{s;F%ftdVNM|uu;tO_-x-(qP@DT zEWcHOr1EIGFMczti7R&5BtHWj;qnROSe2N@Y~E!HkkfYZJwj}QF_P5A5WSo%dZ}69 zb;m-Q4WwyrqK)>#@pH)JQ->{_)m@PwncfbG*2{BlaX?AJNB<; z73FH+3Gy6I$*Hl6GJ&)lk8&5mCpKOaLk5=AQ2pkvd$dNWH8))J$$EUzbMaqi5YR{$*6Z4bB#wEQRdn zdX)=!N7Svwe61b_akJ6LJQ6iq+NMRwoc$1*wkCnV(}?`G@?19M=!ZQJzCm(VHVC#j z;2#mW`7BNgcL-LA;{GgAgZ6i z3viCAs-rnv;+*YA)l3xUO0`=h&Om{AD9Wb^yHo_K8sP!XTz!$-JZ#r{{T@>s2Y}@OC$rNsPe+!n#Clu zdNeGyXRuoLLuK5A)vmXNoGW=VLJ>pqSCNh7srjtB{t`UX%yiK-647}cdVC}KtgWWO zvxhV-a zva=BTYf1F?7^$UiR-e%Z)y&>_&+3UbRM&A!J%E~H9qiw9w%`~uEX6`p9R8*E< zg}V1HSF_1+5OhtD7qDief%sgFg5XzrunQ%;{?Al64B2D(p@b5HmKaZ+m$M`Hf)iG5 z$AmbSDmZ+3l>;(~fGK1)YJ07WoIL`>ctJj@-X{iy13BX=HVy{iP9)(Zw0KkB&s66F ztB)XzP24*x3t1NC?~--TE>Yc6m zpPJoL$M~JZeruM@ue5By$3LLDGDzqCBD2J-(9|TTb^JH{hDq1APm=8zDy7}=(Z6=V z7_*76&xB`@x}uUO+`#DO#CPBefIPpVjqZ)K?j%W;CuA)G!R3) zQ@N;Ju zX1Xhs>^gkbU(0S`am4`9qUY6OcnPsWGDCGMy71rC0_=syE=Wb$bpYqS8<2mGU&`ss z0r1_97sTLgs;s5p&Fm*O`Ho=;F*WiwneJg=dxf3TT`%gSb#!&o$Yy+iM(4Xbh7Jt< z6=fmdekN&w_bpwGQ3eXfx(c!|wWlUx>x-hoGaZ&(=qK(C~Goq}eJHF6_n`Mok(RO_AZthW^iKil? zsfbAtyH8H^XS8Z+nZ+#cCm%-i3OL#^4Ae|+iZDoSs{=_^1#|8Ki&1GFOL)M88*;bq z!ZchB8!g;zCv83U%2A8vh|?tZ4;F}<=A7*j09^T^PpUlEOw}YgNjpQj6Q9vV0W69a zNd86q4PB>Ed@m5R@?g*Er<~qLIzoRH%BYh@6;%FK3C`8lQd`-~FVKbBFlV~nH>)#6 zhYXD@cSD!zi*wX$aL}om>@qmMGpH)oAlhqVNU-G~BMyg;w z5TS+uTt)gWBZov=uFJSB^<<9JUc=kI@L5ayXTO!Uzbx*oqcdpJAZyg}8nf=z(Sym5J!sY|pqF>T0f8 zu$96teGvx4<=0jJ00`dSRMuR);UB!aE|%kcymR8{?3Vsc7R%Hsx_t0r zABmhu1G=0Z9wGANi?7tJ)C`ZEzcrPW(^$~s>Q*bCqU)Lu7YN3Dkb;^?4J1Q0`DAcbj4 z$0i~;Q(0z(mMxMuM-?d7H7FltrXJnd7Y<8s-Q=0bbth&96l8fNVQR?xrvz#$G|_Mj zmIqs5MHKpu!*k;v(iaDX_|S0i0c~%hr=}bimEXIN`juB>xocq_Lg(sLMCTOpxH)GO=qB%$502c~Nk-0e=o$udJ{upd1UgHqS$ zY#uC?6p{nGEwR2?Y2=vf+Us<PMVM9zy5xO?z<%HSv%O zT-?XiKF)B+G+f`J+_l8QBx%a#<23m!PL{|GHuF9ns^|nij^+{AsU)czFE1w@=rc6sgLD&<%#PPe;gCPU1o;kZD#VsZgAazH2|?3#lwF=6Ud z5-Y21-|E-y`R+oIikbi*v zMoY6QnTA5@cl3D3pHRJ>=ui1p>%_MY#W zD(|`28=28IFk+?gpO2z+vJ6J$$1+wJSUL^46=19izI@hx=rYY$j9GI!pf=bd$_7)g z@jb)xTj=f0IE49KgmdPY#)#YDYRbu_pK6qV^Y?8|9FZR26_U!_wmJMjUdRq7WYN_+ zu42%AlX7m$EbO^+SIuE*D3W`v#h$Aab_xE@5`IIq-IofDBC+;aK^4(&5eupBk z+R9j{B8`M$xjAcpH6=u4ugnzqUUK2&gXp0n@a?wC8-(}f_Y>W__FZ3TT69`0{I+DX zvMnGDPN+u0^6ObS<6OQLqT)-9$yn;69%{`SEEcN4T-)Ap1$GUXT(7g)xf%OFLwuMD z!CE6aId7v6168?sY-5A*jS9o+jE=eR4N5IJWH~9>@nz7c-S@2dg-tJk*77LY?M@nn zJgvkVlBsg3Q=V#ms(-|%*Al1)RXr2kb_cb>#44E^f+2?%wpAllD|JPJ$c)zZRlA5Q zGTrtt;giGHqGZPGH}eQa;e4*De!)b@<8#=}t44Q1VVqQ8xn3!)Dl8qs9=?v z_&{(zP8q5q`?DBl=DR-@CbigA98JCxVb1qWY;J6R8|B>`yN-5&J?AxqW)p(8x*#>? zuz`MS2?5;nK;*3J4Hig+bX1g87@hY#{FHR`?3v9nLhle~hheUH~;0<=1mko|(Um=~j zt{d{|u?$?5h4l%hGT@q1To9TUWpV;_B_e6*t>lFALHv`)g{oh`Q--75?&fQ})!5Z` zj`JVlXe+ZS!4p%p*YaJ5Ugt<+!y~gU8GeXn>MDXd1Dfsr&0&;9zm2-!*XW%aiyYF| zjaqU&#~%nquk#4HEc&CBig#V4qpBxuqeZeOJXvBP1~$Q1EBlM>xVJSf99T`4C1$KZ zn^^=9Sc=8OR7}*WcKN0a5bB3iI;j~RHgWlLPkdqhQ{MMCOgR+iJcII0!DWTESVg(4 zvqju3@bf9Q;aAh>PXmINKyH=A4`r z{{X5nKcP|6RJJ;UVC@`LG}Ph3KvYg?!gEh9xf-H*FD;G=+_u>TbjNDYRV10Z7X1|) zye%z5SmgSJRYfo2Z<26m4hsJ63b>3@usx@dP|uE|vd#&0-SR86yEX0=a5;gRyOL<7 zb;e|rUsWT6awQgllDSP|c#s-*{hBgOWsoEw*4bL?KXsRIXmnRYvp&wdHxg_&AOq;&R+!jQ!ckr>Bx@+lAUEZzQIZH^-ss)1rGNk92Ud zXIenBY<#s}YnZ^-TXkdeTj-2#%0~V~E7KP{#Lv_!nwWSSk?Mz$Uh>mQ?>lt zBW?9pl=(C(J=J5yjJ5ukMvit!))!;Qf%z}A8QD8bZFdtvQc^LqwnF-S9Mj1+?4nVV zvi#ThVd$>Oern<9OI0T)1Ov-mkqbNy*OKM&4HdTHACa9yzTeH?!X<#JKtZo=|JTR@ADyGrj-8aR*8W03m4Ue*61;~At{Tjc+O7B(d z$xnSulE!qtCZR77@r8@{g1Emhvcx`X8$8z{v&5`2Rh0S1Gl$J~y)%cj#@{sf>?#;X zn9X){z+#j%^f@XTj||QFs3p+%{478ZAimk!m9@X+u!vZH zhg8_RT8)m*7)~ij<%=Luo}IJPaY+{wJjXDd+7UXYg!^k@k&3>#jG=TTj26c8b445PiXci%1pm`klTDLSIx)&i0DJPYp%imQO$8Jxr9S8mY}hNBo9oT}oms*L)y z-F9U~gp%&v(b*~rpbI8xznZ6;M*^aH8iJhPL{=Bt=sknpa23S3o$9h&UgFCNc{-<$ z5ng)%T|Le8SJ(CzQ+8+CYBHLnndB$;zu|qlqHff8fSuJp@Hd~$4$kc7y}y4avxU7} z(PC9sXw>2$AR{jIKr*^jHnAstrjPSR_nI%IZ zY2j|FGR?qts6%)qcl?DEauI$5qKr7$@RZvY-DPCro<)epmdJfiH75PZ~6<`Z!O*Jy-{8LNx?z5=+);wtFh zy>#SStcBIl8MSgM{PqL3-N!rjGX2M5QJYOQx1@X!jZ_p=p`eDv6Msa1v|X@kr2hcz zbY{>4qnK)OelI*A&Bd3k74a)6p)hWwxY<0Ub{S^lA$xAb-B{}7g zzs*fm*)ngQB$5~CIe@6)p(Zzg>sT~(P{|O8y3cvMmsE7H?&Edvi!W&T&yC&{HYYy( zPE~VByu_+zH!jUhCyB|&Q~MuiQhmhkXz6=}+A(D>7nsRL>j?>A^HBYzu^9!OrfHQi zG=qElz5<*cLeFiFcIXD^xJouD(YW;33Jy+Ze7i+_{{Uoc0#4DcaQkHWllWW6DLY*h|Dr4~{yHbiM{?jcyjg}V{y{6!VD|d6RVNh83!GZn#8bP(09b=8JXNmaC#J*YH9Q@YM+%ykML)uoIV`%N4ZWoRSZ@Rh{1KwS%pc+% zB_j@cY`EEnnkUotqyCLi*p;lBHyz#h+M(?_Sl-v(;RzdY?l?;0R=U8rk9En($;h0Q z)+9C-q5|l?zw9Zy7O{~%-{IVTiaOXB=DPO?Ja_m?;<~~LChF(h^+RAy=9|m?7tj3# z^fI!Jsrh^asH&oCn(N&M4)+OJm8!d~?m$Ce3-F?K{{Ul_kmj2ap;FSw%1XES0#sFT zHO+PIgU5G;VFg<26Upy^upl|2bVr~2D74~fu^iO&(lVBylhCHsM$?+cJDDpqtw34q z0W=}qbF@U}f6#yb!~iJ}0RRF50s#a81Oov9000000RRypF+ovb5OIN#p&+rr(Jf( zrs`S`6B(lEAObb^9LE;+9%1J30TLdA3{*&+%9Scq2~wqcR0&e0N|oz!;ph2 zV+1fvY~Npgp15#Jx9J!{AFL62ghvJ_vJDWtc7g~_Nn<NUB>-=PV&f8?W^ls@dMBz%hv{JmeuwmkL-fC_gZ}`` z!*EPe+hL{kp@4x8@Gd6f+_w%N**L69un>)~34VrN(|U#7O@FA(R``h9ii8e|l!eP? zUa2Y{sDwX5=&#Zt`XBHNKgj<8h5ZP^-{=%Ye~QI}ncTM-2BoFI8H*N(+9;^^ix4YZfK0`IsDwXBjtDMt5Eu~s41dBy{I9LS^wZVVJh%>u{6-VJ)KU|a_h8h5Lkj8YG#ZX#yutaD zU1kF1LhXR33W$T)Knq}!GT+oe{U!r4>RjKvN}RwXKSLkX`jChD7{*)}K8$@52w~`d zirHcFz{euS7@AW|bSSL#9^+gAYg1^$$bT z{bTGUKSjJs`)a?rOY%UA(qaN)!7;XCQen+uKsSn4${}m|!RuEo<5#5Mt&= znDs656u*LOoWiWYQZtQV@|Hn|p$}7Sh9x1{c=RadS9Ze`+a$3@qahFi_Yq-rf3gN_ zab(?V^Di6H!OVyAK_Xq3vY&5%Nc#a79n<~qtvN! zvRX9^grt;RZ5%K1OGGRT3qH^+vdQfTH3ke|7BICcgla9zu`Fa}{{V>KYd)K;?jM-$ zUZYYFW%?4saOT>Et8Y=VmDEJbamG~<)W>=vc0gd3MlAuQiCG=MWf#mEGl5n6K~5Hh zh8CwcD8}UVD+1hH9G8Blp$LAP{{RCR##|YGiiuQ3)yp}RDg-~lY{DBxn4rT>d6Y^) zf&@uuOmPikh!@022Ao4`?Z5@E#4rXR716tMmGnR|K?YwKs-o zR2Z9O{gg$O`$LJTaA6SuR$MR4Nm*WE4Y2yX4?m=}Xdx6O9Kf{jh-F_gvch#JdZmWJ z^D2o>E*pTvMwYJ(uBh8LgoD}#y#DJYRaNYj)$}Lv0X9$JG@o$>(EEm<%Y;8$82Xas z)Tm`+8xnb zB1EZ%;5lFx!S+YY3maKs4Moz2_J#;;vZ2H}%uGpLO5l2t0SqyxID*1WK@4!9xsoYP zcNwz0MnJX#uh|7mQ_E&rddzVE;5?C$N#%|}ua6MO3sA$ELB1s!wi}79klEQTQYch)5?7gc-Dain-=&(3^LJ@x zH-cS7FPYXP5&|@bs-Tc9oW$Ge2XLEU4-uo7310ClA8^8v8(gxse4{eD8kwFcmgZ>0 z!nwmvrNI{3EIObN3OYS3#K&wX)Y&P|PZ8}h&B89R4;baVOlfUVf<#{p!G%(y-9xa= zL-jBfC?m_7FK^93EY@26E-$5uBXc#0`YR=oF%dByl2&5Jxnwwl9|Ra)`GVBO5DhaZ z!-8oJBZd;TXyyL^Mp;C2coOwc8Sw5p-QpQ)QHD2|hFvVwZXU)Zn)jCG;Uq*IK*qw1 z41OXKpQ8k*_b=Q7m^RF!%a4#_J;L8IlGtdu*5#|aGPMA12ee?U#T>%e{{UIHQ7PHZ z1R>0-h-vnzSYtBy()3QRQvU!=p~cH_5n`7u1y!j}<|M#(kj;x-)NRNP0;6Zd8EVB& z9Pu1YxJCkCubeX;Z7GI|9aJCEfVWWa5e54`(JcXMRhQXe%mvlLf^owxV3iYhrIo?I zT3`_nJA>R4m>tA-3eCbxGbyV~LS};DqGOgB0;s_+d&+7Y6G(9lFpRqbpC|88Qp`}K z`GATPekXA-!5n~cuvfGM+s~0L24@asqwZE0G7Uhz0;E|`5J^2 zru7c7J7T5X_JST(goJFsKeT3fA?kz~N~#cL5G#Js6;fHvMw&xBW;6kb6h#Hyy0EpQr zJS?A(IfWA(LHAV0TB&@i+7^ap%7>L6T|x}iL5HGcUvV5BrRs{?ZsXwl^eRt`!`BM8 z7xMti8n{moa$S7t^UvI6%5UAS>`!J7ieK^ z6d!U3Z5lXD;Cw|&2Ui&x`4gI}GP2HF8n^Er$i^AGiCNsIo9mg50q2;>Z5*r;kU4pb zS)8OLTtryBc_WEvhs4(V#}eRvBa*ykrNM!NlM|gc;%-@?=r+MHMd5wR5A!WprkjCq zW#is%(JJQG^u$w@96!{e!sxY^F)f%gv}GDATDJ@faqWqaG}CR|B1ts%*D)azW5(l} zuyZs+^EAv6f?=u)+$p(AHeyv}S)3*=0;TsO$c1+r8MHcwQwo7mE?@=(GQrKWIf`EFQouWzp|cb7 z?qW`1-q@PnNGD1Sd&V?)aS{E>;$4)fg|Gt#*?VXu*L(E9L#PbjIEX6NH*pPPxn<}( zh-$d9Euj})5;eN&OLNa~ZsB;GFoM<~azq_iYF}#-ss@#4e-kISx9(TLNnaD}cPgB0 z_~jjw-Q3StaY~N1RHea#ZO51^m}O;C_Knob+ZHyMGQ>5A$G2R;b2VOa<|SF5;$R<; z+$oGbgPgMIR(Xt%ln>q>H1UHH1fy!XOKb6hnT~`r3fxu$2+mG>*mECbx4Ic?;#iso zRmZ$%t{QV(!q6BuFo~gzH;lR?!x+gE@a`*Q4q~0e9Lm>g6a=qDgaxjpVy3Ws>5D2~ z9Y<}4#CDo<;TwQ%0j3C32>llr{$(;^1PmnFg}Aqpr+_1*;Ds5i-N)KpXhPCN-ONl* z;EEKj@Jk}6sbujg?kY1syb=XVF8-s6#VD&VYd4)wW-Ls!^nlQLO26*ZZr1KOXY((v zrQ^&pd_ycQ@Nt;Wb{-f_9B~Wr3*8gJ4bz&10;+4iqR8k|=MZr6m(MK9Iy`FqqVrt5 zOg49_9C5hcz<)B>AzXI>435jaZ$4!LC098hR-WXsq+-?eEJ6POR0xixBUh8Oe*{^1 z)(-r_OE`||agpmW!ljL8D3%2UYE;Xqv)i&`rw?4g!d}A)QFLDX;HQEte5XVB?pl zF-!JO5gk4c{D^FKs7D(Q;$wB}wSwm9Q!WX0y5e19jOE}TEF`6^XgV&nwqUC{FMS|$ zi-TV>?Za*qk%?Jth%3|vJf81lc>%Fq*6j9)Mv`BQ&Nj*6l+YlVibS1bQHzj6-t*6`)y5exZ5luVX zRfFY)a8d6Gb-m}1gGWin{lvMI)4myv7sEGC{fAkf=3w;wT_CXGL}L3~M#EP8$Cef7 zGjARxH%W^T;s#LOKK+pCH3+K}G>=SsgFg^z4pxq* z&I7U}lC|c@DkhR&L-~|CxnIsqxMD96^hs(0^8?)z7dTdf@{dgWpQ=p# z_g~ovX7!Ub?+)6Y6KQ-wR)KLas&IK@FE&5rX!{oQt3>+ z#b&~YjNX84Vuw-qCTZm=yGaPBGb)IQ!~>{Eu>eFo4aGNS?3yFy4E6PlgB>FrFb+;P zF?3=kO2I#fFL{xRbmBXX3J;jqDB+xZoJ_*`7laL$>JEWu3Ns1Ca2mAZ{_!hQZI-#_ zfmCGaOMKpj-^Ymd5p&-w)7ie z4NT*qc$VBt9hix$GJ{+{GV$(Otr~pFb+eKzt(7?!tuUFspyV-ih-v{01>Rn91ci$e zm(vZalIa+qrlHPh$P0A;h)2uI1-i4y*&) zpAwTupb(ZNPv$?hI3xHUY^42!w?|?OvQ>>wY=Gs9Rc}X72FMsZIFugHDPt|DcE%;M zQa(Qzo2{#CzA@pa3(Q7Uy~-PzNt&e?MXXHLH8J8T*TDtdd%{GEqB!>@-&9IdGnJP{xZEwq?Gd z7K|M8{-s?56n(K$@cU?LMnKcqgPS-)b^J`o)iqH z;P4nai=flHj}j8`ms5FbN z{z;rdQQba@jfPB008v44yk9!hE*AhQlXlbw$>$@_tY9GJ_*c4hN$KM zpel-UEV0P(3&u6>e8L!wWX+quXr_3a+H=It0hSz>=Aoe10cM}tVn`!IWOpn;^AvX% zmU$*z%Xbyrv<_H0FHcb8R6$%N%(G^@n>#ge{Z^Xy?F8{4t1Uz{5iXgUXPQa`uMiV{ z#AZ8Wz)Ms);e|spzi)Yhtz*G5u}ZLW)k7?SHH9>oM9Wj2YyR2 zS4)d0yM-&LhU}%0A(kD}p=Tg`!UJv$XOJPtwGF=15zNh8iTeGfV5dXk1RMETk0DD9 z+*_D-T+tt>q`8;BX_(C3gplzyui6PMyNP?m!d${Oc!k*Am1gaY5UWvk;e&cwqsMWf zUx=HFDyFbZ+{-X-p%$Q(s-Mhq%x#!5_(Em}P4z~iTQQqnD*hsa6wI#~>e-8`xZoQW z+P8?bO?hU@qPZ~y zIkRyNGt3d9QI3^@@hsdw7=9X+QM%?=6vl!bu^MNGgxaVo%}QKUHEdp*;O(f-xpuV` zqjeh!#)uwozYy0Vz8%~-xP;^!Iio)D<4uEfl}I%)24vf;XU)J!HNq80pK#$?K$H$J zX{KATSa)shO!D_Yc+e61_+JxVy@FHr8lQ|)O@U^%{V>*$J80Cy2Rd>W)Zl$ zQYl3XSiTH=&Leqxb%t$RKpdrG9O0s~@$Ji)0u zLw7b9_#qx(0zxsdHpxAdiTgavHZpiHm!BbLVYpIiRnXG z0hf|kO4MS3ce8u$GKBvCyv3YGy73m>OZxeRR+)s+h-<{G_l$vr1@STpy7-PNsUMQz zp;zh?0xeoqd_@rxJVzd$rc7}#-eLlngv7KBEELJ--p4@hQ2? z%{ZyfN`vLG2sRcQSPV-_!;SHnGPF1Gv=+;5hk@{{RGB zlfZq-BnSLw_Y)V&nEIzaW%LkA1JI`t#f}YuSK@BpnP*p5xP|jz_;DE4)tY7+w~V|H zY5<{MOks{A{`0m)B`1h5bB)=xWVe{Lumpl-5XD)kaAcH-u%xb;PAaP-liC2tpbvdE z*;4M~t}bjciEeNBxcxUtlL|$_*U!4{hX}pEXoYc9qUFJ?N=2>3_>>ecxWbD2LthBq z{w5Ws2qk9}YB)d9R{*dMKV$$%7aRb$;$H*9KrP@@AQ)|3z zN?a3&R3PNy`!5g#LWBjgvRZ2~@qv1Q>LaN`Qk%pf%vY02_=Nue+1wGD4;(^JV22iG zwd8{ICI0}XP~n(m&Bu&lWd4apq5%#ql}9q{j!(Fk6Ctt=n^i``A5nE?2im+4k^-nv z0)a8;2Ap}88ViR+DP*yXbxq~DtR!MCPCcgIIsSb!_>pNZE+sPOBxG`irOqzQGJ-jT z9i^XcVkvdcymu@1f{X@_iKk(BgS%_YTo5!y@4Q%5_LekuIeq37p5!R|e^BEF$YS}2 zMFGLriK-kio@Fs;&q2^i<=HlwS%serr7ut+dC=!BVo*DlD0t(Rp4hRJR7fMPuMUD!qfC-^_`9p~VE^LD<+yk?FD>uwD zDz*$5&I-qgg4#yyn=YxQr8<*X8B>(k5$HU_i-hM2qPnHOX==+*p~i~hpr9b56f(<1 zL1jwi&@wF`_!R_*_S043TmxPU$C@$4<*F8ns~Go*A;c(G1#^xf4lxTktUl#pSknx$ zpkMChQnhUA(ot(8pbkxHSh@qPU$nRgw|o3gI@m1hh+hFNY!|aerFaH_pC&t$>Kz0N zM5~F?na~&LV6QQT8a48=%vSKhp?B!gom8JM1 zuyYzNP)5_}+_7d0*1L_^u?BBjxLl|wVnGiT5Y(ZT?x^&#ml5Ap6f0{D~@6KuwS!?-KrE~}?8q00S7adQUOF$LDp^9y03C8)m>fJ>uQ)y(TJ9Iw{u9 z9v9j=8#K{hiL^7`po-PTTMe%le-QHd90%E}Cup)dmjjk+_i#oYz$WxRf(rK*t591! zV=+4l;ifXv4(rY%KyQE4MXYtGxwd(zAT%jmOVnVOL=@~b23LeJN`zg7Z+5h@E(p?D zc6HGVAWMdG{{T@{p75sfMX_-57qI7Zd6X&!_68}TWKFN?Jh-wSvdGZkk}UafuZeC= zGBS#7hLMM{(|r8E-r!a*Yxj@rI%TSD%@=CYCqlnw^l(Pv(Gc(dM!x0bxYTyD}_ch2{h#D&>2LNu+ZPI)>^a$i+l^@9kp7 zrAY3K0$Fl`(LwpdBGAOEhKw$DZQ>pbu@rdBRTOHu_LP}QIev8&0XlMD&LLStf{(&j z1_E8vIchmE3bAl}UgD5td+r3_IN~TFbQduTN{Uc@z2X5_pbi;ETdtn`%aj zMc78ovogC^W$}L#9+x|Thpf{OEfX_U8}}P$ysnS$4lW^OQoK?Di87IorZ9ZQ0YFCKf9*f@C2T-b zP%Cc!VJza{zY-4G;eu+BGL27{h6D@d&Y2mi@WC2m#Hy)?Ti|UmsEVzsn(RDGT4wxY zgfdiT7n6T7mQoB^^3*=+2pYjjk6i z(Dp)V)WXfnmZo$|5^SgHGc}L~7@1B6;gV+W66H6kmi{?_B?%@2(mA!*0gaFg8)OaCEp;+oMZTXAk zM`q#p8xdKJmq%)a7z3weigIxl%nS%p`y$ZPT-0LyXDLVGp_afm*d}RB;~x^?jFP~T zWnO4pW3*6W6Fg;3zskg4Y z#is%b#oAwXkcNq*+`nM~3q!Vucf+kbl;$i2TY86dj_A}PuJFU}a^DB#{LR3ba{M(b z+JN7=QAIg>McrZ$Ve_1Daskf#^aY;mIf<11^}A;c}*q3Hh9kdFBA6X^sx*fWey9Mf*y90>fzP;6NAy z20aI5swQEJ)!>X!@*Pe0;=(+=$cn_gh&Jv~HQE;{4aTCn;D+oNo z2fPi|2sLTVTltNx!I^~4?Uz6&iSBoBCH3;xA(p9W&r$j}T{t|!8Y$S{<|5)7wAfeAHgiI%#!xy1r$Qv8w6*Wu~k5 zYu<1xdU&`4Mt4yjE`;5G2;i-t`@=r~V~s`@mN9c%Ps9XLkwwp8P#nnzn{B^|!2510 zi?RuL)=uVEPwr`6E8Zp?u)br;XmdHMGOu18K{ke$Y3$hpp!0}wyCTypQ}+S*hN7M- zREh8;EdFDnn03WAL^D#}8EL4t)Jp#VDe?FcUaz-j~fa<{WI!cdyy|E_oHooQ{=TfHP*ux1}Z0a`T7w7s}Pg~q~A0UBTC5Qd#$H)tN%u1B_D1ug7KM0ti^#26eoRrr~^OcdGY zbD|`-D}Bsn3ay%e`UjuHLhdN^c$K9sV>^PO8)(c>gx4c%y_~~HOw>*pK1Sb&=y7c? z%Q-cVmKmpy<{U1Il$Im=)M9+7x{L_??95A|;)lP-+ycx2)tie&&B_5*Ql+jb&)a}! z2BJVB?$}Xg*EsJS&2gu$TVIGe*iJ3P=i~UC$1`Sb<-`rHA`o6F3^7YuL1z?V;06!w zmK2AZ+kJgUMc9BU+`Y*Hnt_dtk zj2C@H0Fypxf6Nt8DZ`0sY&N(^8dsv6OE$z(pwEd$axxWs#qLHSqwY{Ts_!oY03!IP zI)*F=9U|||O87As zH9RvupgcpaBg7jzGPECv>L~`zl?v~(&!1ED6FNiefJPc8yEfJrgSP6XPIgSak$y%- zSK>4;BpX~IgDU`emzwN-%w=N@9-D0l92=PveaszVNB9lm2@QDk*35NLlRAKXnl99A z$Y>_jiCymzk(87J`1XsS8a=fK%!kO!1=_0cWt%u2S%)#Lg%-M&01(io^kC{>0EQEe zS!{?vn!g03HF4ahSzeXg6M^}@py~sn3-^Ilfa6T~dyeb`xoLU1psPxkqbR0S*{{}L z#7i2Lg8l9OrN@4>eNqRqmnSMd@klv=bk|QXA8XVmw{Pq+s@T-vzv>HtMhn1V*Rcc5Qh^BCFT&wE_<+j^ zlvX#%i9{TO0VoA11DSKg(B!x~B3MnF@_2zu#K`2{I)aMC8eJT;O8~YLb_>3<8Zf|| z4BxdwZ&5bCE~1kwPS2MI!5Pb@*-B!Js}saWqN|C0(JC;aAixm|%_ieyBO?J8jt7`S z^a~TRB*4IO%rgN4Z%+izv^}QJaNR7I8e2lFV|zM0&oA63g+3;8qzzmW+&hZn44{VY zSy7J7KvTE?stt@+5*sEP>_@mjQv_#5k6M1%AZ9+VOgUOaZH+nq1V;Vjt$fE}dplqm zCQx;HVP{gAlBA`jsZZ4~I7e%LSy{ zPhl6b2^$m&F;u}@1a3~hB0@~UnX*bK9MULJfT~#K$Kn*cg54pqixRv;G`U$rN~xE1 z0lJqFd8#ne2ZvMf6Xi8FqyR3VRV{4`}dqOoz-+SlrVL;3C}L z#8&PzhTxgO+C11t2BAQn`gu7ZJBGmht1(bb1%3t=(uk{v=uj2FZH3mLb7S1*Wh0b9 zj4&;$N_mJ`uMwHCPy)HE$87;~TA>s)OaU@LzJe7iyaA&w zR~vWXce{%g!?!#$bzbPud1ca$(fy@Jhi+Pmb%#NQY=|0Y{h)}`*jz;6VB5el!Vj^8 z9tu`IG6omfY-)|YZ{+r#`yxN@g*1lL^OvgAF1sp`EOTEGE zdGVQ+X!!U_)Z$@-HG|9$)F%ArM;`Sml+{a4J>kC7d)NhsFm6h4&^}{?g()6GIBFtC z8$Hu?<5LpCyDE*>-|ro5q<$hg6yVHgUZ~E4c*73_ZK1WTtMdevU59wAyvrWt;-aIb z60c6C3LL;U=eAW>PY}oSfNSye!GkI-Qx>%vwJ@I&*QQF94BsJ4L?d!AK1f!4Q*RTx zgyej|^}REe>Dc~YOym|^LqTr@e73={Ww)RdT+KZT32MwS#Vd=%4Qk0{n^p$ROBuwB z8Qd%`8Lu%$BC6vSe$vbV!nnk_ungb@4OBN_mbh~UEp&)A<_$oWsvPXrc+wXe%j zw6ZIu>S1MLh&Kf%+{Jvr;qJ@vGOfK4vNpP%SiY=7LU!9}!N@lZyFcM%-{Ku8y`?7B z9vIuaxID1Yx)!{%F9TO=1Dk^AUH<^67K^*{73wrR7>0E~_Z=0Vvn#FFpFUy@mj{$i z^0(e4qvivdUnCezbxkO_3g)h`5jyZM4e z?I?= z_2>4KEx(Z4=(>2tMTYZ&Y9k$*CDpeqNL<7p!3I1;@6a5?_Kz;e*vO_J1B=NQ)|9aY z)EL1r@W%Mi2558mj4vufJi&Di#2pWLL{u^g-khv0yeP2o{{T3Pw6Lf$@?_k?t# zx26KlHpkmi-20p{L%%C6nPLd@R4qHz-01 zAgqS+P0p_d3gm0|og9nPG}^VE7P*U6 zf(a>N6|_rNRWh_S;OswW?9ps0tIPs$0r-K4>gF!u=a!3!WwUHv5j*>dY;d>;C*cQh zX8DPl;$96aWTq=pUiTQp!$c$YgJR2g&)m6I7e z4r7r}X?pZ^9NQx|oF$%V`j_md8Gw-R6p~ntm?(pGNQq)RHyo^9)I}+!--0Z|3qT9! zxVF?%!CmG#Vc=XI0FDaL8@S~c6xr{nnpZO=JVh)T;tiqma89($Xk~4gsjgzl<-Kt% zs@X2pxM(e&$<1Dr!!mg z{^0)r-$4HWQ8f;j8#}02)VN1WfdTOg4c2ilmk`p^(S6+6s!X4ZY+h+N7>bhi_J_u^ z@l*+Z0pNrNN63C=G(5nu7a(j7rGVMXEQ#LgG~qn3J-_$Vd?XFuw-MQs?JrS%PE`1a z7C4np3}7pi4Genr_F;BRc$hF#;f1WkD0DPT186YnZHs#NBFj^hTMpQOxy%;1L0eo_ ziUBoraYb#<@@&zyNIO;c2)pxH&(U^I; z?H61`&SPa;7XbJ`EZUUotuomSGR6(=6)WmH{lIYCGVc}#s_xrjXpXvL~fEIz>jSk1zELYRenOJ!HNQ*ndpCL#*qg8MLQQE)|L z(O#ij_>G7xybRDzHQ|FQ&aWdsnDLFvZqDJ$1D7`jz&#is-DVbNi14n;_>~p`#n}b$ zyS`(PNWD=xwaOTN;55{CRL5)SiShg(2&ckqA3`g)FExtbzMukA@hvJU3`#Dgs_%V5 zn89CB`2o18%|i9eaW!?Bb-8>ISzJp{vxoSC;!!d+O~Hg$p%&QklK@B;0$WJkWQYMg zDZ@F6Vf0Y_iM69}4;4`g#|Cv5+`8uww@+L`{6dJ(tadgar1~^zesK*srDlU@Jb>B zshYhU`eRMxsHZC-$-R&prG2l%P(T_*OdRT7;K1VzW>sFEAT-33^BUR5m^v?6hjmTr zEYvU~qG-k?eceHD+_(FeZH+QwZNm8>RvA{?iFffc78yx1U~e0aX9lHUWz4XbE6!z@ z#eb;2BXd!W^QnDYbqpr@<^a50p~etHP6R3d4iixYcYhInCEj)YOfV;u#EJX@JGC&i zQ!VzT(;1q`f?+_JBq=vQrpoAKp}`K1ois`5@peFLJ!f zqgySpb9PtEqpm)xnmN67=5xI2ayULwVDGX&ybq%8e}26{AXgMO6)qI`o1wYCtr zGKSXqq*aOG{{T6Ka`LZJyKXokpdk4e7{7>)tl}X$W$20-_KDvDO-+0tAE^#V6=k02 z;@m-_ao=&#h+WO9<54#|eqn=;63Cx0$Y_?{dx^5f-`sgb{{Y$V7{Tm-7Y=bOHeyo) z-5<8;%|lD2aS0m9c!Y2r5r~bFj%E;d6c|r3vcHL2LFClp#dQV$0B9Q>p9taX7T|tS z$Yfu%7YJE5{mcS}jtcFWvxgRQ?I;Ouj#woxfy8Sij$t6*#3vG8r|v3DlMeVtzHLzw zHnzN@Qa00MO1ze1ABeaq?`U{ozmSQ4Uo!T|c2;#a4Q9nmfdcWFTeJg>__?#sv-pb@ zUSsgwWxD7O?NHV7D_@dd*iL_{;z~Y{{o)j%=FdYQn6P75^&rKxoV<|mcLXE zlQW};HJBULXCO;u#G^G(h1Q_7M_I<323!xTXBLIdlm za^=gH=(Id_NRQNTY}R2tqDmw|y>c-(VwvP3_On!V0MtEdFxhJ^U7ZA00-=P#;0$Exw)2T z*}H>rqFS|VYP~!}lrGk28jR+4r3xIUl%tkB%6Ueup@Pprgm>^usw!71+%N7T3twZ| zF5R*Da899=)vk1s3sCNpszSxHj-}%WvFAG>bA|n; zahgZO(6EQZJrpVu$h=?jKsZxWI#0}e0)$n9nmfCS6o3vMqjX|uk|TmIikw5ys45B- zRpO^eoGM|#0kI{RsI$;Akt_%JiyR~G1ftd-x+5C$?!%gy7M0D5l~gj|gpQ>`46>gy zh?!|0%pa+D7x6DZyVS*+?1mT`#NJ}4IEfyi`#~Piw%>`erI?9Mbuyb~EyYEZ-%vrQ zbmnfS?ik9N=^b>ww=UeEWko?zM-*7GV#FpKU=L=zi8?B+))(ZSEFZE{zlUUlt3`RF zy19QNFz8F5T?gTnvS&Q<{vz6F>e-u)rgq|^ZJ|C2l-EtF}Q3rcj1DS ztUWN=_Xz1?w;^}sBPouXEtkYD2QXP08M)Z}M#~%*P`EkrL6jHX4q(H!O3_SL5K~e9 z5uwa3ULqg_p_o}-((suF{0vyH(CZySD{RIw+A8oTJ*Ea^X8Gn51Qt$U z8q6D`6C3onqKYh8+OO@Q3D-0p=|}H7crU~epWc9mA71t>{?Hu2pCgHWS-bHmTY5QLh*BIAwpGk-@ zu$|asWrMif0t=3AEbmW@K{0(6Po@YUJchmFd_3TOGXhlYZTYAGqWmGk%knVIUzlm6 zBPs2XJh+u%Wqr#xa+8!2f55BIVP(sTnrU#|+XdOEmqwzC%lALy3mjq~rIj!4bK)9v ztBe-ZpyL;~zK_i3Jv%||F7@>*h>kZMR}mY6i+{`(uO!5`1lv%-%|;y#=ay$iEEX(B zh&KgK!XHJw3M^+8D)DCr;#m$q#%JxQRq$`Bm3DZf^?bld*rw!H7r4=wP}%&!4RdYS zTH!k-%ytwh@e+7AKsNxG4V;{$zROz4jz%qpF0V_7BsgVz#uBME_RCLZ{dp&tzc-j+ zuaEO7HMmIPUyfN*tx8eH?t+V!Dh{ZDJ1lj4O$H!CY?q&jY#e6)03}D?1q}ziG{vtP zzwN^ybPNM|<_UygcLLUZCSb5d(%ekRc0<*SSj*`wzM^KW{Mw&$}`2GMmgY z?Y{(PEges?72cirQU+W{sswQ%OjA+uS7YR9R&}Fg0`Ndsjo5kk$4Wn z%s+%If_n|iHn_F~a2yLSkp;K)=~AVBki$}?5tMq=$yE~(yw}j&st}u1ePo@P5M%Bw3Ai@~I0J|` z>dQ)l5XDTm+VMx+r|mRfxD10sB-|l7jp~Vw(S)F|Tjl^a z^BV!OU$-*!Mi6Dp2Q$wrHx@Pp{Bk{TH4qk_p-1HkJkACt z2LrftH}wEqrOGQ~*6;S3h`h$Jp}FSIGl%MVChyG4x!E#Jo`vzp=qy-~BB8`a-Fw7Y zC=y%dG;rFs#Wt+V1qIYsh_M$?lTdnq>H(U8)G*X5#6+%mfdW*iiCBpILHZ9v^y|?a z6oZR0Fn~}JUd92`G|9Z0)ENwDpf#) zs`R7!kLakx>zQz`_JQ;RhW8939Y-h_^yLy-Rv6)e4q`Q0jYZs5%qy8yspCwhS5b@x z?NJYtzG0AD!e@lBLf+!LekZ;?9K?4X%};cE@h#g2;(2i!X5%4S^*XFvG35#dKic8=ttLgDlkK4 z%#k961z|eOB{T_4ERU|fv-Cg_;sN)U^0CiV8NB&RbrFwmnB)Nr=4>2yEdET&E9=nt zd7e*2mLDkjN1euBI2*Y6N6L9U2h=Kyii`CwT)$8HAn~c}jMjg~TZq1Q5~cUQLl>aE zA~hMsdS9*FS#ik{SEWLGKqtPXO3bhQl@rl9C_@O5!QmFd5MY2ihY|EXfK0Dxn8Gb+ zisyKp1YOJ!fbd*Fwt{KlmzYb;u+o1yVwqF4dNUqko@3`9IP>XvRsyeU|j7Bd6`TYn~9026$`LzWj%TV+dR|~xdV}e9%GVO3NrWY1r;kvi)Kf0 zcl^(CoMZ-wM67EOi*p!TyPXTnSf#wn9?@0j(5Yyswkzf?Dk?C`wZ+EKQE~Jy(*FR( z|HJ?!5dZ=L0s;d80RaI40RR91009C30|XHe5(N_=Fcd%)PzL|n00;pA0RaL4JOBUy z03ZMXt!q(=h(TGcO>0`v8Y5cPfY!CB2ByPy?Y-}Pf!_DM@9gury^}U!JKO_ZdXQrV z3<|i|0d=4NSRjHAl34dPtLnq-2U^y(pfpCm5&CanhV9$8ZSQ;D{*NXffj6*WCNwdD z4!Qye00IaA1A)f(ZI6F_Q#Ryc00^4awWA3C0B-la{u*Bday3_LtxzyJUs0uPPLTOsLK0#{Bk z$FWQys|>CiS|uf5M!-yx3Ci~XEE#b3WYw0uGvLPK}~D( zJeF1jf0TWYVfrxeV+H~bf%B-+^NUJTTp1Q+u1yv(wVc+zvs%3Z2-Eg%rpvJvn; zj|{}^T~GN((S{g)OfbV5FdPr9b78V$quTjznPyHs`1U*4LNbT#q_=jfRaiC~t9C}L zuD;AMiyjP1Rk=Sq{J|WK3^2nF$>7F@4o3rl^K(`$w%gj$de+#shaoGuciCKV?Pyqz zO}$k>TTRA-6;|*K#=0r;_j{`6t`lbc##0XihF^gMT!@P{<)v; zJ@|8yeK0e7l07r~nsu#NtCc_P4F$%7Js5Qzk@;@@E*w#jZe9ZUN;@SxvN?ck;mVrz z6H;>X3N#VdPTHwjEns2D-D;e&>Z2j#URygdN~`BMHHJ;&D|9kZg5c!tPUZV4mM6ed zDvCVDA49k4ZoTkZ|GhU}!w)<|iiy2C8KajsFbUZi$ox?faId5Bw~wf&1 zvL6aiLv}=3x&5zpV(7x~kiYZ7mXyT}d=$tst6`|;YMjxon-Wh{kl)1}W1VH@=Gr5B zp*DAG_(0J%+14Yx1Vb<S&1r2M@tEVkY~#nb;w`iIAXaXPU>V{* zz6lHuuUBuN-k#01_#Q(SB``W-+Mur94&%mQv`Qsjcx4F$9TUjOa^bN40|1@k94}0y z40!XZ$E~EV0&d= z44DG!YD74U@~MKz)x$7zq@(`@7AY42{G-;pkWC?;qc*!v6udV%r`^r1(Ahv~*Q5{Q znh!(HQ4#KD_meV?gC0E}oDQ>iWLhVJQ1C#(e*A|Vt>%~Y3NHiq4dS^Pe{hm=;g7vK z4da^TX(h3b{=^=@Wk%WGC%9;uw`jx#56c4Ze0mEf$zQ@KMsnK9#5$+5xbZMaSz;C% zDrnC9-f8#Ua&?U9dp6p9S2JGsm8y9EaVWA3^vO`0PzV2Nk+D!I&<%^8tDOtM9isTS8^J84`#V^3cK$1={5#Tp%5YO#60bYocn-u=@|@65sxOdcKYGMg%V zL5Ip`(9|g61hHq6(Tc#4drxPWAx}P@Mew@KzuF!M9SEF+gU4rp2FKe z#`2<603DzW8>aXrgDVSnG5j2N-c56QhzR=7iTmhvJH|)BqiQsGyC1Z+5P*xW;6A>9 zB;iJ1syGq$)7`Bj>eOurcd&(*@MT}GU)L=Q)|u9pIe*ib07quz=kPe{AgmqU4<1aF z{5lG#hCR9@zupcK_%YrDCswsd!|>%oSE>bA)7mf_Z0-Txgum=QwHq}UBQ`ah7tDLI zPu>^&uFx1{QG+o}2%k3TK26abb5+SODoDt0>fUApCG1}KE#!pIeC`IDuhkSlu_8Ux z8Lo^O&>Q5#1uw{GaXG;>qm8q0T7rK7rduy0thk;0zstNTrg2as8pK4V!9@86O@R3O zub6GMq#R!xJa5Fu+@Ew|AdrR6wapNN?SSC9cSb@&LVQ~p32K}Ys$`&X)DAU4ojjmA z&ch^cSj6~~?*LGm)W9A$Q=)#M?p%}m_WsbICJ5X4xva$$29pVZ!bYgU=3wnGb`+5P zvdf~lPMr0=p@2(5R|y8;w@>dG(^OF+r(O)TqUc4H)H>9|2Gk=FWbwd~0oT~bww22d zZ0(r4MB_#~0!s_lC1z-GZGJ`H6H)^}+%*M3AL*|DEa6*65ydUw#N90=$QblXfGxPd ziPwMpE19TSc{$7u^h|mh1r)1?>Z1ZZY1uZOMDB#rS}Hzo)eBe79)Rp!Qd7;AwEDEa zQTTqZNZMK@d)4XOOgJv}4=|^P>^8nS-yRu-NZVA1j(6Dmtq$I=^94go7*Tqhn+oDg ztuC!57NBe$-7cT8<`K#L#K!)w>z;2L_BD7~R+k#l#IA+0Re)Lbcyc=d`6z4lIO@k{ z!JQ_F7w_Y7=*o<7wanu@*^n|LY%ei4Q7lqwQhifK40RcXa`t*qb=p2ux0@ioD7d6F zoCf-Krz2JP+m^7&%*65di^cwU)sYX- zNV%cX6X$tQR$tV#=C!mwHl$pq>s1kXbDPr{>#iKynPwraX;&LD^OxU;lXzTxx3twF za^DxTT+NrrnTlrM`Z`lRZ^`}z-|uJ6#P-IU$d^H23ptJqdU+4mhKzR2>)XCx`EVO+ z@-ce`0}FcxI|mE1nq0jYW`=JJFR17nWXP$TzegO)Di4{CW#w}@d|i!Ox?vnMFLab2 z<>yS3@#`P4p*&VI2&c>yei5X%egENL_OlEsUzu#;GS4QPwnK~E5W_n<*;GjS2pwx3 zw{k*LrVL7KtMa1Y9j-Vk`Bv;w;WZ1{QknDNLDJQ-Ykdfg1W{70z9EecZDN#?n!x~f z#|VkZv1lMNoVz};`jCGCql;td`u?R~#=e$sa-<_5hJUz}qrya6=BvAIznP*bG}7Xl zH5g`0Q)5*ttSy$C=sZ?T_ef}8@YyEq^ChA1cly+sKA}H4wwXpDKRa(uSKHo$4Z}YY zlb0fR*z;^sS%A4&Bp_?M#{FAwn2DlUP~)SvEa%sOtzKb9v5*G)l#1PJpL^rYo*qWKUENZ7+Yo8LSM)*+2-=ir8{=JSXZFHO< zH@d3GnT7W8wdL0uw>NW2iNjw2T{-9tbDUT#2(DJW?OBX>b})|%Mnt*0x1Zs?Q9NR6 zQORh{^CgftT14LY>D&diptER33efQZgQ!BYFyQaYyG6>QRsOCr3CX!Cp`}x=rQyVh z<9Z(yYwJa2f)D_f$P#;`RYH?=s_3EvP8j?F;ym!yU*H0q?OsP)kR>An;^1PS(Eqw6 z|6;ZA0=E0&f-W1cTV@fFQ!%pN9mB9zB-CT%L zXYp4Tq?d3@Q~jb$`;!P(4_Gkr-e7uxPT6&&XL?jeP}|aE$N}BvlZyfE?KdV5mA49@ zU`3^I8H|{_f6s2wxDxr3q%ZYU^uwWf_4qoTi@4cxA-su;jV|iNK)EfFpY{15O(kVSX>de;Jc-aTK67Py<5-}?pYi4D1UrWJeNDGQ9pkjWUueS1#UDxLlP?ClbJOe!+< zLfN>{w!t-=cevf^Bg*|#u-MhnR7vG_9`1*3^)DJIw7ns_4-Y)`oOcuo-?EOw6Fth} z-26U!Rf^IwI7813blw91EFD+B=g*F0UqKxVb(48=+4Wv_uNrEy)_wN&rVmE8cre$X z`3b+o_yw&!0m$ehrGSjof?$F^+wI)?GXNlq{mM}Ht1SBDbODlN6xrz5$}Q4#;ND?q zh{5=ZH{Kz(cd$SK!@eVPp|$=ClUxeQYXnmfrCln5 zNQaZORS#8;FO$}|&6Jl+;f=yV%aI9M&Nedg3MIdVtJ8&J`!MkfD!9v1lUwIU+4bR| z2j<;!9uO113k`TF^g3pEAIb+cMDu2sL=eI(r|2!`1-4HW6{p+J6F3BN&Qg=WV z1rF`d>aSzC^RlVWsovbEbp%ECBSktXxio-)KvhybGUVeziFg?1=W1k}jNB`G?9?K1 zjPGEp@%Ai0gL#WLNv6ak%rW>pt%A2T{{U*-MZBy7CUIaBy}7BO#Mjfg07b^l%NCN) zau@-5FkMmn7nm$aFaY`ae|^hw0#j_AyOiD;)YfjT>e1_>?{+_P+IDU(Z{cB)INHj8 zk51N{A0inbqM!+6b%lH9I2n4y%29^yHp2)n4lG^9+Kw0l$HDVzeX_V@I7OG^ggQA zPQaCx6aTBw(n5#VE%*1R&Ra*1xyFm?rRL!I=MuR{EMhk8&o4gHeSGl`kkiZ%={GA! z?#KUI*`Q|ekOVpGB!k5;s7-mm#wiX+Jws%1UhQtV$c2wn06g!ZXW{PC$CuZyR*r%8 zdH4f;S>Ib5cI&_v-ix0#3sF$9=XkY|w>bLm%exM&_uo78H1Hn)@RZqfzVvGD?HTB+ zLjJ=`i{Ox+ZZTBMDOMTeij6r%CxcW@#9lOA975#(R|R=Uu9LsfongD=olQN&l4>?hgMN+SlHTpyi~<5O}A>D==|hANDn@wUP-r zP`d;E{s)6}2OOC$9wBib+5d1K02<0mG*omn%>N-jFHi_x;uF&I(aAEr)j=iVxAu^c z`;@A!`@RGzl*woVZTdyb^v*LZt$*uG{`~(yp_kHtC+dHI_bFLEM#uA1iD~}2f?|}0 zf)Bhf(=rz|?lJC+%EpFeXJAulW_}`4*S$8lxp!GoueP?ilW?;|$D~~3c@zRlQrEE{ z?Jz>7F`C3dt$+Va1G|o{rBXdhow+kQ8aTMGrk8qW7xxcy?f2jqJ@Hh(LB!4=?kMS{ z!lq6Tr9$FZP+pwkouBIs33fXv6Ib0{@iOlf3?3_sB?=o3EO_VAN`jUKayMe|cVnwf z6C~|A`VB=6a_8JKyP+XHAt7Go&$Y9ZWFAtlgfsnHtTgWwB~s!#`FO5wm8E>>c~If^ z!Y);!Ab(3!Umz(xJsWHy@XGj$Dnrn|dTZVV8>B(OXU8vp;u+O!o9T{m)y88>kt@U| zP)frJdO$kymY0=9$9^Ebq}1kzZv?bGT~OAWg=Zj~IR1ApeNQW~8O)i}W!c1;?=8%! z@wtX@S9)aNG&D8*@cnbsTdQ?NqKA=z;F0^-=dgAvyIp!FNan6dyY0arl1H`3fDcnC zshGY*sWrB$qmTF8S-PV?bO{s!y~~xR@q<&N?<)tc=)Uz%q=%m&8X97Wq91{`^%z^+ z#lK(uOf2zA8iEP-Z!sB+je9O% zXFfB@uh3UZ$6Y;;WQ{7>nKd`|YTo&|pFNpnKgHjVaS+>RniFPpX+bj`+S@el^d+Dv z4tJS@+q3G@8`3tFr6RU@FTX zGa;Crl)mS+&NbD(n2(^Y;v4KtBE7D*`uNF_wjlD(*%rMGhu_x>5fjG0E3ceYZwa?c z*Lj@Mu1)58$o>Hq*g37NrwJwsv(pv3RMZwUGE7VkvdpeT5d4Wvkc34GyX8aeWuQ1W z$gx84N?#TD<}ojMPF+3$w&|XhOToZp!cvuI@u8}2`1oR)H@a=4S1L2FkWg!PH?;Y^ zKo7g0j!wlQxWe=14NZ@392X>&zNcus+3Q>W9LoV{sew^H@$yTLztU8JUpn9RZ^ZCc z{4)zRtb4?!ntf4qFkU@_`J`fW`^OjaCiN@IL!Ed?gxZS7S|@jEAlZDo|0Kjt4CZKQ zfF(hge}`$el&$5tU|2a*>$Yyxo37IJSA%hQCPu@pHtv=xc{)u+RQ&KJZed2T0jGy~ zu{Ynucqkf2+Lvb6UDAFr7^ze8_qMi(tBPPC=5xejCc(s<=4ntq=SW4-iswqVMpyg? z-P(dL(9V>8Gs?1HeHIaG_WE(%u!4XVq!-egJmR#3;`o}7LUrhl1hphMQ^CHzDpt%U z$a`};$niVel1zR0+TZk?WO>M-bW!Vjh+HHBlasxh7|DBeD54dN45GbN3<1y<|0{#r?3n#B>eP;RxFvyuOuL?>qzHU}xZ}=Wv6&)WnUqi#BXA|^gI-G}u z&L!Tz%O}SWN4@LP?3PI^`h*)#8RAlYO?fJpa8(a) z+7HoepYAa&?=dStTuW|qGX2ExZ4_K(PAf3C!f}$I@Opibm&xDGE3WwMz%jcKHuEhM zi5^+8#IJG|ko|y)s4h#WSfpEwYw3o3nHJD=-kmFY8iLukYeOT6B~;ADylmZ~gRyit zM_oLBo+)Cbq}FR{buuS5(U-BTHXK@;IyJwZ&k4>aJK}rpJz-u)60c0iiz>5FtJMmS zMksmjp>e$2c*_^$)6ul?wpf8BK6cZV(}GWPqk@VLSE`|Me2h%fA&Seof?KT14%8%< z%(0xoq099h%brYZ3Vz9)!a_p7)h#*%#t<3ngYVmZW@f@SN}@_#-I#~vOIl1V^hc=CAr{GpZ#h_(StjTh`E%SR2r;f)IA-(!ImR-Ru=eyNuv5Wsd&koJS=@g1PI& zUt!rhqQ-0pQ4;W@1Txbq=(V;@4Mh(KKSM6br+3*yBcj*it+t+{n}5VM3=cfpyt61i zrCaxZt;6|I*9eNT%>l*V?5Lz5@3vtcjbSgl$8?Bp9W zbG@)t7jn_hYy`rDNwb-@S!>GgdEN-LN~Tu*>9Y{0`g=_XbZf2%=1*sQU73>2Wf9v< zN>xQrpcgzH$s5aJ?Gwky*&;vH|D!hWwf)+H2ed=7~`Y5w=`Npo7=fHwS$09v)E)g z<DQUzy zb?bqkUIVJ#Dm?+!rg_3byA4#si?<~MRJS^!p7&hy;aVphluMboHV2R`v)}+Hnp517 zbQ-5Lb0Hg^oiv|lrmRUT`s}V=hMhDsu14l6m7fM7TK8lvsgcqt8~w9SLrey$;#816 zHJjYEu5F>M>8Qo%VqTlHw7_OUX?}2q5{Z7+_JH@S3De4Nzg#x@NmG|{*P?;$`+`DZ zL(@`_1hlZ6K`l&o_b+{S@*mFTrHb@$UGrfNRSvbNh7ur?b6j#d`LKZ-QX3j()|MTo zwQrS*+4(CiY`wO^V$3i`YfB{u60OMa>yR1uOQrgHQ;F(_Oy2h26i?Xk*0RDD65K@v{~S?Ke<&M>a_>GHD8zq-x{4VYpg2zaKrAs+d-{-<-^qlZ6KTez;aXJeX%l{G^ zsM|xo`tT1ReHWUn7_;G<$&l)tYHMp2dpx??1v{AKfHLV23-?v=)_Vp=-PvhpQ%Gf~ zYC>bBOwiJI=23@oD{x0<(RVJnPE0KMpAR8-p;Db}f9a(L-)4*7V`=SYQCo;I@BB&A z(@5-)KWKhh0QLpHt6Q!&bkk+WbA{>s7#v-WJ!x7kKPNTHchc@`R0``z*}%wW^yX2n z$L=6+zVS=qjRiR=R9h+z<#7EGPHR_tF5Z8_y*B~w?TQK?>NQ1kFYG3dEX_T}UpqCV z`ssu+r|ssYo6Jy`Sr9`qzW$WL*czH{)4EO-9t(m^HvQ!dQ%8mX^rU|=uQbkbSx4%G zSGje0v_@d5z3bPFsqn>8E`~YJZrV z1d}N*H=oNa>Alkj^FP-=?Bb}q`1UMGZqwrH`-3vud_*cIIs2a}c#H3^?J|n$F(JWt zFsALToe1|8$hYT1=9ov<-fU~Oj*AoiWY76`3h|Ro-&!xEf0kT4mljjMZU>U|K{$y< zn`(Pu!2A#9CQXh(eDotOjhJ@L8HG%?YOTS_ys^vCcnlo}UEhFm-9g3JA?<6^jeh5$ zHCvCpb6ROcKV62SX6p>vYp_)xx&d?aZjgAsXT=&9Hfq$8dIEwN=&mnsHrU2t%gZETYb0RHtPZzy5lYWWuy_J z>r4e=cf2iI?i`|K71sAlc{vfo>Jy7^^(FNmRr`qlGH!J8#eGZ)!mt5eiXEJ5G zw)l&j>7D18y(msWV?K9>XLtHSbwrGj94_HbFl&U%n8{Hl&#SCEC*GjCzg3j;gH9)U zN9Tf5@tg2s=ll3mwF}AO7xSEtBlTFmB#OM8-Vehub$ppW?GL!h9vi}e}L=@o=eqSrfSY}dmhGfm7R`9N$iGxcsOY`V?kX; zQ-PlgJUNh$Z=P9M#cVVl#LGi?%ywd=tEDpr@e^h%E zZdA?3P(A#U0KY+;TFrGoFd&vgesEC795F4z5!cfFs;OOt?Z*aIgE1AzRNad`p|nv z7+?P0##PWBkM~j3>1mHkWaBrtmL!?m>O_Td{<;MXEzd9e-JP8S$~S7o@`I^5CdYGIGdhF7uQU(v{L(ts6@?fY{F44aFmLD1U-fv0R;p5 zD#M@&h+(nY%Wa}ZYu&f}RNB-t=HXbYDB5A(_+GB_hI(i9%QxJD{(v!OLK^A-=Bqv<&LbfTlqeP&N{~qBlRw(G?Zs370SDJdW$Qrkf2%@izwpd zSt|0eGR>%sV1=3quQ_u&bo{WHR$o0PzVO@x=j1@Tu?hT4LKNX2x|W9hry(2{dB4}r zd8#K8GgRJ8T$Fk?`KEK@>GhzKl-)u#RKB^z)+tCm`spd?ZEQc6KOIp~C23vK*8n`lwn1*R*1 z(xT`v;T9MLIcV_=sB2~9e&R78hx|&7`DUmoQBq%a{br&gTO-MwQpd{eCS;go9b&Yp zm+=4$xi&fJF2X-~l+PmG{aLLTJNGS+X3x~2FEW}nCYM^>LU);7xEwp32)72f#pFCF zs2XXi`2#w}SyoTML-P-yhZ0IG&G;%5wdT-fIB{{L!16a(sHd;JEmyg>ts&g;~eQ8UrOm@3n3e_9@kpqYrH+jaU!?&lldhrl~j*#x3p4 z>?dr!Y0RR=Ei)v#gjS#oKbzuV5=N9z#x9HW1iwuW-m$gSkY#(5egvK_0m z?BBdd=#KIKPucn(?un#k{XfbU-CH6VVr`QDfpaMTF}5O#FzszZ1mg?^T_Wv&P_6Gh zQ!cdDflU{BcdF#*@=+(!;IYz_gax4frf4g8wKr?vdf$fl<`a^nVY>Jzi1`AQTqUB> z_PkEQA!+z*d+?6SUK6%77>)!R+q*9`k?#v6jq8by%M!gLicgxCRw<(YMMZY?XuVKs zpP@Vwvz)y72haw_`J%rfREge-|JB$CW-dnb0JB@;{AcMcg@ya>lWqS22y9Z(QPWgd zcjJoCsi}BIC&z#IGQh2eu1Cj?LrUic{sHiTA7kj5(tER$8wT{R9qjFP(+BF}{IzYv zI-Us*t^Wa{=st#hkyF_~pvTqV^4I?Oc3GY^@SPxmu0dC7dk)EV!Yhk_x^SW-&JYzB@+tWN<`5X12pIg8GC?jmDw$ zs58`uyd22!Z}T@#sE3EkbF-Kt6F^kGs>UY88TKOe-&gK17}*Z6MHO++P)RE z_L~@tjPrjYS*Q&DP|5P7+fg%ZW1au9E=Os&n8qCsvtJ~deD*H$4ny(-N+Q8!6&P(k z)x7;%Y5bemB9;brlkh}ujBi)JjDQ!{s&jM%WNn z;^bz|vNZUOjwWu#1t9FTD;SAglW;e43UziFO8)7@{Q_r9P~ANUwq_qFeZk3CFyGSm z8$gZm>f=W}eH)tv;-ZflY;-ANM{`uvbxRFKl{tPt>*`lNqhLtNAc6K;eU3*HiNqfc z5q-6G=4C7W@57T{n?&rqU))Y>dcl}z&%G%-)ItYv1PH4hvby+=Lu zsy-_|_=K(8ysRv*;q-WPNW|T~>hKZ$Alk#4zV^SoOiM zx!?eKd;;HkFW0H2Bvzw!A`K1kI8dtNs9t5Pa;|mak$?bYB1UtB-ejZ+kqg=oS2W@9GFKqYrMQvpWRZz3xUU~@L7W*k;J(G56h z-Us#dTQ^F2{v4a|a~nD|m~~a771}vF+u8vYFZE?32YD$<@AvJ{;>SNo4|on|bkcYq z>o;g%LsBV3cz8cyAt<^>C)D-ig{9<&thMzg3_gw27p$9%6y>0N^l(gu2Av@wdSYdj z2N}Q+y&85Q+F!GwZr$p}i1oH!ZS`5Kxy
    1W{Y&fPH@SotnH|W%uj5bc&QDtdI0y ze&598yf#2Epn^iXjp`Od76XSS|LUD*zfH0QxLnoN>ac%h%RtvQj+{62P;X$E6v=_a2du3_~)X!8J@s zEK*8g1B8^)IvjkW5&k^N2f-n9*fV2Ews{=;>Zf|6yAD3D!1W&Mj2zc9a*V>-#??W?_39kU#{BHyN! zmkmZrRm4h=#a_3qjVX;IWQx_Dy!G#wwS|`2A8RJfCJjwLpTpCildmMRCEM)2;b;$_ zm*m;$YzS-N9_7;F|2+&9%a9seETb0->p3t(zk_8 zB=#tAUmO1lSZ~c{qS_1!l0xhb6sT#GD5D0PTK#^GT5nUo{GF{5LgI%m|z+Q0;Q3lt-{@3W?OJV%Qay5#1((Br_Fb&er}E5X?)k=b|r z38o&-d5fs(;r^={TaDt&9~{vwZiH^8>cEGuD!d%t&%pJ!LrS9(Y=)xK1cl@c=~^Ll zANySfFq~K78@m#XR2!cvqZ6A~`t@`4F+|>;SyQlVS#M*OL`gthmaKw-*537kk!9WFRw4v z3g#@1BY!a+E7VXB!rf*6jth}WXs<3u0ML!C+97f;z)7;5-FBWKZeSD)5jvrdQ52uW zSoo{^I~H1q0jL+32#!|6fLQB5Dwei+Y*PSM$5)9{zO}Yj>~b;&nnV4&ZHTC$uC9g8 zSb*@owU{+u{#`ZTnm0+rE+c2U(}<`>j@OSA2xEG-&GNSN+hEV;#P7DMLz3>ESRLQ; zzV7m|&XPR%a(AECwMI>b6%U+=>=i}QIUjF&wMxV=M~RwP=MnC{M^nbf?9mlYgV1@c zitNFxM@3ngtnTWi_kG?OO$sMWeALn9CRymh`+#MPyU&(my^mYIm%sy&VJG?U(y~yM z5>I-kRylt;45F>kZVb0AlojBcmm(QRfe456R=A#ECXG*zvw56JXysk3R_TDv12%78 z^*kK2&UbaaQs~!&-m8j|}(?kN$*6BqS#{`zCWY|GH=I+(aefe7noH;9@lc zz&F!6NB!Dm>G2)eDbjY7LnoBpG&$)BXZ?oyi^K`vrW|Fu5vbAs<;RMd9^ca>UC~wP z2)NTOZNmHTH!rSemKmlr3cgh0mw&B6U1Z&F{%sS+@@?8MUQp~S$ST;K*()$Vf4wgw zgU7A6|90hYA}DK{TsM>L(4$w1Lb047$E@lbR#Imn(hSR5>=1n4E&y{ znyM~LGndD4WB2CRS=G*%+?^<{I9P2%5{1yo>SabogldqXmTA?&xS=r|<2JWD35RBX z(JqJOZds~&jnfndhPgzuxyb2!jQZAI-^;<#!EI~msnZ9y`E-vb7h%^Q~SiOqGi-Ydp{xB42Ra+_K<8GeF+3({Bp*4_0$|V4s4B1g+GBc0m8%;pmX=0!-JJ3 zy8|}W{Xn5C5w&ZJFa+zCb@WeAvwp!?k#SU4x`CP>C`Q|e6i=`eU3}SUyvpr+4JQWa z;fa+60G&Y(Zbd|%Mvm`$)Z`OFwK?z_MmghIKMaJ`=H;%hCJ>8#CqODH3tqC{d7J6N zZTV}gN5Yp>{c3~AbNrX+E>y(t$*r%us>g@rs4BF>DfoUfury zn9)myWUGN2S76iGQcgVdSFcsKMhB7n4g?Dco1_xu1G)7x?mqyi^{X{HYLY@doqYGi zdG{q0V{UQLD~LQ;_@LqIbKoIeY%@B85hp<7;WUsHc`)Zc5(@HJgj$5^Y#k;rej3SC zxPt`#L2~N?k$-p3&rTn1j*--Hb5<9#;% zE7W~D_W*wIoxEjO`GtITd@MIO>j(PkjiF9R!63f{(_4UvE-yRl8FuB9FmnwEm zEGg*tVl;Kdo3dw{Z%q3&1BlH7q~{8LH^HR%cF$2wy(yy97IF~pAdvDcNT5YoBbIM0 zIGEX!KTa-=-B&bc=eU~_bYP{tmO4hoPTiI|kzM!1>(b7c9u+6=`e%6Ndd%^QE{|D5 ziOUz>Qtpg&LSWYQwm~BqG>k9{NG}ada~?S>Nflh%-zX$U&?g=!*W$T=8^i7wn|g&{ z+C!38UXroblx!cQn4;cgI2{CwbAmGO;E>v^09bh-A%rx+9cP7pmJF=L4;5RXAP+i}d)Yt7kxDoBdNtLz<8GMR;AhN^^B)q14Oo|UM%w-!I{UsVo^c-C{ zk!H7`!knIIymO`2Fg|Heb`1GETx%6ZGxF;JyMsC;B=UvHIYl^&@S_xtEi%ukH{UpN zL;r^BDwneX#9c>mbXm>%%8M)Go>VKQj__9pcvn>C5NfXSC7PTCj%v1XE;60Gq3PJ7 zAB9ls8(T{-B;8Qa+NEM7P{EYUq9>b%@;{I*d2G0C*mM$XD;9g4?P~3`>x?2F2<*$q z*=H}Q$aC}V?7#DqhB3q6(uV#4R1S~URi_(y9vou{1Ov=CUrswOw9iDcEo<4Pe-X^Z zLaroF;uYFlM@Gt2`s2Y{gCikT{8plLxU+-U5o#8 zTUq9;o#{it^cQias1|pdEv3_rMgHG)G^6T!t|V#FTUJV2=VVQs!BE&v#jGcrTJQl7 znsizPQR6XXT??oCVWXUlTQGY4P|#Dhd^(cH3*sc~n_$dzoIatKg#9*W3*L}t&VR_;?;z9^=&|sLTFl$J@gv#I*vWZaos4H+ zc2GG~KzDRu%&Qe(H6EjiqRa!;N!Odw()rOF_Mx2ZVk*b7MrMZyFR9%UP4n8VzF(KT ze_6U-ds8d>IFR_#-$sw^ID&fy7c!x7w1kF%nMC5Xo+oTUk=%T9XO?1`gw2IUg=^;? z)Ndrgs!Ma^tF|tEK^l4tgVLyxrfPlCwz2(N?7W_|(ZAT$_`x@tWJJ_jYDiuNW=+{M z${D=RNuw;dxj7RL0$lpyfOIO%^1Gwtt#KQVR}}2rl0Okq)-!5j9g4gIzROo-D@kyB z=~@JZ25ej$8shI}S5Te(m^pvsz0rJ4lktQU!-Cw!pBHc@pAO%I8XbtNk*R7Jg~#*; zvxk-pYz^d^K06F%#rp8SpB(1tkFsoA0Pd?=P=j@5T8CoeLDcE3%Sm`}W-x@4jEJ+R z)^=f2&!Mu<@ZLMJGx^q3RB=geOnsRfA!dS5RuEZ8Rl`LjnIeK#B0$^ z<>94#e zVOM8=&u7)sm^$BQX9*|=@I5#_!6e7E+V_|xV*hv?kNGr~5fJ&=r7U`PObvr}5Xx6q zmyH`-fdz$~=}i!O^&ETe$t|RmAR{SkmHR|)b_uF6(=TcZ6}5Y}rd7gZ z6-<*5u+weMY!LRkLqrQP5S&xC8eA8LI}M5>_<8WIRicq+Wp;5`Yt>AHq-j~JESyEa zshW{z`)rs@y|E-l%awB@3>L6nTkxiwhvVT7bZ{tcW+}@OxkeQ7)rs+nwS6ipN|T$u z<+iL-4*1nm)+}Z=U82@LYB|L4;QUvPG((b|Vn)wSmtj)Lao2>-eHlze2y9v}sBW9{ zL8P%eC@|gdVLC6Z$2tZ0bCXnX1;9opcMv?|Hwsn`P0{CK(_Mp6=+EKKK(8PWI1ZazNG z<}7tLZh|DM;O7Zg!75NTW=VWtxqn?Ar*-dPRk#jOxI)NNGpLt zY*&(wlNtW+suO(I+n4ng#S9gP8!=2J`KHU}5D+zgTD7^W?@L2`3AW^8Kn~G)sfR;l zgfc|o%nllHvob3#YF{+QZdip~q8vvSrk=hGsQ`96S;kx_tp%>-e+k7eU4lu45yjl4 zQ(Kg1SU$%3;+K_zxH*Hl-!0} z1CT𝔏@X_(v?MqHC3pL|=g=YF#a9otw%Gf}K>rY;9r1>@<2>xqdL0g)iossRgVU zc%bHb#b@ecMw|xXpJctDExe;`5AhM=OF&FyD4&g#9VldbHw7tQj?EH&Ld47@ zoYaD8w)lE+-IT9cC3;rq>7C5*V~Pe-w_P(jC}!uby%-+iBs)aOhxn4+a9rX~V)$QQ zcWM2!l$>-pyA5uE=|VR&pis-5GN{F%P^%}1H$@9{I+-hKv(ZRa_xIfeZ~Rf-)jz`-ed)tj{H#)AMRqY0BlcE`LDzTsx3o-KRfy4-_(bw_Aj@px1Cx zbLm4!@wXCmi!`L$0s-sIB6Ck&srZrNPsU86vDM!TgBOE(e6v3^zt}3f+w2M}BQY0O zkAmC8;j=UUr_j=W0H}mWWuLCG3UwESbmPQe`omE=Gf%m&T`8q!P4N00x8r|v7_$yy zdZ?%Nr)fN>_1%n8G>wy(a%k+9RWfSm>suOP!Uk2y!^~evQ9qn^Nw0;gleUIB-d@=( zp&`Dj)3N}wW+6$6q%=Y^aBwy2P!tWp7_aW}13~sH!ej>$tKHIDMvWsy-Wm^12q%8T zMQ2vS?&+SR(${68zPO)>{>FLb?%%4asM$g&C3qOCWIg`@0=f#wJEALt{Jwpwrst}~ z^?7qmF-Cc~@~#`IoJN*Lba~NwF<(kEY-svs+C^V?;cuxZ5q=l3A4TwBmN4G|A@AhM zLFm56TG@f>(&{ykBpneppVd+#px3%;U?CL6M^F$@&x;<5 zBtI3Eg~*@opEnVA7=NB@w9RI`)})fz8%BNIOn=(Mo#9i2X9U z8h*cTF(L?_K0xMk?0yKZ-MWgMc$qp!qxm|TX9cKB^4r=tG*c_EaFgE)-|hdgeazKy z>6ZqRTyqGXOskhMSz(R++Q{RKRwy8AJdhN6AB;_K!_tZC$7M#esu=L?$mqwV$Hsxa zh0=y*2v^y!03ed)cb=XnlpIUr=*v2&N}}u$%@vp!P_Y>?Tdq%`&B2^Gr*4VK1NS98 z0(yJgxyt9>WLMs%c?EYWn2QMS+?tDrjwkH0t0B$`xdy{WFW72=V?8Y7QFjitFw!&Y zhlq7Ph@1T$3B$H zRK;L9Sfjwid@&<$0cQq1PLN%mtQC9e>5B}dthPZFBx6c~{#J`xO$eM{9$?x@Lmll_Ew#iGYo0vS#{#*Y40Htja(*OVf literal 0 HcmV?d00001 diff --git a/web/core/profiles/demo_umami/themes/umami/css/components/blocks/footer-promo/footer-promo.css b/web/core/profiles/demo_umami/themes/umami/css/components/blocks/footer-promo/footer-promo.css index 8476f1a6a..7486d488f 100644 --- a/web/core/profiles/demo_umami/themes/umami/css/components/blocks/footer-promo/footer-promo.css +++ b/web/core/profiles/demo_umami/themes/umami/css/components/blocks/footer-promo/footer-promo.css @@ -36,6 +36,9 @@ background: url('../../../../images/svg/pointer--white.svg') no-repeat center center; vertical-align: middle; } +[dir=rtl] .block-type-footer-promo-block .footer-promo-content a:after { + transform: rotate(180deg); +} @media screen and (min-width: 60rem) { .block-type-footer-promo-block { diff --git a/web/core/profiles/demo_umami/themes/umami/css/components/blocks/search/search-results.css b/web/core/profiles/demo_umami/themes/umami/css/components/blocks/search/search-results.css index 06c196381..b140da4ad 100644 --- a/web/core/profiles/demo_umami/themes/umami/css/components/blocks/search/search-results.css +++ b/web/core/profiles/demo_umami/themes/umami/css/components/blocks/search/search-results.css @@ -19,6 +19,7 @@ .search-form #edit-basic { display: flex; align-items: flex-end; + flex: 1 1; } .search-form .form-type-search { margin: 0; @@ -43,6 +44,7 @@ .search-form .search-help-link { padding: 1.28rem; margin: 0 1rem 1rem 0; + flex: 1 1; } .search-form #edit-advanced { @@ -96,7 +98,11 @@ background: #fff; border: 1px solid #fcece7; padding: 1.28rem; - margin: 0 0 1rem 0; + margin: 0 0 1rem 0; /* LTR */ +} +/* Apply right margin to keep aligned with title and exposed filter. */ +[dir=rtl] .search-results li { + margin: 0 1rem 1rem 0; } .search-results .search-result__snippet { diff --git a/web/core/profiles/demo_umami/themes/umami/css/components/blocks/search/search.css b/web/core/profiles/demo_umami/themes/umami/css/components/blocks/search/search.css index fe3684298..176a09c44 100644 --- a/web/core/profiles/demo_umami/themes/umami/css/components/blocks/search/search.css +++ b/web/core/profiles/demo_umami/themes/umami/css/components/blocks/search/search.css @@ -4,7 +4,7 @@ */ .search-form + h2 { - margin: 0 14px 1rem; + margin: 0 1rem 1rem; } .search-block-form { @@ -67,22 +67,32 @@ width: 20em; max-width: calc(100vw - 6.25em); height: auto; - margin: 0 -2px 0 0; + margin: 0 -2px 0 0; /* LTR */ padding: 7px 8px 7px 32px; color: #464646; - border: 1px solid #dbdbdb; - border-right: none; + border: 1px solid #dbdbdb; /* LTR */ + border-right: none; /* LTR */ border-radius: 3px; background: url(../../../../images/svg/search.svg) no-repeat 0.5em center #fff; font-size: 0.875rem; line-height: normal; } +[dir=rtl] .form-search { + margin: 0 0 0 -2px; + border-left: none; + border-right: 1px solid #dbdbdb; +} .form-search:focus { - margin: 0 0 -2px -2px; + margin: 0 0 -2px -2px; /* LTR */ padding: 5px 8px 5px 32px; outline: none; } +[dir=rtl] .form-search:focus { + margin: 0 -2px -2px 0; + background-position: 0.35em; + border: 3px solid #00836d; +} .form-search::placeholder { opacity: 1; @@ -101,8 +111,16 @@ .search-block-form .form-submit, .search-form .form-submit { /* Take off the border radius on the left side as it bumps into the search field */ - border-top-left-radius: 0; - border-bottom-left-radius: 0; + border-top-left-radius: 0; /* LTR */ + border-bottom-left-radius: 0; /* LTR */ +} +[dir=rtl] .search-block-form .form-submit, +[dir=rtl] .search-form .form-submit { + /* Take off the border radius on the left side as it bumps into the search field */ + border-top-left-radius: 4px; + border-bottom-left-radius: 4px; + border-top-right-radius: 0; + border-bottom-right-radius: 0; } .search-block-form .form-submit:focus, @@ -110,6 +128,14 @@ .search-form .form-submit:focus, .search-form .form-submit:hover { margin: 0; - border-top-left-radius: 4px; - border-bottom-left-radius: 4px; + border-top-left-radius: 4px; /* LTR */ + border-bottom-left-radius: 4px; /* LTR */ +} +/* Apply border radius to all corners to override LTR and RTL (normal state) changes. */ +[dir=rtl] .search-block-form .form-submit:focus, +[dir=rtl] .search-block-form .form-submit:hover, +[dir=rtl] .search-form .form-submit:focus, +[dir=rtl] .search-form .form-submit:hover { + margin: 0; + border-radius: 4px; } diff --git a/web/core/profiles/demo_umami/themes/umami/css/components/content-types/recipe/recipe.css b/web/core/profiles/demo_umami/themes/umami/css/components/content-types/recipe/recipe.css index 453d8b24f..ac1aff731 100644 --- a/web/core/profiles/demo_umami/themes/umami/css/components/content-types/recipe/recipe.css +++ b/web/core/profiles/demo_umami/themes/umami/css/components/content-types/recipe/recipe.css @@ -36,11 +36,19 @@ align-items: center; min-height: 40px; margin-bottom: 0.96em; - padding-left: 48px; + padding-left: 48px; /* LTR */ background-repeat: no-repeat; - background-position: left center; + background-position: left center; /* LTR */ background-size: 40px 40px; } +[dir=rtl] .node--type-recipe.node--view-mode-full .field--name-field-preparation-time, +[dir=rtl] .node--type-recipe.node--view-mode-full .field--name-field-cooking-time, +[dir=rtl] .node--type-recipe.node--view-mode-full .field--name-field-number-of-servings, +[dir=rtl] .node--type-recipe.node--view-mode-full .field--name-field-difficulty { + background-position: right center; + padding-left: 0; + padding-right: 48px; +} .node--type-recipe.node--view-mode-full .field--name-field-preparation-time { background-image: url(../../../../images/svg/knife.svg); } diff --git a/web/core/profiles/demo_umami/themes/umami/css/components/fields/recipe-instruction.css b/web/core/profiles/demo_umami/themes/umami/css/components/fields/recipe-instruction.css index af9ee7ee3..6b3797e71 100644 --- a/web/core/profiles/demo_umami/themes/umami/css/components/fields/recipe-instruction.css +++ b/web/core/profiles/demo_umami/themes/umami/css/components/fields/recipe-instruction.css @@ -28,15 +28,22 @@ .field--name-field-recipe-instruction ol > li { position: relative; min-height: 1.5em; - padding: 0 0 0.6em 2.5em; + padding: 0 0 0.6em 2.5em; /* LTR */ list-style: none; counter-increment: step-counter; } +[dir=rtl] .field--name-field-recipe-instruction ol > li { + padding: 0 2.5em 0.6em 0; +} .field--name-field-recipe-instruction ol > li::before { position: absolute; top: 0; - left: 0; + left: 0; /* LTR */ content: counter(step-counter); color: #cc2a00; font-size: 1.5rem; } +[dir=rtl] .field--name-field-recipe-instruction ol > li::before { + right: 0; + left: auto; +} diff --git a/web/core/profiles/demo_umami/themes/umami/css/components/forms/contact.css b/web/core/profiles/demo_umami/themes/umami/css/components/forms/contact.css index 5ba7810ce..b1d265f31 100644 --- a/web/core/profiles/demo_umami/themes/umami/css/components/forms/contact.css +++ b/web/core/profiles/demo_umami/themes/umami/css/components/forms/contact.css @@ -41,6 +41,10 @@ @media screen and (min-width: 30rem) { /* 480px */ .contact-form .form-actions .button { - margin-left: 1em; + margin-left: 1em; /* LTR */ + } + [dir=rtl] .contact-form .form-actions .button + .button { + margin-right: 1em; + margin-left: 0; } } diff --git a/web/core/profiles/demo_umami/themes/umami/css/components/messages/messages.css b/web/core/profiles/demo_umami/themes/umami/css/components/messages/messages.css index d7a4f0498..b49bc8e48 100644 --- a/web/core/profiles/demo_umami/themes/umami/css/components/messages/messages.css +++ b/web/core/profiles/demo_umami/themes/umami/css/components/messages/messages.css @@ -17,7 +17,10 @@ margin-top: 1.538em; } .messages__content { - background: no-repeat 0 center; + background: no-repeat 0 center; /* LTR */ +} +[dir=rtl] .messages__content { + background-position: right; } .messages--status { background-color: #e6eee0; @@ -49,7 +52,11 @@ margin: 0; } .messages__item { - margin-left: 24px; + margin-left: 24px; /* LTR */ +} +[dir=rtl] .messages__item { + margin-left: 0; + margin-right: 24px; } .messages__item + .messages__item { margin-top: 0.769em; diff --git a/web/core/profiles/demo_umami/themes/umami/css/components/navigation/breadcrumbs/breadcrumbs.css b/web/core/profiles/demo_umami/themes/umami/css/components/navigation/breadcrumbs/breadcrumbs.css index f04578f0e..6cfde97e9 100644 --- a/web/core/profiles/demo_umami/themes/umami/css/components/navigation/breadcrumbs/breadcrumbs.css +++ b/web/core/profiles/demo_umami/themes/umami/css/components/navigation/breadcrumbs/breadcrumbs.css @@ -5,6 +5,9 @@ .breadcrumb { padding: 0.79rem 1.266rem; } +.breadcrumb li { + display: inline-block; +} /* Large */ @media screen and (min-width: 60rem) { /* 960px */ .breadcrumb { diff --git a/web/core/profiles/demo_umami/themes/umami/css/components/navigation/menu-account/menu-account.css b/web/core/profiles/demo_umami/themes/umami/css/components/navigation/menu-account/menu-account.css index ac4f39185..563a902cc 100644 --- a/web/core/profiles/demo_umami/themes/umami/css/components/navigation/menu-account/menu-account.css +++ b/web/core/profiles/demo_umami/themes/umami/css/components/navigation/menu-account/menu-account.css @@ -7,7 +7,10 @@ .menu--account { display: block; flex: 0 1 50%; - text-align: right; + text-align: right; /* LTR */ + } + [dir="rtl"] .menu--account { + text-align: left; } } @@ -19,7 +22,11 @@ line-height: 1.5; } .menu-account__item + .menu-account__item { - margin-left: 1em; + margin-left: 1em; /* LTR */ +} +[dir="rtl"] .menu-account__item + .menu-account__item { + margin-left: 0; + margin-right: 1em; } .menu-account__link, .menu-account__link:hover { diff --git a/web/core/profiles/demo_umami/themes/umami/css/components/navigation/menu-main/menu-main.css b/web/core/profiles/demo_umami/themes/umami/css/components/navigation/menu-main/menu-main.css index 44b715b18..54c54d9a2 100644 --- a/web/core/profiles/demo_umami/themes/umami/css/components/navigation/menu-main/menu-main.css +++ b/web/core/profiles/demo_umami/themes/umami/css/components/navigation/menu-main/menu-main.css @@ -86,7 +86,11 @@ margin-bottom: 0; } .menu-main__item + .menu-main__item { - margin-left: 2.5em; + margin-left: 2.5em; /* LTR */ + } + [dir="rtl"] .menu-main__item + .menu-main__item { + margin-left: 0; + margin-right: 2.5em; } } diff --git a/web/core/profiles/demo_umami/themes/umami/css/components/navigation/tabs/tabs.css b/web/core/profiles/demo_umami/themes/umami/css/components/navigation/tabs/tabs.css index 79cc1194c..84e0b0971 100644 --- a/web/core/profiles/demo_umami/themes/umami/css/components/navigation/tabs/tabs.css +++ b/web/core/profiles/demo_umami/themes/umami/css/components/navigation/tabs/tabs.css @@ -13,9 +13,12 @@ padding: 0; } .tabs .tab { - margin: 0; + margin: 0; /* LTR */ background-color: #e6eee0; } +[dir=rtl] .tabs .tab { + margin: 0; +} .tabs .tab.is-active { background-color: #fff; } diff --git a/web/core/profiles/demo_umami/themes/umami/css/components/views/promoted-items.css b/web/core/profiles/demo_umami/themes/umami/css/components/views/promoted-items.css index b81adae59..0ad4107c2 100644 --- a/web/core/profiles/demo_umami/themes/umami/css/components/views/promoted-items.css +++ b/web/core/profiles/demo_umami/themes/umami/css/components/views/promoted-items.css @@ -47,9 +47,13 @@ @media screen and (min-width: 60rem) { /* 960px */ .view-promoted-items--single > .view-content { flex: 0 0 50%; - margin-right: 14px; + margin-right: 14px; /* LTR */ display: flex; } + [dir=rtl] .view-promoted-items--single > .view-content { + margin-right: 0; + margin-left: 14px; + } } .view-promoted-items--single > .view-content .views-row { @@ -72,9 +76,13 @@ /* Large */ @media screen and (min-width: 60rem) { /* 960px */ .view-promoted-items--single > .attachment-after { - margin-left: 14px; + margin-left: 14px; /* LTR */ display: flex; } + [dir=rtl] .view-promoted-items--single > .attachment-after { + margin-left: 0; + margin-right: 14px; + } } /* Large */ diff --git a/web/core/profiles/demo_umami/themes/umami/logo.svg b/web/core/profiles/demo_umami/themes/umami/logo.svg index 80f820889..6b7936d0e 100644 --- a/web/core/profiles/demo_umami/themes/umami/logo.svg +++ b/web/core/profiles/demo_umami/themes/umami/logo.svg @@ -1,6 +1,6 @@ - umami logo + Umami logo @@ -14,4 +14,4 @@ - \ No newline at end of file + diff --git a/web/core/tests/Drupal/FunctionalJavascriptTests/Ajax/ElementValidationTest.php b/web/core/tests/Drupal/FunctionalJavascriptTests/Ajax/ElementValidationTest.php new file mode 100644 index 000000000..48bda56cd --- /dev/null +++ b/web/core/tests/Drupal/FunctionalJavascriptTests/Ajax/ElementValidationTest.php @@ -0,0 +1,53 @@ +drupalGet('ajax_validation_test'); + $page = $this->getSession()->getPage(); + $assert = $this->assertSession(); + + // Partially complete the form with a string. + $page->fillField('drivertext', 'some dumb text'); + // Move focus away from this field to trigger AJAX. + $page->findField('spare_required_field')->focus(); + + // When the AJAX command updates the DOM a
      unsorted list + // "message__list" structure will appear on the page echoing back the + // "some dumb text" message. + $placeholder_text = $assert->waitForElement('css', "ul.messages__list li.messages__item em:contains('some dumb text')"); + $this->assertNotNull($placeholder_text, 'A callback successfully echoed back a string.'); + + $this->drupalGet('ajax_validation_test'); + // Partialy complete the form with a number. + $page->fillField('drivernumber', '12345'); + $page->findField('spare_required_field')->focus(); + + // The AJAX request/resonse will complete successfully when a InsertCommand + // injects a message with a placeholder element into the DOM with the + // submitted number. + $placeholder_number = $assert->waitForElement('css', "ul.messages__list li.messages__item em:contains('12345')"); + $this->assertNotNull($placeholder_number, 'A callback successfully echoed back a number.'); + } + +} diff --git a/web/core/tests/Drupal/FunctionalJavascriptTests/Ajax/FormValuesTest.php b/web/core/tests/Drupal/FunctionalJavascriptTests/Ajax/FormValuesTest.php new file mode 100644 index 000000000..d1a3e5c2b --- /dev/null +++ b/web/core/tests/Drupal/FunctionalJavascriptTests/Ajax/FormValuesTest.php @@ -0,0 +1,84 @@ +drupalLogin($this->drupalCreateUser(['access content'])); + } + + /** + * Submits forms with select and checkbox elements via Ajax. + */ + public function testSimpleAjaxFormValue() { + + $this->drupalGet('ajax_forms_test_get_form'); + + $session = $this->getSession(); + $assertSession = $this->assertSession(); + + // Verify form values of a select element. + foreach (['green', 'blue', 'red'] as $item) { + // Updating the field will trigger a AJAX request/response. + $session->getPage()->selectFieldOption('select', $item); + + // The AJAX command in the response will update the DOM + $select = $assertSession->waitForElement('css', "div#ajax_selected_color:contains('$item')"); + $this->assertNotNull($select, "DataCommand has updated the page with a value of $item."); + } + + // Verify form values of a checkbox element. + $session->getPage()->checkField('checkbox'); + $div0 = $this->assertSession()->waitForElement('css', "div#ajax_checkbox_value:contains('checked')"); + $this->assertNotNull($div0, 'DataCommand updates the DOM as expected when a checkbox is selected'); + + $session->getPage()->uncheckField('checkbox'); + $div1 = $this->assertSession()->waitForElement('css', "div#ajax_checkbox_value:contains('unchecked')"); + $this->assertNotNull($div1, 'DataCommand updates the DOM as expected when a checkbox is de-selected'); + + // Verify that AJAX elements with invalid callbacks return error code 500. + // Ensure the test error log is empty before these tests. + $this->assertFalse(file_exists(DRUPAL_ROOT . '/' . $this->siteDirectory . '/error.log'), 'PHP error.log is empty.'); + // We don't need to check for the X-Drupal-Ajax-Token header with these + // invalid requests. + $this->assertAjaxHeader = FALSE; + foreach (['null', 'empty', 'nonexistent'] as $key) { + $element_name = 'select_' . $key . '_callback'; + // Updating the field will trigger a AJAX request/response. + $session->getPage()->selectFieldOption($element_name, 'green'); + + // The select element is disabled as the AJAX request is issued. + $this->assertSession()->waitForElement('css', "select[name=\"$element_name\"]:disabled"); + + // The select element is enabled as the response is receieved. + $this->assertSession()->waitForElement('css', "select[name=\"$element_name\"]:enabled"); + $this->assertTrue(file_exists(DRUPAL_ROOT . '/' . $this->siteDirectory . '/error.log'), 'PHP error.log is not empty.'); + $this->assertContains('"The specified #ajax callback is empty or not callable."', file_get_contents(DRUPAL_ROOT . '/' . $this->siteDirectory . '/error.log')); + // The exceptions are expected. Do not interpret them as a test failure. + // Not using File API; a potential error must trigger a PHP warning. + unlink(\Drupal::root() . '/' . $this->siteDirectory . '/error.log'); + } + // We need to reload the page to kill any unfinished AJAX calls before + // tearDown() is called. + $this->drupalGet('ajax_forms_test_get_form'); + } + +} diff --git a/web/core/tests/Drupal/FunctionalTests/Bootstrap/UncaughtExceptionTest.php b/web/core/tests/Drupal/FunctionalTests/Bootstrap/UncaughtExceptionTest.php index 988520080..1bc789c92 100644 --- a/web/core/tests/Drupal/FunctionalTests/Bootstrap/UncaughtExceptionTest.php +++ b/web/core/tests/Drupal/FunctionalTests/Bootstrap/UncaughtExceptionTest.php @@ -2,6 +2,7 @@ namespace Drupal\FunctionalTests\Bootstrap; +use Drupal\Component\Render\FormattableMarkup; use Drupal\Tests\BrowserTestBase; /** @@ -37,7 +38,7 @@ class UncaughtExceptionTest extends BrowserTestBase { * * @var array */ - public static $modules = ['error_service_test']; + public static $modules = ['error_service_test', 'error_test']; /** * {@inheritdoc} @@ -99,6 +100,31 @@ class UncaughtExceptionTest extends BrowserTestBase { $this->assertErrorLogged($this->expectedExceptionMessage); } + /** + * Tests displaying an uncaught fatal error. + */ + public function testUncaughtFatalError() { + $fatal_error = [ + '%type' => 'Recoverable fatal error', + '@message' => 'Argument 1 passed to Drupal\error_test\Controller\ErrorTestController::Drupal\error_test\Controller\{closure}() must be of the type array, string given, called in ' . \Drupal::root() . '/core/modules/system/tests/modules/error_test/src/Controller/ErrorTestController.php on line 62 and defined', + '%function' => 'Drupal\error_test\Controller\ErrorTestController->Drupal\error_test\Controller\{closure}()', + ]; + if (version_compare(PHP_VERSION, '7.0.0-dev') >= 0) { + // In PHP 7, instead of a recoverable fatal error we get a TypeError. + $fatal_error['%type'] = 'TypeError'; + // The error message also changes in PHP 7. + $fatal_error['@message'] = 'Argument 1 passed to Drupal\error_test\Controller\ErrorTestController::Drupal\error_test\Controller\{closure}() must be of the type array, string given, called in ' . \Drupal::root() . '/core/modules/system/tests/modules/error_test/src/Controller/ErrorTestController.php on line 62'; + } + $this->drupalGet('error-test/generate-fatals'); + $this->assertResponse(500, 'Received expected HTTP status code.'); + $message = new FormattableMarkup('%type: @message in %function (line ', $fatal_error); + $this->assertRaw((string) $message); + $this->assertRaw('
      ');
      +    // Ensure we are escaping but not double escaping.
      +    $this->assertRaw(''');
      +    $this->assertNoRaw('&#039;');
      +  }
      +
         /**
          * Tests uncaught exception handling with custom exception handler.
          */
      diff --git a/web/core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php b/web/core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php
      index fb564450b..eb70f68ce 100644
      --- a/web/core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php
      +++ b/web/core/tests/Drupal/FunctionalTests/BrowserTestBaseTest.php
      @@ -114,6 +114,7 @@ class BrowserTestBaseTest extends BrowserTestBase {
       
           // Test drupalPostForm().
           $edit = ['bananas' => 'red'];
      +    // Submit the form using the button label.
           $result = $this->drupalPostForm('form-test/object-builder', $edit, 'Save');
           $this->assertSame($this->getSession()->getPage()->getContent(), $result);
           $value = $config_factory->get('form_test.object')->get('bananas');
      @@ -123,6 +124,20 @@ class BrowserTestBaseTest extends BrowserTestBase {
           $value = $config_factory->get('form_test.object')->get('bananas');
           $this->assertSame('', $value);
       
      +    // Submit the form using the button id.
      +    $edit = ['bananas' => 'blue'];
      +    $result = $this->drupalPostForm('form-test/object-builder', $edit, 'edit-submit');
      +    $this->assertSame($this->getSession()->getPage()->getContent(), $result);
      +    $value = $config_factory->get('form_test.object')->get('bananas');
      +    $this->assertSame('blue', $value);
      +
      +    // Submit the form using the button name.
      +    $edit = ['bananas' => 'purple'];
      +    $result = $this->drupalPostForm('form-test/object-builder', $edit, 'op');
      +    $this->assertSame($this->getSession()->getPage()->getContent(), $result);
      +    $value = $config_factory->get('form_test.object')->get('bananas');
      +    $this->assertSame('purple', $value);
      +
           // Test drupalPostForm() with no-html response.
           $values = Json::decode($this->drupalPostForm('form_test/form-state-values-clean', [], t('Submit')));
           $this->assertTrue(1000, $values['beer']);
      diff --git a/web/core/tests/Drupal/FunctionalTests/Installer/InstallerDatabaseErrorMessagesTest.php b/web/core/tests/Drupal/FunctionalTests/Installer/InstallerDatabaseErrorMessagesTest.php
      index b6ad43767..69c209070 100644
      --- a/web/core/tests/Drupal/FunctionalTests/Installer/InstallerDatabaseErrorMessagesTest.php
      +++ b/web/core/tests/Drupal/FunctionalTests/Installer/InstallerDatabaseErrorMessagesTest.php
      @@ -19,7 +19,7 @@ class InstallerDatabaseErrorMessagesTest extends InstallerTestBase {
           // it will try and create the drupal_install_test table as this is part of
           // the standard database tests performed by the installer in
           // Drupal\Core\Database\Install\Tasks.
      -    Database::getConnection('default')->query('CREATE TABLE {drupal_install_test} (id int NULL)');
      +    Database::getConnection('default')->query('CREATE TABLE {drupal_install_test} (id int NOT NULL PRIMARY KEY)');
           parent::setUpSettings();
         }
       
      diff --git a/web/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationTest.php b/web/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationTest.php
      index ecf7d8867..5fa84aba0 100644
      --- a/web/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationTest.php
      +++ b/web/core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationTest.php
      @@ -48,12 +48,12 @@ class InstallerTranslationTest extends InstallerTestBase {
           // it will try and create the drupal_install_test table as this is part of
           // the standard database tests performed by the installer in
           // Drupal\Core\Database\Install\Tasks.
      -    Database::getConnection('default')->query('CREATE TABLE {drupal_install_test} (id int NULL)');
      +    Database::getConnection('default')->query('CREATE TABLE {drupal_install_test} (id int NOT NULL PRIMARY KEY)');
           parent::setUpSettings();
       
           // Ensure that the error message translation is working.
           $this->assertRaw('Beheben Sie alle Probleme unten, um die Installation fortzusetzen. Informationen zur Konfiguration der Datenbankserver finden Sie in der Installationshandbuch, oder kontaktieren Sie Ihren Hosting-Anbieter.');
      -    $this->assertRaw('CREATE ein Test-Tabelle auf Ihrem Datenbankserver mit dem Befehl CREATE TABLE {drupal_install_test} (id int NULL) fehlgeschlagen.');
      +    $this->assertRaw('CREATE ein Test-Tabelle auf Ihrem Datenbankserver mit dem Befehl CREATE TABLE {drupal_install_test} (id int NOT NULL PRIMARY KEY) fehlgeschlagen.');
       
           // Now do it successfully.
           Database::getConnection('default')->query('DROP TABLE {drupal_install_test}');
      diff --git a/web/core/tests/Drupal/KernelTests/AssertConfigTrait.php b/web/core/tests/Drupal/KernelTests/AssertConfigTrait.php
      index eb1588f18..7acab53b0 100644
      --- a/web/core/tests/Drupal/KernelTests/AssertConfigTrait.php
      +++ b/web/core/tests/Drupal/KernelTests/AssertConfigTrait.php
      @@ -40,7 +40,7 @@ trait AssertConfigTrait {
       
                 // Allow to skip entire config files.
                 if ($skipped_config[$config_name] === TRUE) {
      -            continue;
      +            break;
                 }
       
                 // Allow to skip some specific lines of imported config files.
      @@ -71,12 +71,12 @@ trait AssertConfigTrait {
               case 'Drupal\Component\Diff\Engine\DiffOpAdd':
                 // The _core property does not exist in the default config.
                 if ($op->closing[0] === '_core:') {
      -            continue;
      +            break;
                 }
                 foreach ($op->closing as $closing) {
                   // The UUIDs don't exist in the default config.
                   if (strpos($closing, 'uuid: ') === 0) {
      -              continue;
      +              break;
                   }
                   throw new \Exception($config_name . ': ' . var_export($op, TRUE));
                 }
      diff --git a/web/core/tests/Drupal/KernelTests/Core/Common/SizeTest.php b/web/core/tests/Drupal/KernelTests/Core/Common/SizeTest.php
      index 82ff53086..f595cfcab 100644
      --- a/web/core/tests/Drupal/KernelTests/Core/Common/SizeTest.php
      +++ b/web/core/tests/Drupal/KernelTests/Core/Common/SizeTest.php
      @@ -29,8 +29,12 @@ class SizeTest extends KernelTestBase {
         public function providerTestCommonFormatSize() {
           $kb = Bytes::KILOBYTE;
           return [
      +      ['0 bytes', 0],
             ['1 byte', 1],
      +      ['-1 bytes', -1],
             ['2 bytes', 2],
      +      ['-2 bytes', -2],
      +      ['1023 bytes', $kb - 1],
             ['1 KB', $kb],
             ['1 MB', pow($kb, 2)],
             ['1 GB', pow($kb, 3)],
      @@ -39,10 +43,13 @@ class SizeTest extends KernelTestBase {
             ['1 EB', pow($kb, 6)],
             ['1 ZB', pow($kb, 7)],
             ['1 YB', pow($kb, 8)],
      -      // Rounded to 1 MB - not 1000 or 1024 kilobyte
      +      ['1024 YB', pow($kb, 9)],
      +      // Rounded to 1 MB - not 1000 or 1024 kilobytes
             ['1 MB', ($kb * $kb) - 1],
      +      ['-1 MB', -(($kb * $kb) - 1)],
             // Decimal Megabytes
             ['3.46 MB', 3623651],
      +      ['3.77 GB', 4053371676],
             // Decimal Petabytes
             ['59.72 PB', 67234178751368124],
             // Decimal Yottabytes
      diff --git a/web/core/tests/Drupal/KernelTests/Core/Entity/EntityFieldTest.php b/web/core/tests/Drupal/KernelTests/Core/Entity/EntityFieldTest.php
      index 3fd17d86b..1695d9378 100644
      --- a/web/core/tests/Drupal/KernelTests/Core/Entity/EntityFieldTest.php
      +++ b/web/core/tests/Drupal/KernelTests/Core/Entity/EntityFieldTest.php
      @@ -3,6 +3,7 @@
       namespace Drupal\KernelTests\Core\Entity;
       
       use Drupal\Core\Entity\EntityInterface;
      +use Drupal\Core\Entity\EntityStorageException;
       use Drupal\Core\Entity\RevisionLogInterface;
       use Drupal\Core\Entity\TypedData\EntityDataDefinition;
       use Drupal\Core\Entity\TypedData\EntityDataDefinitionInterface;
      @@ -919,4 +920,33 @@ class EntityFieldTest extends EntityKernelTestBase {
           $this->assertEqual($entity->field_test_text->processed, $target, format_string('%entity_type: Text is processed with the default filter.', ['%entity_type' => $entity_type]));
         }
       
      +  /**
      +   * Tests explicit entity ID assignment.
      +   */
      +  public function testEntityIdAssignment() {
      +    $entity_type = 'entity_test';
      +    /** @var \Drupal\Core\Entity\ContentEntityStorageInterface $storage */
      +    $storage = $this->container->get('entity_type.manager')->getStorage($entity_type);
      +
      +    // Check that an ID can be explicitly assigned on creation.
      +    /** @var \Drupal\Core\Entity\ContentEntityInterface $entity */
      +    $entity = $this->createTestEntity($entity_type);
      +    $entity_id = 3;
      +    $entity->set('id', $entity_id);
      +    $this->assertSame($entity_id, $entity->id());
      +    $storage->save($entity);
      +    $entity = $storage->loadUnchanged($entity->id());
      +    $this->assertTrue($entity);
      +
      +    // Check that an explicitly-assigned ID is preserved on update.
      +    $storage->save($entity);
      +    $entity = $storage->loadUnchanged($entity->id());
      +    $this->assertTrue($entity);
      +
      +    // Check that an ID cannot be explicitly assigned on update.
      +    $this->setExpectedException(EntityStorageException::class);
      +    $entity->set('id', $entity_id + 1);
      +    $storage->save($entity);
      +  }
      +
       }
      diff --git a/web/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryTest.php b/web/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryTest.php
      index e69260489..a6819f019 100644
      --- a/web/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryTest.php
      +++ b/web/core/tests/Drupal/KernelTests/Core/Entity/EntityQueryTest.php
      @@ -138,8 +138,11 @@ class EntityQueryTest extends EntityKernelTestBase {
             }
             foreach (array_reverse(str_split(decbin($i))) as $key => $bit) {
               if ($bit) {
      -          list($field_name, $langcode, $values) = $units[$key];
      -          $entity->getTranslation($langcode)->{$field_name}[] = $values;
      +          // @todo https://www.drupal.org/project/drupal/issues/3001920 Doing
      +          //   list($field_name, $langcode, $values) = $units[$key]; causes
      +          //   problems in PHP 7.3. Revert to better variable names once
      +          //   https://bugs.php.net/bug.php?id=76937 is fixed.
      +          $entity->getTranslation($units[$key][1])->{$units[$key][0]}[] = $units[$key][2];
               }
             }
             $entity->save();
      @@ -1160,4 +1163,42 @@ class EntityQueryTest extends EntityKernelTestBase {
           $this->assertEquals($entity->id(), reset($result));
         }
       
      +  /**
      +   * Tests entity queries with condition on the revision metadata keys.
      +   */
      +  public function testConditionOnRevisionMetadataKeys() {
      +    $this->installModule('entity_test_revlog');
      +    $this->installEntitySchema('entity_test_revlog');
      +
      +    /** @var \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager */
      +    $entity_type_manager = $this->container->get('entity_type.manager');
      +    /** @var \Drupal\Core\Entity\ContentEntityTypeInterface $entity_type */
      +    $entity_type = $entity_type_manager->getDefinition('entity_test_revlog');
      +    /** @var \Drupal\Core\Entity\ContentEntityStorageInterface $storage */
      +    $storage = $entity_type_manager->getStorage('entity_test_revlog');
      +
      +    $revision_created_timestamp = time();
      +    $revision_created_field_name = $entity_type->getRevisionMetadataKey('revision_created');
      +    $entity = $storage->create([
      +      'type' => 'entity_test',
      +      $revision_created_field_name => $revision_created_timestamp,
      +    ]);
      +    $entity->save();
      +
      +    // Query only the default revision.
      +    $result = $storage->getQuery()
      +      ->condition($revision_created_field_name, $revision_created_timestamp)
      +      ->execute();
      +    $this->assertCount(1, $result);
      +    $this->assertEquals($entity->id(), reset($result));
      +
      +    // Query all revisions.
      +    $result = $storage->getQuery()
      +      ->condition($revision_created_field_name, $revision_created_timestamp)
      +      ->allRevisions()
      +      ->execute();
      +    $this->assertCount(1, $result);
      +    $this->assertEquals($entity->id(), reset($result));
      +  }
      +
       }
      diff --git a/web/core/tests/Drupal/KernelTests/Core/File/PharWrapperTest.php b/web/core/tests/Drupal/KernelTests/Core/File/PharWrapperTest.php
      new file mode 100644
      index 000000000..2cd2ab1ea
      --- /dev/null
      +++ b/web/core/tests/Drupal/KernelTests/Core/File/PharWrapperTest.php
      @@ -0,0 +1,33 @@
      +getDrupalRoot() . '/core/modules/simpletest/files';
      +    // Ensure that file operations via the phar:// stream wrapper work for phar
      +    // files with the .phar extension.
      +    $this->assertFalse(file_exists("phar://$base/phar-1.phar/no-such-file.php"));
      +    $this->assertTrue(file_exists("phar://$base/phar-1.phar/index.php"));
      +    $file_contents = file_get_contents("phar://$base/phar-1.phar/index.php");
      +    $expected_hash = 'c7e7904ea573c5ebea3ef00bb08c1f86af1a45961fbfbeb1892ff4a98fd73ad5';
      +    $this->assertSame($expected_hash, hash('sha256', $file_contents));
      +
      +    // Ensure that file operations via the phar:// stream wrapper throw an
      +    // exception for files without the .phar extension.
      +    $this->setExpectedException('TYPO3\PharStreamWrapper\Exception');
      +    file_exists("phar://$base/image-2.jpg/index.php");
      +  }
      +
      +}
      diff --git a/web/core/tests/Drupal/KernelTests/Core/File/StreamWrapperTest.php b/web/core/tests/Drupal/KernelTests/Core/File/StreamWrapperTest.php
      index 6c18b6654..070782fcb 100644
      --- a/web/core/tests/Drupal/KernelTests/Core/File/StreamWrapperTest.php
      +++ b/web/core/tests/Drupal/KernelTests/Core/File/StreamWrapperTest.php
      @@ -144,4 +144,31 @@ class StreamWrapperTest extends FileTestBase {
           $this->assertFalse(file_stream_wrapper_valid_scheme(file_uri_scheme('foo://asdf')), 'Did not get a valid stream scheme from foo://asdf');
         }
       
      +  /**
      +   * Tests that phar stream wrapper is registered as expected.
      +   *
      +   * @see \Drupal\Core\StreamWrapper\StreamWrapperManager::register()
      +   */
      +  public function testPharStreamWrapperRegistration() {
      +    if (!in_array('phar', stream_get_wrappers(), TRUE)) {
      +      $this->markTestSkipped('There is no phar stream wrapper registered. PHP is probably compiled without phar support.');
      +    }
      +    // Ensure that phar is not treated as a valid scheme.
      +    $stream_wrapper_manager = $this->container->get('stream_wrapper_manager');
      +    $this->assertFalse($stream_wrapper_manager->getViaScheme('phar'));
      +
      +    // Ensure that calling register again and unregister do not create errors
      +    // due to the PharStreamWrapperManager singleton.
      +    $stream_wrapper_manager->register();
      +    $this->assertContains('public', stream_get_wrappers());
      +    $this->assertContains('phar', stream_get_wrappers());
      +    $stream_wrapper_manager->unregister();
      +    $this->assertNotContains('public', stream_get_wrappers());
      +    // This will have reverted to the builtin phar stream wrapper.
      +    $this->assertContains('phar', stream_get_wrappers());
      +    $stream_wrapper_manager->register();
      +    $this->assertContains('public', stream_get_wrappers());
      +    $this->assertContains('phar', stream_get_wrappers());
      +  }
      +
       }
      diff --git a/web/core/tests/Drupal/KernelTests/Core/Plugin/EntityContextTypedDataTest.php b/web/core/tests/Drupal/KernelTests/Core/Plugin/EntityContextTypedDataTest.php
      new file mode 100644
      index 000000000..c26a3f8a9
      --- /dev/null
      +++ b/web/core/tests/Drupal/KernelTests/Core/Plugin/EntityContextTypedDataTest.php
      @@ -0,0 +1,37 @@
      + 'entity_test',
      +      'bundle' => 'entity_test',
      +      'mode' => 'default',
      +      'status' => TRUE,
      +    ]);
      +    $display->save();
      +
      +    $violations = EntityContext::fromEntity($display)->validate();
      +    $this->assertCount(0, $violations);
      +  }
      +
      +}
      diff --git a/web/core/tests/Drupal/KernelTests/Core/Theme/MessageTest.php b/web/core/tests/Drupal/KernelTests/Core/Theme/MessageTest.php
      index 1b3796eff..5552591ed 100644
      --- a/web/core/tests/Drupal/KernelTests/Core/Theme/MessageTest.php
      +++ b/web/core/tests/Drupal/KernelTests/Core/Theme/MessageTest.php
      @@ -32,6 +32,14 @@ class MessageTest extends KernelTestBase {
           $this->render($messages);
           $this->assertRaw('messages messages--error');
           $this->assertRaw('messages messages--status');
      +    // Tests display of only one type of messages.
      +    \Drupal::messenger()->addError('An error occurred');
      +    $messages = [
      +      '#type' => 'status_messages',
      +      '#display' => 'error',
      +    ];
      +    $this->render($messages);
      +    $this->assertRaw('messages messages--error');
         }
       
       }
      diff --git a/web/core/tests/Drupal/Tests/BrowserTestBase.php b/web/core/tests/Drupal/Tests/BrowserTestBase.php
      index 6443b5a38..204eacb4f 100644
      --- a/web/core/tests/Drupal/Tests/BrowserTestBase.php
      +++ b/web/core/tests/Drupal/Tests/BrowserTestBase.php
      @@ -238,12 +238,6 @@ abstract class BrowserTestBase extends TestCase {
             'hidden_field_selector' => new HiddenFieldSelector(),
           ]);
           $session = new Session($driver, $selectors_handler);
      -    $cookies = $this->extractCookiesFromRequest(\Drupal::request());
      -    foreach ($cookies as $cookie_name => $values) {
      -      foreach ($values as $value) {
      -        $session->setCookie($cookie_name, $value);
      -      }
      -    }
           $this->mink = new Mink();
           $this->mink->registerSession('default', $session);
           $this->mink->setDefaultSessionName('default');
      @@ -251,6 +245,16 @@ abstract class BrowserTestBase extends TestCase {
       
           $this->initFrontPage();
       
      +    // Copies cookies from the current environment, for example, XDEBUG_SESSION
      +    // in order to support Xdebug.
      +    // @see BrowserTestBase::initFrontPage()
      +    $cookies = $this->extractCookiesFromRequest(\Drupal::request());
      +    foreach ($cookies as $cookie_name => $values) {
      +      foreach ($values as $value) {
      +        $session->setCookie($cookie_name, $value);
      +      }
      +    }
      +
           return $session;
         }
       
      @@ -676,7 +680,7 @@ abstract class BrowserTestBase extends TestCase {
          *   The JSON decoded drupalSettings value from the current page.
          */
         protected function getDrupalSettings() {
      -    $html = $this->getSession()->getPage()->getHtml();
      +    $html = $this->getSession()->getPage()->getContent();
           if (preg_match('@@', $html, $matches)) {
             return Json::decode($matches[1]);
           }
      diff --git a/web/core/tests/Drupal/Tests/Component/Datetime/DateTimePlusTest.php b/web/core/tests/Drupal/Tests/Component/Datetime/DateTimePlusTest.php
      index 37b353b8f..6e7040adf 100644
      --- a/web/core/tests/Drupal/Tests/Component/Datetime/DateTimePlusTest.php
      +++ b/web/core/tests/Drupal/Tests/Component/Datetime/DateTimePlusTest.php
      @@ -330,7 +330,9 @@ class DateTimePlusTest extends TestCase {
             // Create a date object in the distant past.
             // @see https://www.drupal.org/node/2795489#comment-12127088
             if (version_compare(PHP_VERSION, '5.6.15', '>=')) {
      -        $dates[] = ['1809-02-12 10:30', 'America/Chicago', '1809-02-12T10:30:00-06:00'];
      +        // Note that this date is after the United States standardized its
      +        // timezones.
      +        $dates[] = ['1883-11-19 10:30', 'America/Chicago', '1883-11-19T10:30:00-06:00'];
             }
             // Create a date object in the far future.
             $dates[] = ['2345-01-02 02:04', 'UTC', '2345-01-02T02:04:00+00:00'];
      @@ -366,7 +368,9 @@ class DateTimePlusTest extends TestCase {
             // Create a date object in the distant past.
             // @see https://www.drupal.org/node/2795489#comment-12127088
             if (version_compare(PHP_VERSION, '5.6.15', '>=')) {
      -        $dates[] = [['year' => 1809, 'month' => 2, 'day' => 12], 'America/Chicago', '1809-02-12T00:00:00-06:00'];
      +        // Note that this date is after the United States standardized its
      +        // timezones.
      +        $dates[] = [['year' => 1883, 'month' => 11, 'day' => 19], 'America/Chicago', '1883-11-19T00:00:00-06:00'];
             }
             // Create a date object in the far future.
             $dates[] = [['year' => 2345, 'month' => 1, 'day' => 2], 'UTC', '2345-01-02T00:00:00+00:00'];
      diff --git a/web/core/tests/Drupal/Tests/Component/Transliteration/PhpTransliterationTest.php b/web/core/tests/Drupal/Tests/Component/Transliteration/PhpTransliterationTest.php
      index 924f3e930..b6a79b3a7 100644
      --- a/web/core/tests/Drupal/Tests/Component/Transliteration/PhpTransliterationTest.php
      +++ b/web/core/tests/Drupal/Tests/Component/Transliteration/PhpTransliterationTest.php
      @@ -142,8 +142,6 @@ class PhpTransliterationTest extends TestCase {
             // Test strings in some other languages.
             // Turkish, provided by drupal.org user Kartagis.
             ['tr', 'Abayı serdiler bize. Söyleyeceğim yüzlerine. Sanırım hepimiz aynı şeyi düşünüyoruz.', 'Abayi serdiler bize. Soyleyecegim yuzlerine. Sanirim hepimiz ayni seyi dusunuyoruz.'],
      -      // Illegal/unknown unicode.
      -      ['en', chr(0xF8) . chr(0x80) . chr(0x80) . chr(0x80) . chr(0x80), '?'],
             // Max length.
             ['de', $two_byte, 'Ae Oe', '?', 5],
           ];
      @@ -164,6 +162,60 @@ class PhpTransliterationTest extends TestCase {
           $this->assertSame($trunc_output, $transliteration->transliterate($input, 'de', '?', 18), 'Truncating to 18 characters works');
         }
       
      +  /**
      +   * Tests the unknown character replacement.
      +   *
      +   * @param string $langcode
      +   *   The language code to test.
      +   * @param string $original
      +   *   The original string.
      +   * @param string $expected
      +   *   The expected return from PhpTransliteration::transliterate().
      +   * @param string $unknown_character
      +   *   The character to substitute for characters in $string without
      +   *   transliterated equivalents.
      +   * @param int $max_length
      +   *   The maximum length of the string that returns the transliteration.
      +   *
      +   * @dataProvider providerTestTransliterationUnknownCharacter
      +   */
      +  public function testTransliterationUnknownCharacter($langcode, $original, $expected, $unknown_character = '?', $max_length = NULL) {
      +    $transliteration = new PhpTransliteration();
      +    $actual = $transliteration->transliterate($original, $langcode, $unknown_character, $max_length);
      +    $this->assertSame($expected, $actual);
      +  }
      +
      +  /**
      +   * Provides data for self::testTransliterationUnknownCharacter().
      +   *
      +   * @return array
      +   *   An array of arrays, each containing the parameters for
      +   *   self::testTransliterationUnknownCharacter().
      +   */
      +  public function providerTestTransliterationUnknownCharacter() {
      +    return [
      +      // Each test case is (language code, input, output, unknown character, max
      +      // length).
      +
      +      // Illegal/unknown unicode.
      +      ['en', chr(0xF8) . chr(0x80) . chr(0x80) . chr(0x80) . chr(0x80), '?????'],
      +      ['en', chr(0xF8) . chr(0x80) . chr(0x80) . chr(0x80) . chr(0x80), '-----', '-'],
      +      ['en', 'Hel' . chr(0x80) . 'o World', 'Hel?o World'],
      +      ['en', 'Hell' . chr(0x80) . ' World', 'Hell? World'],
      +      // Non default replacement.
      +      ['en', chr(0x80) . 'ello World', '_ello World', '_'],
      +      // Keep the original question marks.
      +      ['en', chr(0xF8) . '?' . chr(0x80), '???'],
      +      ['en', chr(0x80) . 'ello ? World?', '_ello ? World?', '_'],
      +      ['pl', 'aąeę' . chr(0x80) . 'oółżźz ?', 'aaee?oolzzz ?'],
      +      // Non-US-ASCII replacement.
      +      ['en', chr(0x80) . 'ello World?', 'Oello World?', 'Ö'],
      +      ['pl', chr(0x80) . 'óóść', 'ooosc', 'ó'],
      +      // Ensure question marks are replaced when max length used.
      +      ['en', chr(0x80) . 'ello ? World?', '_ello ?', '_', 7],
      +    ];
      +  }
      +
         /**
          * Tests inclusion is safe.
          *
      diff --git a/web/core/tests/Drupal/Tests/Component/Utility/MailTest.php b/web/core/tests/Drupal/Tests/Component/Utility/MailTest.php
      new file mode 100644
      index 000000000..5f3032891
      --- /dev/null
      +++ b/web/core/tests/Drupal/Tests/Component/Utility/MailTest.php
      @@ -0,0 +1,60 @@
      +assertEquals($safe_display_name, Mail::formatDisplayName($string));
      +  }
      +
      +  /**
      +   * Data provider for testFormatDisplayName().
      +   *
      +   * @see testFormatDisplayName()
      +   *
      +   * @return array
      +   *   An array containing a string and its 'display-name' safe value.
      +   */
      +  public function providerTestDisplayName() {
      +    return [
      +      // Simple ASCII characters.
      +      ['Test site', 'Test site'],
      +      // ASCII with html entity.
      +      ['Test & site', 'Test & site'],
      +      // Non-ASCII characters.
      +      ['Tést site', '=?UTF-8?B?VMOpc3Qgc2l0ZQ==?='],
      +      // Non-ASCII with special characters.
      +      ['Tést; site', '=?UTF-8?B?VMOpc3Q7IHNpdGU=?='],
      +      // Non-ASCII with html entity.
      +      ['Tést; site', '=?UTF-8?B?VMOpc3Q7IHNpdGU=?='],
      +      // ASCII with special characters.
      +      ['Test; site', '"Test; site"'],
      +      // ASCII with special characters as html entity.
      +      ['Test < site', '"Test < site"'],
      +      // ASCII with special characters and '\'.
      +      ['Test; \ "site"', '"Test; \\\\ \"site\""'],
      +      // String already RFC-2822 compliant.
      +      ['"Test; site"', '"Test; site"'],
      +      // String already RFC-2822 compliant.
      +      ['"Test; \\\\ \"site\""', '"Test; \\\\ \"site\""'],
      +    ];
      +  }
      +
      +}
      diff --git a/web/core/tests/Drupal/Tests/Core/Command/QuickStartTest.php b/web/core/tests/Drupal/Tests/Core/Command/QuickStartTest.php
      index c792d1aba..5622aa237 100644
      --- a/web/core/tests/Drupal/Tests/Core/Command/QuickStartTest.php
      +++ b/web/core/tests/Drupal/Tests/Core/Command/QuickStartTest.php
      @@ -85,7 +85,15 @@ class QuickStartTest extends TestCase {
         public function testQuickStartCommand() {
           // Install a site using the standard profile to ensure the one time login
           // link generation works.
      -    $install_command = "{$this->php} core/scripts/drupal quick-start standard --site-name='Test site {$this->testDb->getDatabasePrefix()}' --suppress-login";
      +
      +    $install_command = [
      +      $this->php,
      +      'core/scripts/drupal',
      +      'quick-start',
      +      'standard',
      +      "--site-name='Test site {$this->testDb->getDatabasePrefix()}'",
      +      '--suppress-login',
      +    ];
           $process = new Process($install_command, NULL, ['DRUPAL_DEV_SITE_PATH' => $this->testDb->getTestSitePath()]);
           $process->inheritEnvironmentVariables();
           $process->setTimeout(500);
      @@ -129,7 +137,13 @@ class QuickStartTest extends TestCase {
          */
         public function testQuickStartInstallAndServerCommands() {
           // Install a site.
      -    $install_command = "{$this->php} core/scripts/drupal install testing --site-name='Test site {$this->testDb->getDatabasePrefix()}'";
      +    $install_command = [
      +      $this->php,
      +      'core/scripts/drupal',
      +      'install',
      +      'testing',
      +      "--site-name='Test site {$this->testDb->getDatabasePrefix()}'",
      +    ];
           $install_process = new Process($install_command, NULL, ['DRUPAL_DEV_SITE_PATH' => $this->testDb->getTestSitePath()]);
           $install_process->inheritEnvironmentVariables();
           $install_process->setTimeout(500);
      @@ -139,7 +153,12 @@ class QuickStartTest extends TestCase {
           $this->assertSame(0, $result);
       
           // Run the PHP built-in webserver.
      -    $server_command = "{$this->php} core/scripts/drupal server --suppress-login";
      +    $server_command = [
      +      $this->php,
      +      'core/scripts/drupal',
      +      'server',
      +      '--suppress-login',
      +    ];
           $server_process = new Process($server_command, NULL, ['DRUPAL_DEV_SITE_PATH' => $this->testDb->getTestSitePath()]);
           $server_process->inheritEnvironmentVariables();
           $server_process->start();
      @@ -173,7 +192,13 @@ class QuickStartTest extends TestCase {
           $this->assertContains('Test site ' . $this->testDb->getDatabasePrefix(), $content);
       
           // Try to re-install over the top of an existing site.
      -    $install_command = "{$this->php} core/scripts/drupal install testing --site-name='Test another site {$this->testDb->getDatabasePrefix()}'";
      +    $install_command = [
      +      $this->php,
      +      'core/scripts/drupal',
      +      'install',
      +      'testing',
      +      "--site-name='Test another site {$this->testDb->getDatabasePrefix()}'",
      +    ];
           $install_process = new Process($install_command, NULL, ['DRUPAL_DEV_SITE_PATH' => $this->testDb->getTestSitePath()]);
           $install_process->inheritEnvironmentVariables();
           $install_process->setTimeout(500);
      @@ -196,7 +221,13 @@ class QuickStartTest extends TestCase {
         public function testQuickStartCommandProfileValidation() {
           // Install a site using the standard profile to ensure the one time login
           // link generation works.
      -    $install_command = "{$this->php} core/scripts/drupal quick-start umami --site-name='Test site {$this->testDb->getDatabasePrefix()}' --suppress-login";
      +    $install_command = [
      +      $this->php,
      +      'core/scripts/drupal',
      +      'quick-start',
      +      'umami',
      +      "--site-name='Test site {$this->testDb->getDatabasePrefix()}' --suppress-login",
      +    ];
           $process = new Process($install_command, NULL, ['DRUPAL_DEV_SITE_PATH' => $this->testDb->getTestSitePath()]);
           $process->inheritEnvironmentVariables();
           $process->run();
      @@ -207,7 +238,12 @@ class QuickStartTest extends TestCase {
          * Tests the server command when there is no installation.
          */
         public function testServerWithNoInstall() {
      -    $server_command = "{$this->php} core/scripts/drupal server --suppress-login";
      +    $server_command = [
      +      $this->php,
      +      'core/scripts/drupal',
      +      'server',
      +      '--suppress-login',
      +    ];
           $server_process = new Process($server_command, NULL, ['DRUPAL_DEV_SITE_PATH' => $this->testDb->getTestSitePath()]);
           $server_process->inheritEnvironmentVariables();
           $server_process->run();
      diff --git a/web/core/tests/Drupal/Tests/Core/EventSubscriber/RssResponseRelativeUrlFilterTest.php b/web/core/tests/Drupal/Tests/Core/EventSubscriber/RssResponseRelativeUrlFilterTest.php
      index d8290fe47..e9c9549f2 100644
      --- a/web/core/tests/Drupal/Tests/Core/EventSubscriber/RssResponseRelativeUrlFilterTest.php
      +++ b/web/core/tests/Drupal/Tests/Core/EventSubscriber/RssResponseRelativeUrlFilterTest.php
      @@ -114,7 +114,7 @@ RSS;
           $event = new FilterResponseEvent(
             $this->prophesize(HttpKernelInterface::class)->reveal(),
             Request::create('/'),
      -      'foo',
      +      HttpKernelInterface::MASTER_REQUEST,
             new Response($content, 200, [
               'Content-Type' => 'application/rss+xml',
             ])
      diff --git a/web/core/tests/Drupal/Tests/Core/Layout/LayoutPluginManagerTest.php b/web/core/tests/Drupal/Tests/Core/Layout/LayoutPluginManagerTest.php
      index 2d8985914..139200cab 100644
      --- a/web/core/tests/Drupal/Tests/Core/Layout/LayoutPluginManagerTest.php
      +++ b/web/core/tests/Drupal/Tests/Core/Layout/LayoutPluginManagerTest.php
      @@ -12,6 +12,7 @@ use Drupal\Core\Extension\ThemeHandlerInterface;
       use Drupal\Core\Layout\LayoutDefault;
       use Drupal\Core\Layout\LayoutDefinition;
       use Drupal\Core\Layout\LayoutPluginManager;
      +use Drupal\Core\StringTranslation\TranslatableMarkup;
       use Drupal\Tests\UnitTestCase;
       use org\bovigo\vfs\vfsStream;
       use Prophecy\Argument;
      @@ -114,8 +115,12 @@ class LayoutPluginManagerTest extends UnitTestCase {
           $theme_a_path = vfsStream::url('root/themes/theme_a');
           $layout_definition = $this->layoutPluginManager->getDefinition('theme_a_provided_layout');
           $this->assertSame('theme_a_provided_layout', $layout_definition->id());
      -    $this->assertSame('2 column layout', $layout_definition->getLabel());
      -    $this->assertSame('Columns: 2', $layout_definition->getCategory());
      +    $this->assertSame('2 column layout', (string) $layout_definition->getLabel());
      +    $this->assertSame('Columns: 2', (string) $layout_definition->getCategory());
      +    $this->assertSame('A theme provided layout', (string) $layout_definition->getDescription());
      +    $this->assertTrue($layout_definition->getLabel() instanceof TranslatableMarkup);
      +    $this->assertTrue($layout_definition->getCategory() instanceof TranslatableMarkup);
      +    $this->assertTrue($layout_definition->getDescription() instanceof TranslatableMarkup);
           $this->assertSame('twocol', $layout_definition->getTemplate());
           $this->assertSame("$theme_a_path/templates", $layout_definition->getPath());
           $this->assertSame('theme_a/twocol', $layout_definition->getLibrary());
      @@ -126,19 +131,26 @@ class LayoutPluginManagerTest extends UnitTestCase {
           $this->assertSame(LayoutDefault::class, $layout_definition->getClass());
           $expected_regions = [
             'left' => [
      -        'label' => 'Left region',
      +        'label' => new TranslatableMarkup('Left region', [], ['context' => 'layout_region']),
             ],
             'right' => [
      -        'label' => 'Right region',
      +        'label' => new TranslatableMarkup('Right region', [], ['context' => 'layout_region']),
             ],
           ];
      -    $this->assertSame($expected_regions, $layout_definition->getRegions());
      +    $regions = $layout_definition->getRegions();
      +    $this->assertEquals($expected_regions, $regions);
      +    $this->assertTrue($regions['left']['label'] instanceof TranslatableMarkup);
      +    $this->assertTrue($regions['right']['label'] instanceof TranslatableMarkup);
       
           $module_a_path = vfsStream::url('root/modules/module_a');
           $layout_definition = $this->layoutPluginManager->getDefinition('module_a_provided_layout');
           $this->assertSame('module_a_provided_layout', $layout_definition->id());
      -    $this->assertSame('1 column layout', $layout_definition->getLabel());
      -    $this->assertSame('Columns: 1', $layout_definition->getCategory());
      +    $this->assertSame('1 column layout', (string) $layout_definition->getLabel());
      +    $this->assertSame('Columns: 1', (string) $layout_definition->getCategory());
      +    $this->assertSame('A module provided layout', (string) $layout_definition->getDescription());
      +    $this->assertTrue($layout_definition->getLabel() instanceof TranslatableMarkup);
      +    $this->assertTrue($layout_definition->getCategory() instanceof TranslatableMarkup);
      +    $this->assertTrue($layout_definition->getDescription() instanceof TranslatableMarkup);
           $this->assertSame(NULL, $layout_definition->getTemplate());
           $this->assertSame("$module_a_path/layouts", $layout_definition->getPath());
           $this->assertSame('module_a/onecol', $layout_definition->getLibrary());
      @@ -149,19 +161,26 @@ class LayoutPluginManagerTest extends UnitTestCase {
           $this->assertSame(LayoutDefault::class, $layout_definition->getClass());
           $expected_regions = [
             'top' => [
      -        'label' => 'Top region',
      +        'label' => new TranslatableMarkup('Top region', [], ['context' => 'layout_region']),
             ],
             'bottom' => [
      -        'label' => 'Bottom region',
      +        'label' => new TranslatableMarkup('Bottom region', [], ['context' => 'layout_region']),
             ],
           ];
      -    $this->assertSame($expected_regions, $layout_definition->getRegions());
      +    $regions = $layout_definition->getRegions();
      +    $this->assertEquals($expected_regions, $regions);
      +    $this->assertTrue($regions['top']['label'] instanceof TranslatableMarkup);
      +    $this->assertTrue($regions['bottom']['label'] instanceof TranslatableMarkup);
       
           $core_path = '/core/lib/Drupal/Core';
           $layout_definition = $this->layoutPluginManager->getDefinition('plugin_provided_layout');
           $this->assertSame('plugin_provided_layout', $layout_definition->id());
           $this->assertEquals('Layout plugin', $layout_definition->getLabel());
           $this->assertEquals('Columns: 1', $layout_definition->getCategory());
      +    $this->assertEquals('Test layout', $layout_definition->getDescription());
      +    $this->assertTrue($layout_definition->getLabel() instanceof TranslatableMarkup);
      +    $this->assertTrue($layout_definition->getCategory() instanceof TranslatableMarkup);
      +    $this->assertTrue($layout_definition->getDescription() instanceof TranslatableMarkup);
           $this->assertSame('plugin-provided-layout', $layout_definition->getTemplate());
           $this->assertSame($core_path, $layout_definition->getPath());
           $this->assertSame(NULL, $layout_definition->getLibrary());
      @@ -172,10 +191,12 @@ class LayoutPluginManagerTest extends UnitTestCase {
           $this->assertSame('Drupal\Core\Plugin\Layout\TestLayout', $layout_definition->getClass());
           $expected_regions = [
             'main' => [
      -        'label' => 'Main Region',
      +        'label' => new TranslatableMarkup('Main Region', [], ['context' => 'layout_region']),
             ],
           ];
      -    $this->assertEquals($expected_regions, $layout_definition->getRegions());
      +    $regions = $layout_definition->getRegions();
      +    $this->assertEquals($expected_regions, $regions);
      +    $this->assertTrue($regions['main']['label'] instanceof TranslatableMarkup);
         }
       
         /**
      @@ -284,6 +305,7 @@ EOS;
       module_a_provided_layout:
         label: 1 column layout
         category: 'Columns: 1'
      +  description: 'A module provided layout'
         theme_hook: onecol
         path: layouts
         library: module_a/onecol
      @@ -301,6 +323,7 @@ theme_a_provided_layout:
         class: '\Drupal\Core\Layout\LayoutDefault'
         label: 2 column layout
         category: 'Columns: 2'
      +  description: 'A theme provided layout'
         template: twocol
         path: templates
         library: theme_a/twocol
      @@ -325,7 +348,7 @@ use Drupal\Core\Layout\LayoutDefault;
        *   template = "templates/plugin-provided-layout",
        *   regions = {
        *     "main" = {
      - *       "label" = @Translation("Main Region")
      + *       "label" = @Translation("Main Region", context = "layout_region")
        *     }
        *   }
        * )
      diff --git a/web/core/tests/Drupal/Tests/Core/Plugin/Context/ContextAwarePluginBaseTest.php b/web/core/tests/Drupal/Tests/Core/Plugin/Context/ContextAwarePluginBaseTest.php
      new file mode 100644
      index 000000000..66e54b215
      --- /dev/null
      +++ b/web/core/tests/Drupal/Tests/Core/Plugin/Context/ContextAwarePluginBaseTest.php
      @@ -0,0 +1,96 @@
      +plugin = new TestContextAwarePlugin([], 'the_sisko', new TestPluginDefinition());
      +  }
      +
      +  /**
      +   * @covers ::getContextDefinitions
      +   */
      +  public function testGetContextDefinitions() {
      +    $this->assertInternalType('array', $this->plugin->getContextDefinitions());
      +  }
      +
      +  /**
      +   * @covers ::getContextDefinition
      +   */
      +  public function testGetContextDefinition() {
      +    // The context is not defined, so an exception will be thrown.
      +    $this->setExpectedException(ContextException::class, 'The person context is not a valid context.');
      +    $this->plugin->getContextDefinition('person');
      +  }
      +
      +  /**
      +   * @covers ::setContextValue
      +   */
      +  public function testSetContextValue() {
      +    $typed_data_manager = $this->prophesize(TypedDataManagerInterface::class);
      +    $container = new ContainerBuilder();
      +    $container->set('typed_data_manager', $typed_data_manager->reveal());
      +    \Drupal::setContainer($container);
      +
      +    $this->plugin->getPluginDefinition()->addContextDefinition('foo', new ContextDefinition('string'));
      +
      +    $this->assertFalse($this->plugin->setContextCalled);
      +    $this->plugin->setContextValue('foo', new StringData(new DataDefinition(), 'bar'));
      +    $this->assertTrue($this->plugin->setContextCalled);
      +  }
      +
      +}
      +
      +class TestPluginDefinition extends PluginDefinition implements ContextAwarePluginDefinitionInterface {
      +
      +  use ContextAwarePluginDefinitionTrait;
      +
      +}
      +
      +class TestContextAwarePlugin extends ContextAwarePluginBase {
      +
      +  /**
      +   * Indicates if ::setContext() has been called or not.
      +   *
      +   * @var bool
      +   */
      +  public $setContextCalled = FALSE;
      +
      +  /**
      +   * {@inheritdoc}
      +   */
      +  public function setContext($name, ComponentContextInterface $context) {
      +    parent::setContext($name, $context);
      +    $this->setContextCalled = TRUE;
      +  }
      +
      +}
      diff --git a/web/core/tests/Drupal/Tests/Core/Plugin/Context/EntityContextDefinitionDeprecationTest.php b/web/core/tests/Drupal/Tests/Core/Plugin/Context/EntityContextDefinitionDeprecationTest.php
      index 1a14692fb..a82995e5a 100644
      --- a/web/core/tests/Drupal/Tests/Core/Plugin/Context/EntityContextDefinitionDeprecationTest.php
      +++ b/web/core/tests/Drupal/Tests/Core/Plugin/Context/EntityContextDefinitionDeprecationTest.php
      @@ -6,17 +6,38 @@ use Drupal\Core\DependencyInjection\ContainerBuilder;
       use Drupal\Core\Plugin\Context\Context;
       use Drupal\Core\Plugin\Context\ContextDefinition;
       use Drupal\Core\Plugin\Context\EntityContextDefinition;
      +use Drupal\Core\TypedData\TypedDataManagerInterface;
      +use Drupal\Core\Validation\ConstraintManager;
       use Drupal\Tests\UnitTestCase;
       use Prophecy\Argument;
      +use Symfony\Component\Validator\Validator\ValidatorInterface;
       
       /**
      + * Test deprecated use of ContextDefinition as an EntityContextDefinition.
      + *
        * @coversDefaultClass \Drupal\Core\Plugin\Context\ContextDefinition
        *
        * @group Plugin
        * @group legacy
      + *
      + * @see https://www.drupal.org/node/2976400
        */
       class EntityContextDefinitionDeprecationTest extends UnitTestCase {
       
      +  /**
      +   * The context definition under test.
      +   *
      +   * @var \Drupal\Core\Plugin\Context\ContextDefinition
      +   */
      +  protected $definition;
      +
      +  /**
      +   * The compatibility layer property on the context definition under test.
      +   *
      +   * @var \ReflectionProperty
      +   */
      +  protected $compatibilityLayer;
      +
         /**
          * {@inheritdoc}
          */
      @@ -24,41 +45,134 @@ class EntityContextDefinitionDeprecationTest extends UnitTestCase {
           parent::setUp();
       
           // Mock container services needed for constraint validation.
      -    $constraint_manager = $this->prophesize('\Drupal\Core\Validation\ConstraintManager');
      +    $constraint_manager = $this->prophesize(ConstraintManager::class);
           $constraint_manager->create(Argument::type('string'), Argument::any())->willReturn(TRUE);
       
      -    $typed_data_manager = $this->prophesize('\Drupal\Core\TypedData\TypedDataManagerInterface');
      +    $typed_data_manager = $this->prophesize(TypedDataManagerInterface::class);
           $typed_data_manager->getValidationConstraintManager()->willReturn($constraint_manager->reveal());
       
      -    $validator = $this->prophesize('\Symfony\Component\Validator\Validator\ValidatorInterface')
      +    $validator = $this->prophesize(ValidatorInterface::class)
             ->reveal();
           $typed_data_manager->getValidator()->willReturn($validator);
       
           $container = new ContainerBuilder();
           $container->set('typed_data_manager', $typed_data_manager->reveal());
           \Drupal::setContainer($container);
      -  }
       
      -  /**
      -   * @expectedDeprecation Constructing a ContextDefinition object for an entity type is deprecated in Drupal 8.6.0. Use Drupal\Core\Plugin\Context\EntityContextDefinition instead. See https://www.drupal.org/node/2976400 for more information.
      -   */
      -  public function testDeprecationNotice() {
      -    $definition = new ContextDefinition('entity:node');
      +    // Create a deprecated entity context definition and prepare the
      +    // compatibility layer to be overridden.
      +    $this->definition = new ContextDefinition('entity:node');
           // The code paths we're testing are private and protected, so use reflection
           // to manipulate protected properties.
      -    $reflector = new \ReflectionObject($definition);
      +    $reflector = new \ReflectionObject($this->definition);
       
           // Ensure that the BC object was created correctly.
           $this->assertTrue($reflector->hasProperty('entityContextDefinition'));
      -    $property = $reflector->getProperty('entityContextDefinition');
      -    $property->setAccessible(TRUE);
      -    $this->assertInstanceOf(EntityContextDefinition::class, $property->getValue($definition));
      +    $this->compatibilityLayer = $reflector->getProperty('entityContextDefinition');
      +    $this->compatibilityLayer->setAccessible(TRUE);
      +    $this->assertInstanceOf(EntityContextDefinition::class, $this->compatibilityLayer->getValue($this->definition));
      +  }
       
      -    // Ensure that getConstraintObjects() adds the EntityType constraint.
      -    $method = $reflector->getMethod('getConstraintObjects');
      -    $method->setAccessible(TRUE);
      -    $this->assertArrayHasKey('EntityType', $method->invoke($definition));
      +  /**
      +   * Test that the BC layer survives serialization and unserialization.
      +   *
      +   * @expectedDeprecation Constructing a ContextDefinition object for an entity type is deprecated in Drupal 8.6.0. Use Drupal\Core\Plugin\Context\EntityContextDefinition instead. See https://www.drupal.org/node/2976400 for more information.
      +   */
      +  public function testSerialization() {
      +    $definition = unserialize(serialize($this->definition));
      +    $bc_layer = $this->compatibilityLayer->getValue($definition);
      +    $this->assertInstanceOf(EntityContextDefinition::class, $bc_layer);
      +  }
       
      +  /**
      +   * Test that getConstraints() proxies to the compatibility layer.
      +   *
      +   * @covers ::getConstraints
      +   * @expectedDeprecation Constructing a ContextDefinition object for an entity type is deprecated in Drupal 8.6.0. Use Drupal\Core\Plugin\Context\EntityContextDefinition instead. See https://www.drupal.org/node/2976400 for more information.
      +   */
      +  public function testGetConstraints() {
      +    $bc_mock = $this->getMockBuilder(EntityContextDefinition::class)
      +      ->setMethods(['getConstraints'])
      +      ->getMock();
      +
      +    $constraints = ['test_constraint'];
      +    $bc_mock->expects($this->once())
      +      ->method('getConstraints')
      +      ->willReturn($constraints);
      +    $this->compatibilityLayer->setValue($this->definition, $bc_mock);
      +
      +    $this->assertSame($constraints, $this->definition->getConstraints());
      +  }
      +
      +  /**
      +   * Test that getConstraint() proxies to the compatibility layer.
      +   *
      +   * @covers ::getConstraint
      +   * @expectedDeprecation Constructing a ContextDefinition object for an entity type is deprecated in Drupal 8.6.0. Use Drupal\Core\Plugin\Context\EntityContextDefinition instead. See https://www.drupal.org/node/2976400 for more information.
      +   */
      +  public function testGetConstraint() {
      +    $bc_mock = $this->getMockBuilder(EntityContextDefinition::class)
      +      ->setMethods(['getConstraint'])
      +      ->getMock();
      +
      +    $bc_mock->expects($this->once())
      +      ->method('getConstraint')
      +      ->with('constraint_name')
      +      ->willReturn('test_constraint');
      +    $this->compatibilityLayer->setValue($this->definition, $bc_mock);
      +
      +    $this->assertSame('test_constraint', $this->definition->getConstraint('constraint_name'));
      +  }
      +
      +  /**
      +   * Test that setConstraints() proxies to the compatibility layer.
      +   *
      +   * @covers ::setConstraints
      +   * @expectedDeprecation Constructing a ContextDefinition object for an entity type is deprecated in Drupal 8.6.0. Use Drupal\Core\Plugin\Context\EntityContextDefinition instead. See https://www.drupal.org/node/2976400 for more information.
      +   */
      +  public function testSetConstraints() {
      +    $bc_mock = $this->getMockBuilder(EntityContextDefinition::class)
      +      ->setMethods(['setConstraints'])
      +      ->getMock();
      +
      +    $constraints = ['TestConstraint' => []];
      +    $bc_mock->expects($this->once())
      +      ->method('setConstraints')
      +      ->with($constraints)
      +      ->willReturnSelf();
      +    $this->compatibilityLayer->setValue($this->definition, $bc_mock);
      +
      +    $this->assertSame($this->definition, $this->definition->setConstraints($constraints));
      +  }
      +
      +  /**
      +   * Test that addConstraint() proxies to the compatibility layer.
      +   *
      +   * @covers ::addConstraint
      +   * @expectedDeprecation Constructing a ContextDefinition object for an entity type is deprecated in Drupal 8.6.0. Use Drupal\Core\Plugin\Context\EntityContextDefinition instead. See https://www.drupal.org/node/2976400 for more information.
      +   */
      +  public function testAddConstraint() {
      +    $bc_mock = $this->getMockBuilder(EntityContextDefinition::class)
      +      ->setMethods(['addConstraint'])
      +      ->getMock();
      +
      +    $options = ['options'];
      +    $bc_mock->expects($this->once())
      +      ->method('addConstraint')
      +      ->with('constraint_name', $options)
      +      ->willReturnSelf();
      +    $this->compatibilityLayer->setValue($this->definition, $bc_mock);
      +
      +    $this->assertSame($this->definition, $this->definition->addConstraint('constraint_name', $options));
      +  }
      +
      +  /**
      +   * Test that isSatisfiedBy() calls the compatibility layer.
      +   *
      +   * @covers ::isSatisfiedBy
      +   * @expectedDeprecation Constructing a ContextDefinition object for an entity type is deprecated in Drupal 8.6.0. Use Drupal\Core\Plugin\Context\EntityContextDefinition instead. See https://www.drupal.org/node/2976400 for more information.
      +   */
      +  public function testIsSatisfiedBy() {
           // Ensure that the BC object's getSampleValues() method is called during
           // validation.
           $bc_mock = $this->getMockBuilder(EntityContextDefinition::class)
      @@ -68,12 +182,21 @@ class EntityContextDefinitionDeprecationTest extends UnitTestCase {
           $bc_mock->expects($this->atLeastOnce())
             ->method('getSampleValues')
             ->willReturn([]);
      -    $property->setValue($definition, $bc_mock);
      -    $definition->isSatisfiedBy(new Context($definition));
      +    $this->compatibilityLayer->setValue($this->definition, $bc_mock);
      +    $this->definition->isSatisfiedBy(new Context($this->definition));
      +  }
       
      -    // Ensure that the BC layer survives serialization and unserialization.
      -    $definition = unserialize(serialize($definition));
      -    $this->assertInstanceOf(EntityContextDefinition::class, $property->getValue($definition));
      +  /**
      +   * Test that getConstraintObjects() adds the EntityType constraint.
      +   *
      +   * @covers ::getConstraintObjects
      +   * @expectedDeprecation Constructing a ContextDefinition object for an entity type is deprecated in Drupal 8.6.0. Use Drupal\Core\Plugin\Context\EntityContextDefinition instead. See https://www.drupal.org/node/2976400 for more information.
      +   */
      +  public function testGetConstraintObjects() {
      +    $reflector = new \ReflectionObject($this->definition);
      +    $method = $reflector->getMethod('getConstraintObjects');
      +    $method->setAccessible(TRUE);
      +    $this->assertArrayHasKey('EntityType', $method->invoke($this->definition));
         }
       
       }
      diff --git a/web/core/tests/Drupal/Tests/Core/Routing/RouterTest.php b/web/core/tests/Drupal/Tests/Core/Routing/RouterTest.php
      new file mode 100644
      index 000000000..d6ba1d43f
      --- /dev/null
      +++ b/web/core/tests/Drupal/Tests/Core/Routing/RouterTest.php
      @@ -0,0 +1,60 @@
      +prophesize(RouteProviderInterface::class);
      +
      +    $route_collection = new RouteCollection();
      +
      +    $route = new Route('/user/{user}');
      +    $route->setOption('compiler_class', RouteCompiler::class);
      +    $route_collection->add('user_view', $route);
      +
      +    $route = new Route('/user/login');
      +    $route->setOption('compiler_class', RouteCompiler::class);
      +    $route_collection->add('user_login', $route);
      +
      +    $route_provider->getRouteCollectionForRequest(Argument::any())
      +      ->willReturn($route_collection);
      +
      +    $url_generator = $this->prophesize(UrlGeneratorInterface::class);
      +    $current_path_stack = $this->prophesize(CurrentPathStack::class);
      +    $router = new Router($route_provider->reveal(), $current_path_stack->reveal(), $url_generator->reveal());
      +
      +    $request_context = $this->prophesize(RequestContext::class);
      +    $request_context->getScheme()->willReturn('http');
      +    $router->setContext($request_context->reveal());
      +
      +    $current_path_stack->getPath(Argument::any())->willReturn('/user/1');
      +    $result = $router->match('/user/1');
      +
      +    $this->assertEquals('user_view', $result['_route']);
      +
      +    $current_path_stack->getPath(Argument::any())->willReturn('/user/login');
      +    $result = $router->match('/user/login');
      +
      +    $this->assertEquals('user_login', $result['_route']);
      +  }
      +
      +}
      diff --git a/web/core/tests/Drupal/Tests/UiHelperTrait.php b/web/core/tests/Drupal/Tests/UiHelperTrait.php
      index d0817f607..d315433ac 100644
      --- a/web/core/tests/Drupal/Tests/UiHelperTrait.php
      +++ b/web/core/tests/Drupal/Tests/UiHelperTrait.php
      @@ -167,27 +167,12 @@ trait UiHelperTrait {
          *   @todo change $edit to disallow NULL as a value for Drupal 9.
          *     https://www.drupal.org/node/2802401
          * @param string $submit
      -   *   Value of the submit button whose click is to be emulated. For example,
      -   *   'Save'. The processing of the request depends on this value. For example,
      -   *   a form may have one button with the value 'Save' and another button with
      -   *   the value 'Delete', and execute different code depending on which one is
      -   *   clicked.
      -   *
      -   *   This function can also be called to emulate an Ajax submission. In this
      -   *   case, this value needs to be an array with the following keys:
      -   *   - path: A path to submit the form values to for Ajax-specific processing.
      -   *   - triggering_element: If the value for the 'path' key is a generic Ajax
      -   *     processing path, this needs to be set to the name of the element. If
      -   *     the name doesn't identify the element uniquely, then this should
      -   *     instead be an array with a single key/value pair, corresponding to the
      -   *     element name and value. The \Drupal\Core\Form\FormAjaxResponseBuilder
      -   *     uses this to find the #ajax information for the element, including
      -   *     which specific callback to use for processing the request.
      -   *
      -   *   This can also be set to NULL in order to emulate an Internet Explorer
      -   *   submission of a form with a single text field, and pressing ENTER in that
      -   *   textfield: under these conditions, no button information is added to the
      -   *   POST data.
      +   *   The id, name, label or value of the submit button which is to be clicked.
      +   *   For example, 'Save'. The first element matched by
      +   *   \Drupal\Tests\WebAssert::buttonExists() will be used. The processing of
      +   *   the request depends on this value. For example, a form may have one
      +   *   button with the value 'Save' and another button with the value 'Delete',
      +   *   and execute different code depending on which one is clicked.
          * @param array $options
          *   Options to be forwarded to the url generator.
          * @param string|null $form_html_id
      @@ -202,6 +187,8 @@ trait UiHelperTrait {
          *   (deprecated) The response content after submit form. It is necessary for
          *   backwards compatibility and will be removed before Drupal 9.0. You should
          *   just use the webAssert object for your assertions.
      +   *
      +   * @see \Drupal\Tests\WebAssert::buttonExists()
          */
         protected function drupalPostForm($path, $edit, $submit, array $options = [], $form_html_id = NULL) {
           if (is_object($submit)) {
      diff --git a/web/core/tests/Drupal/Tests/WebAssert.php b/web/core/tests/Drupal/Tests/WebAssert.php
      index 19d9c2cc6..fa7700ece 100644
      --- a/web/core/tests/Drupal/Tests/WebAssert.php
      +++ b/web/core/tests/Drupal/Tests/WebAssert.php
      @@ -3,6 +3,7 @@
       namespace Drupal\Tests;
       
       use Behat\Mink\Exception\ExpectationException;
      +use Behat\Mink\Exception\ResponseTextException;
       use Behat\Mink\WebAssert as MinkWebAssert;
       use Behat\Mink\Element\TraversableElement;
       use Behat\Mink\Exception\ElementNotFoundException;
      @@ -545,4 +546,31 @@ class WebAssert extends MinkWebAssert {
           $this->assert(!preg_match($regex, $actual), $message);
         }
       
      +  /**
      +   * Checks that current page contains text only once.
      +   *
      +   * @param string $text
      +   *   The string to look for.
      +   *
      +   * @see \Behat\Mink\WebAssert::pageTextContains()
      +   */
      +  public function pageTextContainsOnce($text) {
      +    $actual = $this->session->getPage()->getText();
      +    $actual = preg_replace('/\s+/u', ' ', $actual);
      +    $regex = '/' . preg_quote($text, '/') . '/ui';
      +    $count = preg_match_all($regex, $actual);
      +    if ($count === 1) {
      +      return;
      +    }
      +
      +    if ($count > 1) {
      +      $message = sprintf('The text "%s" appears in the text of this page more than once, but it should not.', $text);
      +    }
      +    else {
      +      $message = sprintf('The text "%s" was not found anywhere in the text of the current page.', $text);
      +    }
      +
      +    throw new ResponseTextException($message, $this->session->getDriver());
      +  }
      +
       }
      diff --git a/web/core/themes/bartik/bartik.theme b/web/core/themes/bartik/bartik.theme
      index 1c408cf3c..76394c16a 100644
      --- a/web/core/themes/bartik/bartik.theme
      +++ b/web/core/themes/bartik/bartik.theme
      @@ -37,7 +37,7 @@ function bartik_preprocess_html(&$variables) {
       }
       
       /**
      - * Implements hook_preprocess_HOOK() for page templates.
      + * Implements hook_preprocess_HOOK() for page title templates.
        */
       function bartik_preprocess_page_title(&$variables) {
         // Since the title and the shortcut link are both block level elements,
      diff --git a/web/modules/contrib/webform/README.md b/web/modules/contrib/webform/README.md
      index 0c8c4040f..46e94cbe9 100644
      --- a/web/modules/contrib/webform/README.md
      +++ b/web/modules/contrib/webform/README.md
      @@ -58,18 +58,17 @@ The primary use case for this module is to:
       7. (optional) Install add-on contrib modules](/admin/structure/webform/addons).
       
       
      -### Releases
      +### Upgrading from pre-release versions
       
      -Even though the Webform module is still under active development with
      -regular [beta releases](https://www.drupal.org/documentation/version-info/alpha-beta-rc),
      -all existing configuration and submission data will be maintained and updated 
      -between releases.  **APIs can and will be changing** while this module moves 
      -from beta releases to a final release candidate. 
      +All existing configuration and submission data was maintained and updated 
      +through the beta and rc release cycles. 
      +**APIs have changed** during these release cycles. 
       
      -Simply put, if you install and use the Webform module out of the box AS-IS, 
      -you _should_ be okay. Once you start extending webforms with plugins, altering 
      -hooks, and overriding templates, you will need to read each release's 
      -notes and assume that _things will be changing_.
      +Simply put, if you installed and used the Webform module out of the box AS-IS, 
      +and now you want to upgrade to a full release, then 
      +you _should_ be okay. If you extended webforms with plugins, altered 
      +hooks, and overrode templates, you will need to read each release's 
      +notes and assume that _things have changed_.
       
       
       ### Project Status
      diff --git a/web/modules/contrib/webform/composer.json b/web/modules/contrib/webform/composer.json
      index a37325763..2cc121593 100644
      --- a/web/modules/contrib/webform/composer.json
      +++ b/web/modules/contrib/webform/composer.json
      @@ -32,7 +32,9 @@
         },
         "require-dev": {
           "drupal/address": "~1.4",
      +    "drupal/chosen": "~2.6",
           "drupal/jsonapi": "~2.0",
      +    "drupal/select2": "~1.1",
           "drupal/token": "~1.3"
         }
       }
      diff --git a/web/modules/contrib/webform/composer.libraries.json b/web/modules/contrib/webform/composer.libraries.json
      index 2e190c8ab..e52369c8b 100644
      --- a/web/modules/contrib/webform/composer.libraries.json
      +++ b/web/modules/contrib/webform/composer.libraries.json
      @@ -28,13 +28,13 @@
                   "type": "package",
                   "package": {
                       "name": "algolia/places",
      -                "version": "1.13.0",
      +                "version": "1.15.0",
                       "type": "drupal-library",
                       "extra": {
                           "installer-name": "algolia.places"
                       },
                       "dist": {
      -                    "url": "https://registry.npmjs.org/places.js/-/places.js-1.13.0.tgz",
      +                    "url": "https://registry.npmjs.org/places.js/-/places.js-1.15.0.tgz",
                           "type": "tar"
                       },
                       "require": {
      @@ -46,13 +46,13 @@
                   "type": "package",
                   "package": {
                       "name": "ckeditor/autogrow",
      -                "version": "4.10.0",
      +                "version": "4.10.1",
                       "type": "drupal-library",
                       "extra": {
                           "installer-name": "ckeditor.autogrow"
                       },
                       "dist": {
      -                    "url": "https://download.ckeditor.com/autogrow/releases/autogrow_4.10.0.zip",
      +                    "url": "https://download.ckeditor.com/autogrow/releases/autogrow_4.10.1.zip",
                           "type": "zip"
                       },
                       "require": {
      @@ -82,13 +82,13 @@
                   "type": "package",
                   "package": {
                       "name": "ckeditor/fakeobjects",
      -                "version": "4.10.0",
      +                "version": "4.10.1",
                       "type": "drupal-library",
                       "extra": {
                           "installer-name": "ckeditor.fakeobjects"
                       },
                       "dist": {
      -                    "url": "https://download.ckeditor.com/fakeobjects/releases/fakeobjects_4.10.0.zip",
      +                    "url": "https://download.ckeditor.com/fakeobjects/releases/fakeobjects_4.10.1.zip",
                           "type": "zip"
                       },
                       "require": {
      @@ -100,13 +100,13 @@
                   "type": "package",
                   "package": {
                       "name": "ckeditor/image",
      -                "version": "4.10.0",
      +                "version": "4.10.1",
                       "type": "drupal-library",
                       "extra": {
                           "installer-name": "ckeditor.image"
                       },
                       "dist": {
      -                    "url": "https://download.ckeditor.com/image/releases/image_4.10.0.zip",
      +                    "url": "https://download.ckeditor.com/image/releases/image_4.10.1.zip",
                           "type": "zip"
                       },
                       "require": {
      @@ -118,13 +118,13 @@
                   "type": "package",
                   "package": {
                       "name": "ckeditor/link",
      -                "version": "4.10.0",
      +                "version": "4.10.1",
                       "type": "drupal-library",
                       "extra": {
                           "installer-name": "ckeditor.link"
                       },
                       "dist": {
      -                    "url": "https://download.ckeditor.com/link/releases/link_4.10.0.zip",
      +                    "url": "https://download.ckeditor.com/link/releases/link_4.10.1.zip",
                           "type": "zip"
                       },
                       "require": {
      @@ -136,13 +136,13 @@
                   "type": "package",
                   "package": {
                       "name": "codemirror/codemirror",
      -                "version": "5.41.0",
      +                "version": "5.42.0",
                       "type": "drupal-library",
                       "extra": {
                           "installer-name": "codemirror"
                       },
                       "dist": {
      -                    "url": "https://github.com/components/codemirror/archive/5.41.0.zip",
      +                    "url": "https://github.com/components/codemirror/archive/5.42.0.zip",
                           "type": "zip"
                       },
                       "require": {
      @@ -244,13 +244,13 @@
                   "type": "package",
                   "package": {
                       "name": "jquery/inputmask",
      -                "version": "4.0.2",
      +                "version": "4.0.4",
                       "type": "drupal-library",
                       "extra": {
                           "installer-name": "jquery.inputmask"
                       },
                       "dist": {
      -                    "url": "https://github.com/RobinHerbots/jquery.inputmask/archive/4.0.2.zip",
      +                    "url": "https://github.com/RobinHerbots/jquery.inputmask/archive/4.0.4.zip",
                           "type": "zip"
                       },
                       "require": {
      @@ -262,13 +262,13 @@
                   "type": "package",
                   "package": {
                       "name": "jquery/intl-tel-input",
      -                "version": "14.0.4",
      +                "version": "14.0.6",
                       "type": "drupal-library",
                       "extra": {
                           "installer-name": "jquery.intl-tel-input"
                       },
                       "dist": {
      -                    "url": "https://github.com/jackocnr/intl-tel-input/archive/v14.0.4.zip",
      +                    "url": "https://github.com/jackocnr/intl-tel-input/archive/v14.0.6.zip",
                           "type": "zip"
                       },
                       "require": {
      @@ -404,20 +404,20 @@
               }
           },
           "require": {
      -        "algolia/places": "1.13.0",
      -        "ckeditor/autogrow": "4.10.0",
      +        "algolia/places": "1.15.0",
      +        "ckeditor/autogrow": "4.10.1",
               "ckeditor/codemirror": "v1.17.7",
      -        "ckeditor/fakeobjects": "4.10.0",
      -        "ckeditor/image": "4.10.0",
      -        "ckeditor/link": "4.10.0",
      -        "codemirror/codemirror": "5.41.0",
      +        "ckeditor/fakeobjects": "4.10.1",
      +        "ckeditor/image": "4.10.1",
      +        "ckeditor/link": "4.10.1",
      +        "codemirror/codemirror": "5.42.0",
               "jquery/chosen": "1.8.7",
               "jquery/geocomplete": "1.7.0",
               "jquery/hotkeys": "0.2.0",
               "jquery/icheck": "1.0.2 ",
               "jquery/image-picker": "0.3.0",
      -        "jquery/inputmask": "4.0.2",
      -        "jquery/intl-tel-input": "14.0.4",
      +        "jquery/inputmask": "4.0.4",
      +        "jquery/intl-tel-input": "14.0.6",
               "jquery/rateit": "1.1.1",
               "jquery/select2": "4.0.5",
               "jquery/textcounter": "0.8.0",
      diff --git a/web/modules/contrib/webform/config/install/webform.settings.yml b/web/modules/contrib/webform/config/install/webform.settings.yml
      index 947263364..36ac82b51 100644
      --- a/web/modules/contrib/webform/config/install/webform.settings.yml
      +++ b/web/modules/contrib/webform/config/install/webform.settings.yml
      @@ -24,6 +24,7 @@ settings:
           messages messages--error
           messages messages--warning
           messages messages--status
      +    
         button_classes: ''
         default_wizard_prev_button_label: '< Previous Page'
         default_wizard_next_button_label: 'Next Page >'
      @@ -47,16 +48,16 @@ settings:
         default_submission_views: {  }
         default_submission_views_replace:
           global_routes:
      -    - entity.webform_submission.collection
      -    - entity.webform_submission.user
      +      - entity.webform_submission.collection
      +      - entity.webform_submission.user
           webform_routes:
      -    - entity.webform.results_submissions
      -    - entity.webform.user.drafts
      -    - entity.webform.user.submissions
      +      - entity.webform.results_submissions
      +      - entity.webform.user.drafts
      +      - entity.webform.user.submissions
           node_routes:
      -    - entity.node.webform.results_submissions
      -    - entity.node.webform.user.drafts
      -    - entity.node.webform.user.submissions
      +      - entity.node.webform.results_submissions
      +      - entity.node.webform.user.drafts
      +      - entity.node.webform.user.submissions
         default_previous_submission_message: 'You have already submitted this webform. View your previous submission.'
         default_previous_submissions_message: 'You have already submitted this webform. View your previous submissions.'
         default_autofill_message: 'This submission has been autofilled with your previous submission.'
      @@ -64,12 +65,15 @@ settings:
           messages messages--error
           messages messages--warning
           messages messages--status
      +    
         confirmation_classes: |
           messages messages--error
           messages messages--warning
           messages messages--status
      +    
         confirmation_back_classes: |
           button
      +    
         default_limit_total_message: 'No more submissions are permitted.'
         default_limit_user_message: 'No more submissions are permitted.'
         dialog: false
      @@ -125,12 +129,14 @@ element:
           messages messages--error
           messages messages--warning
           messages messages--status
      +    
         classes: |
           container-inline clearfix
           form--inline clearfix
           messages messages--error
           messages messages--warning
           messages messages--status
      +    
         horizontal_rule_classes: |
           webform-horizontal-rule--solid
           webform-horizontal-rule--dashed
      @@ -141,6 +147,7 @@ element:
           webform-horizontal-rule--thick
           webform-horizontal-rule--flaired
           webform-horizontal-rule--glyph
      +    
         default_description_display: ''
         default_more_title: More
         default_section_title_tag: h2
      @@ -169,7 +176,7 @@ file:
         default_managed_file_extensions: 'gif jpg png bmp eps tif pict psd txt rtf html odf pdf doc docx ppt pptx xls xlsx xml avi mov mp3 ogg wav bz2 dmg gz jar rar sit svg tar zip'
         default_audio_file_extensions: 'mp3 ogg wav'
         default_document_file_extensions: 'txt rtf pdf doc docx odt ppt pptx odp xls xlsx ods'
      -  default_image_file_extensions: 'gif jpg png svg'
      +  default_image_file_extensions: 'gif jpg png'
         default_video_file_extensions: 'avi mov mp4 ogg wav webm'
         make_unused_managed_files_temporary: true
         delete_temporary_managed_files: true
      @@ -186,14 +193,16 @@ mail:
         default_body_text: |
           Submitted on [webform_submission:created]
           Submitted by: [webform_submission:user]
      -
      +    
           Submitted values are:
           [webform_submission:values]
      +    
         default_body_html: |
           

      Submitted on [webform_submission:created]

      Submitted by: [webform_submission:user]

      Submitted values are:

      [webform_submission:values] + roles: { } test: types: | @@ -236,6 +245,7 @@ test: webform_time: - '09:00' - '17:00' + names: | first_name: - 'John' @@ -275,6 +285,7 @@ test: - 'Loremipsum' - 'Oratione' - 'Dixisset' + ui: video_display: dialog details_save: true diff --git a/web/modules/contrib/webform/config/install/webform.webform.contact.yml b/web/modules/contrib/webform/config/install/webform.webform.contact.yml index 390ebbd95..bb88d5372 100644 --- a/web/modules/contrib/webform/config/install/webform.webform.contact.yml +++ b/web/modules/contrib/webform/config/install/webform.webform.contact.yml @@ -56,6 +56,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -188,6 +189,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: email_confirmation: id: email diff --git a/web/modules/contrib/webform/config/install/webform.webform_options.translations.yml b/web/modules/contrib/webform/config/install/webform.webform_options.translations.yml new file mode 100644 index 000000000..9f87b76f1 --- /dev/null +++ b/web/modules/contrib/webform/config/install/webform.webform_options.translations.yml @@ -0,0 +1,11 @@ +langcode: en +status: true +dependencies: + enforced: + module: + - webform +id: translations +label: Translations +category: Language +likert: false +options: '' diff --git a/web/modules/contrib/webform/config/schema/webform.action.schema.yml b/web/modules/contrib/webform/config/schema/webform.action.schema.yml index 0cf20edbd..4ebbd1505 100644 --- a/web/modules/contrib/webform/config/schema/webform.action.schema.yml +++ b/web/modules/contrib/webform/config/schema/webform.action.schema.yml @@ -1,19 +1,15 @@ action.configuration.webform_submission_delete_action: type: action_configuration_default label: 'Delete submission configuration' - action.configuration.webform_submission_make_sticky_action: type: action_configuration_default label: 'Star/Flag selected submission configuration' - action.configuration.webform_submission_make_unsticky_action: type: action_configuration_default label: 'Unstar/Unflag selected submission configuration' - action.configuration.webform_submission_make_lock_action: type: action_configuration_default label: 'Lock selected submission configuration' - action.configuration.webform_submission_make_unlock_action: type: action_configuration_default label: 'Unlock selected submission configuration' diff --git a/web/modules/contrib/webform/config/schema/webform.block.schema.yml b/web/modules/contrib/webform/config/schema/webform.block.schema.yml index 0487e28bc..ebe134522 100644 --- a/web/modules/contrib/webform/config/schema/webform.block.schema.yml +++ b/web/modules/contrib/webform/config/schema/webform.block.schema.yml @@ -4,26 +4,25 @@ block.settings.webform_block: mapping: webform_id: type: string - label: 'Webform' + label: Webform default_data: type: text label: 'Default webform submission data' redirect: type: boolean label: 'Redirect to the webform' - block.settings.webform_submission_limit_block: type: block_settings label: 'Webform submission limits block' mapping: type: type: text - label: 'Type' + label: Type source_entity: type: boolean label: 'Source entity' content: - label: 'Content' + label: Content type: text progress_bar: type: boolean @@ -36,7 +35,7 @@ block.settings.webform_submission_limit_block: label: 'Progress bar message' webform_id: type: string - label: 'Webform' + label: Webform entity_type: type: string label: 'Source entity type' diff --git a/web/modules/contrib/webform/config/schema/webform.entity.webform.schema.yml b/web/modules/contrib/webform/config/schema/webform.entity.webform.schema.yml index 1403c8a88..804ebdb13 100644 --- a/web/modules/contrib/webform/config/schema/webform.entity.webform.schema.yml +++ b/web/modules/contrib/webform/config/schema/webform.entity.webform.schema.yml @@ -1,13 +1,13 @@ -webform.webform.*: +'webform.webform.*': type: config_entity - label: 'Webforms' + label: Webforms mapping: status: type: string - label: 'Status' + label: Status weight: type: integer - label: 'Weight' + label: Weight open: type: string label: 'Open date/time' @@ -16,25 +16,25 @@ webform.webform.*: label: 'Close date/time' uid: type: integer - label: 'Author' + label: Author template: type: boolean - label: 'Template' + label: Template archive: type: boolean - label: 'Archive' + label: Archive id: type: string label: 'Machine name' title: type: label - label: 'Title' + label: Title description: type: label label: 'Administrative description' category: type: label - label: 'Category' + label: Category elements: type: text label: 'Elements (YAML)' @@ -43,12 +43,10 @@ webform.webform.*: label: 'CSS (Cascading Style Sheets)' javascript: type: string - label: 'JavaScript' + label: JavaScript settings: type: mapping - label: 'Settings' - # Below mapping is copied to: webform.handler.settings - #@see webform.plugin.handler.schema.yml + label: Settings mapping: ajax: type: boolean @@ -89,6 +87,9 @@ webform.webform.*: form_confidential_message: type: text label: 'Form confidential message' + form_remote_addr: + type: boolean + label: 'Track user IP address' form_convert_anonymous: type: boolean label: 'Convert anonymous drafts and submissions to authenticated' @@ -127,7 +128,7 @@ webform.webform.*: label: 'Display required indicator' form_autofocus: type: boolean - label: 'Autofocus' + label: Autofocus form_details_toggle: type: boolean label: 'Display collapse/expand all details link' @@ -178,11 +179,11 @@ webform.webform.*: label: 'Submission views' sequence: type: mapping - label: 'Submission view' + label: 'Submission view' mapping: title: type: text - label: 'Title' + label: Title view: type: string label: 'View name / Display ID' @@ -191,13 +192,13 @@ webform.webform.*: label: 'Apply to webform' sequence: type: string - label: 'Route' + label: Route node_routes: type: sequence label: 'Apply to node' sequence: type: string - label: 'Route' + label: Route submission_views_replace: type: mapping label: 'Submission view replace' @@ -207,19 +208,19 @@ webform.webform.*: label: 'Replace to global' sequence: type: string - label: 'Route' + label: Route webform_routes: type: sequence label: 'Replace to webform' sequence: type: string - label: 'Route' + label: Route node_routes: type: sequence label: 'Replace to node' sequence: type: string - label: 'Route' + label: Route submission_user_columns: type: sequence label: 'Submission user columns' @@ -417,26 +418,26 @@ webform.webform.*: label: 'Access Rules' sequence: type: mapping - label: 'Access Rule' + label: 'Access Rule' mapping: roles: type: sequence - label: 'Roles' + label: Roles sequence: type: string - label: 'Role' + label: Role users: type: sequence - label: 'Users' + label: Users sequence: type: integer label: 'User IDs' permissions: type: sequence - label: 'Permissions' + label: Permissions sequence: type: string - label: 'Permission' + label: Permission handlers: type: sequence label: 'Webform handlers' @@ -451,20 +452,20 @@ webform.webform.*: label: 'Handler instance ID' label: type: label - label: 'Label' + label: Label status: type: boolean - label: 'Status' + label: Status conditions: type: ignore label: 'Conditional logic' weight: type: integer - label: 'Weight' + label: Weight settings: - type: webform.handler.[%parent.id] + type: 'webform.handler.[%parent.id]' third_party_settings: type: sequence label: 'Third party settings' sequence: - type: webform.settings.third_party.[%key] + type: 'webform.settings.third_party.[%key]' diff --git a/web/modules/contrib/webform/config/schema/webform.entity.webform_options.schema.yml b/web/modules/contrib/webform/config/schema/webform.entity.webform_options.schema.yml index cee99cc44..9973faf29 100644 --- a/web/modules/contrib/webform/config/schema/webform.entity.webform_options.schema.yml +++ b/web/modules/contrib/webform/config/schema/webform.entity.webform_options.schema.yml @@ -1,16 +1,16 @@ -webform.webform_options.*: +'webform.webform_options.*': type: config_entity - label: 'Options' + label: Options mapping: id: type: string label: 'Machine name' label: type: label - label: 'Label' + label: Label category: type: label - label: 'Category' + label: Category likert: type: boolean label: 'Use as Likert' diff --git a/web/modules/contrib/webform/config/schema/webform.field.schema.yml b/web/modules/contrib/webform/config/schema/webform.field.schema.yml index 0d7429b7c..a93d445fa 100644 --- a/web/modules/contrib/webform/config/schema/webform.field.schema.yml +++ b/web/modules/contrib/webform/config/schema/webform.field.schema.yml @@ -5,7 +5,6 @@ field.storage_settings.webform: target_type: type: string label: 'Type of item to reference' - base_webform_field_field_settings: type: mapping mapping: @@ -13,9 +12,8 @@ base_webform_field_field_settings: type: string label: 'Reference method' handler_settings: - type: entity_reference_selection.[%parent.handler] + type: 'entity_reference_selection.[%parent.handler]' label: 'Entity reference selection settings' - field.field_settings.webform: type: base_webform_field_field_settings label: 'Webform settings' @@ -32,7 +30,6 @@ field.field_settings.webform: close: type: string label: 'Webform close date/time' - field.widget.settings.webform_entity_reference_autocomplete: type: mapping label: 'Webform autocomplete display format settings' @@ -45,11 +42,10 @@ field.widget.settings.webform_entity_reference_autocomplete: label: 'Size of textfield' placeholder: type: label - label: 'Placeholder' + label: Placeholder default_data: type: boolean label: 'Default submission data' - field.widget.settings.webform_entity_reference_select: type: mapping label: 'Webform select display format settings' @@ -57,7 +53,6 @@ field.widget.settings.webform_entity_reference_select: default_data: type: boolean label: 'Default submission data' - field.formatter.settings.webform_entity_reference_entity_view: type: mapping label: 'Display the referenced webform with default submission data.' @@ -65,7 +60,6 @@ field.formatter.settings.webform_entity_reference_entity_view: source_entity: type: boolean label: 'Source entity' - field.formatter.settings.webform_entity_reference_link: type: mapping label: 'Display the referenced webform as a link.' diff --git a/web/modules/contrib/webform/config/schema/webform.plugin.exporter.schema.yml b/web/modules/contrib/webform/config/schema/webform.plugin.exporter.schema.yml index 742724c9a..3098fbe51 100644 --- a/web/modules/contrib/webform/config/schema/webform.plugin.exporter.schema.yml +++ b/web/modules/contrib/webform/config/schema/webform.plugin.exporter.schema.yml @@ -1,11 +1,10 @@ -webform.exporter.*: +'webform.exporter.*': type: mapping label: 'Exporter settings' - webform.exporter.delimited_text: type: mapping - label: 'Delimiter' + label: Delimiter mapping: delimiter: type: string - label: 'Delimiter' + label: Delimiter diff --git a/web/modules/contrib/webform/config/schema/webform.plugin.handler.schema.yml b/web/modules/contrib/webform/config/schema/webform.plugin.handler.schema.yml index 14ce42a22..35130ebda 100644 --- a/web/modules/contrib/webform/config/schema/webform.plugin.handler.schema.yml +++ b/web/modules/contrib/webform/config/schema/webform.plugin.handler.schema.yml @@ -1,31 +1,30 @@ -webform.handler.*: +'webform.handler.*': type: mapping label: 'Handler settings' - webform.handler.action: type: mapping - label: 'Action' + label: Action mapping: states: type: sequence - label: 'States' + label: States sequence: type: string - label: 'State' + label: State notes: - label: 'Notes' + label: Notes type: text sticky: - label: 'Flag' + label: Flag type: boolean locked: - label: 'Locked' + label: Locked type: boolean data: - label: 'Data' + label: Data type: text message: - label: 'Message' + label: Message type: text message_type: label: 'Message type' @@ -33,22 +32,20 @@ webform.handler.action: debug: type: boolean label: 'Enable debugging' - webform.handler.log: type: mapping - label: 'Log' + label: Log mapping: { } - webform.handler.email: type: mapping - label: 'Email' + label: Email mapping: states: type: sequence - label: 'States' + label: States sequence: type: string - label: 'State' + label: State to_mail: label: 'Email to address' type: email @@ -111,29 +108,28 @@ webform.handler.email: label: 'Exclude unselected checkboxes' html: type: boolean - label: 'HTML' + label: HTML attachments: type: boolean - label: 'Attachments' + label: Attachments twig: type: boolean - label: 'Twig' + label: Twig theme_name: type: string label: 'Theme name' debug: type: boolean label: 'Enable debugging' - webform.handler.remote_post: type: mapping label: 'Remote Post' mapping: method: - label: 'Method' + label: Method type: string type: - label: 'Type' + label: Type type: string excluded_data: type: sequence @@ -188,7 +184,7 @@ webform.handler.remote_post: type: sequence sequence: type: mapping - label: 'Message' + label: Message mapping: code: type: integer @@ -196,18 +192,13 @@ webform.handler.remote_post: message: type: text label: 'Response message' - webform.handler.settings: type: mapping - label: 'Settings' + label: Settings mapping: debug: type: string label: 'Enable debugging' - # Below mapping is copied from: webform.webform.* - # @see webform.entity.webform.schema.yml - # NOTE: 'type: boolean' is changed to 'type: string - # NOTE: 'type: integer' is changed to 'type: string ajax: type: string label: 'Use Ajax' @@ -282,7 +273,7 @@ webform.handler.settings: label: 'Display required indicator' form_autofocus: type: string - label: 'Autofocus' + label: Autofocus form_details_toggle: type: string label: 'Display collapse/expand all details link' @@ -318,11 +309,11 @@ webform.handler.settings: label: 'Submission views' sequence: type: mapping - label: 'Submission view' + label: 'Submission view' mapping: title: type: text - label: 'Title' + label: Title view: type: string label: 'View name / Display ID' @@ -331,13 +322,13 @@ webform.handler.settings: label: 'Apply to webform' sequence: type: string - label: 'Route' + label: Route node_routes: type: sequence label: 'Apply to node' sequence: type: string - label: 'Route' + label: Route submission_views_replace: type: mapping label: 'Submission view replace' @@ -347,19 +338,19 @@ webform.handler.settings: label: 'Replace to global' sequence: type: string - label: 'Route' + label: Route webform_routes: type: sequence label: 'Replace to webform' sequence: type: string - label: 'Route' + label: Route node_routes: type: sequence label: 'Replace to node' sequence: type: string - label: 'Route' + label: Route submission_user_columns: type: sequence label: 'Submission user columns' diff --git a/web/modules/contrib/webform/config/schema/webform.settings.schema.yml b/web/modules/contrib/webform/config/schema/webform.settings.schema.yml index 6be72ae18..f39bf73a3 100644 --- a/web/modules/contrib/webform/config/schema/webform.settings.schema.yml +++ b/web/modules/contrib/webform/config/schema/webform.settings.schema.yml @@ -122,11 +122,11 @@ webform.settings: label: 'Default submission views' sequence: type: mapping - label: 'Submission view' + label: 'Submission view' mapping: title: type: text - label: 'Title' + label: Title view: type: string label: 'View name / Display ID' @@ -135,19 +135,19 @@ webform.settings: label: 'Apply to global' sequence: type: string - label: 'Route' + label: Route webform_routes: type: sequence label: 'Apply to webform' sequence: type: string - label: 'Route' + label: Route node_routes: type: sequence label: 'Apply to node' sequence: type: string - label: 'Route' + label: Route default_submission_views_replace: type: mapping label: 'Default submission view replace' @@ -157,19 +157,19 @@ webform.settings: label: 'Replace to global' sequence: type: string - label: 'Route' + label: Route webform_routes: type: sequence label: 'Replace to webform' sequence: type: string - label: 'Route' + label: Route node_routes: type: sequence label: 'Replace to node' sequence: type: string - label: 'Route' + label: Route default_submission_access_denied_message: type: text label: 'Default submission access denied message' @@ -234,7 +234,7 @@ webform.settings: label: 'CSS (Cascading Style Sheets)' javascript: type: string - label: 'JavaScript' + label: JavaScript element: type: mapping label: 'Element default settings' @@ -382,10 +382,10 @@ webform.settings: label: 'Default email body (HTML)' roles: type: sequence - label: 'Roles' + label: Roles sequence: type: string - label: 'Role' + label: Role export: type: mapping label: 'Export default settings' @@ -527,7 +527,7 @@ webform.settings: label: 'Use CDN' requirements: type: mapping - label: 'Requirements' + label: Requirements mapping: cdn: type: boolean @@ -540,7 +540,7 @@ webform.settings: label: 'Check if SPAM protection module is installed' contribute: type: mapping - label: 'Contribute' + label: Contribute mapping: account_type: type: string @@ -552,4 +552,4 @@ webform.settings: type: sequence label: 'Third party settings' sequence: - type: webform.admin_settings.third_party.[%key] + type: 'webform.admin_settings.third_party.[%key]' diff --git a/web/modules/contrib/webform/config/schema/webform.third_party.honeypot.schema.yml b/web/modules/contrib/webform/config/schema/webform.third_party.honeypot.schema.yml index a85d6cdde..915c657ef 100644 --- a/web/modules/contrib/webform/config/schema/webform.third_party.honeypot.schema.yml +++ b/web/modules/contrib/webform/config/schema/webform.third_party.honeypot.schema.yml @@ -8,7 +8,6 @@ webform.admin_settings.third_party.honeypot: time_restriction: type: boolean label: 'Add time limit to all webforms' - webform.settings.third_party.honeypot: type: mapping label: 'Webform test third party settings' diff --git a/web/modules/contrib/webform/css/webform.element.date.css b/web/modules/contrib/webform/css/webform.element.date.css new file mode 100644 index 000000000..f51802f1d --- /dev/null +++ b/web/modules/contrib/webform/css/webform.element.date.css @@ -0,0 +1,8 @@ +/** + * @file + * Element date styles. + */ + +.ui-datepicker-trigger { + margin: 0 2px; +} diff --git a/web/modules/contrib/webform/css/webform.element.datelist.css b/web/modules/contrib/webform/css/webform.element.datelist.css new file mode 100644 index 000000000..8381b151a --- /dev/null +++ b/web/modules/contrib/webform/css/webform.element.datelist.css @@ -0,0 +1,8 @@ +/** + * @file + * Element datelist styles. + */ + +.form-type-datelist input[type="text"] { + max-width: 5em; +} diff --git a/web/modules/contrib/webform/css/webform.element.image_file.css b/web/modules/contrib/webform/css/webform.element.image_file.css index 99bd1abbc..fcbe0d2f0 100644 --- a/web/modules/contrib/webform/css/webform.element.image_file.css +++ b/web/modules/contrib/webform/css/webform.element.image_file.css @@ -9,3 +9,7 @@ img.webform-image-file { max-width: 100%; height: auto; } + +.webform-image-file-modal img { + display: block; +} diff --git a/web/modules/contrib/webform/css/webform.element.managed_file.css b/web/modules/contrib/webform/css/webform.element.managed_file.css new file mode 100644 index 000000000..6e1e890de --- /dev/null +++ b/web/modules/contrib/webform/css/webform.element.managed_file.css @@ -0,0 +1,30 @@ +/** + * @file + * Managed file styles. + */ + +.webform-managed-file-preview-wrapper + input[type="submit"], +.webform-managed-file-preview-wrapper + button, +.webform-managed-file-preview + input[type="submit"], +.webform-managed-file-preview + button { + margin: .5em 0; +} + +.webform-managed-file-preview-wrapper, +.webform-managed-file-preview-wrapper.form-item { + display: table; + border: 1px solid #ccc; + padding: .5em; +} + +.webform-managed-file-preview, +label.webform-managed-file-preview, +label.option.webform-managed-file-preview { + display: block; +} + +.webform-managed-file-placeholder, +.webform-managed-file-preview, +.webform-file-button { + margin: .5em 0; +} diff --git a/web/modules/contrib/webform/css/webform.element.states.css b/web/modules/contrib/webform/css/webform.element.states.css index a6c1a54bc..ea79b60d2 100644 --- a/web/modules/contrib/webform/css/webform.element.states.css +++ b/web/modules/contrib/webform/css/webform.element.states.css @@ -65,3 +65,14 @@ tr.webform-states-table--state td select { .webform-states-table .tabledrag-changed { display: none !important; /* Must use !important because .tabledrag-changed 'display' is set via JavaScript */ } + +/** + * Limit results in jQuery UI Autocomplete + * + * https://stackoverflow.com/questions/7617373/limit-results-in-jquery-ui-autocomplete + */ +.ui-autocomplete { + max-height: 200px; + overflow-y: auto; + overflow-x: hidden; +} diff --git a/web/modules/contrib/webform/css/webform.element.video_file.css b/web/modules/contrib/webform/css/webform.element.video_file.css index 3c59d6b55..ea34d87d2 100644 --- a/web/modules/contrib/webform/css/webform.element.video_file.css +++ b/web/modules/contrib/webform/css/webform.element.video_file.css @@ -5,17 +5,7 @@ * @see /webform/test_element_media_file */ -.webform-video-file { - position: relative; - max-width: 640px; - height: 0; - padding-bottom: 56.25%; -} - .webform-video-file video { - position: absolute; - top: 0; - left: 0; width: 100%; - height: 100%; + height: auto; } diff --git a/web/modules/contrib/webform/css/webform.theme.seven.css b/web/modules/contrib/webform/css/webform.theme.seven.css index 3370cf9de..d499c211e 100644 --- a/web/modules/contrib/webform/css/webform.theme.seven.css +++ b/web/modules/contrib/webform/css/webform.theme.seven.css @@ -49,18 +49,28 @@ code { } /* Add yellow background to tooltips and tabs */ +/* @see core/assets/vendor/jquery.ui/themes/base/tabs.css */ .ui-tooltip.ui-widget { background: #fe6;; border: 1px solid #ed5; } +.webform-tabs .ui-tabs-nav .ui-tabs-anchor { + text-decoration: inherit; +} + .webform-tabs .ui-tabs-active.ui-state-active { background: #fe6; border: 1px solid #ed5; + text-decoration: none; } -.webform-tabs .ui-tabs-active.ui-state-active.ui-state-focus a { - text-decoration: underline; +.webform-tabs .ui-state-hover { + text-decoration: underline !important; +} + +.webform-tabs .ui-state-active.ui-state-hover { + text-decoration: none !important; } /** Compress tabs for mobile */ @@ -137,6 +147,27 @@ pre.webform-codemirror-runmode { margin: 1em 0; } +/* jQuery UI autocomplete states */ +.ui-autocomplete a /* For filter autocomplete. */, +.ui-autocomplete .ui-menu-item-wrapper /* For #states value autocomplete. */ { + display: block; + border: 1px solid transparent; + color: #0074bd; +} + +.ui-autocomplete a.ui-state-hover, +.ui-autocomplete a.ui-state-active, +.ui-autocomplete a.ui-state-focus, +.ui-autocomplete .ui-menu-item-wrapper.ui-state-hover, +.ui-autocomplete .ui-menu-item-wrapper.ui-state-active, +.ui-autocomplete .ui-menu-item-wrapper.ui-state-focus { + text-decoration: underline; + color: #0074bd; + background: #fe6; + border: solid 1px #ed5; + margin: 0; +} + /* jQuery UI button states */ .webform-buttons .ui-button.ui-state-default { background: #f5f5f2; @@ -179,7 +210,6 @@ pre.webform-codemirror-runmode { text-decoration: underline; } - /* Token tree */ .token-tree ul { margin: 0; diff --git a/web/modules/contrib/webform/docs/DEVELOPMENT-CHEATSHEET.md b/web/modules/contrib/webform/docs/DEVELOPMENT-CHEATSHEET.md index 648a3580e..064a9dc17 100644 --- a/web/modules/contrib/webform/docs/DEVELOPMENT-CHEATSHEET.md +++ b/web/modules/contrib/webform/docs/DEVELOPMENT-CHEATSHEET.md @@ -43,7 +43,7 @@ git push git branch -D [issue-number]-[issue-description] git push origin :[issue-number]-[issue-description] -# Delete remove branch +# Delete remote branch git push origin --delete [issue-number]-[issue-description] ``` @@ -130,6 +130,7 @@ drush en -y webform\ webform_test_handler\ webform_test_handler_remote_post\ webform_test_options\ + webform_test_paragraphs\ webform_test_rest\ webform_test_submissions\ webform_test_translation\ diff --git a/web/modules/contrib/webform/docs/FEATURES.md b/web/modules/contrib/webform/docs/FEATURES.md index bcae5f1d3..58fe250be 100644 --- a/web/modules/contrib/webform/docs/FEATURES.md +++ b/web/modules/contrib/webform/docs/FEATURES.md @@ -1,219 +1,460 @@ Features -------- -## Form Builder -
      - -Form Builder - +
      +The Webform module provides all the features expected from an enterprise +proprietary form builder combined with the flexibility and openness of Drupal +
      + +The Webform module allows you to build any type of form that can collect any +type of data, which can be submitted to any application or system. +Every single behavior and aspect of your forms and its inputs are customizable. +Whether you need a multi-page form containing a multi-column input layout with +conditional logic or a simple contact form that pushes data to a SalesForce/CRM, + it is all possible using the Webform module for Drupal 8. + +Drupal and the Webform module strives to be fully accessible to all users and +site builders. Assistive technologies, including screen readers and +keyboard access, are fully supported. + +Besides being a feature rich form builder, the Webform module is part of the +Drupal project's ecosystem and community. + +
      +The Drupal project is open source software. +Anyone can download, use, work on, and share it with others. +It's built on principles like collaboration, globalism, and innovation. +It's distributed under the terms of the GNU General Public License (GPL). +There are no licensing fees, ever. Drupal (and Webform) will always be free. +
      + +
      +
+ + + + +
▶ Watch videoTry Webform
-The Webform module provides an intuitive webform builder based upon Drupal 8's -best practices for user interface and user experience. The webform builder allows non-technical users to easily build and maintain webforms. +
+ +## Form manager + + + + + + +
+ +The form manager provides a list of all available webforms. + +Form manager features include: + +- Filtering by keyword, category, and status +- Sorting by total number of submissions +- Archiving of old forms + +## Form builder + + + + + + +
+ +The Webform module provides an intuitive form builder based upon Drupal 8's +best practices for user interface design and user experience. +The form builder allows non-technical users to easily build +and maintain webforms. Form builder features include: -- Drag-n-drop webform element management -- Generation of test submissions -- Duplication of existing webforms, templates, and elements +- Drag-n-drop form element management +- Multi-column layout management +- Conditional logic overview +- Element duplication + +## Configuration settings + +Form behaviors, features, submission handling, messaging, and confirmations are completely customizable using global settings and/or form-specific settings. + + + + + + +
+ +### General settings + +Allow a webform's administrative information, paths, behaviors, and third-party settings to be customized. + +General settings include: + +- Categorization +- Customizable paths +- Disable saving of results +- Ajax support + +### Form settings + +Allow a form's status, attributes, behaviors, labels, messages, wizard settings, +and preview to be customized. + +Form settings include: + +- Open and close date/time scheduling +- Login redirection with custom messaging. +- Multiple step wizard forms +- Submission preview +- Input prepopulation using query string parameters. + + + + + + +
+ +### Submissions settings + +Allows a submission's labels, behaviors, limits, and draft settings to be +customized. + +Submission settings include: + +- Saving of drafts +- Automatic purging of submissions +- Submission limits per user and/or per form +- Autofilling form using previously submitted values + +### Confirmation settings + +Allows the form's confirmation type, message, and URL to be customized. + +Confirmation types include: + +- Dedicated page +- Redirect to internal or external URL +- Displaying of a custom status message +- Opening a modal dialog + + + + + + +
-## Form Settings +### Emails / Handlers -
- -Form Settings - -
- -Form submission handling, messaging, and confirmations are completely -customizable using global settings and/or form-specific settings. - -Form settings that can be customized include: - -- Messages and button labels -- Confirmation page, messages, and redirects -- Saving drafts -- Previewing submissions -- Confidential submissions -- Prepopulating a webform's elements using query string parameters -- Preventing duplicate submissions -- Disabling back button -- Warning users about unsaved changes -- Disabling client-side validation -- Limiting number of submission per user, per webform, and/or per node -- Look-n-feel of webform, confirmation page, and buttons -- Injection webform specific CSS and JavaScript - - -## Elements - -
- -Elements - -
- -The Webform module is built directly on top of Drupal 8's Form API. Every -[form element](https://api.drupal.org/api/drupal/developer!topics!forms_api_reference.html/8) -available in Drupal 8 is supported by the Webform module. - -Form elements include: - -- **HTML:** Textfield, Textareas, Checkboxes, Radios, Select menu, - Password, and more… -- **HTML5:** Email, Url, Number, Telephone, Date, Number, Range, - and more… -- **Drupal specific** File uploads, Entity References, Table select, Date list, - and more… -- **Custom:** [Likert scale](https://en.wikipedia.org/wiki/Likert_scale), - Star rating, Toggle, Buttons, Geolocation, - Select/Checkboxes/Radios with other, and more… -- **Markups** Inline dismissable messages, HTML Markup, Details, and Fieldsets. -- **Composite elements:** Name, Address, and Contact - - -## Element Settings - -
- -Element Settings - -
- -All of Drupal 8's default webform element properties and behaviors are supported. -There are also several custom webform element properties and settings -available to enhance a webform element's behavior. - -Standard and custom properties allow for: - -- **Customizable required error messages** -- **Conditional logic** using [FAPI States API](https://api.drupal.org/api/examples/form_example%21form_example_states.inc/function/form_example_states_form/7) -- **Input masks** (using [jquery.inputmask](https://github.com/RobinHerbots/jquery.inputmask)) -- **[Select2](https://select2.github.io/)** replacement of select boxes -- **Word and character counting** for text elements -- **Help popup** (using [jQuery UI Tooltip](https://jqueryui.com/tooltip/)) -- **Regular expression pattern validation** -- **Private** elements, visible only to administrators -- **Unique** values per element - - -## Viewing Source - -
- -Viewing Source - -
- -At the heart of a Webform module's webform elements is a Drupal render array, -which can be edited and managed by developers. The Drupal render array gives developers -complete control over a webform's elements, layout, and look-and-feel by -allowing developers to make bulk updates to a webform's label, descriptions, and -behaviors. - - -## States/Conditional Logic - -
- -States/Conditional Logic - -
- -Drupal's State API can be used by developers to provide conditional logic to -hide and show webform elements. - -Drupal's State API supports: - -- Show/Hide -- Open/Close -- Enable/Disable - - -## Multistep Forms - -
- -Multistep Forms - -
- -Forms can be broken up into multiple pages using a progress bar. Authenticated -users can save drafts and/or have their changes automatically saved as they -progress through a long webform. - -Multistep webform features include: - -- Customizable progress bar -- Customizable previous and next button labels and styles -- Saving drafts between steps - - -## Email & Remote Post Handlers - -
- -Email/Handlers - -
- -Upon webform submission, customizable email notifications and confirmations can -be sent to users and administrators. - -An extendable plugin that allows developers to push submitted data -to external or internal systems and/or applications is provided. +Allows additional actions and behaviors to be processed when a webform or +submission is created, updated, or deleted. Handlers are used to route +submitted data to external applications and send notifications & confirmations. Email support features include: - Previewing and resending emails - Sending HTML emails -- File attachments (requires the [Mail System](https://www.drupal.org/project/mailsystem) and [Swift Mailer](https://www.drupal.org/project/swiftmailer) module.) +- File attachments (requires the Mail System and Swift Mailer module.) - HTML and plain-text email-friendly Twig templates -- Customizable display formats for individual webform elements +- Customizable display formats for individual form elements Remote post features include: - -- Posting selected elements to remote server +- Posting selected elements to a remote server - Adding custom parameters to remote post requests + + + + + +
-## Results Management +### CSS/JS assets -
- -Results Management - -
+The CSS/JS assets page allows site builders to attach custom CSS and JavaScript +to a webform. Custom CSS can be used to make simple layout or design tweaks +to a form. Custom JavaScript allows additional conditional logic and +behaviors to be added to a form. -Form submissions can optionally be stored in the database, reviewed, and -downloaded. +### Access settings -Submissions can also be flagged with administrative notes. +Allows an administrator to determine who can administer a webform and/or create, +update, delete, and purge webform submissions. + +## Elements + + + + + + +
+ +The Webform module is built directly on top of Drupal 8's Form API. +Every form element available in Drupal 8 is supported by the Webform module. + +Form elements include: + +- **Basic HTML**: Textfield, Textareas, Checkboxes, Radios, Select menu, Password, and more... +- **Advanced HTML5**: Email, Url, Number, Telephone, Date, Number, Range, and more... +- **Advanced Drupal**: File uploads, Entity References, Table select, Date list, and more... +- **Widgets**: Likert scale, Star rating, Buttons, Geolocation, Terms of service, Select/Checkboxes/Radios with other, and more... +- **Markup**: Dismissible messages, Basic HTML, Advanced HTML, Details, and Fieldsets. +- **Composites**: Name, Address, Contact, Credit Card, and event custom composites +- **Computed**: Calculated values using Tokens and Twig with Ajax support. + +### Element settings + +All of Drupal 8's default form element properties and behaviors are supported. +There are also several custom webform element properties and settings available +to enhance a form element's behavior. + +Standard and custom properties allow for: + +- Customizable error validation messages +- Conditional logic using [FAPI States API](https://api.drupal.org/api/examples/form_example%21form_example_states.inc/function/form_example_states_form/7) +- Input masks (using [jquery.inputmask](https://github.com/RobinHerbots/jquery.inputmask)) +- [Select2](https://select2.github.io/) or [Chosen](https://harvesthq.github.io/chosen/) replacement of select boxes +- Word and character counting for text elements +- Help tooltips (using [jQuery UI Tooltip](https://jqueryui.com/tooltip/)) +- More information slideouts +- Regular expression pattern validation +- Private elements, visible only to administrators +- Unique values per element + + + + + + +
+ +### States/Conditional logic + +Drupal's State API can be used by developers to provide conditional logic +to hide and show form elements. + +Drupal's State API supports: + +- Show/Hide +- Required/Optional +- Open/Close +- Enable/Disable + +### Viewing source + +At the heart of a Webform module's form elements is a Drupal +[render array](https://www.drupal.org/docs/8/api/render-api/render-arrays), +which can be edited and managed by developers. The Drupal render array +gives developers complete control over a webform's elements, layout, +and look-and-feel by allowing developers to make bulk updates +to a webform's label, descriptions, and behaviors. + +## Forms + + + + + + +
+ +### Accessibility + +The outputted forms and even the Webform module's administrative interface +(i.e. form builder) are accessible using keyboard navigation and screen readers. +The Webform module complies with [WCAG 2.0](http://www.w3.org/TR/WCAG20/#contents) +and [ATAG 2.0](http://www.w3.org/TR/ATAG20/#contents) guidelines. + +### Multistep form + +Forms can be broken up into multiple pages using a progress bar. +Authenticated users can save drafts and/or have their changes automatically +saved as they progress through a long form. + +Multistep form features include: + +- Customizable progress bar +- Customizable previous and next button labels and styles +- Saving drafts between steps + +### Drupal integration​ + + + + + + +
+ +Webforms can be attached to nodes or displayed as blocks. +Webforms can also have dedicated SEO-friendly URLs. +Form elements are render arrays that can easily be altered using +custom hooks and/or plugins. + +## Results management + + + + + + +
+ +Form submissions can optionally be stored in the database, reviewed, +and downloaded. Submissions can also be flagged with administrative notes. Results management features include: -- Flagging -- Administrative notes +- Submission flagging, locking, and notes - Viewing submissions as HTML, plain text, and YAML - Customizable reports - Downloading results as a CSV to Google Sheets or MS Excel - Saving of download preferences per form -- Automatically purging old submissions based on certain criteria +- [Drupal Views](https://www.drupal.org/docs/8/core/modules/views) integration +for advanced reporting. +## Access controls -## Access Controls + + + + + +
-
- -Access Controls - -
- -The Webform module provides full access controls for managing who can create -forms, post submissions, and access a webform's results. -Access controls can be applied to roles and/or specific users. +The Webform module provides full access controls and permissions for managing +who can create forms, post submissions, and access a webform's results. +Access controls can be applied to roles and/or specific users. +The Webform access submodule allows you to even setup reusable permission +groups which can be applied to multiple instances of the same webform. Access controls allow users to: @@ -226,162 +467,173 @@ Access controls allow users to: - View selected elements - Update selected elements +## Reusable templates -## Reusable Templates + + + + + +
-
- -Reusable Templates - -
- -The Webform module provides a few starter templates and multiple example forms -which webform administrators can update or use to create new reusable templates -for their organization. +The Webform module provides a few starter templates and multiple example +forms which webform administrators can update or use to create new +reusable templates for their organization. Starter templates include: -- Contact Us +- Contact Us - Donation - Employee Evaluation - Issue -- Job Application +- Job Application - Job Seeker Profile - Registration - Session Evaluation - Subscribe - User Profile -Example webforms include: +## Reusable options -- Elements -- Basic layout -- Flexbox layout -- Input masks -- Options -- Wizard + + + + + +
-## Reusable Options - -
- -Reusable Options - -
- -Administrators can define reusable global options for select menus, checkboxes, -and radio buttons. The Webform module includes default options for states, -countries, [likert](https://en.wikipedia.org/wiki/Likert_scale) answers, -and more. +Administrators can define reusable global options for select menus, checkboxes, +and radio buttons. The Webform module includes default options for states, +countries, demographics, likert answers, and more. Reusable options include: -- Country codes & names -- Days, Months, Time zones -- Education, Employment status, Ethnicity, Industry, Languages, Marital status, Relationship, Size, and Titles -- Likert agreement, comparison, importance, quality, satisfaction, ten scale, and - would you -- State/province codes & names -- State codes & names +- **Geographic**: Languages, country, and states +- **Date and time**: Days, months, and time zones +- **Demographic**: Education, employment status, ethnicity, Industry, +languages, marital status, relationship, size, and job titles +- **Likert**: Agreement, comparison, importance, quality, satisfaction, +ten scale, and would you ## Internationalization - -
- -Internationalization - -
-Forms and configuration can be translated into multiple languages using Drupal's -configuration translation system. +Forms and configuration can be translated into multiple languages using +Drupal's [configuration translation system](https://www.drupal.org/docs/8/core/modules/config-translation. +## Add-ons -## Drupal Integration + + + + + +
-
- -Drupal Integration - -
+There are [dozens of add-ons available](https://www.drupal.org/node/2837065) +that extend and/or provide additional functionality to the Webform module +and Drupal's Form API. -Forms can be attached to nodes or displayed as blocks. Webforms can also have -dedicated SEO-friendly URLs. Webform elements are simply render arrays that can -easily be altered using custom hooks and/or plugins. +Add-ons include: +- Analysis for creating graphs and charts +- CRM integration including SalesForce, HubSpot, MyEmma, SugarCRM, more… +- SPAM protection +- Advanced workflows +- Data encryption +- GDPR compliance -## Add-ons & Third Party Settings +## Development tools -
- -Add-ons & Third Party Settings - -
+ + + + + +
-Includes a list of modules and projects that extend and/or provide additional -functionality to the Webform module and Drupal's Form API. +Examples and tools are provided to help developers get started customizing +existing features and adding new features to the Webform module. +Development tools include: -## Extendable Plugins +- Test forms using customizable default values +- Easy to export configuration files +- Debugging tools for all handlers +- Examples for external API integration using remotes posts or custom code +- Example modules for creating custom elements and handlers +- Demos for building event registration and application evaluation system -
- -Extendable Plugins - -
+## Drush & Composer integration -The Webform module provides [plugins](https://www.drupal.org/developing/api/8/plugins) -and hooks that allow contrib and custom modules to extend and enhance webform -elements and submission handling. - -**WebformElement plugin** is used to integrate and enhance webform elements so -that they can be properly integrated into the Webform module. - -**WebformHandler plugin** allows developers to extend a webform's submission -handling. - -**WebformExporter plugin** allows developers to export results using custom -formats and file types. - - -## Help & Video Tutorials - -
- -Help & Video Tutorials - -
- -The Webform module provides examples, inline help, and screencast walk throughs. - -Screencasts include: - -- [Welcome to the Webform module](https://youtu.be/sQGsfQ_LZJ4) -- [Installing the Webform module and third party libraries](https://youtu.be/IMfFTrsjg5k) -- [Managing Webforms, Templates, and Examples](https://youtu.be/T5MVGa_3jOQ) -- [Adding Elements, Composites, and Containers](https://youtu.be/LspF9mAvRcY) -- [Configuring Webform Settings and Behaviors](https://youtu.be/UJ0y09ZS9Uc) -- [Controlling Access to Webforms and Elements](https://youtu.be/SFm76DAVjbE) -- [Collecting Submissions, Sending Emails, and Posting Results](https://youtu.be/OdfVm5LMH9A) -- [Placing Webforms in Blocks and Creating Webform Nodes](https://youtu.be/xYBW2g0osd4) -- [Administering and Extending the Webform module](https://youtu.be/bkScAX_Qbt4) -- [Using the Source](https://youtu.be/2pWkJiYeR6E) -- [Getting Help](https://youtu.be/sRXUR2c2brA) - - -## Drush Integration - -
- -Drush Integration - -
+ + + + + +
Drush commands are provided to: -- Generate multiple webform submissions -- Export webform submissions -- Purge webform submissions -- Download and manage third party libraries +- Generate multiple submissions +- Export submissions +- Purge submissions +- Download and manage third-party libraries +- Generate a composer.js file for third-party libraries - Tidy YAML configuration files + + + + + diff --git a/web/modules/contrib/webform/docs/RELEASE-NOTES.md b/web/modules/contrib/webform/docs/RELEASE-NOTES.md index c423653cd..2dc46c098 100644 --- a/web/modules/contrib/webform/docs/RELEASE-NOTES.md +++ b/web/modules/contrib/webform/docs/RELEASE-NOTES.md @@ -11,6 +11,10 @@ Steps for creating a new release 1. Review code -------------- + # Remove files that should never be reviewed. + cd modules/sandbox/webform + rm *.patch interdiff-* + [PHP](https://www.drupal.org/node/1587138) # Check Drupal PHP coding standards diff --git a/web/modules/contrib/webform/drush/webform.drush.inc b/web/modules/contrib/webform/drush/webform.drush.inc index b1b698eb5..02664372f 100644 --- a/web/modules/contrib/webform/drush/webform.drush.inc +++ b/web/modules/contrib/webform/drush/webform.drush.inc @@ -177,13 +177,13 @@ function webform_drush_command() { ), ), 'webform-repair' => array( - 'description' => 'Makes sure all Webform admin settings and webforms are up-to-date.', + 'description' => 'Makes sure all Webform admin configuration and webform settings are up-to-date.', 'core' => array( '8+', ), 'bootstrap' => 1, 'examples' => array( - 'webform-repair' => 'Repairs admin settings and webforms are up-to-date.', + 'webform-repair' => 'Repairs admin configuration and webform settings are up-to-date.', ), 'aliases' => array( 'wfr', diff --git a/web/modules/contrib/webform/images/elements/date-calendar.png b/web/modules/contrib/webform/images/elements/date-calendar.png new file mode 100644 index 0000000000000000000000000000000000000000..60c2f3c15b18475a92179b57acc53cea565d5f25 GIT binary patch literal 210 zcmeAS@N?(olHy`uVBq!ia0vp^LO{&V!3-qtMdT|0DajJoh?3y^w370~qErUQl>DSr z1<%~X^wgl##FWaylc_d9MbZI2A+GHw{+I6i@3-#1{)`WX?I*Wv*-}_o`2YWZpnUPo zm%2cTvn0qb7$^b;48i^tAlocFT^vIyZY4c9z`!Gulfj^Jgn^~UN8tbui-4kA3qwc; wD{DjRjhm4Z1@sidL>%~gXVe{GU|?ip2-?EtWmm534>W_p)78&qol`;+0QH(ip8x;= literal 0 HcmV?d00001 diff --git a/web/modules/contrib/webform/includes/webform.date.inc b/web/modules/contrib/webform/includes/webform.date.inc index 4c2f32e6d..6009ffcfd 100644 --- a/web/modules/contrib/webform/includes/webform.date.inc +++ b/web/modules/contrib/webform/includes/webform.date.inc @@ -7,9 +7,31 @@ use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Datetime\DrupalDateTime; +use Drupal\Core\Datetime\DateHelper; /** - * Callback for custom datetime datepicker. + * Callback for removing abbreviation from datelist. + * + * @param array $element + * The element. + * @param \Drupal\Core\Form\FormStateInterface $form_state + * The form state. + * @param \Drupal\Core\Datetime\DrupalDateTime|null $date + * The date value. + * + * @see \Drupal\Core\Datetime\Element\Datelist::processDatelist + */ +function _webform_datelist_date_date_callback(array &$element, FormStateInterface $form_state, $date) { + $no_abbreviate = (isset($element['#date_abbreviate']) && $element['#date_abbreviate'] === FALSE); + if ($no_abbreviate && isset($element['month']) && isset($element['month']['#options'])) { + // Load translated date part labels from the appropriate calendar plugin. + $date_helper = new DateHelper(); + $element['month']['#options'] = $date_helper->monthNames($element['#required']);; + } +} + +/** + * Callback for custom datetime date element. * * @param array $element * The element. @@ -20,19 +42,27 @@ use Drupal\Core\Datetime\DrupalDateTime; * * @see \Drupal\webform\Plugin\WebformElement\DateTime::prepare */ -function _webform_datetime_datepicker(array &$element, FormStateInterface $form_state, DrupalDateTime $date = NULL) { - // Convert #type from datepicker to textfield. - if (isset($element['#date_date_element']) && $element['#date_date_element'] === 'datepicker') { - $element['date']['#type'] = 'textfield'; +function _webform_datetime_date(array &$element, FormStateInterface $form_state, DrupalDateTime $date = NULL) { + // Make sure the date element is being displayed. + if (!isset($element['date'])) { + return; + } - // Must manually set 'data-drupal-date-format' to trigger date picker. - // @see \Drupal\Core\Render\Element\Date::processDate - $element['date']['#attributes']['data-drupal-date-format'] = [$element['date']['#date_date_format']]; + $type = (isset($element['#date_date_element'])) ? $element['#date_date_element'] : 'date'; + switch ($type) { + case 'datepicker': + // Convert #type from datepicker to textfield. + $element['date']['#type'] = 'textfield'; + + // Must manually set 'data-drupal-date-format' to trigger date picker. + // @see \Drupal\Core\Render\Element\Date::processDate + $element['date']['#attributes']['data-drupal-date-format'] = [$element['date']['#date_date_format']]; + break; } } /** - * Callback for custom datetime timepicker. + * Callback for custom datetime time element. * * @param array $element * The element. @@ -43,16 +73,58 @@ function _webform_datetime_datepicker(array &$element, FormStateInterface $form_ * * @see \Drupal\webform\Plugin\WebformElement\DateTime::prepare */ -function _webform_datetime_timepicker(array &$element, FormStateInterface $form_state, DrupalDateTime $date = NULL) { - // Convert #type from timepicker to textfield. - if (isset($element['#date_time_element']) && $element['#date_time_element'] === 'timepicker') { - $element['time']['#type'] = 'textfield'; +function _webform_datetime_time(array &$element, FormStateInterface $form_state, DrupalDateTime $date = NULL) { + // Make sure the time element is being displayed. + if (!isset($element['time'])) { + return; } - // Must manually set 'data-webform-time-format' to trigger time picker. - // @see \Drupal\webform\Element\WebformTime::processWebformTime - $element['time']['#attributes']['data-webform-time-format'] = [$element['#date_time_format']]; + // Apply time specific min/max to the element. + foreach (['min', 'max'] as $property) { + if (!empty($element["#date_time_$property"])) { + $value = $element["#date_time_$property"]; + } + elseif (!empty($element["#date_$property"])) { + $value = date('H:i:s', strtotime($element["#date_$property"])); + } + else { + $value = NULL; + } + if ($value) { + $element['time']["#$property"] = $value; + $element['time']['#attributes'][$property] = $value; + } + } - // Attached custom timepicker library. - $element['time']['#attached']['library'][] = 'webform/webform.element.time'; + // Apply time step and format to the element. + if (!empty($element['#date_time_step'])) { + $element['time']['#step'] = $element['#date_time_step']; + $element['time']['#attributes']['step'] = $element['#date_time_step']; + } + if (!empty($element['#date_time_format'])) { + $element['time']['#time_format'] = $element['#date_time_format']; + } + + // Remove extra attributes for date element. + unset( + $element['time']['#attributes']['data-min-year'], + $element['time']['#attributes']['data-max-year'] + ); + + $type = (isset($element['#date_time_element'])) ? $element['#date_time_element'] : 'time'; + + switch ($type) { + case 'timepicker': + $element['time']['#type'] = 'webform_time'; + $element['time']['#timepicker'] = TRUE; + break; + + case 'time': + $element['time']['#type'] = 'webform_time'; + break; + + case 'text': + $element['time']['#element_validate'][] = ['\Drupal\webform\Element\WebformTime', 'validateWebformTime']; + break; + } } diff --git a/web/modules/contrib/webform/includes/webform.install.update.inc b/web/modules/contrib/webform/includes/webform.install.update.inc index 570a0d797..f9e5cdee7 100644 --- a/web/modules/contrib/webform/includes/webform.install.update.inc +++ b/web/modules/contrib/webform/includes/webform.install.update.inc @@ -19,6 +19,7 @@ use Drupal\webform\Plugin\WebformHandler\EmailWebformHandler; use Drupal\webform\WebformInterface; use Drupal\webform\Plugin\WebformHandler\RemotePostWebformHandler; use Drupal\webform\Utility\WebformArrayHelper; +use Drupal\webform\Utility\WebformFormHelper; use Drupal\webform\Utility\WebformOptionsHelper; use Drupal\webform\Utility\WebformReflectionHelper; use Drupal\webform\Utility\WebformYaml; @@ -2712,6 +2713,10 @@ function webform_update_8146() { } } +/******************************************************************************/ +// Webform-8.x-5.0-rc23 - October 20, 2018. +/******************************************************************************/ + /** * Issue #3006468: Hide empty fields on on submission page. */ @@ -2743,9 +2748,200 @@ function webform_update_8149() { } } +/******************************************************************************/ +// Webform-8.x-5.0-rc24 - October 22, 2018. +/******************************************************************************/ + /** * Issue #2980032: SUBMISSION BEHAVIORS: Allow edit the previous submission. */ function webform_update_8150() { _webform_update_webform_settings(); } + +/******************************************************************************/ +// Webform-8.x-5.0-rc25 - November 5, 2018 (No update required). +/******************************************************************************/ + +/******************************************************************************/ +// Webform-8.x-5.0-rc26 - November 5, 2018 (No update required). +/******************************************************************************/ + +/******************************************************************************/ +// Webform-8.x-5.0-rc27 - November 28, 2018. +/******************************************************************************/ + +/** + * Issue #3013767: Computed twig element is not working on multi-step form. + */ +function webform_update_8151() { + $config_factory = \Drupal::configFactory(); + foreach ($config_factory->listAll('webform.webform.') as $webform_config_name) { + $webform_config = $config_factory->getEditable($webform_config_name); + $elements = $webform_config->get('elements'); + + // Try to decode elements. + try { + $elements = Yaml::decode($elements); + } + catch (\Exception $exception) { + continue; + } + + // Make sure elements is an array. + if (!is_array($elements)) { + continue; + } + + $has_computed_element = FALSE; + $flattened_elements =& WebformFormHelper::flattenElements($elements); + foreach ($flattened_elements as &$element) { + // Convert #value property to #template property. + // @see \Drupal\webform\Entity\Webform::initElementsRecursive + if (isset($element['#type']) && strpos($element['#type'], 'webform_computed_') === 0) { + $has_computed_element = TRUE; + if (isset($element['#value']) && !isset($element['#template'])) { + $element['#template'] = $element['#value']; + unset($element['#value']); + } + } + } + if ($has_computed_element) { + $webform_config->set('elements', Yaml::encode($elements)); + $webform_config->save(TRUE); + } + } +} + +/** + * Issue #3014933: Webform paths not being removed when a webform is deleted. + */ +function webform_update_8153() { + // Load all webforms to improve performance. + $webform = Webform::loadMultiple(); + + $database = \Drupal::database(); + $select = $database->select('url_alias', 'u'); + $select->fields('u', ['pid', 'source', 'alias', 'langcode']); + $select->condition('source', '/webform/%', 'LIKE'); + $result = $select->execute(); + while ($record = $result->fetchAssoc()) { + if (preg_match('#^/webform/([^/]+)/(?:drafts|submissions)$#', $record['source'], $match)) { + // Check if the webform still exists. + $webform_id = $match[1]; + if (!isset($webform[$webform_id])) { + // Delete the broken URL alias. + $database->delete('url_alias') + ->condition('pid', $record['pid']) + ->execute(); + } + } + } +} + +/** + * Issue #3015990: Option not to store the IP address for logged-in users. + */ +function webform_update_8154() { + _webform_update_webform_settings(); +} + +/******************************************************************************/ +// Webform-8.x-5.0-rc28 - TBD. +/******************************************************************************/ + +/** + * Issue #3017679: 2 different validation range modes for date/time field. + */ +function webform_update_8155() { + $config_factory = \Drupal::configFactory(); + foreach ($config_factory->listAll('webform.webform.') as $webform_config_name) { + $webform_config = $config_factory->getEditable($webform_config_name); + $elements = $webform_config->get('elements'); + + // Try to decode elements. + try { + $elements = Yaml::decode($elements); + } + catch (\Exception $exception) { + continue; + } + + // Make sure elements is an array. + if (!is_array($elements)) { + continue; + } + + $has_date_element = FALSE; + $flattened_elements =& WebformFormHelper::flattenElements($elements); + foreach ($flattened_elements as &$element) { + // Convert #min/max property to #date_date_(min|max) property. + // @see \Drupal\webform\Entity\Webform::initElementsRecursive + if (isset($element['#type']) && in_array($element['#type'], ['date', 'datetime', 'datelist'])) { + $has_date_element = TRUE; + if (isset($element['#min']) && !isset($element['#date_date_min'])) { + $element['#date_date_min'] = $element['#min']; + unset($element['#min']); + } + if (isset($element['#max']) && !isset($element['#date_date_max'])) { + $element['#date_date_max'] = $element['#max']; + unset($element['#max']); + } + } + } + if ($has_date_element) { + $webform_config->set('elements', Yaml::encode($elements)); + $webform_config->save(TRUE); + } + } +} + +/** + * Issue #3015180: Add 'webform_submission_log' submodule. + */ +function webform_update_8156() { + $enable = \Drupal::config('webform.settings')->get('settings.default_submission_log'); + if (!$enable) { + $query = \Drupal::entityQuery('webform') + ->condition('settings.submission_log', TRUE) + ->count(); + $enable = $query->execute() > 0; + } + + if ($enable) { + try { + \Drupal::service('module_installer')->install(['webform_submission_log']); + } + catch (\Drupal\Core\Database\SchemaObjectExistsException $exception) { + // This is actually expected. The table {webform_submission_log} would exist + // from webform submission entity schema. + } + + // Because MySQL does not allow default value on blob/text column types and + // we want to add a not null blob column to a table that is likely to have + // existing rows, we are doing it in such a 3-step fashion. + \Drupal::database()->schema()->addField('webform_submission_log', 'variables', [ + 'type' => 'blob', + 'size' => 'big', + 'description' => 'Serialized array of variables that match the message string and that is passed into the t() function.', + ]); + + \Drupal::database()->update('webform_submission_log')->fields([ + 'variables' => serialize([]), + ])->execute(); + + \Drupal::database()->schema()->changeField('webform_submission_log', 'variables', 'variables', [ + 'type' => 'blob', + 'not null' => TRUE, + 'size' => 'big', + 'description' => 'Serialized array of variables that match the message string and that is passed into the t() function.', + ]); + } +} + +/** + * Issue #3022398: Possible modification to update hook and/or documentation. + */ +function webform_update_8157() { + _webform_update_webform_submission_storage_schema(); +} diff --git a/web/modules/contrib/webform/includes/webform.libraries.inc b/web/modules/contrib/webform/includes/webform.libraries.inc index 22cfbdca1..60b034bec 100644 --- a/web/modules/contrib/webform/includes/webform.libraries.inc +++ b/web/modules/contrib/webform/includes/webform.libraries.inc @@ -9,24 +9,37 @@ * Implements hook_library_info_alter(). */ function webform_library_info_alter(&$libraries, $extension) { - $webform_libraries_modules = \Drupal::moduleHandler()->getImplementations('webform_libraries_info'); - $webform_libraries_modules[] = 'webform'; - // Only alter modules that declare webform libraries. // @see hook_webform_libraries_info() + $webform_libraries_modules = \Drupal::moduleHandler()->getImplementations('webform_libraries_info'); + $webform_libraries_modules[] = 'webform'; if (!in_array($extension, $webform_libraries_modules)) { return; } - // Prevent duplicate instances of the chosen plugin and use - // the chosen_lib.module's as the dependency. - if (isset($libraries['webform.element.chosen']) && \Drupal::moduleHandler()->moduleExists('chosen_lib')) { - $dependencies =& $libraries['webform.element.chosen']['dependencies']; - foreach ($dependencies as $index => $dependency) { - if ($dependency === 'webform/libraries.jquery.chosen') { - $dependencies[$index] = 'chosen_lib/chosen'; - $dependencies[] = 'chosen_lib/chosen.css'; - break; + // If chosen_lib.module is installed, then update the dependency. + if (\Drupal::moduleHandler()->moduleExists('chosen_lib')) { + if (isset($libraries['webform.element.chosen'])) { + $dependencies =& $libraries['webform.element.chosen']['dependencies']; + foreach ($dependencies as $index => $dependency) { + if ($dependency === 'webform/libraries.jquery.chosen') { + $dependencies[$index] = 'chosen_lib/chosen'; + $dependencies[] = 'chosen_lib/chosen.css'; + break; + } + } + } + } + + // If select2.module is installed, then update the dependency. + if (\Drupal::moduleHandler()->moduleExists('select2')) { + if (isset($libraries['webform.element.select2'])) { + $dependencies =& $libraries['webform.element.select2']['dependencies']; + foreach ($dependencies as $index => $dependency) { + if ($dependency === 'webform/libraries.jquery.select2') { + $dependencies[$index] = 'select2/select2'; + break; + } } } } @@ -43,6 +56,11 @@ function webform_library_info_alter(&$libraries, $extension) { continue; } + // Skip libraries installed by other modules. + if (isset($library['module'])) { + continue; + } + if (!empty($library['dependencies'])) { // Remove excluded libraries from dependencies. foreach ($library['dependencies'] as $dependency_index => $dependency_name) { diff --git a/web/modules/contrib/webform/includes/webform.options.inc b/web/modules/contrib/webform/includes/webform.options.inc index dd327eac8..f5b1f1da8 100644 --- a/web/modules/contrib/webform/includes/webform.options.inc +++ b/web/modules/contrib/webform/includes/webform.options.inc @@ -73,3 +73,16 @@ function webform_webform_options_languages_alter(array &$options, array $element } } } + +/** + * Implements hook_webform_options_WEBFORM_OPTIONS_ID_alter(). + */ +function webform_webform_options_translations_alter(array &$options, array $element = []) { + if (empty($options)) { + $languages = \Drupal::languageManager()->getLanguages(); + $options = []; + foreach ($languages as $language) { + $options[$language->getId()] = $language->getName(); + } + } +} diff --git a/web/modules/contrib/webform/includes/webform.theme.inc b/web/modules/contrib/webform/includes/webform.theme.inc index b33d3fae0..d50b9d292 100644 --- a/web/modules/contrib/webform/includes/webform.theme.inc +++ b/web/modules/contrib/webform/includes/webform.theme.inc @@ -289,13 +289,16 @@ function webform_preprocess_table(&$variables) { foreach ($variables['rows'] as &$row) { // Check first cell. if (!isset($row['cells'][0]['content']) + || !is_array($row['cells'][0]['content']) || !isset($row['cells'][0]['content']['#markup'])) { continue; } // Check last cell edit link. if (!isset($row['cells'][1]['content']) + || !is_array($row['cells'][1]['content']) || !isset($row['cells'][1]['content']['#links']) + || !is_array($row['cells'][1]['content']['#links']) || !isset($row['cells'][1]['content']['#links']['edit'])) { continue; } diff --git a/web/modules/contrib/webform/includes/webform.theme.template.inc b/web/modules/contrib/webform/includes/webform.theme.template.inc index 08b1f7502..b4010fa84 100644 --- a/web/modules/contrib/webform/includes/webform.theme.template.inc +++ b/web/modules/contrib/webform/includes/webform.theme.template.inc @@ -283,6 +283,11 @@ function template_preprocess_webform_submission_navigation(array &$variables) { */ function template_preprocess_webform_submission(array &$variables) { $variables['view_mode'] = $variables['elements']['#view_mode']; + + $variables['navigation'] = $variables['elements']['navigation']; + $variables['information'] = $variables['elements']['information']; + $variables['submission'] = $variables['elements']['submission']; + $variables['webform_submission'] = $variables['elements']['#webform_submission']; if ($variables['webform_submission'] instanceof WebformSubmissionInterface) { $variables['webform'] = $variables['webform_submission']->getWebform(); @@ -413,19 +418,21 @@ function template_preprocess_webform_element_base_html(array &$variables) { if (empty($variables['options']['email'])) { $type = $element['#type']; + $attributes = (isset($element['#format_attributes'])) ? $element['#format_attributes'] : []; + $attributes += ['class' => []]; + // Use wrapper attributes for the id instead of #id, + // this stops the
'); + // Create French translation. $translation_elements = [ 'textfield' => [ diff --git a/web/modules/contrib/webform/src/Tests/WebformLibrariesTest.php b/web/modules/contrib/webform/src/Tests/WebformLibrariesTest.php index 3dabee835..60b830e09 100644 --- a/web/modules/contrib/webform/src/Tests/WebformLibrariesTest.php +++ b/web/modules/contrib/webform/src/Tests/WebformLibrariesTest.php @@ -129,6 +129,27 @@ class WebformLibrariesTest extends WebformTestBase { $this->assertNoText('jQuery: Toggles library'); $this->assertNoText('Signature Pad library'); */ + + // Check that chosen and select2 using webform's CDN URLs. + $edit = [ + 'excluded_libraries[jquery.select2]' => TRUE, + 'excluded_libraries[jquery.chosen]' => TRUE, + ]; + $this->drupalPostForm('admin/structure/webform/config/libraries', $edit, t('Save configuration')); + $this->drupalGet('webform/test_libraries_optional'); + $this->assertRaw('https://cdnjs.cloudflare.com/ajax/libs/chosen'); + $this->assertRaw('https://cdnjs.cloudflare.com/ajax/libs/select2'); + + // Install chosen and select2 modules. + \Drupal::service('module_installer')->install(['chosen', 'chosen_lib', 'select2']); + drupal_flush_all_caches(); + + // Check that chosen and select2 using module's path and not CDN. + $this->drupalGet('webform/test_libraries_optional'); + $this->assertNoRaw('https://cdnjs.cloudflare.com/ajax/libs/chosen'); + $this->assertNoRaw('https://cdnjs.cloudflare.com/ajax/libs/select2'); + $this->assertRaw('/modules/contrib/chosen/css/chosen-drupal.css'); + $this->assertRaw('/libraries/select2/dist/css/select2.min.css'); } } diff --git a/web/modules/contrib/webform/src/Tests/WebformOptionsTest.php b/web/modules/contrib/webform/src/Tests/WebformOptionsTest.php index 29b8127cc..c54849fde 100644 --- a/web/modules/contrib/webform/src/Tests/WebformOptionsTest.php +++ b/web/modules/contrib/webform/src/Tests/WebformOptionsTest.php @@ -36,7 +36,6 @@ class WebformOptionsTest extends WebformTestBase { 'access site reports', 'administer site configuration', 'administer webform', - 'access webform submission log', 'create webform', 'administer users', ]); diff --git a/web/modules/contrib/webform/src/Tests/WebformResultsExportOptionsTest.php b/web/modules/contrib/webform/src/Tests/WebformResultsExportOptionsTest.php index f4bf422fa..b433d569f 100644 --- a/web/modules/contrib/webform/src/Tests/WebformResultsExportOptionsTest.php +++ b/web/modules/contrib/webform/src/Tests/WebformResultsExportOptionsTest.php @@ -30,7 +30,6 @@ class WebformResultsExportOptionsTest extends WebformTestBase { */ public function testExportOptions() { $admin_submission_user = $this->drupalCreateUser([ - 'access webform submission log', 'administer webform submission', ]); diff --git a/web/modules/contrib/webform/src/Tests/WebformSubmissionConditionsValidatorTest.php b/web/modules/contrib/webform/src/Tests/WebformSubmissionConditionsValidatorTest.php index 46116af95..223bc87a0 100644 --- a/web/modules/contrib/webform/src/Tests/WebformSubmissionConditionsValidatorTest.php +++ b/web/modules/contrib/webform/src/Tests/WebformSubmissionConditionsValidatorTest.php @@ -18,15 +18,17 @@ class WebformSubmissionConditionsValidatorTest extends WebformTestBase { * @var array */ protected static $testWebforms = [ - 'test_form_states_server_clear', - 'test_form_states_server_custom', - 'test_form_states_server_comp', - 'test_form_states_server_multiple', - 'test_form_states_server_nested', - 'test_form_states_server_preview', - 'test_form_states_server_required', - 'test_form_states_server_save', - 'test_form_states_server_wizard', + 'test_states_crosspage', + 'test_states_server_clear', + 'test_states_server_custom', + 'test_states_server_comp', + 'test_states_server_nested', + 'test_states_server_multiple', + 'test_states_server_containers', + 'test_states_server_preview', + 'test_states_server_required', + 'test_states_server_save', + 'test_states_server_wizard', ]; /** @@ -52,7 +54,12 @@ class WebformSubmissionConditionsValidatorTest extends WebformTestBase { * Tests webform submission conditions (#states) validator required. */ public function testFormStatesValidatorRequired() { - $webform = Webform::load('test_form_states_server_required'); + + /**************************************************************************/ + // required. + /**************************************************************************/ + + $webform = Webform::load('test_states_server_required'); // Check no #states required errors. $this->postSubmission($webform); @@ -328,7 +335,7 @@ class WebformSubmissionConditionsValidatorTest extends WebformTestBase { // custom. /**************************************************************************/ - $webform = Webform::load('test_form_states_server_custom'); + $webform = Webform::load('test_states_server_custom'); // Check no #states required errors. $this->postSubmission($webform); @@ -351,7 +358,7 @@ class WebformSubmissionConditionsValidatorTest extends WebformTestBase { // multiple element. /**************************************************************************/ - $webform = Webform::load('test_form_states_server_multiple'); + $webform = Webform::load('test_states_server_multiple'); $edit = [ 'trigger_required' => TRUE, @@ -365,18 +372,19 @@ class WebformSubmissionConditionsValidatorTest extends WebformTestBase { // composite element. /**************************************************************************/ - $webform = Webform::load('test_form_states_server_comp'); + $webform = Webform::load('test_states_server_comp'); $edit = [ 'webform_name_trigger' => TRUE, 'webform_name_multiple_trigger' => TRUE, 'webform_name_multiple_header_trigger' => TRUE, + 'webform_name_nested_trigger' => TRUE, ]; $this->postSubmission($webform, $edit); // Check basic composite. $this->assertRaw('First field is required.'); - $this->assertRaw(''); + $this->assertRaw(''); // Check multiple composite with custom error. $this->assertRaw("Custom error message for 'last' element."); @@ -384,20 +392,26 @@ class WebformSubmissionConditionsValidatorTest extends WebformTestBase { // Check multiple table composite. $this->assertRaw('Last field is required.'); - $this->assertRaw(''); + $this->assertRaw(''); + + // Check single nested composite. + $this->assertRaw('webform_name_nested_first field is required.'); + $this->assertRaw('webform_name_nested_last field is required.'); + $this->assertRaw(' '); /**************************************************************************/ - // nested. + // nested containers. /**************************************************************************/ - $webform = Webform::load('test_form_states_server_nested'); + $webform = Webform::load('test_states_server_containers'); // Check sub elements. - $this->drupalGet('webform/test_form_states_server_nested'); - $this->assertRaw(''); - $this->assertRaw(''); - $this->assertRaw(''); - $this->assertRaw(''); + $this->drupalGet('webform/test_states_server_containers'); + $this->assertRaw(''); + $this->assertRaw(''); + $this->assertRaw(''); + $this->assertRaw(''); + $this->assertRaw(''); // Check nested element is required. $edit = [ @@ -408,6 +422,8 @@ class WebformSubmissionConditionsValidatorTest extends WebformTestBase { $this->assertNoRaw('visible_custom_textfield field is required.'); $this->assertRaw('visible_slide_textfield field is required.'); $this->assertNoRaw('visible_slide_custom_textfield field is required.'); + $this->assertRaw('textfield field is required.'); + $this->assertRaw('select_other field is required.'); // Check nested element is not required. $edit = []; @@ -416,6 +432,8 @@ class WebformSubmissionConditionsValidatorTest extends WebformTestBase { $this->assertNoRaw('visible_custom_textfield field is required.'); $this->assertNoRaw('visible_slide_textfield field is required.'); $this->assertNoRaw('visible_slide_custom_textfield field is required.'); + $this->assertNoRaw('textfield field is required.'); + $this->assertNoRaw('select_other field is required.'); // Check custom states element validation. $edit = [ @@ -426,13 +444,64 @@ class WebformSubmissionConditionsValidatorTest extends WebformTestBase { $this->postSubmission($webform, $edit); $this->assertRaw('visible_custom_textfield field is required.'); $this->assertRaw('visible_slide_custom_textfield field is required.'); + + /**************************************************************************/ + // nested conditions. + /**************************************************************************/ + + $webform = Webform::load('test_states_server_nested'); + + // Check a and b sets target required page 1. + $edit = ['a' => TRUE, 'b' => TRUE, 'c' => FALSE]; + $this->drupalPostForm('webform/test_states_server_nested', $edit, t('Next Page >')); + $this->assertRaw('page_1_target: [a and b] or c = required field is required.'); + + // Check c sets target required page 1. + $edit = ['a' => FALSE, 'b' => TRUE, 'c' => TRUE]; + $this->drupalPostForm('webform/test_states_server_nested', $edit, t('Next Page >')); + $this->assertRaw('page_1_target: [a and b] or c = required field is required.'); + + // Check none sets target not required page 1. + $edit = ['a' => FALSE, 'b' => FALSE, 'c' => FALSE]; + $this->drupalPostForm('webform/test_states_server_nested', $edit, t('Next Page >')); + $this->assertNoRaw('page_1_target: [a and b] or c = required field is required.'); + + // Check none sets target not required page 2. + $this->assertRaw(''); + $this->assertRaw(''); + + // Check a and b sets target required page 2. + $edit = ['a' => TRUE, 'b' => TRUE, 'c' => FALSE, 'page_1_target' => '{value}']; + $this->drupalPostForm('webform/test_states_server_nested', $edit, t('Next Page >')); + $this->assertNoRaw(''); + $this->assertRaw(''); + $this->assertRaw(''); + + /**************************************************************************/ + // test_states_crosspage. + /**************************************************************************/ + + $webform = Webform::load('test_states_crosspage'); + + $trigger_1_name = 'webform_states_' . md5('.webform-submission-test-states-crosspage-add-form :input[name="trigger_1"]'); + $trigger_2_name = 'webform_states_' . md5('.webform-submission-test-states-crosspage-add-form :input[name="trigger_2"]'); + + // Check cross page states attribute and input on page 1. + $this->drupalGet('webform/test_states_crosspage'); + $this->assertRaw(':input[name=\u0022' . $trigger_2_name . '\u0022]'); + $this->assertFieldByName($trigger_2_name); + + // Check cross page states attribute and input on page 2. + $this->postSubmission($webform, ['trigger_1' => TRUE], t('Next Page >')); + $this->assertRaw(':input[name=\u0022' . $trigger_1_name . '\u0022]'); + $this->assertFieldByName($trigger_1_name); } /** * Tests webform submission conditions (#states) validator wizard cross-page conditions. */ - public function testFormStatesValidatorWizard() { - $webform = Webform::load('test_form_states_server_wizard'); + public function testFormStatesValidatorWizard() { + $webform = Webform::load('test_states_server_wizard'); /**************************************************************************/ @@ -527,7 +596,7 @@ class WebformSubmissionConditionsValidatorTest extends WebformTestBase { * Tests visible conditions (#states) validator for elements . */ public function testStatesValidatorElementVisible() { - $webform_preview = Webform::load('test_form_states_server_preview'); + $webform_preview = Webform::load('test_states_server_preview'); // Check trigger unchecked and elements are conditionally hidden. $this->postSubmission($webform_preview, [], t('Preview')); @@ -547,7 +616,7 @@ class WebformSubmissionConditionsValidatorTest extends WebformTestBase { $this->assertRaw('dependent_fieldset'); $this->assertRaw('nested_textfield'); - $webform_save = Webform::load('test_form_states_server_save'); + $webform_save = Webform::load('test_states_server_save'); // Check trigger unchecked and saved. $this->postSubmission($webform_save, ['trigger_checkbox' => FALSE], t('Submit')); @@ -570,7 +639,7 @@ dependent_textfield_multiple: - '{dependent_textfield}' dependent_details_textfield: '{dependent_details_textfield}'"); - $webform_clear = Webform::load('test_form_states_server_clear'); + $webform_clear = Webform::load('test_states_server_clear'); // Check trigger unchecked and not cleared. $this->postSubmission($webform_clear, ['trigger_checkbox' => FALSE], t('Submit')); diff --git a/web/modules/contrib/webform/src/Tests/WebformSubmissionStorageTest.php b/web/modules/contrib/webform/src/Tests/WebformSubmissionStorageTest.php index d81e3b9b4..98ac360b3 100644 --- a/web/modules/contrib/webform/src/Tests/WebformSubmissionStorageTest.php +++ b/web/modules/contrib/webform/src/Tests/WebformSubmissionStorageTest.php @@ -59,15 +59,19 @@ class WebformSubmissionStorageTest extends WebformTestBase { $this->assertEqual($storage->getTotal($webform, NULL, $user2), 3); // Check next submission. + $this->drupalLogin($user1); $this->assertEqual($storage->getNextSubmission($user1_submissions[0], NULL, $user1)->id(), $user1_submissions[1]->id(), "User 1 can navigate forward to user 1's next submission"); $this->assertNull($storage->getNextSubmission($user1_submissions[2], NULL, $user1), "User 1 can't navigate forward to user 2's next submission"); + $this->drupalLogin($user2); $this->assertNull($storage->getNextSubmission($user2_submissions[0], NULL, $user2), "User 2 can't navigate forward to user 2's next submission because of missing 'view own webform submission' permission"); $this->drupalLogin($admin_user); $this->assertEqual($storage->getNextSubmission($user1_submissions[2], NULL)->id(), $user2_submissions[0]->id(), "Admin user can navigate between user submissions"); $this->drupalLogout(); // Check previous submission. + $this->drupalLogin($user1); $this->assertEqual($storage->getPreviousSubmission($user1_submissions[1], NULL, $user1)->id(), $user1_submissions[0]->id(), "User 1 can navigate backward to user 1's previous submission"); + $this->drupalLogin($user2); $this->assertNull($storage->getPreviousSubmission($user2_submissions[0], NULL, $user2), "User 2 can't navigate backward to user 1's previous submission"); $this->drupalLogin($admin_user); $this->assertEqual($storage->getPreviousSubmission($user2_submissions[0], NULL)->id(), $user1_submissions[2]->id(), "Admin user can navigate between user submissions"); diff --git a/web/modules/contrib/webform/src/Tests/WebformSubmissionViewTest.php b/web/modules/contrib/webform/src/Tests/WebformSubmissionViewTest.php index 9474d7a41..45ede6ca0 100644 --- a/web/modules/contrib/webform/src/Tests/WebformSubmissionViewTest.php +++ b/web/modules/contrib/webform/src/Tests/WebformSubmissionViewTest.php @@ -44,7 +44,7 @@ class WebformSubmissionViewTest extends WebformTestBase { public function testView() { $admin_submission_user = $this->drupalCreateUser([ 'administer webform submission', - ]); + ]); /**************************************************************************/ diff --git a/web/modules/contrib/webform/src/Tests/WebformTestBase.php b/web/modules/contrib/webform/src/Tests/WebformTestBase.php index 61f9b641b..9908b34f0 100644 --- a/web/modules/contrib/webform/src/Tests/WebformTestBase.php +++ b/web/modules/contrib/webform/src/Tests/WebformTestBase.php @@ -236,65 +236,6 @@ abstract class WebformTestBase extends WebTestBase { return $this->getLastSubmissionId($webform); } - /****************************************************************************/ - // Log. - /****************************************************************************/ - - /** - * Get the last submission id. - * - * @return int - * The last submission id. - */ - protected function getLastSubmissionLog() { - $query = \Drupal::database()->select('webform_submission_log', 'l'); - $query->leftJoin('webform_submission', 'ws', 'l.sid = ws.sid'); - $query->fields('l', [ - 'lid', - 'uid', - 'sid', - 'handler_id', - 'operation', - 'message', - 'timestamp', - ]); - $query->fields('ws', [ - 'webform_id', - 'entity_type', - 'entity_id', - ]); - $query->orderBy('l.lid', 'DESC'); - $query->range(0, 1); - return $query->execute()->fetch(); - } - - /** - * Get the entire submission log. - * - * @return int - * The last submission id. - */ - protected function getSubmissionLog() { - $query = \Drupal::database()->select('webform_submission_log', 'l'); - $query->leftJoin('webform_submission', 'ws', 'l.sid = ws.sid'); - $query->fields('l', [ - 'lid', - 'uid', - 'sid', - 'handler_id', - 'operation', - 'message', - 'timestamp', - ]); - $query->fields('ws', [ - 'webform_id', - 'entity_type', - 'entity_id', - ]); - $query->orderBy('l.lid', 'DESC'); - return $query->execute()->fetchAll(); - } - /****************************************************************************/ // Export. /****************************************************************************/ @@ -358,7 +299,7 @@ abstract class WebformTestBase extends WebTestBase { /** * Passes if the substring is contained within text, fails otherwise. */ - protected function assertContains($haystack, $needle, $message = '', $group = 'Other') { + protected function assertContains($needle, $haystack, $message = '') { if (!$message) { $t_args = [ '@haystack' => Unicode::truncate($haystack, 150, TRUE, TRUE), @@ -370,13 +311,13 @@ abstract class WebformTestBase extends WebTestBase { if (!$result) { $this->verbose($haystack); } - return $this->assert($result, $message, $group); + $this->assert($result, $message); } /** * Passes if the substring is not contained within text, fails otherwise. */ - protected function assertNotContains($haystack, $needle, $message = '', $group = 'Other') { + protected function assertNotContains($needle, $haystack, $message = '') { if (!$message) { $t_args = [ '@haystack' => Unicode::truncate($haystack, 150, TRUE, TRUE), @@ -389,7 +330,7 @@ abstract class WebformTestBase extends WebTestBase { if (!$result) { $this->verbose($haystack); } - return $this->assert($result, $message, $group); + $this->assert($result, $message); } /** diff --git a/web/modules/contrib/webform/src/Tests/WebformTestTrait.php b/web/modules/contrib/webform/src/Tests/WebformTestTrait.php index fed6e694f..4697391a4 100644 --- a/web/modules/contrib/webform/src/Tests/WebformTestTrait.php +++ b/web/modules/contrib/webform/src/Tests/WebformTestTrait.php @@ -161,6 +161,7 @@ trait WebformTestTrait { $entity_ids = \Drupal::entityQuery('webform_submission') ->sort('sid', 'DESC') ->condition('webform_id', $webform->id()) + ->accessCheck(FALSE) ->execute(); return reset($entity_ids); } diff --git a/web/modules/contrib/webform/src/Tests/WebformTokenSubmissionValueTest.php b/web/modules/contrib/webform/src/Tests/WebformTokenSubmissionValueTest.php index 177421dac..51f55ef4d 100644 --- a/web/modules/contrib/webform/src/Tests/WebformTokenSubmissionValueTest.php +++ b/web/modules/contrib/webform/src/Tests/WebformTokenSubmissionValueTest.php @@ -146,8 +146,8 @@ last_name: Smith // Check containers. $this->assertRaw('webform_submission:values:fieldset
fieldset');
     $this->assertRaw('webform_submission:values:fieldset:html
'); - $this->assertRaw('webform_submission:values:fieldset:header:html
'); - $this->assertRaw('webform_submission:values:fieldset:details:html
'); + $this->assertRaw('webform_submission:values:fieldset:header:html
'); + $this->assertRaw('webform_submission:values:fieldset:details:html
'); $this->assertRaw('webform_submission:values:fieldset:fieldset:html
'); // Check authenticated token handling. diff --git a/web/modules/contrib/webform/src/Tests/Wizard/WebformWizardAdvancedTest.php b/web/modules/contrib/webform/src/Tests/Wizard/WebformWizardAdvancedTest.php index 8acada5e2..a744292a0 100644 --- a/web/modules/contrib/webform/src/Tests/Wizard/WebformWizardAdvancedTest.php +++ b/web/modules/contrib/webform/src/Tests/Wizard/WebformWizardAdvancedTest.php @@ -158,7 +158,7 @@ class WebformWizardAdvancedTest extends WebformWizardTestBase { $this->assertRaw('janesmith@example.com'); $this->assertRaw(''); $this->assertRaw('111-111-1111'); - $this->assertRaw('
'); + $this->assertRaw('
'); $this->assertRaw('This is working fine.'); // Submit the webform. diff --git a/web/modules/contrib/webform/src/Utility/Mail.php b/web/modules/contrib/webform/src/Utility/Mail.php new file mode 100644 index 000000000..3ed9a4778 --- /dev/null +++ b/web/modules/contrib/webform/src/Utility/Mail.php @@ -0,0 +1,71 @@ +[]:;@\,."'; + + /** + * Return a RFC-2822 compliant "display-name" component. + * + * The "display-name" component is used in mail header "Originator" fields + * (From, Sender, Reply-to) to give a human-friendly description of the + * address, i.e. From: My Display Name . RFC-822 and + * RFC-2822 define its syntax and rules. This method gets as input a string + * to be used as "display-name" and formats it to be RFC compliant. + * + * @param string $string + * A string to be used as "display-name". + * + * @return string + * A RFC compliant version of the string, ready to be used as + * "display-name" in mail originator header fields. + */ + public static function formatDisplayName($string) { + // Make sure we don't process html-encoded characters. They may create + // unneeded trouble if left encoded, besides they will be correctly + // processed if decoded. + $string = Html::decodeEntities($string); + + // If string contains non-ASCII characters it must be (short) encoded + // according to RFC-2047. The output of a "B" (Base64) encoded-word is + // always safe to be used as display-name. + $safe_display_name = Unicode::mimeHeaderEncode($string, TRUE); + + // Encoded-words are always safe to be used as display-name because don't + // contain any RFC 2822 "specials" characters. However + // Unicode::mimeHeaderEncode() encodes a string only if it contains any + // non-ASCII characters, and leaves its value untouched (un-encoded) if + // ASCII only. For this reason in order to produce a valid display-name we + // still need to make sure there are no "specials" characters left. + if (preg_match('/[' . preg_quote(Mail::RFC_2822_SPECIALS) . ']/', $safe_display_name)) { + + // If string is already quoted, it may or may not be escaped properly, so + // don't trust it and reset. + if (preg_match('/^"(.+)"$/', $safe_display_name, $matches)) { + $safe_display_name = str_replace(['\\\\', '\\"'], ['\\', '"'], $matches[1]); + } + + // Transform the string in a RFC-2822 "quoted-string" by wrapping it in + // double-quotes. Also make sure '"' and '\' occurrences are escaped. + $safe_display_name = '"' . str_replace(['\\', '"'], ['\\\\', '\\"'], $safe_display_name) . '"'; + + } + + return $safe_display_name; + } + +} diff --git a/web/modules/contrib/webform/src/Utility/WebformArrayHelper.php b/web/modules/contrib/webform/src/Utility/WebformArrayHelper.php index 096d241ef..b20528b22 100644 --- a/web/modules/contrib/webform/src/Utility/WebformArrayHelper.php +++ b/web/modules/contrib/webform/src/Utility/WebformArrayHelper.php @@ -378,4 +378,23 @@ class WebformArrayHelper { $array = $new; } + /** + * Remove value from an array. + * + * @param array &$array + * An array. + * @param mixed $value + * A value. + * + * @see https://stackoverflow.com/questions/7225070/php-array-delete-by-value-not-key + */ + public static function removeValue(array &$array, $value) { + if (($key = array_search($value, $array)) !== FALSE) { + unset($array[$key]); + } + if (static::isSequential($array)) { + array_values($array); + } + } + } diff --git a/web/modules/contrib/webform/src/Utility/WebformDateHelper.php b/web/modules/contrib/webform/src/Utility/WebformDateHelper.php index 5f7588767..53986a20f 100644 --- a/web/modules/contrib/webform/src/Utility/WebformDateHelper.php +++ b/web/modules/contrib/webform/src/Utility/WebformDateHelper.php @@ -2,8 +2,10 @@ namespace Drupal\webform\Utility; +use Drupal\Core\Datetime\DateHelper; use Drupal\Core\Datetime\DrupalDateTime; use Drupal\Core\Form\OptGroup; +use Drupal\datetime\Plugin\Field\FieldType\DateTimeItemInterface; /** * Helper class webform date helper methods. @@ -52,7 +54,7 @@ class WebformDateHelper { public static function format($timestamp, $type = 'fallback', $format = '', $timezone = NULL, $langcode = NULL) { /** @var \Drupal\Core\Datetime\DateFormatterInterface $date_formatter */ $date_formatter = \Drupal::service('date.formatter'); - return $timestamp ? $date_formatter->format($timestamp, $type) : ''; + return $timestamp ? $date_formatter->format($timestamp, $type, $format, $timezone, $langcode) : ''; } /** @@ -65,25 +67,33 @@ class WebformDateHelper { * The date/time object format as 'Y-m-d\TH:i:s'. */ public static function formatStorage(DrupalDateTime $date) { - return $date->format(DATETIME_DATETIME_STORAGE_FORMAT); + return $date->format(DateTimeItemInterface::DATETIME_STORAGE_FORMAT); } /** - * Check if date/time string is using a valid date/time format. + * Creates a date object from an input format with a translated date string. * - * @param string $time - * A date/time string. * @param string $format - * Format accepted by date(). + * PHP date() type format for parsing the input. + * @param mixed $time + * A date string. + * @param mixed $timezone + * PHP DateTimeZone object, string or NULL allowed. + * @param array $settings + * An array of settings. + * @see \Drupal\Core\Datetime\DrupalDateTime::__construct * - * @return bool - * TRUE is $time is in the accepted format. - * - * @see http://stackoverflow.com/questions/19271381/correctly-determine-if-date-string-is-a-valid-date-in-that-format + * @return \Drupal\Core\Datetime\DrupalDateTime|boolean + * A new DateTimePlus object or FALSE if invalid date string. */ - public static function isValidDateFormat($time, $format = 'Y-m-d') { - $datetime = \DateTime::createFromFormat($format, $time); - return ($datetime && $datetime->format($format) === $time); + public static function createFromFormat($format, $time, $timezone = NULL, array $settings = []) { + $english_time = WebformDateHelper::convertDateStringToEnglish($format, $time); + try { + return DrupalDateTime::createFromFormat($format, $english_time, $timezone, $settings); + } + catch (\Exception $exception) { + return FALSE; + } } /** @@ -185,4 +195,65 @@ class WebformDateHelper { } } + /** + * Convert date string to English so that it can be parsed. + * + * @param string $format + * PHP date() type format for parsing the input. + * @param string $value + * A date string. + * + * @return string + * A date string translated to English. + * + * @see https://stackoverflow.com/questions/36498186/php-datetimecreatefromformat-and-multi-languages + * @see core/modules/locale/locale.datepicker.js + */ + protected static function convertDateStringToEnglish($format, $value) { + // Do not convert English date strings. + if (\Drupal::languageManager()->getCurrentLanguage()->getId() === 'en') { + return $value; + } + + // F = A full textual representation of a month, such as January or March. + if (strpos($format, 'F') !== FALSE) { + $month_names_untranslated = DateHelper::monthNamesUntranslated(); + $month_names_translated = DateHelper::monthNames(); + foreach ($month_names_untranslated as $index => $month_name_untranslated) { + $value = str_ireplace((string) $month_names_translated[$index], $month_name_untranslated, $value); + } + + } + + // M = A short textual representation of a month, three letters. + if (strpos($format, 'M') !== FALSE) { + $month_names_abbr_untranslated = DateHelper::monthNamesAbbrUntranslated(); + $month_names_abbr_translated = DateHelper::monthNamesAbbr(); + foreach ($month_names_abbr_untranslated as $index => $month_name_abbr_untranslated) { + $value = str_ireplace((string) $month_names_abbr_translated[$index], $month_name_abbr_untranslated, $value); + } + } + + // l = A full textual representation of the day of the week. + if (strpos($format, 'l') !== FALSE) { + $week_days_untranslated = DateHelper::weekDaysUntranslated(); + $week_days_translated = DateHelper::weekDays(); + foreach ($week_days_untranslated as $index => $week_day_untranslated) { + $value = str_ireplace((string) $week_days_translated[$index], $week_day_untranslated, $value); + } + } + + // D = A textual representation of a day, three letters. + if (strpos($format, 'D') !== FALSE) { + $week_days_abbr_untranslated = DateHelper::weekDaysUntranslated(); + $week_days_abbr_translated = DateHelper::weekDaysAbbr(); + foreach ($week_days_abbr_untranslated as $index => $week_day_abbr_untranslated) { + $week_days_abbr_untranslated[$index] = (string) substr($week_days_abbr_untranslated[$index], 0, 3); + $value = str_ireplace((string) $week_days_abbr_translated[$index], $week_days_abbr_untranslated[$index], $value); + } + } + + return $value; + } + } diff --git a/web/modules/contrib/webform/src/Utility/WebformElementHelper.php b/web/modules/contrib/webform/src/Utility/WebformElementHelper.php index 415f904da..3a3e8b7b9 100644 --- a/web/modules/contrib/webform/src/Utility/WebformElementHelper.php +++ b/web/modules/contrib/webform/src/Utility/WebformElementHelper.php @@ -86,6 +86,26 @@ class WebformElementHelper { return (Element::child($key) && is_array($element)); } + /** + * Determine if an element has children. + * + * @param array|mixed $element + * An element. + * + * @return bool + * TRUE if an element has children. + * + * @see \Drupal\Core\Render\Element::children + */ + public static function hasChildren($element) { + foreach ($element as $key => $value) { + if ($key === '' || $key[0] !== '#') { + return TRUE; + } + } + return FALSE; + } + /** * Determine if an element is a webform element and should be enhanced. * @@ -383,6 +403,11 @@ class WebformElementHelper { * An associative array of translated element properties. */ public static function applyTranslation(array &$element, array $translation) { + // Apply all translated properties to the element. + // This allows default properties to be translated, which includes + // composite element titles. + $element += $translation; + foreach ($element as $key => &$value) { // Make sure to only merge properties. if (!Element::property($key) || empty($translation[$key])) { @@ -586,9 +611,9 @@ class WebformElementHelper { * @return array * An associative array containing an element's states. */ - public static function getStates(array $element) { - // Composite and multiple elements use use a custom states wrapper - // which will changes '#states' to '#_webform_states'. + public static function &getStates(array &$element) { + // Composite and multiple elements use a custom states wrapper + // which will change '#states' to '#_webform_states'. // @see \Drupal\webform\Utility\WebformElementHelper::fixStatesWrapper if (!empty($element['#_webform_states'])) { return $element['#_webform_states']; @@ -597,7 +622,10 @@ class WebformElementHelper { return $element['#states']; } else { - return []; + // Return empty states variable to prevent the below notice. + // 'Only variable references should be returned by reference'. + $empty_states = []; + return $empty_states; } } @@ -630,7 +658,7 @@ class WebformElementHelper { * Randomoize an associative array of element values and disable page caching. * * @param array $values - * An associative array of element values, + * An associative array of element values. * * @return array * Randomized associative array of element values. diff --git a/web/modules/contrib/webform/src/WebformAccessRulesManager.php b/web/modules/contrib/webform/src/WebformAccessRulesManager.php index e1a1586d4..feae2f058 100644 --- a/web/modules/contrib/webform/src/WebformAccessRulesManager.php +++ b/web/modules/contrib/webform/src/WebformAccessRulesManager.php @@ -119,21 +119,9 @@ class WebformAccessRulesManager implements WebformAccessRulesManagerInterface { } /** - * Retrieve a list of access rules from a webform. - * - * @param \Drupal\webform\WebformInterface $webform - * Webform whose access rules to retrieve. - * - * @return array - * Associative array of access rules contained in the provided webform. Keys - * are operation names whereas values are sub arrays with the following - * structure: - * - roles: (array) Array of roles that should have access to this operation - * - users: (array) Array of UIDs that should have access to this operation - * - permissions: (array) Array of permissions that should grant access to - * this operation + * {@inheritdoc} */ - protected function getAccessRules(WebformInterface $webform) { + public function getAccessRules(WebformInterface $webform) { return $webform->getAccessRules() + $this->getDefaultAccessRules(); } @@ -142,19 +130,9 @@ class WebformAccessRulesManager implements WebformAccessRulesManagerInterface { /****************************************************************************/ /** - * Check access for a given operation and set of access rules. - * - * @param string $operation - * Operation that is being requested. - * @param \Drupal\Core\Session\AccountInterface $account - * Account that is requesting access to the operation. - * @param array $access_rules - * A set of access rules to check against. - * - * @return bool - * TRUE if access is allowed and FALSE is access is denied. + * {@inheritdoc} */ - protected function checkAccessRules($operation, AccountInterface $account, array $access_rules) { + public function checkAccessRules($operation, AccountInterface $account, array $access_rules) { // Check administer access rule and grant full access to user. if ($this->checkAccessRule($access_rules['administer'], $account)) { return TRUE; @@ -201,15 +179,9 @@ class WebformAccessRulesManager implements WebformAccessRulesManagerInterface { } /** - * Determine if access rules should be cached per user. - * - * @param array $access_rules - * A set of access rules. - * - * @return bool - * TRUE if access rules should be cached per user. + * {@inheritdoc} */ - protected function cachePerUser(array $access_rules) { + public function cachePerUser(array $access_rules) { foreach ($access_rules as $access_rule) { if (!empty($access_rule['users'])) { return TRUE; diff --git a/web/modules/contrib/webform/src/WebformAccessRulesManagerInterface.php b/web/modules/contrib/webform/src/WebformAccessRulesManagerInterface.php index 5b0293c01..ce5bc6b1d 100644 --- a/web/modules/contrib/webform/src/WebformAccessRulesManagerInterface.php +++ b/web/modules/contrib/webform/src/WebformAccessRulesManagerInterface.php @@ -39,6 +39,10 @@ interface WebformAccessRulesManagerInterface { */ public function checkWebformSubmissionAccess($operation, AccountInterface $account, WebformSubmissionInterface $webform_submission); + /****************************************************************************/ + // Get access rules methods. + /****************************************************************************/ + /** * Returns the webform default access rules. * @@ -47,6 +51,42 @@ interface WebformAccessRulesManagerInterface { */ public function getDefaultAccessRules(); + /** + * Retrieve a list of access rules from a webform. + * + * @param \Drupal\webform\WebformInterface $webform + * Webform whose access rules to retrieve. + * + * @return array + * Associative array of access rules contained in the provided webform. Keys + * are operation names whereas values are sub arrays with the following + * structure: + * - roles: (array) Array of roles that should have access to this operation + * - users: (array) Array of UIDs that should have access to this operation + * - permissions: (array) Array of permissions that should grant access to + * this operation + */ + public function getAccessRules(WebformInterface $webform); + + /****************************************************************************/ + // Check access rules methods. + /****************************************************************************/ + + /** + * Check access for a given operation and set of access rules. + * + * @param string $operation + * Operation that is being requested. + * @param \Drupal\Core\Session\AccountInterface $account + * Account that is requesting access to the operation. + * @param array $access_rules + * A set of access rules to check against. + * + * @return bool + * TRUE if access is allowed and FALSE is access is denied. + */ + public function checkAccessRules($operation, AccountInterface $account, array $access_rules); + /** * Collect metadata on known access rules. * @@ -65,4 +105,15 @@ interface WebformAccessRulesManagerInterface { */ public function getAccessRulesInfo(); + /** + * Determine if access rules should be cached per user. + * + * @param array $access_rules + * A set of access rules. + * + * @return bool + * TRUE if access rules should be cached per user. + */ + public function cachePerUser(array $access_rules); + } diff --git a/web/modules/contrib/webform/src/WebformAddonsManager.php b/web/modules/contrib/webform/src/WebformAddonsManager.php index a8cda6bbc..e0428f9c8 100644 --- a/web/modules/contrib/webform/src/WebformAddonsManager.php +++ b/web/modules/contrib/webform/src/WebformAddonsManager.php @@ -277,6 +277,14 @@ class WebformAddonsManager implements WebformAddonsManagerInterface { // Enhancement. /**************************************************************************/ + // Enhancement: Webform Confirmation File. + $projects['webform_confirmation_file'] = [ + 'title' => $this->t('Webform Confirmation File'), + 'description' => $this->t('Provides a webform handler that streams the contents of a file to a user after completing a webform.'), + 'url' => Url::fromUri('https://www.drupal.org/project/webform_confirmation_file'), + 'category' => 'enhancement', + ]; + // Enhancement: Webform Embed. $projects['webform_embed'] = [ 'title' => $this->t('Webform Embed'), @@ -293,6 +301,14 @@ class WebformAddonsManager implements WebformAddonsManagerInterface { 'category' => 'enhancement', ]; + // Enhancement: Webform Feedback. + $projects['webform_feedback'] = [ + 'title' => $this->t('Webform Feedback'), + 'description' => $this->t('Provides a feedback button for your website which allows you to gather customer/client feedback.'), + 'url' => Url::fromUri('https://www.drupal.org/project/webform_feedback'), + 'category' => 'enhancement', + ]; + // Enhancement: Webform Protected Downloads. $projects['webform_protected_downloads'] = [ 'title' => $this->t('Webform Protected Downloads'), @@ -304,7 +320,7 @@ class WebformAddonsManager implements WebformAddonsManagerInterface { // Enhancement: Webform Wizard Full Title. $projects['webform_wizard_full_title'] = [ 'title' => $this->t('Webform Wizard Full Title'), - 'description' => $this->t('Extends functionality of Webform so on wizard forms, the title of the wizard page can override the form title'), + 'description' => $this->t('Extends functionality of Webform so on wizard forms, the title of the wizard page can override the form title.'), 'url' => Url::fromUri('https://www.drupal.org/project/webform_wizard_full_title'), 'category' => 'enhancement', ]; @@ -343,11 +359,19 @@ class WebformAddonsManager implements WebformAddonsManagerInterface { // Integrations: Druminate Webforms. $projects['druminate'] = [ 'title' => $this->t('Druminate Webforms'), - 'description' => $this->t('Allows editors to send webform submissions to Luminate Online Surveys'), + 'description' => $this->t('Allows editors to send webform submissions to Luminate Online Surveys.'), 'url' => Url::fromUri('https://www.drupal.org/project/druminate'), 'category' => 'integration', ]; + // Integrations: Webform Eloqua. + $projects['webform_eloqua'] = [ + 'title' => $this->t('Webform Eloqua'), + 'description' => $this->t('Integrates Drupal 8 Webforms with Oracle Eloqua.'), + 'url' => Url::fromUri('https://www.drupal.org/project/webform_eloqua'), + 'category' => 'integration', + ]; + // Integrations: GraphQL Webform. $projects['graphql_webform'] = [ 'title' => $this->t('GraphQL Webform'), @@ -388,6 +412,14 @@ class WebformAddonsManager implements WebformAddonsManagerInterface { 'category' => 'integration', ]; + // Integrations: Rules Webform. + $projects['rules_webform'] = [ + 'title' => $this->t('Rules Webform'), + 'description' => $this->t("Provides integration of 'Rules' and 'Webform' modules. It enables to get access to webform submission data from rules. Also it provides possibility of altering and removing webform submission data from rules."), + 'url' => Url::fromUri('https://www.drupal.org/project/rules_webform'), + 'category' => 'integration', + ]; + // Integration: Webform iContact. $projects['webform_icontact'] = [ 'title' => $this->t('Webform iContact'), diff --git a/web/modules/contrib/webform/src/WebformEntityAccessControlHandler.php b/web/modules/contrib/webform/src/WebformEntityAccessControlHandler.php index 74a7f3985..3fd0b54f1 100644 --- a/web/modules/contrib/webform/src/WebformEntityAccessControlHandler.php +++ b/web/modules/contrib/webform/src/WebformEntityAccessControlHandler.php @@ -127,7 +127,13 @@ class WebformEntityAccessControlHandler extends EntityAccessControlHandler imple // webform's configuration via REST or JSON API. // @see https://www.drupal.org/project/webform/issues/2956771 if ($operation === 'view') { - if ($this->requestStack->getCurrentRequest()->getRequestFormat() === 'html') { + // Check is current request if for HTML. + $is_html = ($this->requestStack->getCurrentRequest()->getRequestFormat() === 'html'); + // Make sure JSON API 1.x requests format which is 'html' is + // detected properly. + // @see https://www.drupal.org/project/jsonapi/issues/2877584 + $is_jsonapi = (strpos($this->requestStack->getCurrentRequest()->getPathInfo(), '/jsonapi/') === 0) ? TRUE : FALSE; + if ($is_html && !$is_jsonapi) { $access_result = $this->accessRulesManager->checkWebformAccess('create', $account, $entity); } else { @@ -141,7 +147,7 @@ class WebformEntityAccessControlHandler extends EntityAccessControlHandler imple if ($access_result instanceof AccessResultReasonInterface) { $access_result->setReason('Access to webform configuration is required.'); } - return $access_result->addCacheContexts(['request_format']); + return $access_result->addCacheContexts(['url.path', 'request_format']); } // Check if 'update', or 'delete' of 'own' or 'any' webform is allowed. diff --git a/web/modules/contrib/webform/src/WebformEntityElementsValidator.php b/web/modules/contrib/webform/src/WebformEntityElementsValidator.php index 7165f5771..294bf5861 100644 --- a/web/modules/contrib/webform/src/WebformEntityElementsValidator.php +++ b/web/modules/contrib/webform/src/WebformEntityElementsValidator.php @@ -90,6 +90,19 @@ class WebformEntityElementsValidator implements WebformEntityElementsValidatorIn */ protected $formBuilder; + /** + * Element keys/names that are reserved. + * + * @var array + */ + public static $reservedNames = [ + 'add', + 'form_build_id', + 'form_id', + 'form_token', + 'op', + ]; + /** * Constructs a WebformEntityElementsValidator object. * @@ -241,6 +254,14 @@ class WebformEntityElementsValidator implements WebformEntityElementsValidatorIn ]; $messages[] = $this->t('The element key %name on line @line_number must contain only lowercase letters, numbers, and underscores.', $t_args); } + elseif (in_array($name, static::$reservedNames)) { + $line_numbers = $this->getLineNumbers('/^\s*(["\']?)' . preg_quote($name, '/') . '\1\s*:/'); + $t_args = [ + '%name' => $name, + '@line_number' => WebformArrayHelper::toString($line_numbers), + ]; + $messages[] = $this->t('The element key %name on line @line_number is a reserved key.', $t_args); + } } return $messages; } diff --git a/web/modules/contrib/webform/src/WebformEntityHandlersForm.php b/web/modules/contrib/webform/src/WebformEntityHandlersForm.php index 04921f5be..4b3e4c4c6 100644 --- a/web/modules/contrib/webform/src/WebformEntityHandlersForm.php +++ b/web/modules/contrib/webform/src/WebformEntityHandlersForm.php @@ -129,6 +129,7 @@ class WebformEntityHandlersForm extends EntityForm { ]; $operations = []; + // Edit. $operations['edit'] = [ 'title' => $this->t('Edit'), 'url' => Url::fromRoute('entity.webform.handler.edit_form', [ @@ -137,6 +138,7 @@ class WebformEntityHandlersForm extends EntityForm { ]), 'attributes' => WebformDialogHelper::getOffCanvasDialogAttributes(), ]; + // Duplicate. if ($handler->cardinality() === WebformHandlerInterface::CARDINALITY_UNLIMITED) { $operations['duplicate'] = [ 'title' => $this->t('Duplicate'), @@ -147,7 +149,17 @@ class WebformEntityHandlersForm extends EntityForm { 'attributes' => WebformDialogHelper::getOffCanvasDialogAttributes(), ]; } - + // Test individual handler. + if ($this->entity->access('test')) { + $operations['test'] = [ + 'title' => $this->t('Test'), + 'url' => Url::fromRoute( + 'entity.webform.test_form', + ['webform' => $this->entity->id()], + ['query' => ['_webform_handler' => $handler_id]] + ), + ]; + } // Add AJAX functionality to enable/disable operations. $operations['status'] = [ 'title' => $handler->isEnabled() ? $this->t('Disable') : $this->t('Enable'), @@ -157,7 +169,7 @@ class WebformEntityHandlersForm extends EntityForm { ]), 'attributes' => WebformDialogHelper::getModalDialogAttributes(WebformDialogHelper::DIALOG_NARROW, ['use-ajax']), ]; - + // Delete. $operations['delete'] = [ 'title' => $this->t('Delete'), 'url' => Url::fromRoute('entity.webform.handler.delete_form', [ @@ -166,6 +178,7 @@ class WebformEntityHandlersForm extends EntityForm { ]), 'attributes' => WebformDialogHelper::getModalDialogAttributes(WebformDialogHelper::DIALOG_NARROW), ]; + $row['operations'] = [ '#type' => 'operations', '#links' => $operations, diff --git a/web/modules/contrib/webform/src/WebformEntityListBuilder.php b/web/modules/contrib/webform/src/WebformEntityListBuilder.php index 4975c1ea8..2499c0947 100644 --- a/web/modules/contrib/webform/src/WebformEntityListBuilder.php +++ b/web/modules/contrib/webform/src/WebformEntityListBuilder.php @@ -78,19 +78,6 @@ class WebformEntityListBuilder extends ConfigEntityListBuilder { */ protected $roleStorage; - /** - * {@inheritdoc} - */ - public static function createInstance(ContainerInterface $container, EntityTypeInterface $entity_type) { - return new static( - $entity_type, - $container->get('entity.manager')->getStorage($entity_type->id()), - $container->get('request_stack'), - $container->get('current_user'), - $container->get('entity_type.manager') - ); - } - /** * Constructs a new WebformListBuilder object. * @@ -118,6 +105,19 @@ class WebformEntityListBuilder extends ConfigEntityListBuilder { $this->roleStorage = $entity_type_manager->getStorage('user_role'); } + /** + * {@inheritdoc} + */ + public static function createInstance(ContainerInterface $container, EntityTypeInterface $entity_type) { + return new static( + $entity_type, + $container->get('entity.manager')->getStorage($entity_type->id()), + $container->get('request_stack'), + $container->get('current_user'), + $container->get('entity_type.manager') + ); + } + /** * {@inheritdoc} */ diff --git a/web/modules/contrib/webform/src/WebformEntityStorage.php b/web/modules/contrib/webform/src/WebformEntityStorage.php index 721306a63..6859fba15 100644 --- a/web/modules/contrib/webform/src/WebformEntityStorage.php +++ b/web/modules/contrib/webform/src/WebformEntityStorage.php @@ -3,11 +3,13 @@ namespace Drupal\webform; use Drupal\Component\Uuid\UuidInterface; +use Drupal\Core\Cache\Cache; use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Config\Entity\ConfigEntityStorage; use Drupal\Core\Database\Connection; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\EntityTypeInterface; +use Drupal\Core\Entity\EntityTypeManagerInterface; use Drupal\Core\Language\LanguageManagerInterface; use Drupal\Core\StreamWrapper\StreamWrapperInterface; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -24,6 +26,13 @@ class WebformEntityStorage extends ConfigEntityStorage implements WebformEntityS */ protected $database; + /** + * The entity type manager service. + * + * @var \Drupal\Core\Entity\EntityTypeManagerInterface + */ + protected $entityTypeManager; + /** * Associative array container total results for all webforms. * @@ -44,10 +53,13 @@ class WebformEntityStorage extends ConfigEntityStorage implements WebformEntityS * The language manager. * @param \Drupal\Core\Database\Connection $database * The database connection to be used. + * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager + * The entity type manager service. */ - public function __construct(EntityTypeInterface $entity_type, ConfigFactoryInterface $config_factory, UuidInterface $uuid_service, LanguageManagerInterface $language_manager, Connection $database) { + public function __construct(EntityTypeInterface $entity_type, ConfigFactoryInterface $config_factory, UuidInterface $uuid_service, LanguageManagerInterface $language_manager, Connection $database, EntityTypeManagerInterface $entity_type_manager) { parent::__construct($entity_type, $config_factory, $uuid_service, $language_manager); $this->database = $database; + $this->entityTypeManager = $entity_type_manager; } /** @@ -59,7 +71,8 @@ class WebformEntityStorage extends ConfigEntityStorage implements WebformEntityS $container->get('config.factory'), $container->get('uuid'), $container->get('language_manager'), - $container->get('database') + $container->get('database'), + $container->get('entity_type.manager') ); } @@ -79,6 +92,21 @@ class WebformEntityStorage extends ConfigEntityStorage implements WebformEntityS return $entity; } + /** + * {@inheritdoc} + */ + protected function doPostSave(EntityInterface $entity, $update) { + if ($update && $entity->getAccessRules() != $entity->original->getAccessRules()) { + // Invalidate webform_submission listing cache tags because due to the + // change in access rules of this webform, some listings might have + // changed for users. + $cache_tags = $this->entityTypeManager->getDefinition('webform_submission')->getListCacheTags(); + Cache::invalidateTags($cache_tags); + } + + parent::doPostSave($entity, $update); + } + /** * {@inheritdoc} */ @@ -111,9 +139,6 @@ class WebformEntityStorage extends ConfigEntityStorage implements WebformEntityS foreach ($entities as $entity) { $webform_ids[] = $entity->id(); } - $this->database->delete('webform_submission_log') - ->condition('webform_id', $webform_ids, 'IN') - ->execute(); // Delete all webform records used to track next serial. $this->database->delete('webform') diff --git a/web/modules/contrib/webform/src/WebformHelpManager.php b/web/modules/contrib/webform/src/WebformHelpManager.php index 55d4cc3cb..a738bfa45 100644 --- a/web/modules/contrib/webform/src/WebformHelpManager.php +++ b/web/modules/contrib/webform/src/WebformHelpManager.php @@ -385,7 +385,7 @@ class WebformHelpManager implements WebformHelpManagerInterface { // Content. $row['content'] = ['data' => []]; $row['content']['data']['title'] = [ - '#markup' => $video['title'], + '#markup' => $video['title'] . ' | ' . (isset($video['owner']) ? $video['owner'] : $this->t('Jacob Rockowitz')), '#prefix' => '

', '#suffix' => '

', ]; @@ -404,22 +404,29 @@ class WebformHelpManager implements WebformHelpManagerInterface { '#prefix' => '

', '#suffix' => '

', ]; - $row['content']['data']['resources'] = [ - 'title' => [ - '#markup' => $this->t('Additional resources'), - '#prefix' => '
', - '#suffix' => '
', - ], - 'links' => [ - '#theme' => 'links', - '#links' => $this->getVideoLinks($id), - '#attributes' => ['class' => ['webform-help-links']], - ], - ]; + if ($video_links = $this->getVideoLinks($id)) { + $row['content']['data']['resources'] = [ + 'title' => [ + '#markup' => $this->t('Additional resources'), + '#prefix' => '
', + '#suffix' => '
', + ], + 'links' => [ + '#theme' => 'links', + '#links' => $video_links, + '#attributes' => ['class' => ['webform-help-links']], + ], + ]; + } $rows[$id] = ['data' => $row, 'no_striping' => TRUE]; } - $build = []; + $build = [ + 'content' => [ + '#markup' => '

' . $this->t('The below are video tutorials are produced by Jacob Rockowitz and WebWash.net.') . '

' . + (!$docs ? '
' : ''), + ], + ]; if (!$docs) { // Filter. @@ -473,13 +480,12 @@ class WebformHelpManager implements WebformHelpManagerInterface { ]; - $build['#attached']['library'][] = 'webform/webform.admin'; $build['#attached']['library'][] = 'webform/webform.help'; $build['#attached']['library'][] = 'webform/webform.ajax'; } else { - $build = [ + $build['videos'] = [ '#theme' => 'table', '#rows' => $rows, '#no_striping' => TRUE, @@ -501,7 +507,8 @@ class WebformHelpManager implements WebformHelpManagerInterface { $build = [ 'content' => [ '#markup' => '

' . $this->t("Below is a list of modules and projects that extend and/or provide additional functionality to the Webform module and Drupal's Form API.") . '

' . - '

★ = ' . $this->t('Recommended') . '

', + '
' . + '

★ = ' . $this->t('Recommended') . '

', ], ]; @@ -803,7 +810,10 @@ class WebformHelpManager implements WebformHelpManagerInterface { * An associative array containing videos. */ protected function initVideos() { - $videos = [ + $videos = []; + + // Jacob Rockowitz (jrockowitz.com). + $videos += [ 'introduction' => [ 'title' => $this->t('Introduction to Webform for Drupal 8'), 'content' => $this->t('This screencast provides a general introduction to the Webform module.'), @@ -1185,6 +1195,116 @@ class WebformHelpManager implements WebformHelpManagerInterface { 'presentation_id' => '1TMo0vBjkdtfcIsYWhxQnjO_rG9ebK64oHhdPvTvwNus', ], ]; + + // WebWash (www.webwash.net/). + $videos += [ + 'webwash_webform' => [ + 'title' => $this->t('How to Create Forms using Webform and Contact in Drupal 8'), + 'owner' => $this->t('WebWash'), + 'content' => $this->t('Learn how to create forms using Webform and Contact module in Drupal 8.'), + 'youtube_id' => 'u8PBW0K9I9I', + 'links' => [ + [ + 'title' => $this->t('Getting Started with Webform in Drupal 8: Part I | WebWash'), + 'url' => 'https://www.webwash.net/getting-started-webform-drupal-8/', + ], + [ + 'title' => $this->t('Moving Forward with Webform in Drupal 8: Part II | WebWash'), + 'url' => 'https://www.webwash.net/moving-forward-webform-drupal-8/ ', + ], + ] + ], + 'webwash_install' => [ + 'title' => $this->t('Using Webform in Drupal 8, 1.1: Install Webform'), + 'owner' => $this->t('WebWash'), + 'content' => $this->t('Learn how to download and install the Webform module.'), + 'youtube_id' => 'T4CiLF8fwFQ', + ], + 'webwash_create' => [ + 'title' => $this->t('Using Webform in Drupal 8, 1.2: Create a Form'), + 'owner' => $this->t('WebWash'), + 'content' => $this->t('Learn how to create a form from scratch and add three elements to it: Name, Email and Telephone.'), + 'youtube_id' => 'fr3kTiYKNls', + ], + 'webwash_conditional' => [ + 'title' => $this->t('Using Webform in Drupal 8, 2.1: Create Conditional Elements'), + 'owner' => $this->t('WebWash'), + 'content' => $this->t('Learn how to create conditional elements.'), + 'youtube_id' => 'ic4wu-iZd4Y', + ], + 'webwash_wizard' => [ + 'title' => $this->t('Using Webform in Drupal 8, 2.2: Create Multi-step Wizard'), + 'owner' => $this->t('WebWash'), + 'content' => $this->t('Learn how to create a multi-step page form.'), + 'youtube_id' => 'k17W2yH71ak', + ], + 'webwash_float' => [ + 'title' => $this->t('Using Webform in Drupal 8, 2.3: Float Elements Next to Each Other'), + 'owner' => $this->t('WebWash'), + 'content' => $this->t('Learn how to float elements next to each other on a form.'), + 'youtube_id' => 'EgFNqfVboHQ', + ], + 'webwash_options' => [ + 'title' => $this->t('Using Webform in Drupal 8, 2.4: Create List Options'), + 'owner' => $this->t('WebWash'), + 'content' => $this->t('Learn how to create reusable list options for elements.'), + 'youtube_id' => 'magHXd9DNpg', + 'links' => [ + [ + 'title' => $this->t('How to Use Webform Predefined Options in Drupal 8 | WebWash'), + 'url' => 'https://www.webwash.net/use-webform-predefined-options-drupal-8/', + ], + ], + ], + 'webwash_email' => [ + 'title' => $this->t('Using Webform in Drupal 8, 2.5: Sending Emails'), + 'owner' => $this->t('WebWash'), + 'content' => $this->t('Learn how to send emails when a submission is submitted.'), + 'youtube_id' => 'kSzi1J1MyBc', + ], + 'webwash_confirmation' => [ + 'title' => $this->t('Using Webform in Drupal 8, 2.6: Create Confirmation Page'), + 'owner' => $this->t('WebWash'), + 'content' => $this->t('Learn how to create a custom confirmation page.'), + 'youtube_id' => 'edYCWGoLzZk', + ], + 'webwash_submissions' => [ + 'title' => $this->t('Using Webform in Drupal 8, 3.1: View, Download and Clear Submissions'), + 'owner' => $this->t('WebWash'), + 'content' => $this->t('Learn how to view and manage submission data.'), + 'youtube_id' => 'dftBF8P4Lh4', + ], + 'webwash_drafts' => [ + 'title' => $this->t('Using Webform in Drupal 8, 3.2: Allow Draft Submissions'), + 'owner' => $this->t('WebWash'), + 'content' => $this->t('Learn how to allow users to save draft submissions.'), + 'youtube_id' => 'xA3RtJFZc_4', + ], + 'webwash_zapier' => [ + 'title' => $this->t('Using Webform in Drupal 8, 4.1: Send Submissions to Zapier'), + 'owner' => $this->t('WebWash'), + 'content' => $this->t('Learn how to integrate Webform with other system using Zapier.'), + 'youtube_id' => 'GY0F-rya2iY', + 'links' => [ + [ + 'title' => $this->t('Integrate Webform and Google Sheets using Zapier in Drupal 8 | WebWash'), + 'url' => 'https://www.webwash.net/integrate-webform-and-google-sheets-using-zapier-in-drupal-8/', + ], + ], + ], + 'webwash_block' => [ + 'title' => $this->t('Using Webform in Drupal 8, 5.1: Display Form as a Block'), + 'owner' => $this->t('WebWash'), + 'content' => $this->t('Learn how to display a form as a block.'), + 'youtube_id' => 'men4peeDS_4', + ], + 'webwash_node' => [ + 'title' => $this->t('Using Webform in Drupal 8, 5.2: Display Form using Webform Node'), + 'owner' => $this->t('WebWash'), + 'content' => $this->t('Learn how to display forms using Webform Node sub-module.'), + 'youtube_id' => '29pntXdy81k', + ], + ]; foreach ($videos as $id => &$video_info) { $video_info['id'] = $id; } @@ -1349,13 +1469,28 @@ class WebformHelpManager implements WebformHelpManagerInterface { ], ]; + + /**************************************************************************/ + // Help. + /**************************************************************************/ + + $help['help'] = [ + 'group' => 'help', + 'title' => $this->t('Help'), + 'content' => $this->t('Visit the Webform 8.x-5.x documentation pages for an introduction, features overview, articles, recipes, known issues, and a roadmap.'), + 'routes' => [ + // @see /admin/structure/webform/help + 'webform.help', + ], + ]; + /**************************************************************************/ // Contribute. /**************************************************************************/ // Contribute. $help['contribute'] = [ - 'group' => 'contribute', + 'group' => 'help', 'title' => $this->t('Contribute'), 'content' => $this->t('The Contribute page encourages individuals and organizations to join the Drupal community, become members of the Drupal Association, and contribute to Drupal projects, events, and more.'), 'video_id' => 'about', @@ -1364,6 +1499,7 @@ class WebformHelpManager implements WebformHelpManagerInterface { 'webform.contribute', ], ]; + /**************************************************************************/ // Configuration. /**************************************************************************/ @@ -1471,7 +1607,7 @@ class WebformHelpManager implements WebformHelpManagerInterface { 'group' => 'configuration', 'title' => $this->t('Configuration: Libraries: Help'), 'content' => '

' . $this->t('The Webform module utilizes third-party Open Source libraries to enhance webform elements and to provide additional functionality.') . ' ' . - $this->t('It is recommended that these libraries are installed in your Drupal installations /libraries directory.') . ' ' . + $this->t('It is recommended that these libraries are installed in your Drupal installations /libraries or /web/libraries directory.') . ' ' . $this->t('If these libraries are not installed, they will be automatically loaded from a CDN.') . ' ' . $this->t('All libraries are optional and can be excluded via the admin settings form.') . '

' . @@ -1485,7 +1621,7 @@ class WebformHelpManager implements WebformHelpManagerInterface { '
  • ' . $this->t('Generate a *.make.yml or composer.json file using drush @webform-libraries-make or drush @webform-libraries-composer.', $t_args) . '
  • ' . '
  • ' . $this->t('Execute drush @webform-libraries-download, to download third-party libraries required by the Webform module. (OSX/Linux)', $t_args) . '
  • ' . '
  • ' . $this->t("Execute drush @webform-composer-update, to update your Drupal installation's composer.json to include the Webform module's selected libraries as repositories.", $t_args) . '
  • ' . - '
  • ' . $this->t('Download and extract a zipped archive containing all webform libraries and extract the directories and files to /libraries', [':href' => 'https://cgit.drupalcode.org/sandbox-jrockowitz-2941983/plain/libraries.zip']) . '
  • ' . + '
  • ' . $this->t('Download and extract a zipped archive containing all webform libraries and extract the directories and files to /libraries or /web/libraries', [':href' => 'https://cgit.drupalcode.org/sandbox-jrockowitz-2941983/plain/libraries.zip']) . '
  • ' . '', 'message_type' => 'info', 'message_close' => TRUE, @@ -1744,17 +1880,6 @@ class WebformHelpManager implements WebformHelpManagerInterface { ], ]; - // Submissions: Log. - $help['submissions_log'] = [ - 'group' => 'submissions', - 'title' => $this->t('Submissions: Log'), - 'content' => $this->t('The Submissions log page tracks all submission events for all webforms that have submission logging enabled. Submission logging can be enabled globally or on a per webform basis.'), - 'routes' => [ - // @see /admin/structure/webform/results/log - 'entity.webform_submission.collection_log', - ], - ]; - // Results. $help['results'] = [ 'group' => 'submissions', @@ -1768,17 +1893,6 @@ class WebformHelpManager implements WebformHelpManagerInterface { ], ]; - // Results: Log. - $help['results_log'] = [ - 'group' => 'submissions', - 'title' => $this->t('Results: Log'), - 'content' => $this->t('The Results Log lists all webform submission events for the current webform.'), - 'routes' => [ - // @see /admin/structure/webform/manage/{webform}/results/log - 'entity.webform.results_log', - ], - ]; - // Results: Download. $help['results_download'] = [ 'group' => 'submissions', @@ -1846,19 +1960,6 @@ class WebformHelpManager implements WebformHelpManagerInterface { ], ]; - $help['submission_log'] = [ - 'group' => 'submission', - 'title' => $this->t('Submission: Log'), - 'content' => $this->t("The Log page shows all events and transactions for a submission."), - 'video_id' => 'submission', - 'routes' => [ - // @see /admin/structure/webform/manage/{webform}/submission/{webform_submisssion}/log - 'entity.webform_submission.log', - // @see /node/{node}/webform/submission/{webform_submission}/log - 'entity.node.webform_submission.log', - ], - ]; - $help['submission_edit'] = [ 'group' => 'submission', 'title' => $this->t('Submission: Edit'), @@ -1974,15 +2075,6 @@ class WebformHelpManager implements WebformHelpManagerInterface { 'entity.node.webform.results_submissions', ], ]; - $help['webform_node_results_log'] = [ - 'group' => 'webform_nodes', - 'title' => $this->t('Webform Node: Results: Log'), - 'content' => $this->t('The Results Log lists all webform submission events for the current webform.'), - 'routes' => [ - // @see /node/{node}/webform/results/log - 'entity.node.webform.results_log', - ], - ]; $help['webform_node_results_download'] = [ 'group' => 'webform_nodes', 'title' => $this->t('Webform Node: Results: Download'), diff --git a/web/modules/contrib/webform/src/WebformInterface.php b/web/modules/contrib/webform/src/WebformInterface.php index aeedbc15c..cb9b51455 100644 --- a/web/modules/contrib/webform/src/WebformInterface.php +++ b/web/modules/contrib/webform/src/WebformInterface.php @@ -239,6 +239,34 @@ interface WebformInterface extends ConfigEntityInterface, EntityWithPluginCollec */ public function getNumberOfWizardPages(); + /** + * Returns the webform's current operation. + * + * @return string + * The webform's operation. + */ + public function getOperation(); + + /** + * Sets the webform's current operation . + * + * @param string $operation + * The webform's operation. + * + * @return $this + * + * @see \Drupal\webform\WebformSubmissionForm + */ + public function setOperation($operation); + + /** + * Determine if the webform is being tested. + * + * @return bool + * TRUE if the webform is being tested. + */ + public function isTest(); + /** * Sets the webform settings and properties override state. * @@ -329,10 +357,19 @@ interface WebformInterface extends ConfigEntityInterface, EntityWithPluginCollec * Returns the webform confidential indicator. * * @return bool - * TRUE if the webform is confidential . + * TRUE if the webform is confidential. */ public function isConfidential(); + + /** + * Determine if remote IP address is being stored. + * + * @return bool + * TRUE if remote IP address is being stored. + */ + public function hasRemoteAddr(); + /** * Determine if the saving of submissions is disabled. * @@ -667,13 +704,21 @@ interface WebformInterface extends ConfigEntityInterface, EntityWithPluginCollec public function getElementsManagedFiles(); /** - * Get webform elements selectors as options. + * Get webform element's selectors as options. * * @return array * Webform elements selectors as options. */ public function getElementsSelectorOptions(); + /** + * Get webform element options as autocomplete source values. + * + * @return array + * Webform element options as autocomplete source values. + */ + public function getElementsSelectorSourceValues(); + /** * Get webform elements that can be prepopulated. * diff --git a/web/modules/contrib/webform/src/WebformLibrariesManager.php b/web/modules/contrib/webform/src/WebformLibrariesManager.php index 9894da7ab..6a5b0482d 100644 --- a/web/modules/contrib/webform/src/WebformLibrariesManager.php +++ b/web/modules/contrib/webform/src/WebformLibrariesManager.php @@ -123,7 +123,15 @@ class WebformLibrariesManager implements WebformLibrariesManagerInterface { ':settings_elements_href' => Url::fromRoute('webform.config.elements')->toString(), ]; - if ($library_exists) { + if (!empty($library['module'])) { + // Installed by module. + $t_args['@module'] = $library['module']; + $t_args[':module_href'] = 'https://www.drupal.org/project/' . $library['module']; + $stats['@installed']++; + $title = $this->t('@title (Installed)', $t_args); + $description = $this->t('The @title library is installed by the @module module.', $t_args); + } + elseif ($library_exists) { // Installed. $stats['@installed']++; $title = $this->t('@title @version (Installed)', $t_args); @@ -277,7 +285,7 @@ class WebformLibrariesManager implements WebformLibrariesManagerInterface { 'version' => $ckeditor_version, ]; $libraries['ckeditor.fakeobjects'] = [ - 'title' => $this->t('CKEditor: Fakeobjects'), + 'title' => $this->t('CKEditor: Fake Objects'), 'description' => $this->t('Utility required by CKEditor link plugin.'), 'notes' => $this->t('Allows CKEditor to use basic image and link dialog.'), 'homepage_url' => Url::fromUri('https://ckeditor.com/addon/fakeobjects'), @@ -321,9 +329,9 @@ class WebformLibrariesManager implements WebformLibrariesManagerInterface { 'description' => $this->t('Code Mirror is a versatile text editor implemented in JavaScript for the browser.'), 'notes' => $this->t('Code Mirror is used to provide a text editor for YAML, HTML, CSS, and JavaScript configuration settings and messages.'), 'homepage_url' => Url::fromUri('http://codemirror.net/'), - 'download_url' => Url::fromUri('https://github.com/components/codemirror/archive/5.41.0.zip'), + 'download_url' => Url::fromUri('https://github.com/components/codemirror/archive/5.42.0.zip'), 'issues_url' => Url::fromUri('https://github.com/codemirror/codemirror/issues'), - 'version' => '5.41.0', + 'version' => '5.42.0', ]; $libraries['algolia.places'] = [ 'title' => $this->t('Algolia Places'), @@ -334,8 +342,8 @@ class WebformLibrariesManager implements WebformLibrariesManagerInterface { // NOTE: Using NPM/JsDelivr because it contains the '/dist/cdn/' directory. // @see https://asset-packagist.org/package/detail?fullname=npm-asset/places.js // @see https://www.jsdelivr.com/package/npm/places.js - 'download_url' => Url::fromUri('https://registry.npmjs.org/places.js/-/places.js-1.13.0.tgz'), - 'version' => '1.13.0', + 'download_url' => Url::fromUri('https://registry.npmjs.org/places.js/-/places.js-1.15.0.tgz'), + 'version' => '1.15.0', 'elements' => ['webform_location_places'], ]; $libraries['jquery.geocomplete'] = [ @@ -362,16 +370,16 @@ class WebformLibrariesManager implements WebformLibrariesManagerInterface { 'description' => $this->t('Input masks ensures a predefined format is entered. This can be useful for dates, numerics, phone numbers, etc…'), 'notes' => $this->t('Input masks are used to ensure predefined and custom formats for text fields.'), 'homepage_url' => Url::fromUri('https://robinherbots.github.io/Inputmask/'), - 'download_url' => Url::fromUri('https://github.com/RobinHerbots/jquery.inputmask/archive/4.0.2.zip'), - 'version' => '4.0.2', + 'download_url' => Url::fromUri('https://github.com/RobinHerbots/jquery.inputmask/archive/4.0.4.zip'), + 'version' => '4.0.4', ]; $libraries['jquery.intl-tel-input'] = [ 'title' => $this->t('jQuery: International Telephone Input'), 'description' => $this->t("A jQuery plugin for entering and validating international telephone numbers. It adds a flag dropdown to any input, detects the user's country, displays a relevant placeholder and provides formatting/validation methods."), 'notes' => $this->t('International Telephone Input is used by the Telephone element.'), 'homepage_url' => Url::fromUri('https://github.com/jackocnr/intl-tel-input'), - 'download_url' => Url::fromUri('https://github.com/jackocnr/intl-tel-input/archive/v14.0.4.zip'), - 'version' => '14.0.4', + 'download_url' => Url::fromUri('https://github.com/jackocnr/intl-tel-input/archive/v14.0.6.zip'), + 'version' => '14.0.6', ]; $libraries['jquery.rateit'] = [ 'title' => $this->t('jQuery: RateIt'), @@ -389,6 +397,7 @@ class WebformLibrariesManager implements WebformLibrariesManagerInterface { 'homepage_url' => Url::fromUri('https://select2.github.io/'), 'download_url' => Url::fromUri('https://github.com/select2/select2/archive/4.0.5.zip'), 'version' => '4.0.5', + 'module' => $this->moduleHandler->moduleExists('select2') ? 'select2' : '', ]; $libraries['jquery.chosen'] = [ 'title' => $this->t('jQuery: Chosen'), @@ -397,6 +406,7 @@ class WebformLibrariesManager implements WebformLibrariesManagerInterface { 'homepage_url' => Url::fromUri('https://harvesthq.github.io/chosen/'), 'download_url' => Url::fromUri('https://github.com/harvesthq/chosen/releases/download/v1.8.7/chosen_v1.8.7.zip'), 'version' => '1.8.7', + 'module' => $this->moduleHandler->moduleExists('chosen') ? 'chosen' : '', ]; $libraries['jquery.textcounter'] = [ 'title' => $this->t('jQuery: Text Counter'), diff --git a/web/modules/contrib/webform/src/WebformOptionsListBuilder.php b/web/modules/contrib/webform/src/WebformOptionsListBuilder.php index 11782175b..6f32a5cb0 100644 --- a/web/modules/contrib/webform/src/WebformOptionsListBuilder.php +++ b/web/modules/contrib/webform/src/WebformOptionsListBuilder.php @@ -4,10 +4,15 @@ namespace Drupal\webform; use Drupal\Core\Config\Entity\ConfigEntityListBuilder; use Drupal\Core\Entity\EntityInterface; +use Drupal\Core\Entity\EntityStorageInterface; +use Drupal\Core\Entity\EntityTypeInterface; use Drupal\Core\Form\OptGroup; use Drupal\Core\Url; use Drupal\webform\Entity\WebformOptions; use Drupal\webform\Utility\WebformDialogHelper; +use Symfony\Component\DependencyInjection\ContainerInterface; +use Symfony\Component\HttpFoundation\RedirectResponse; +use Symfony\Component\HttpFoundation\RequestStack; /** * Defines a class to build a listing of webform options entities. @@ -16,12 +21,65 @@ use Drupal\webform\Utility\WebformDialogHelper; */ class WebformOptionsListBuilder extends ConfigEntityListBuilder { + /** + * Search keys. + * + * @var string + */ + protected $keys; + + /** + * Search category. + * + * @var string + */ + protected $category; + + /** + * Constructs a new WebformOptionsListBuilder object. + * + * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type + * The entity type definition. + * @param \Drupal\Core\Entity\EntityStorageInterface $storage + * The entity storage class. + * @param \Symfony\Component\HttpFoundation\RequestStack $request_stack + * The request stack. + */ + public function __construct(EntityTypeInterface $entity_type, EntityStorageInterface $storage, RequestStack $request_stack) { + parent::__construct($entity_type, $storage); + $this->request = $request_stack->getCurrentRequest(); + + $this->keys = $this->request->query->get('search'); + $this->category = $this->request->query->get('category'); + } + + /** + * {@inheritdoc} + */ + public static function createInstance(ContainerInterface $container, EntityTypeInterface $entity_type) { + return new static( + $entity_type, + $container->get('entity.manager')->getStorage($entity_type->id()), + $container->get('request_stack') + ); + } + /** * {@inheritdoc} */ public function render() { + // Handler autocomplete redirect. + if ($this->keys && preg_match('#\(([^)]+)\)$#', $this->keys, $match)) { + if ($webform_options = $this->getStorage()->load($match[1])) { + return new RedirectResponse($webform_options->toUrl()->setAbsolute(TRUE)->toString()); + } + } + $build = []; + // Filter form. + $build['filter_form'] = $this->buildFilterForm(); + // Display info. $build['info'] = $this->buildInfo(); @@ -35,6 +93,17 @@ class WebformOptionsListBuilder extends ConfigEntityListBuilder { return $build; } + /** + * Build the filter form. + * + * @return array + * A render array representing the filter form. + */ + protected function buildFilterForm() { + $categories = $this->getStorage()->getCategories(); + return \Drupal::formBuilder()->getForm('\Drupal\webform\Form\WebformOptionsFilterForm', $this->keys, $this->category, $categories); + } + /** * Build information summary. * @@ -42,7 +111,7 @@ class WebformOptionsListBuilder extends ConfigEntityListBuilder { * A render array representing the information summary. */ protected function buildInfo() { - $total = $this->getStorage()->getQuery()->count()->execute(); + $total = $this->getQuery($this->keys, $this->category)->count()->execute(); if (!$total) { return []; } @@ -173,4 +242,46 @@ class WebformOptionsListBuilder extends ConfigEntityListBuilder { ]; } + /** + * Get the base entity query filtered by search and category. + * + * @param string $keys + * (optional) Search key. + * @param string $category + * (optional) Category. + * + * @return \Drupal\Core\Entity\Query\QueryInterface + * An entity query. + */ + protected function getQuery($keys = '', $category = '') { + $query = $this->getStorage()->getQuery(); + + // Filter by key(word). + if ($keys) { + $or = $query->orConditionGroup() + ->condition('id', $keys, 'CONTAINS') + ->condition('title', $keys, 'CONTAINS') + ->condition('options', $keys, 'CONTAINS'); + $query->condition($or); + } + + // Filter by category. + if ($category) { + $query->condition('category', $category); + } + + return $query; + } + + /** + * {@inheritdoc} + */ + protected function getEntityIds() { + $header = $this->buildHeader(); + $query = $this->getQuery($this->keys, $this->category); + $query->tableSort($header); + $query->pager($this->limit); + return $query->execute(); + } + } diff --git a/web/modules/contrib/webform/src/WebformSubmissionConditionsValidator.php b/web/modules/contrib/webform/src/WebformSubmissionConditionsValidator.php index 1efa08358..bf97eb97d 100644 --- a/web/modules/contrib/webform/src/WebformSubmissionConditionsValidator.php +++ b/web/modules/contrib/webform/src/WebformSubmissionConditionsValidator.php @@ -4,6 +4,7 @@ namespace Drupal\webform; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\StringTranslation\StringTranslationTrait; +use Drupal\webform\Plugin\WebformElement\WebformCompositeBase; use Drupal\webform\Plugin\WebformElement\WebformElement; use Drupal\webform\Plugin\WebformElementManagerInterface; use Drupal\webform\Utility\WebformArrayHelper; @@ -71,12 +72,12 @@ class WebformSubmissionConditionsValidator implements WebformSubmissionCondition /** @var \Drupal\webform\WebformSubmissionInterface $webform_submission */ $webform_submission = $form_state->getFormObject()->getEntity(); - // Get build and get visible form elements. - $elements = &$this->getBuildElements($form); + // Get build/visible form elements. + $visible_elements = &$this->getBuildElements($form); // Loop through visible elements with #states. - foreach ($elements as &$element) { - $states = WebformElementHelper::getStates($element); + foreach ($visible_elements as &$element) { + $states =& WebformElementHelper::getStates($element); foreach ($states as $original_state => $conditions) { if (!is_array($conditions)) { continue; @@ -85,18 +86,31 @@ class WebformSubmissionConditionsValidator implements WebformSubmissionCondition // Process state/negate. list($state, $negate) = $this->processState($original_state); - // @todo Track an element's states. // If hide/show we need to make sure that validation is not triggered. if (strpos($state, 'visible') === 0) { $element['#after_build'][] = [get_class($this), 'elementAfterBuild']; } - // Skip if conditions targets are visible. - if ($this->isConditionsTargetsVisible($conditions, $elements)) { + $targets = $this->getConditionTargetsVisiblity($conditions, $visible_elements); + + // Determine if targets are visible or cross page. + $all_targets_visible = (array_sum($targets) === count($targets)); + $has_cross_page_targets = (!$all_targets_visible && array_sum($targets)); + + // Skip if evaluating conditions when all targets are visible. + if ($all_targets_visible) { + continue; + } + + // Replace hidden cross page targets with hidden inputs. + if ($has_cross_page_targets) { + $cross_page_targets = array_filter($targets, function ($visible) {return $visible === FALSE;}); + $states[$original_state] = $this->replaceCrossPageTargets($conditions, $webform_submission, $cross_page_targets, $form); continue; } $result = $this->validateConditions($conditions, $webform_submission); + // Skip invalid conditions. if ($result === NULL) { continue; @@ -140,6 +154,77 @@ class WebformSubmissionConditionsValidator implements WebformSubmissionCondition } } + /** + * Replace hidden cross page targets with hidden inputs. + * + * @param array $conditions + * An element's conditions. + * @param \Drupal\webform\WebformSubmissionInterface $webform_submission + * A webform submission. + * @param array $targets + * An array of hidden target selectors. + * @param array $form + * A form. + * + * @return array + * The conditions with cross page targets replaced with hidden inputs. + */ + public function replaceCrossPageTargets(array $conditions, WebformSubmissionInterface $webform_submission, array $targets, array &$form) { + $cross_page_conditions = []; + foreach ($conditions as $index => $value) { + if (is_int($index) && is_array($value) && WebformArrayHelper::isSequential($value)) { + $cross_page_conditions[$index] = $this->replaceCrossPageTargets($conditions, $webform_submission, $targets, $form); + } + else { + $cross_page_conditions[$index] = $value; + + if (is_string($value) && in_array($value, ['and', 'or', 'xor'])) { + continue; + } + elseif (is_int($index)) { + $selector = key($value); + $condition = $value[$selector]; + } + else { + $selector = $index; + $condition = $value; + } + + if (!isset($targets[$selector])) { + continue; + } + + $condition_result = $this->validateCondition($selector, $condition, $webform_submission); + if ($condition_result === NULL) { + continue; + } + + $target_trigger = $condition_result ? 'value' : '!value'; + // IMPORTANT: Using a random value to make sure users can't determine + // the a hidden (computed) element's value/result. + $target_value = rand(); + $target_name = 'webform_states_' . md5($selector); + $target_selector = ':input[name="' . $target_name . '"]'; + + if (is_int($index)) { + unset($cross_page_conditions[$index][$selector]); + $cross_page_conditions[$index][$target_selector] = [$target_trigger => $target_value]; + } + else { + unset($cross_page_conditions[$selector]); + $cross_page_conditions[$target_selector] = [$target_trigger => $target_value]; + } + + // Append cross page element's result as a hidden input. + $form[$target_name] = [ + '#type' => 'hidden', + '#value' => $target_value, + ]; + } + } + return $cross_page_conditions; + } + /****************************************************************************/ // Validate form methods. /****************************************************************************/ @@ -386,54 +471,48 @@ class WebformSubmissionConditionsValidator implements WebformSubmissionCondition * {@inheritdoc} */ public function validateConditions(array $conditions, WebformSubmissionInterface $webform_submission) { - $condition_logic = 'and'; + // Determine condition logic. + // @see Drupal.states.Dependent.verifyConstraints + if (WebformArrayHelper::isSequential($conditions)) { + $condition_logic = (in_array('xor', $conditions)) ? 'xor' : 'or'; + } + else { + $condition_logic = 'and'; + } + $condition_results = []; foreach ($conditions as $index => $value) { + // Skip and, or, and xor. if (is_string($value) && in_array($value, ['and', 'or', 'xor'])) { - $condition_logic = $value; - // If OR conditional logic operator, check current condition - // results. - if ($condition_logic === 'or' && array_sum($condition_results)) { - return TRUE; - } continue; } - elseif (is_int($index)) { - $selector = key($value); - $condition = $value[$selector]; - } - else { - $selector = $index; - $condition = $value; - } - // Ignore invalid selector and return NULL. - $input_name = static::getSelectorInputName($selector); - if (!$input_name) { - return NULL; - } - - $element_key = static::getInputNameAsArray($input_name, 0); - - // Ignore missing dependee element and return NULL. - $element = $webform_submission->getWebform()->getElement($element_key); - if (!$element) { - return NULL; - } - - // Issue #1149078: States API doesn't work with multiple select fields. - // @see https://www.drupal.org/project/drupal/issues/1149078 - if (WebformArrayHelper::isSequential($condition)) { - $sub_condition_results = []; - foreach ($condition as $sub_condition) { - $sub_condition_results[] = $this->checkCondition($element, $selector, $sub_condition, $webform_submission); + if (is_int($index) && is_array($value)) { + // Validate nested conditions. + // NOTE: Nested conditions is not supported via the UI. + $nested_result = $this->validateConditions($value, $webform_submission); + if ($nested_result === NULL) { + return NULL; } - // Evaluate sub-conditions using the 'OR' operator. - $condition_results[$selector] = (boolean) array_sum($sub_condition_results); + $condition_results[] = $nested_result; } else { - $condition_results[$selector] = $this->checkCondition($element, $selector, $condition, $webform_submission); + if (is_int($index)) { + $selector = key($value); + $condition = $value[$selector]; + } + else { + $selector = $index; + $condition = $value; + } + + $condition_result = $this->validateCondition($selector, $condition, $webform_submission); + if ($condition_result === NULL) { + return NULL; + } + + $condition_results[] = $this->validateCondition($selector, $condition, $webform_submission); } } @@ -456,6 +535,59 @@ class WebformSubmissionConditionsValidator implements WebformSubmissionCondition } } + /** + * Validate #state condition. + * + * @param string $selector + * The #state condition selector. + * @param array $condition + * A condition. + * @param \Drupal\webform\WebformSubmissionInterface $webform_submission + * A webform submission. + * + * @return bool|null + * TRUE if the condition validates. NULL if condition can't be processed. + * NULL is returned when there is invalid selector and missing element + * in the conditions. + */ + protected function validateCondition($selector, array $condition, WebformSubmissionInterface $webform_submission) { + // Ignore invalid selector and return NULL. + $input_name = static::getSelectorInputName($selector); + if (!$input_name) { + return NULL; + } + + $element_key = static::getInputNameAsArray($input_name, 0); + $element = $webform_submission->getWebform()->getElement($element_key); + + // If no element is found try checking file uploads which use + // :input[name="files[ELEMENT_KEY]. + // @see \Drupal\webform\Plugin\WebformElement\WebformManagedFileBase::getElementSelectorOptions + if (!$element && strpos($selector, ':input[name="files[') === 0) { + $element_key = static::getInputNameAsArray($input_name, 1); + $element = $webform_submission->getWebform()->getElement($element_key); + } + + // Ignore missing dependee element and return NULL. + if (!$element) { + return NULL; + } + + // Issue #1149078: States API doesn't work with multiple select fields. + // @see https://www.drupal.org/project/drupal/issues/1149078 + if (WebformArrayHelper::isSequential($condition)) { + $sub_condition_results = []; + foreach ($condition as $sub_condition) { + $sub_condition_results[] = $this->checkCondition($element, $selector, $sub_condition, $webform_submission); + } + // Evaluate sub-conditions using the 'OR' operator. + return (boolean) array_sum($sub_condition_results); + } + else { + return $this->checkCondition($element, $selector, $condition, $webform_submission); + } + } + /** * Check a condition. * @@ -521,7 +653,8 @@ class WebformSubmissionConditionsValidator implements WebformSubmissionCondition break; case 'pattern': - // PHP: Convert JavaScript-escaped Unicode characters to PCRE escape sequence format + // PHP: Convert JavaScript-escaped Unicode characters to PCRE + // escape sequence format. // @see \Drupal\webform\Plugin\WebformElement\TextBase::validatePattern $pcre_pattern = preg_replace('/\\\\u([a-fA-F0-9]{4})/', '\\x{\\1}', $trigger_value); $result = preg_match('{' . $pcre_pattern . '}u', $element_value); @@ -670,23 +803,94 @@ class WebformSubmissionConditionsValidator implements WebformSubmissionCondition $elements[$key] = &$element; $this->getBuildElementsRecusive($elements, $element, $subelement_states); + + $element_plugin = $this->elementManager->getElementInstance($element); + if ($element_plugin instanceof WebformCompositeBase && !$element_plugin->hasMultipleValues($element)) { + // Handle composite with single item. + if ($subelement_states) { + $composite_elements = $element_plugin->getCompositeElements(); + foreach ($composite_elements as $composite_key => $composite_element) { + // Skip if #access is set to FALSE. + if (isset($element['#' . $composite_key . '__access']) && $element['#' . $composite_key . '__access'] === FALSE) { + continue; + } + // Move #composite__required to #composite___required which triggers + // conditional #_required handling. + if (!empty($element['#' . $composite_key . '__required'])) { + unset($element['#' . $composite_key . '__required']); + $element['#' . $composite_key . '___required'] = TRUE; + $element['#' . $composite_key . '__states'] = $subelement_states; + } + } + } + } + elseif (isset($element['#element']) && isset($element['#webform_composite_elements'])) { + // Handle composite with multiple items and custom composite elements. + // + // For $element['#elements'] ... + // @see \Drupal\webform\Plugin\WebformElement\WebformCompositeBase::prepareMultipleWrapper + // + // For $element['#webform_composite_elements'] ... + // @see \Drupal\webform\Plugin\WebformElement\WebformCompositeBase::initializeCompositeElements + // @see \Drupal\webform_composite\Plugin\WebformElement\WebformComposite::initializeCompositeElements + // + // Recurse through a composite's sub elements. + $this->getBuildElementsRecusive($elements, $element['#element'], $subelement_states); + } } } /** - * Determine if #states conditions targets are visible. + * Get the visibility state for all of conditions targets. * * @param array $conditions * An associative array containing conditions. * @param array $elements * An associative array of visible elements. * - * @return bool - * TRUE if ALL #states conditions targets are visible. + * @return array + * An associative array keyed by target selectors with a boolean state. */ - protected function isConditionsTargetsVisible(array $conditions, array $elements) { + protected function getConditionTargetsVisiblity(array $conditions, array $elements) { + $targets = []; + $this->getConditionTargetsVisiblityRecursive($conditions, $targets); + foreach ($targets as $selector) { + // Ignore invalid selector and return FALSE. + $input_name = static::getSelectorInputName($selector); + if (!$input_name) { + $targets[$selector] = FALSE; + continue; + } + + // Check if the input's element is visible. + $element_key = static::getInputNameAsArray($input_name, 0); + if (!isset($elements[$element_key])) { + $targets[$selector] = FALSE; + continue; + } + + $targets[$selector] = TRUE; + } + return $targets; + } + + /** + * Recursively collect a conditions targets. + * + * @param array $conditions + * An associative array containing conditions. + * @param array $targets + * An associative array keyed by target selectors with a boolean state. + */ + protected function getConditionTargetsVisiblityRecursive(array $conditions, array &$targets = []) { foreach ($conditions as $index => $value) { - if (is_string($value) && in_array($value, ['and', 'or', 'xor'])) { + if (is_int($index) && is_array($value) && WebformArrayHelper::isSequential($value)) { + // Recurse downward and get nested target element. + // NOTE: Nested conditions is not supported via the UI. + $this->getConditionTargetsVisiblityRecursive($value, $targets); + } + elseif (is_string($value) && in_array($value, ['and', 'or', 'xor'])) { + // Skip AND, OR, or XOR operators. continue; } elseif (is_int($index)) { @@ -696,14 +900,7 @@ class WebformSubmissionConditionsValidator implements WebformSubmissionCondition $selector = $index; } - // Ignore invalid selector and return FALSE. - $input_name = static::getSelectorInputName($selector); - if (!$input_name) { - return FALSE; - } - - $element_key = static::getInputNameAsArray($input_name, 0); - return isset($elements[$element_key]) ? TRUE : FALSE; + $targets[$selector] = $selector; } } diff --git a/web/modules/contrib/webform/src/WebformSubmissionConditionsValidatorInterface.php b/web/modules/contrib/webform/src/WebformSubmissionConditionsValidatorInterface.php index c2421782c..6c61df1d7 100644 --- a/web/modules/contrib/webform/src/WebformSubmissionConditionsValidatorInterface.php +++ b/web/modules/contrib/webform/src/WebformSubmissionConditionsValidatorInterface.php @@ -69,7 +69,9 @@ interface WebformSubmissionConditionsValidatorInterface { * A webform submission. * * @return bool|null - * TRUE if conditions validate. NULL if conditions can't be processed. + * TRUE if the conditions validate. NULL if the conditions can't be + * processed. NULL is returned when there is an invalid selector or a + * missing element in the conditions. * * @see drupal_process_states() */ diff --git a/web/modules/contrib/webform/src/WebformSubmissionExporter.php b/web/modules/contrib/webform/src/WebformSubmissionExporter.php index aaa034b7f..15639e699 100644 --- a/web/modules/contrib/webform/src/WebformSubmissionExporter.php +++ b/web/modules/contrib/webform/src/WebformSubmissionExporter.php @@ -2,6 +2,7 @@ namespace Drupal\webform; +use Drupal\Core\Archiver\ArchiverManager; use Drupal\Core\Archiver\ArchiveTar; use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Entity\EntityInterface; @@ -51,6 +52,13 @@ class WebformSubmissionExporter implements WebformSubmissionExporterInterface { */ protected $streamWrapperManager; + /** + * The archiver manager. + * + * @var \Drupal\Core\Archiver\ArchiverManager + */ + protected $archiverManager; + /** * Webform element manager. * @@ -111,16 +119,19 @@ class WebformSubmissionExporter implements WebformSubmissionExporterInterface { * The entity type manager. * @param \Drupal\Core\StreamWrapper\StreamWrapperManagerInterface $stream_wrapper_manager * The stream wrapper manager. + * @param \Drupal\Core\Archiver\ArchiverManager $achiver_manager + * The archiver manager. * @param \Drupal\webform\Plugin\WebformElementManagerInterface $element_manager * The webform element manager. * @param \Drupal\webform\Plugin\WebformExporterManagerInterface $exporter_manager * The results exporter manager. */ - public function __construct(ConfigFactoryInterface $config_factory, FileSystemInterface $file_system, EntityTypeManagerInterface $entity_type_manager, StreamWrapperManagerInterface $stream_wrapper_manager, WebformElementManagerInterface $element_manager, WebformExporterManagerInterface $exporter_manager) { + public function __construct(ConfigFactoryInterface $config_factory, FileSystemInterface $file_system, EntityTypeManagerInterface $entity_type_manager, StreamWrapperManagerInterface $stream_wrapper_manager, ArchiverManager $achiver_manager, WebformElementManagerInterface $element_manager, WebformExporterManagerInterface $exporter_manager) { $this->configFactory = $config_factory; $this->fileSystem = $file_system; $this->entityStorage = $entity_type_manager->getStorage('webform_submission'); $this->streamWrapperManager = $stream_wrapper_manager; + $this->archiverManager = $achiver_manager; $this->elementManager = $element_manager; $this->exporterManager = $exporter_manager; } @@ -310,10 +321,8 @@ class WebformSubmissionExporter implements WebformSubmissionExporterInterface { } } - $form['export'] = [ - '#type' => 'container', - '#attributes' => ['data-webform-states-no-clear' => TRUE], - ]; + $form['#attributes']['data-webform-states-no-clear'] = TRUE; + $form['export']['format'] = [ '#type' => 'details', '#title' => $this->t('Format options'), @@ -680,7 +689,7 @@ class WebformSubmissionExporter implements WebformSubmissionExporterInterface { $is_archive = ($this->isArchive() && $export_options['files']); $files_directories = []; if ($is_archive) { - $archiver = new ArchiveTar($this->getArchiveFilePath(), 'gz'); + $archiver = $this->getArchiveTar(); $stream_wrappers = array_keys($this->streamWrapperManager->getNames(StreamWrapperInterface::WRITE_VISIBLE)); foreach ($stream_wrappers as $stream_wrapper) { $files_directory = $this->fileSystem->realpath($stream_wrapper . '://webform/' . $webform->id()); @@ -720,9 +729,7 @@ class WebformSubmissionExporter implements WebformSubmissionExporterInterface { public function writeExportToArchive() { $export_file_path = $this->getExportFilePath(); if (file_exists($export_file_path)) { - $archive_file_path = $this->getArchiveFilePath(); - - $archiver = new ArchiveTar($archive_file_path, 'gz'); + $archiver = $this->getArchiveTar(); $archiver->addModify($export_file_path, $this->getBaseFileName(), $this->getFileTempDirectory()); @unlink($export_file_path); @@ -816,6 +823,11 @@ class WebformSubmissionExporter implements WebformSubmissionExporterInterface { $query->sort('sid', isset($export_options['order']) ? $export_options['order'] : 'ASC'); } + // Do not check access to submission since the exporter UI and Drush + // already have access checking. + // @see webform_query_webform_submission_access_alter() + $query->accessCheck(FALSE); + return $query; } @@ -943,4 +955,26 @@ class WebformSubmissionExporter implements WebformSubmissionExporterInterface { return ($this->isArchive() || ($this->getTotal() >= $this->getBatchLimit())); } + /** + * Construct an instance of archive tar implementation. + * + * @return \Drupal\Core\Archiver\ArchiveTar + * Archive tar implementation object. + */ + protected function getArchiveTar() { + $archive_tar = $this->archiverManager->getInstance([ + 'filepath' => $this->getArchiveFilePath(), + ]); + + $archive_tar = $archive_tar->getArchive(); + + if ($archive_tar instanceof ArchiveTar) { + // Make it gzip compress. + $archive_tar->_compress = TRUE; + $archive_tar->_compress_type = 'gz'; + } + + return $archive_tar; + } + } diff --git a/web/modules/contrib/webform/src/WebformSubmissionForm.php b/web/modules/contrib/webform/src/WebformSubmissionForm.php index 521d2ec59..86179c027 100644 --- a/web/modules/contrib/webform/src/WebformSubmissionForm.php +++ b/web/modules/contrib/webform/src/WebformSubmissionForm.php @@ -29,6 +29,7 @@ use Drupal\webform\Utility\WebformArrayHelper; use Drupal\webform\Utility\WebformElementHelper; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException; +use Drupal\Core\Config\ConfigFactoryInterface; /** * Provides a webform to collect and edit submissions. @@ -37,6 +38,13 @@ class WebformSubmissionForm extends ContentEntityForm { use WebformDialogFormTrait; + /** + * The configuration object factory. + * + * @var \Drupal\Core\Config\ConfigFactoryInterface + */ + protected $configFactory; + /** * The renderer service. * @@ -152,6 +160,8 @@ class WebformSubmissionForm extends ContentEntityForm { * * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager * The entity manager. + * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory + * The factory for configuration objects. * @param \Drupal\Core\Render\RendererInterface $renderer * The renderer service. * @param \Drupal\Core\Path\AliasManagerInterface $alias_manager @@ -175,8 +185,23 @@ class WebformSubmissionForm extends ContentEntityForm { * @param \Drupal\webform\WebformSubmissionGenerateInterface $submission_generate * The webform submission generation service. */ - public function __construct(EntityManagerInterface $entity_manager, RendererInterface $renderer, AliasManagerInterface $alias_manager, PathValidatorInterface $path_validator, WebformRequestInterface $request_handler, WebformElementManagerInterface $element_manager, WebformThirdPartySettingsManagerInterface $third_party_settings_manager, WebformMessageManagerInterface $message_manager, WebformTokenManagerInterface $token_manager, WebformSubmissionConditionsValidator $conditions_validator, WebformEntityReferenceManagerInterface $webform_entity_reference_manager, WebformSubmissionGenerateInterface $submission_generate) { + public function __construct( + EntityManagerInterface $entity_manager, + ConfigFactoryInterface $config_factory, + RendererInterface $renderer, + AliasManagerInterface $alias_manager, + PathValidatorInterface $path_validator, + WebformRequestInterface $request_handler, + WebformElementManagerInterface $element_manager, + WebformThirdPartySettingsManagerInterface $third_party_settings_manager, + WebformMessageManagerInterface $message_manager, + WebformTokenManagerInterface $token_manager, + WebformSubmissionConditionsValidator $conditions_validator, + WebformEntityReferenceManagerInterface $webform_entity_reference_manager, + WebformSubmissionGenerateInterface $submission_generate + ) { parent::__construct($entity_manager); + $this->configFactory = $config_factory; $this->renderer = $renderer; $this->requestHandler = $request_handler; $this->aliasManager = $alias_manager; @@ -197,6 +222,7 @@ class WebformSubmissionForm extends ContentEntityForm { public static function create(ContainerInterface $container) { return new static( $container->get('entity.manager'), + $container->get('config.factory'), $container->get('renderer'), $container->get('path.alias_manager'), $container->get('path.validator'), @@ -259,7 +285,7 @@ class WebformSubmissionForm extends ContentEntityForm { // Get the source entity and allow webform submission to be used as a source // entity. - $this->sourceEntity = $this->requestHandler->getCurrentSourceEntity(['webform']); + $this->sourceEntity = $entity->getSourceEntity() ?: $this->requestHandler->getCurrentSourceEntity(['webform']); if ($this->sourceEntity === $entity) { $this->sourceEntity = $this->requestHandler->getCurrentSourceEntity(['webform', 'webform_submission']); } @@ -351,6 +377,9 @@ class WebformSubmissionForm extends ContentEntityForm { $webform->setSettingOverride('ajax', TRUE); } + // Set the webform's current operation. + $webform->setOperation($this->operation); + return parent::setEntity($entity); } @@ -433,6 +462,9 @@ class WebformSubmissionForm extends ContentEntityForm { // Server side #states API validation. $this->conditionsValidator->buildForm($form, $form_state); + // Add Ajax callbacks. + $form = $this->buildAjaxForm($form, $form_state); + // Alter webform via webform handler. $this->getWebform()->invokeHandlers('alterForm', $form, $form_state, $webform_submission); @@ -440,7 +472,7 @@ class WebformSubmissionForm extends ContentEntityForm { $form_id = $this->getFormId(); $this->thirdPartySettingsManager->alter('webform_submission_form', $form, $form_state, $form_id); - return $this->buildAjaxForm($form, $form_state); + return $form; } /** @@ -1476,7 +1508,7 @@ class WebformSubmissionForm extends ContentEntityForm { // Validate file (upload) limit. // @see \Drupal\webform\Plugin\WebformElement\WebformManagedFileBase::validateManagedFileLimit $file_limit = $this->getWebform()->getSetting('form_file_limit') - ?: \Drupal::config('webform.settings')->get('settings.default_form_file_limit') + ?: $this->configFactory->get('webform.settings')->get('settings.default_form_file_limit') ?: ''; $file_limit = Bytes::toInt($file_limit); if (!$file_limit) { @@ -1590,12 +1622,9 @@ class WebformSubmissionForm extends ContentEntityForm { $uri = preg_replace('/\?$/', '', $uri); } $webform_submission->set('uri', $uri); + $webform_submission->set('remote_addr', ($this->getWebform()->hasRemoteAddr()) ? $this->getRequest()->getClientIp() : ''); if ($this->isConfidential()) { $webform_submission->setOwnerId(0); - $webform_submission->set('remote_addr', ''); - } - else { - $webform_submission->set('remote_addr', $this->getRequest()->getClientIp()); } } diff --git a/web/modules/contrib/webform/src/WebformSubmissionListBuilder.php b/web/modules/contrib/webform/src/WebformSubmissionListBuilder.php index 8e51ef982..fa42c508d 100644 --- a/web/modules/contrib/webform/src/WebformSubmissionListBuilder.php +++ b/web/modules/contrib/webform/src/WebformSubmissionListBuilder.php @@ -1089,7 +1089,10 @@ class WebformSubmissionListBuilder extends EntityListBuilder { ]; } - if ($entity->access('view_any') && $this->currentUser->hasPermission('access webform submission log')) { + if ($entity->access('view_any') + && $this->currentUser->hasPermission('access webform submission log') + && $webform->hasSubmissionLog() + && $this->moduleHandler->moduleExists('webform_submission_log')) { $operations['log'] = [ 'title' => $this->t('Log'), 'weight' => 100, @@ -1270,14 +1273,15 @@ class WebformSubmissionListBuilder extends EntityListBuilder { $direction = tablesort_get_sort($header); // If query is order(ed) by 'element__*' we need to build a custom table - // sort using hook_query_alter(). - // @see: webform_query_alter() + // sort using hook_query_TAG_alter(). + // @see webform_query_webform_submission_list_builder_alter() if ($order && strpos($order['sql'], 'element__') === 0) { $name = $order['sql']; $column = $this->columns[$name]; - $query->addMetaData('webform_submission_element_name', $column['key']); - $query->addMetaData('webform_submission_element_property_name', $column['property_name']); - $query->addMetaData('webform_submission_element_direction', $direction); + $query->addTag('webform_submission_list_builder') + ->addMetaData('webform_submission_element_name', $column['key']) + ->addMetaData('webform_submission_element_property_name', $column['property_name']) + ->addMetaData('webform_submission_element_direction', $direction); $result = $query->execute(); // Must manually initialize the pager because the DISTINCT clause in the // query is breaking the row counting. diff --git a/web/modules/contrib/webform/src/WebformSubmissionNotesForm.php b/web/modules/contrib/webform/src/WebformSubmissionNotesForm.php index fde9da1bc..748dbfc3e 100644 --- a/web/modules/contrib/webform/src/WebformSubmissionNotesForm.php +++ b/web/modules/contrib/webform/src/WebformSubmissionNotesForm.php @@ -97,19 +97,18 @@ class WebformSubmissionNotesForm extends ContentEntityForm { '#return_value' => TRUE, '#access' => $this->isDialog() ? FALSE : TRUE, ]; - if ($this->currentUser()->hasPermission('administer users')) { - $form['uid'] = [ - '#type' => 'entity_autocomplete', - '#title' => $this->t('Submitted by'), - '#description' => $this->t('The username of the user that submitted the webform.'), - '#target_type' => 'user', - '#selection_setttings' => [ - 'include_anonymous' => FALSE, - ], - '#required' => TRUE, - '#default_value' => $webform_submission->getOwner(), - ]; - } + $form['uid'] = [ + '#type' => 'entity_autocomplete', + '#title' => $this->t('Submitted by'), + '#description' => $this->t('The username of the user that submitted the webform.'), + '#target_type' => 'user', + '#selection_setttings' => [ + 'include_anonymous' => FALSE, + ], + '#required' => TRUE, + '#default_value' => $webform_submission->getOwner(), + '#access' => $this->currentUser()->hasPermission('administer users'), + ]; $form['#attached']['library'][] = 'webform/webform.admin'; diff --git a/web/modules/contrib/webform/src/WebformSubmissionStorage.php b/web/modules/contrib/webform/src/WebformSubmissionStorage.php index 98f82053e..290adbbf5 100644 --- a/web/modules/contrib/webform/src/WebformSubmissionStorage.php +++ b/web/modules/contrib/webform/src/WebformSubmissionStorage.php @@ -213,6 +213,7 @@ class WebformSubmissionStorage extends SqlContentEntityStorage implements Webfor */ public function deleteAll(WebformInterface $webform = NULL, EntityInterface $source_entity = NULL, $limit = NULL, $max_sid = NULL) { $query = $this->getQuery(); + $query->accessCheck(FALSE); $this->addQueryConditions($query, $webform, $source_entity, NULL); if ($max_sid) { $query->condition('sid', $max_sid, '<='); @@ -238,6 +239,7 @@ class WebformSubmissionStorage extends SqlContentEntityStorage implements Webfor ]; $query = $this->getQuery(); + $query->accessCheck(FALSE); $this->addQueryConditions($query, $webform, $source_entity, $account, $options); // Issue: Query count method is not working for SQL Lite. @@ -251,6 +253,7 @@ class WebformSubmissionStorage extends SqlContentEntityStorage implements Webfor */ public function getMaxSubmissionId(WebformInterface $webform = NULL, EntityInterface $source_entity = NULL, AccountInterface $account = NULL) { $query = $this->getQuery(); + $query->accessCheck(FALSE); $this->addQueryConditions($query, $webform, $source_entity, $account); $query->sort('sid', 'DESC'); $query->range(0, 1); @@ -916,89 +919,91 @@ class WebformSubmissionStorage extends SqlContentEntityStorage implements Webfor /** @var \Drupal\webform\WebformSubmissionInterface $entity */ parent::doPostSave($entity, $update); - // Log transaction. $webform = $entity->getWebform(); - if (!$entity->getWebform()->getSetting('results_disabled')) { + + if ($entity->getWebform()->hasSubmissionLog()) { + // Log webform submission events to the 'webform_submission' log. $context = [ - '@id' => $entity->id(), - '@form' => $webform->label(), + '@title' => $entity->label(), 'link' => $entity->toLink($this->t('Edit'), 'edit-form')->toString(), + 'webform_submission' => $entity, ]; switch ($entity->getState()) { case WebformSubmissionInterface::STATE_DRAFT: - \Drupal::logger('webform')->notice('@form: Submission #@id draft saved.', $context); - break; - - case WebformSubmissionInterface::STATE_UPDATED: - \Drupal::logger('webform')->notice('@form: Submission #@id updated.', $context); - break; - - case WebformSubmissionInterface::STATE_COMPLETED: if ($update) { - \Drupal::logger('webform')->notice('@form: Submission #@id completed.', $context); + $message = '@title draft updated.'; + $context['operation'] = 'draft updated'; } else { - \Drupal::logger('webform')->notice('@form: Submission #@id created.', $context); - } - break; - } - } - - // Log submission events. - if ($entity->getWebform()->hasSubmissionLog()) { - $t_args = ['@title' => $entity->label()]; - switch ($entity->getState()) { - case WebformSubmissionInterface::STATE_DRAFT: - if ($update) { - $operation = 'draft updated'; - $message = $this->t('@title draft updated.', $t_args); - } - else { - $operation = 'draft created'; - $message = $this->t('@title draft created.', $t_args); + $message = '@title draft created.'; + $context['operation'] = 'draft created'; } break; case WebformSubmissionInterface::STATE_COMPLETED: if ($update) { - $operation = 'submission completed'; - $message = $this->t('@title completed using saved draft.', $t_args); + $message = '@title completed using saved draft.'; + $context['operation'] = 'submission completed'; } else { - $operation = 'submission created'; - $message = $this->t('@title created.', $t_args); + $message = '@title created.'; + $context['operation'] = 'submission created'; } break; case WebformSubmissionInterface::STATE_CONVERTED: - $operation = 'submission converted'; - $message = $this->t('@title converted from anonymous to @user.', $t_args + ['@user' => $entity->getOwner()->label()]); + $message = '@title converted from anonymous to @user.'; + $context['operation'] = 'submission converted'; + $context['@user'] = $entity->getOwner()->label(); break; case WebformSubmissionInterface::STATE_UPDATED: - $operation = 'submission updated'; - $message = $this->t('@title updated.', $t_args); + $message = '@title updated.'; + $context['operation'] = 'submission updated'; break; case WebformSubmissionInterface::STATE_UNSAVED: - $operation = 'submission submitted'; - $message = $this->t('@title submitted.', $t_args); + $message = '@title submitted.'; + $context['operation'] = 'submission submitted'; break; case WebformSubmissionInterface::STATE_LOCKED: - $operation = 'submission locked'; - $message = $this->t('@title locked.', $t_args); + $message = '@title locked.'; + $context['operation'] = 'submission locked'; break; default: throw new \Exception('Unexpected webform submission state'); } + \Drupal::logger('webform_submission')->notice($message, $context); + } + elseif (!$entity->getWebform()->getSetting('results_disabled')) { + // Log general events to the 'webform'. + switch ($entity->getState()) { + case WebformSubmissionInterface::STATE_DRAFT: + $message = '@title draft saved.'; + break; - $this->log($entity, [ - 'handler_id' => '', - 'operation' => $operation, - 'message' => $message, - ]); + case WebformSubmissionInterface::STATE_UPDATED: + $message = '@title updated.'; + break; + + case WebformSubmissionInterface::STATE_COMPLETED: + $message = ($update) ? '@title completed.' : '@title created.'; + break; + + default: + $message = NULL; + break; + } + if ($message) { + $context = [ + '@id' => $entity->id(), + '@title' => $entity->label(), + 'link' => $entity->toLink($this->t('Edit'), 'edit-form')->toString(), + ]; + \Drupal::logger('webform')->notice($message, $context); + } } $this->invokeWebformElements('postSave', $entity, $update); @@ -1068,9 +1073,6 @@ class WebformSubmissionStorage extends SqlContentEntityStorage implements Webfor } } - // Delete submission log after all pre and post delete hooks are called. - $this->deleteLog($entities); - // Log deleted. foreach ($entities as $entity) { \Drupal::logger('webform') @@ -1114,6 +1116,7 @@ class WebformSubmissionStorage extends SqlContentEntityStorage implements Webfor $days_to_seconds = 60 * 60 * 24; $query = $this->entityManager->getStorage('webform')->getQuery(); + $query->accessCheck(FALSE); $query->condition('settings.purge', [self::PURGE_DRAFT, self::PURGE_COMPLETED, self::PURGE_ALL], 'IN'); $query->condition('settings.purge_days', 0, '>'); $webforms_to_purge = array_values($query->execute()); @@ -1124,6 +1127,10 @@ class WebformSubmissionStorage extends SqlContentEntityStorage implements Webfor $webforms_to_purge = $this->entityManager->getStorage('webform')->loadMultiple($webforms_to_purge); foreach ($webforms_to_purge as $webform) { $query = $this->getQuery(); + // Since results of this query are never displayed to the user and we + // actually need to query the entire dataset of webform submissions, we + // are disabling access check. + $query->accessCheck(FALSE); $query->condition('created', REQUEST_TIME - ($webform->getSetting('purge_days') * $days_to_seconds), '<'); $query->condition('webform_id', $webform->id()); switch ($webform->getSetting('purge')) { @@ -1304,42 +1311,24 @@ class WebformSubmissionStorage extends SqlContentEntityStorage implements Webfor /** * {@inheritdoc} */ - public function log(WebformSubmissionInterface $webform_submission, array $values = []) { + public function log(WebformSubmissionInterface $webform_submission, array $context = []) { // Submission ID is required for logging. - // @todo Enable logging for submissions not saved to the database. if (empty($webform_submission->id())) { return; } - $values += [ + $message = $context['message']; + unset($context['message']); + + $context += [ 'uid' => $this->currentUser->id(), - 'webform_id' => $webform_submission->getWebform()->id(), - 'sid' => $webform_submission->id() ?: NULL, + 'webform_submission' => $webform_submission, 'handler_id' => NULL, 'data' => [], - 'timestamp' => time(), + 'link' => $webform_submission->toLink($this->t('Edit'), 'edit-form')->toString(), ]; - $values['data'] = serialize($values['data']); - $this->database - ->insert('webform_submission_log') - ->fields($values) - ->execute(); - } - /** - * Delete webform submission events from the 'webform_submission_log' table. - * - * @param array $webform_submissions - * An array of webform submissions. - */ - protected function deleteLog(array $webform_submissions) { - $sids = []; - foreach ($webform_submissions as $webform_submission) { - $sids[$webform_submission->id()] = $webform_submission->id(); - } - $this->database->delete('webform_submission_log') - ->condition('sid', $sids, 'IN') - ->execute(); + \Drupal::logger('webform_submission')->notice($message, $context); } /****************************************************************************/ @@ -1356,6 +1345,11 @@ class WebformSubmissionStorage extends SqlContentEntityStorage implements Webfor ]; $query = $this->getQuery(); + // Because draft is somewhat different from a complete webform submission, + // we allow to bypass access check. Moreover, draft here is enforced to be + // authored by the $account user. Thus we hardly open any security breach + // here. + $query->accessCheck(FALSE); $this->addQueryConditions($query, $webform, $source_entity, $account, $options); // Only load the most recent draft. @@ -1378,6 +1372,7 @@ class WebformSubmissionStorage extends SqlContentEntityStorage implements Webfor // Move all anonymous submissions to UID of this account. $query = $this->getQuery(); + $query->accessCheck(FALSE); $query->condition('uid', 0); $query->condition('sid', $_SESSION['webform_submissions'], 'IN'); $query->sort('sid'); @@ -1493,6 +1488,9 @@ class WebformSubmissionStorage extends SqlContentEntityStorage implements Webfor // Cleanup sids because drafts could have been purged or the webform // submission could have been deleted. $_SESSION['webform_submissions'] = $this->getQuery() + // Disable access check because user having 'sid' in his $_SESSION already + // implies he has access to it. + ->accessCheck(FALSE) ->condition('sid', $_SESSION['webform_submissions'], 'IN') ->sort('sid') ->execute(); diff --git a/web/modules/contrib/webform/src/WebformSubmissionStorageInterface.php b/web/modules/contrib/webform/src/WebformSubmissionStorageInterface.php index 080d3a4c6..b7988e1e6 100644 --- a/web/modules/contrib/webform/src/WebformSubmissionStorageInterface.php +++ b/web/modules/contrib/webform/src/WebformSubmissionStorageInterface.php @@ -556,10 +556,22 @@ interface WebformSubmissionStorageInterface extends ContentEntityStorageInterfac * * @param \Drupal\webform\WebformSubmissionInterface $webform_submission * A webform submission. - * @param array $values - * The value to be logged includes 'handler_id', 'operation', 'message', and 'data'. + * @param array $context + * The values/context to be logged includes 'handler_id', 'operation', 'message', and 'data'. + * + * @deprecated Instead call the 'webform_submission' logger channel directly. + * + * $message = 'Some message with an %argument.' + * $context = [ + * '%argument' => 'Some value' + * 'link' => $webform_submission->toLink($this->t('Edit'), 'edit-form')->toString(), + * 'webform_submission' => $webform_submission, + * 'handler_id' => NULL, + * 'data' => [], + * ]; + * \Drupal::logger('webform_submission')->notice($message, $context); */ - public function log(WebformSubmissionInterface $webform_submission, array $values = []); + public function log(WebformSubmissionInterface $webform_submission, array $context = []); /****************************************************************************/ // Draft methods. diff --git a/web/modules/contrib/webform/src/WebformSubmissionStorageSchema.php b/web/modules/contrib/webform/src/WebformSubmissionStorageSchema.php index 983411fba..c3705f9ab 100644 --- a/web/modules/contrib/webform/src/WebformSubmissionStorageSchema.php +++ b/web/modules/contrib/webform/src/WebformSubmissionStorageSchema.php @@ -65,75 +65,6 @@ class WebformSubmissionStorageSchema extends SqlContentEntityStorageSchema { ], ]; - $schema['webform_submission_log'] = [ - 'description' => 'Table that contains logs of all webform submission events.', - 'fields' => [ - 'lid' => [ - 'type' => 'serial', - 'not null' => TRUE, - 'description' => 'Primary Key: Unique log event ID.', - ], - 'webform_id' => [ - 'description' => 'The webform id.', - 'type' => 'varchar', - 'length' => 32, - 'not null' => TRUE, - ], - 'sid' => [ - 'description' => 'The webform submission id.', - 'type' => 'int', - 'unsigned' => TRUE, - 'not null' => FALSE, - ], - 'handler_id' => [ - 'description' => 'The webform handler id.', - 'type' => 'varchar', - 'length' => 64, - 'not null' => FALSE, - ], - 'uid' => [ - 'type' => 'int', - 'unsigned' => TRUE, - 'not null' => TRUE, - 'default' => 0, - 'description' => 'The {users}.uid of the user who triggered the event.', - ], - 'operation' => [ - 'type' => 'varchar_ascii', - 'length' => 64, - 'not null' => TRUE, - 'default' => '', - 'description' => 'Type of operation, for example "save", "sent", or "update."', - ], - 'message' => [ - 'type' => 'text', - 'not null' => TRUE, - 'size' => 'big', - 'description' => 'Text of log message.', - ], - 'data' => [ - 'type' => 'blob', - 'not null' => TRUE, - 'size' => 'big', - 'description' => 'Serialized array of data.', - ], - 'timestamp' => [ - 'type' => 'int', - 'not null' => TRUE, - 'default' => 0, - 'description' => 'Unix timestamp of when event occurred.', - ], - ], - 'primary key' => ['lid'], - 'indexes' => [ - 'webform_id' => ['webform_id'], - 'sid' => ['sid'], - 'uid' => ['uid'], - 'handler_id' => ['handler_id'], - 'handler_id_operation' => ['handler_id', 'operation'], - ], - ]; - return $schema; } diff --git a/web/modules/contrib/webform/src/WebformSubmissionViewsData.php b/web/modules/contrib/webform/src/WebformSubmissionViewsData.php index d64b7abaa..267e3682b 100644 --- a/web/modules/contrib/webform/src/WebformSubmissionViewsData.php +++ b/web/modules/contrib/webform/src/WebformSubmissionViewsData.php @@ -15,6 +15,8 @@ class WebformSubmissionViewsData extends EntityViewsData { public function getViewsData() { $data = parent::getViewsData(); + $data['webform_submission']['table']['base']['access query tag'] = 'webform_submission_access'; + $data['webform_submission']['webform_submission_bulk_form'] = [ 'title' => $this->t('Webform submission operations bulk form'), 'help' => $this->t('Add a form element that lets you run operations on multiple submissions.'), diff --git a/web/modules/contrib/webform/src/WebformTokenManager.php b/web/modules/contrib/webform/src/WebformTokenManager.php index 1e19bcd35..00f7fb899 100644 --- a/web/modules/contrib/webform/src/WebformTokenManager.php +++ b/web/modules/contrib/webform/src/WebformTokenManager.php @@ -8,6 +8,7 @@ use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Extension\ModuleHandlerInterface; use Drupal\Core\Language\LanguageManagerInterface; use Drupal\Core\Form\FormStateInterface; +use Drupal\Core\Render\BubbleableMetadata; use Drupal\Core\Session\AccountInterface; use Drupal\Core\StringTranslation\StringTranslationTrait; use Drupal\Core\Url; @@ -83,7 +84,7 @@ class WebformTokenManager implements WebformTokenManagerInterface { /** * {@inheritdoc} */ - public function replace($text, EntityInterface $entity = NULL, array $data = [], array $options = []) { + public function replace($text, EntityInterface $entity = NULL, array $data = [], array $options = [], BubbleableMetadata $bubbleable_metadata = NULL) { // Replace tokens within an array. if (is_array($text)) { foreach ($text as $key => $token_value) { @@ -131,7 +132,7 @@ class WebformTokenManager implements WebformTokenManagerInterface { } // Replace the webform related tokens. - $text = $this->token->replace($text, $data, $options); + $text = $this->token->replace($text, $data, $options, $bubbleable_metadata); // Process token suffixes. if (preg_match_all('/{webform-token-suffixes:([^}]+)}(.*?){\/webform-token-suffixes}/ms', $text, $matches)) { @@ -173,6 +174,15 @@ class WebformTokenManager implements WebformTokenManagerInterface { return $text; } + /** + * {@inheritdoc} + */ + public function replaceNoRenderContext($text, EntityInterface $entity = NULL, array $data = [], array $options = []) { + // Create BubbleableMetadata object which will be ignored. + $bubbleable_metadata = new BubbleableMetadata(); + return $this->replace($text, $entity, $data, $options, $bubbleable_metadata); + } + /** * {@inheritdoc} */ diff --git a/web/modules/contrib/webform/src/WebformTokenManagerInterface.php b/web/modules/contrib/webform/src/WebformTokenManagerInterface.php index d3f80e2ed..480803ede 100644 --- a/web/modules/contrib/webform/src/WebformTokenManagerInterface.php +++ b/web/modules/contrib/webform/src/WebformTokenManagerInterface.php @@ -3,6 +3,7 @@ namespace Drupal\webform; use Drupal\Core\Entity\EntityInterface; +use Drupal\Core\Render\BubbleableMetadata; /** * Defines an interface for token manager classes. @@ -27,13 +28,48 @@ interface WebformTokenManagerInterface { * array of token replacements after they are generated. * - clear: A boolean flag indicating that tokens should be removed from the * final text if no replacement value can be generated. + * @param \Drupal\Core\Render\BubbleableMetadata|null $bubbleable_metadata + * (optional) An object to which static::generate() and the hooks and + * functions that it invokes will add their required bubbleable metadata. * * @return string|array * Text or array with tokens replaced. * * @see \Drupal\Core\Utility\Token::replace */ - public function replace($text, EntityInterface $entity = NULL, array $data = [], array $options = []); + public function replace($text, EntityInterface $entity = NULL, array $data = [], array $options = [], BubbleableMetadata $bubbleable_metadata = NULL); + + /** + * Replace tokens in text with no render context. + * + * This method allows tokens to be replaced when there is no render context + * via REST and JSON API requests. + * + * @param string|array $text + * A string of text that may contain tokens. + * @param \Drupal\Core\Entity\EntityInterface|null $entity + * A Webform or Webform submission entity. + * @param array $data + * (optional) An array of keyed objects. + * @param array $options + * (optional) A keyed array of settings and flags to control the token + * replacement process. Supported options are: + * - langcode: A language code to be used when generating locale-sensitive + * tokens. + * - callback: A callback function that will be used to post-process the + * array of token replacements after they are generated. + * - clear: A boolean flag indicating that tokens should be removed from the + * final text if no replacement value can be generated. + * @param \Drupal\Core\Render\BubbleableMetadata|null $bubbleable_metadata + * (optional) An object to which static::generate() and the hooks and + * functions that it invokes will add their required bubbleable metadata. + * + * @return string|array + * Text or array with tokens replaced. + * + * @see \Drupal\Core\Utility\Token::replace + */ + public function replaceNoRenderContext($text, EntityInterface $entity = NULL, array $data = [], array $options = []); /** * Build token tree link if token.module is installed. diff --git a/web/modules/contrib/webform/src/WebformTranslationManager.php b/web/modules/contrib/webform/src/WebformTranslationManager.php index 73d473bf8..684c19f89 100644 --- a/web/modules/contrib/webform/src/WebformTranslationManager.php +++ b/web/modules/contrib/webform/src/WebformTranslationManager.php @@ -6,6 +6,7 @@ use Drupal\Core\Messenger\MessengerInterface; use Drupal\Core\Serialization\Yaml; use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Language\LanguageManagerInterface; +use Drupal\webform\Plugin\WebformElement\WebformCompositeBase; use Drupal\webform\Plugin\WebformElementManagerInterface; use Drupal\webform\Utility\WebformArrayHelper; use Drupal\webform\Utility\WebformElementHelper; @@ -143,6 +144,18 @@ class WebformTranslationManager implements WebformTranslationManagerInterface { $config_elements = $this->getElements($webform, $default_langcode); $elements = WebformElementHelper::getFlattened($config_elements); foreach ($elements as $element_key => &$element) { + // Always include composite element's default '#{element}__title'. + $element_plugin = $this->elementManager->getElementInstance($element); + if ($element_plugin instanceof WebformCompositeBase) { + $composite_elements = $element_plugin->getCompositeElements(); + foreach ($composite_elements as $composite_key => $composite_element) { + $property_key = $composite_key . '__title'; + if (empty($element["#$property_key"])) { + $element["#$property_key"] = $element_plugin->getDefaultProperty($property_key); + } + } + } + $this->removeUnTranslatablePropertiesFromElement($element); if (empty($element)) { unset($elements[$element_key]); diff --git a/web/modules/contrib/webform/templates/webform-confirmation.html.twig b/web/modules/contrib/webform/templates/webform-confirmation.html.twig index 0547fe05a..c5db7adfb 100644 --- a/web/modules/contrib/webform/templates/webform-confirmation.html.twig +++ b/web/modules/contrib/webform/templates/webform-confirmation.html.twig @@ -27,7 +27,7 @@ {% if back %} {% endif %} diff --git a/web/modules/contrib/webform/templates/webform-help-video-youtube.html.twig b/web/modules/contrib/webform/templates/webform-help-video-youtube.html.twig index 45198f834..b27cf7f71 100644 --- a/web/modules/contrib/webform/templates/webform-help-video-youtube.html.twig +++ b/web/modules/contrib/webform/templates/webform-help-video-youtube.html.twig @@ -12,6 +12,6 @@ {{ attach_library('webform/webform.help') }}
    - +
    diff --git a/web/modules/contrib/webform/templates/webform-submission.html.twig b/web/modules/contrib/webform/templates/webform-submission.html.twig index 65cb9dfb0..1675c0b87 100644 --- a/web/modules/contrib/webform/templates/webform-submission.html.twig +++ b/web/modules/contrib/webform/templates/webform-submission.html.twig @@ -22,5 +22,7 @@ view_mode ? 'webform-submission--view-mode-' ~ view_mode|clean_class, ] %} -{{ elements }} +{{ navigation }} +{{ information }} +{{ submission }}
    diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_ajax.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_ajax.yml index 57df5262d..886781983 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_ajax.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_ajax.yml @@ -36,6 +36,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -168,4 +169,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_ajax_confirmation_inline.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_ajax_confirmation_inline.yml index 169c13977..61669110c 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_ajax_confirmation_inline.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_ajax_confirmation_inline.yml @@ -37,6 +37,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -169,4 +170,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_ajax_confirmation_message.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_ajax_confirmation_message.yml index 3b4d620a5..0e1bbcb75 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_ajax_confirmation_message.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_ajax_confirmation_message.yml @@ -37,6 +37,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -169,4 +170,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_ajax_confirmation_modal.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_ajax_confirmation_modal.yml index 716069afa..0b9ec84bc 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_ajax_confirmation_modal.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_ajax_confirmation_modal.yml @@ -37,6 +37,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -169,4 +170,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_ajax_confirmation_page.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_ajax_confirmation_page.yml index 982071374..91e295b61 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_ajax_confirmation_page.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_ajax_confirmation_page.yml @@ -37,6 +37,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -169,4 +170,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_ajax_confirmation_url.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_ajax_confirmation_url.yml index f715cd6b5..4b6d4b63b 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_ajax_confirmation_url.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_ajax_confirmation_url.yml @@ -34,6 +34,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -166,4 +167,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_ajax_confirmation_url_msg.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_ajax_confirmation_url_msg.yml index 7eea16715..0e7270a10 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_ajax_confirmation_url_msg.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_ajax_confirmation_url_msg.yml @@ -37,6 +37,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -169,4 +170,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_composite.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_composite.yml index 00afdad8f..97b4bef02 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_composite.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_composite.yml @@ -73,10 +73,10 @@ elements: | '#country__access': false link_basic: '#type': webform_link - '#title': 'Link' + '#title': Link '#default_value': title: Example - url: http://example.com + url: 'http://example.com' composite_elements_multiple: '#type': details '#title': 'Composite Elements Multiple' @@ -88,7 +88,7 @@ elements: | '#multiple__header': true '#default_value': - title: Example - url: http://example.com + url: 'http://example.com' '#title__help': 'This is link title help' '#url__help': 'This is link url help' @@ -108,6 +108,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -240,6 +241,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: debug: id: debug diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_composite_custom.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_composite_custom.yml index 86a6ffed3..cc1c53fa4 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_composite_custom.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_composite_custom.yml @@ -26,8 +26,8 @@ elements: | '#type': textfield '#title': 'Last name' '#default_value': - - first_name: John - last_name: Smith + - first_name: John + last_name: Smith webform_custom_composite_advanced: '#type': webform_custom_composite '#title': webform_custom_composite_advanced @@ -54,17 +54,17 @@ elements: | '#title': 'Employment status' age: '#type': number - '#title': 'Age' + '#title': Age '#field_suffix': ' yrs. old' '#min': 1 '#max': 125 '#default_value': - - first_name: John - last_name: Smith - gender: Male - martial_status: Single - employment_status: Unemployed - age: 20 + - first_name: John + last_name: Smith + gender: Male + martial_status: Single + employment_status: Unemployed + age: 20 css: '' javascript: '' @@ -82,6 +82,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -214,6 +215,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: debug: id: debug diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_composite_custom_file.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_composite_custom_file.yml index 898469512..7146e718c 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_composite_custom_file.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_composite_custom_file.yml @@ -36,7 +36,7 @@ elements: | managed_file: '#type': managed_file '#title': managed_file - + css: '' javascript: '' settings: @@ -53,6 +53,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -185,6 +186,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: debug: id: debug diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_composite_format.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_composite_format.yml index 71b1ca87c..2dc85005f 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_composite_format.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_composite_format.yml @@ -456,6 +456,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -588,6 +589,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: email_text: id: email diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_composite_format_multiple.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_composite_format_multiple.yml index 46dea37a9..615444a58 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_composite_format_multiple.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_composite_format_multiple.yml @@ -708,6 +708,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -840,6 +841,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: email_text: id: email diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_confirmation_inline.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_confirmation_inline.yml index 05407bd15..e82a9be22 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_confirmation_inline.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_confirmation_inline.yml @@ -37,6 +37,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -169,4 +170,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_confirmation_message.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_confirmation_message.yml index 8362a3225..01eb5e634 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_confirmation_message.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_confirmation_message.yml @@ -37,6 +37,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -169,4 +170,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_confirmation_modal.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_confirmation_modal.yml index 50ea81965..930c456bf 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_confirmation_modal.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_confirmation_modal.yml @@ -37,6 +37,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -169,4 +170,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_confirmation_none.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_confirmation_none.yml index 85a65cb42..0f08d5687 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_confirmation_none.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_confirmation_none.yml @@ -37,6 +37,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -169,4 +170,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_confirmation_page.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_confirmation_page.yml index 6c83636c9..0a6288b9b 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_confirmation_page.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_confirmation_page.yml @@ -37,6 +37,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -169,4 +170,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_confirmation_page_custom.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_confirmation_page_custom.yml index faab12dea..3f122e639 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_confirmation_page_custom.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_confirmation_page_custom.yml @@ -37,6 +37,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -172,4 +173,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_confirmation_url.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_confirmation_url.yml index 30a1ab02a..eb28baba3 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_confirmation_url.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_confirmation_url.yml @@ -34,6 +34,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -166,4 +167,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_confirmation_url_message.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_confirmation_url_message.yml index 2fef4f87e..cf855e0cd 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_confirmation_url_message.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_confirmation_url_message.yml @@ -37,6 +37,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -169,4 +170,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element.yml index 43f733611..e55c071c4 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element.yml @@ -63,6 +63,7 @@ elements: | '#default_value': | {textarea line 1} {textarea line 2} + textfield: '#type': textfield '#title': textfield @@ -253,6 +254,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -385,4 +387,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_access.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_access.yml index 579ece9b1..71e4d4460 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_access.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_access.yml @@ -35,14 +35,14 @@ elements: | '#type': textfield '#title': 'access_create_users (USER:1)' '#default_value': '{value}' - '#access_create_roles': { } + '#access_create_roles': { } '#access_create_users': - 1 access_create_permissions: '#type': textfield '#title': 'access_create_permissions (access user profiles)' '#default_value': '{value}' - '#access_create_roles': { } + '#access_create_roles': { } '#access_create_permissions': - 'access user profiles' access_update: @@ -65,14 +65,14 @@ elements: | '#type': textfield '#title': 'access_update_users (USER:1)' '#default_value': '{value}' - '#access_update_roles': { } + '#access_update_roles': { } '#access_update_users': - 1 access_update_permissions: '#type': textfield '#title': 'access_update_permissions (access user profiles)' '#default_value': '{value}' - '#access_update_roles': { } + '#access_update_roles': { } '#access_update_permissions': - 'access user profiles' access_view: @@ -95,14 +95,14 @@ elements: | '#type': textfield '#title': 'access_view_users (USER:1)' '#default_value': '{value}' - '#access_view_roles': { } + '#access_view_roles': { } '#access_view_users': - 1 access_view_permissions: '#type': textfield '#title': 'access_view_permissions (access user profiles)' '#default_value': '{value}' - '#access_view_roles': { } + '#access_view_roles': { } '#access_view_permissions': - 'access user profiles' @@ -122,6 +122,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -258,4 +259,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_actions.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_actions.yml index f1dc853db..070372f7c 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_actions.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_actions.yml @@ -149,6 +149,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -281,4 +282,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_actions_buttons.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_actions_buttons.yml index 5796efb81..b573668cd 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_actions_buttons.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_actions_buttons.yml @@ -71,6 +71,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: true form_prepopulate_source_entity: false @@ -203,4 +204,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_address.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_address.yml index dbfb7bb97..b09d45ba6 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_address.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_address.yml @@ -35,7 +35,7 @@ elements: | '#description': 'This is a description' '#more_title': 'This is more title' '#more': 'This is more text' - '#title_display': 'before' + '#title_display': before '#default_value': organization: 'Google Inc.' address_line1: '1098 Alta Ave' @@ -87,6 +87,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -219,6 +220,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: debug: id: debug diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_allowed_tags.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_allowed_tags.yml index eea75b59b..b892b9e09 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_allowed_tags.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_allowed_tags.yml @@ -36,6 +36,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -168,4 +169,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_attributes.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_attributes.yml index 43bb3675a..3cfb4c4ba 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_attributes.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_attributes.yml @@ -22,6 +22,7 @@ elements: | one two three + '#class__description': 'This is a custom class description.' '#style__description': 'This is a custom style description.' '#attributes__description': 'This is a custom attributes description.' @@ -49,6 +50,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -181,6 +183,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: debug: id: debug diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_autocomplete.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_autocomplete.yml index ebb03174f..19959c2b9 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_autocomplete.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_autocomplete.yml @@ -18,7 +18,7 @@ elements: | autocomplete_off: '#type': email '#title': 'email (autocomplete=off)' - '#autocomplete': off + '#autocomplete': 'off' autocomplete_items: '#type': webform_autocomplete '#title': 'autocomplete (options)' @@ -54,6 +54,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -186,4 +187,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_buttons.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_buttons.yml index f5d6c0e6c..067676578 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_buttons.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_buttons.yml @@ -48,6 +48,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -180,6 +181,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: debug: id: debug diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_captcha.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_captcha.yml index a947d59b0..42ad333c3 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_captcha.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_captcha.yml @@ -40,11 +40,6 @@ elements: | captcha_recaptcha: '#type': captcha '#captcha_type': recaptcha/reCAPTCHA - captcha_recaptcha: - '#type': captcha - '#captcha_type': recaptcha/reCAPTCHA - '#captcha_title': '{captcha_recaptcha}' - '#captcha_description': '{captcha_recaptcha}' css: '' javascript: '' @@ -62,6 +57,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -194,6 +190,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: debug: id: debug diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_checkbox_value.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_checkbox_value.yml index 14ebafe78..14ff38f1a 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_checkbox_value.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_checkbox_value.yml @@ -27,7 +27,7 @@ elements: | checkbox_value_select_other: '#type': webform_checkbox_value '#title': checkbox_value_select_other - '#default_value': 'Four' + '#default_value': Four '#element': '#type': webform_select_other '#options': @@ -51,6 +51,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -183,6 +184,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: debug: id: debug diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_checkboxes.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_checkboxes.yml index 2d7c800a2..04d507f3f 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_checkboxes.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_checkboxes.yml @@ -17,7 +17,7 @@ category: 'Test: Element' elements: | checkbox_example: '#type': details - '#title': 'Checkbox' + '#title': Checkbox '#open': true checkbox: '#type': checkbox @@ -103,6 +103,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -235,6 +236,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: debug: id: debug diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_codemirror.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_codemirror.yml index fe558f496..e88b49591 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_codemirror.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_codemirror.yml @@ -20,7 +20,12 @@ elements: | text_basic: '#type': webform_codemirror '#title': text_basic - '#default_value': 'Hello' + '#default_value': Hello + text_basic_no_wrap: + '#type': webform_codemirror + '#title': text_basic_no_wrap + '#wrap': false + '#default_value': 'Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus,' yaml_basic: '#type': webform_codemirror '#mode': yaml @@ -67,12 +72,13 @@ elements: | + twig_basic: '#type': webform_codemirror '#mode': twig '#title': twig_basic '#default_value': | - + {% set value = "Hello" %} {{ value }} @@ -92,6 +98,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -224,6 +231,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: debug: id: debug diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_composite.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_composite.yml index af8d4d026..83b2606e8 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_composite.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_composite.yml @@ -53,7 +53,7 @@ elements: | '#title': 'Employment status' age: '#type': number - '#title': 'Age' + '#title': Age '#field_suffix': ' yrs. old' '#min': 1 '#max': 125 @@ -74,6 +74,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -206,6 +207,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: debug: id: debug diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_composite_wrapper.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_composite_wrapper.yml index 60a9de85a..a983210a2 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_composite_wrapper.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_composite_wrapper.yml @@ -77,7 +77,6 @@ elements: | Two: Two Three: Three '#description': 'This is a description' - radios_wrapper_fieldset_element_descriptions: radios_wrapper_form_element: '#type': radios '#title': radios_wrapper_form_element @@ -113,6 +112,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -245,6 +245,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: debug: id: debug diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_computed_ajax.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_computed_ajax.yml index 4852a3fee..25a49a4a9 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_computed_ajax.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_computed_ajax.yml @@ -29,19 +29,20 @@ elements: | webform_computed_token_a: '#type': webform_computed_token '#title': a - '#value': '[webform_submission:values:a:clear]' - '#ajax': TRUE - '#hide_empty': TRUE + '#ajax': true + '#hide_empty': true + '#template': '[webform_submission:values:a:clear]' webform_computed_token_b: '#type': webform_computed_token '#title': b - '#value': '[webform_submission:values:b:clear]' - '#ajax': TRUE - '#hide_empty': TRUE + '#ajax': true + '#hide_empty': true + '#template': '[webform_submission:values:b:clear]' webform_computed_twig: '#type': webform_computed_twig '#title': webform_computed_twig_data - '#value': | + '#ajax': true + '#template': | {% spaceless %} {% if data.a|length and data.b|length %} {{ data.a }} + {{ data.b }} = {{ data.a + data.b }} @@ -49,11 +50,12 @@ elements: | Please enter a value for a and b. {% endif %} {% endspaceless %} - '#ajax': TRUE + webform_computed_twig_token: '#type': webform_computed_twig '#title': webform_computed_twig_token - '#value': | + '#ajax': true + '#template': | {% spaceless %} {% set a = webform_token('[webform_submission:values:a:clear]', webform_submission) %} {% set b = webform_token('[webform_submission:values:b:clear]', webform_submission) %} @@ -63,7 +65,6 @@ elements: | Please enter a value for a and b. {% endif %} {% endspaceless %} - '#ajax': TRUE css: '' javascript: '' @@ -81,6 +82,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -213,4 +215,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_computed_token.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_computed_token.yml index 39069076c..2d1903c94 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_computed_token.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_computed_token.yml @@ -29,6 +29,7 @@ elements: | '#default_value': |

    This is a text format string.

    It contains "double" and 'single' quotes with special characters like <, >, <>, and ><.

    + xss: '#type': textfield '#title': xss @@ -37,38 +38,41 @@ elements: | '#type': webform_computed_token '#title': webform_computed_token_auto '#display_on': view - '#value': | + '#template': | simple string: [webform_submission:values:simple_string]
    complex string : [webform_submission:values:complex_string]
    text_format: [webform_submission:values:text_format]
    xss: [webform_submission:values:xss]
    + webform_computed_token_html: '#type': webform_computed_token '#title': webform_computed_token_html '#mode': html '#display_on': view - '#value': | + '#template': | simple string: [webform_submission:values:simple_string]
    complex string : [webform_submission:values:complex_string]
    text_format: [webform_submission:values:text_format]
    xss: [webform_submission:values:xss]
    + webform_computed_token_text: '#type': webform_computed_token '#title': webform_computed_token_text '#mode': text '#display_on': view - '#value': | + '#template': | simple string: [webform_submission:values:simple_string] complex string : [webform_submission:values:complex_string] text_format: [webform_submission:values:text_format] xss: [webform_submission:values:xss] + webform_computed_token_store: '#type': webform_computed_token '#title': webform_computed_token_store '#mode': text '#display_on': none - '#value': 'sid: [webform_submission:sid]' '#store': true + '#template': 'sid: [webform_submission:sid]' css: '' javascript: '' @@ -86,6 +90,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -218,4 +223,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_computed_twig.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_computed_twig.yml index 32b0c68fe..79899e921 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_computed_twig.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_computed_twig.yml @@ -33,6 +33,7 @@ elements: | '#default_value': |

    This is a text format string.

    It contains "double" and 'single' quotes with special characters like <, >, <>, and ><.

    + xss: '#type': textfield '#title': xss @@ -41,61 +42,65 @@ elements: | '#type': webform_computed_twig '#title': webform_computed_twig_auto '#display_on': view - '#value': | + '#template': | number: {{ (webform_token('[webform_submission:values:number:clear]', webform_submission) ?: 0) }} * 2 = {{ (webform_token('[webform_submission:values:number:clear]', webform_submission) ?: 0) * 2 }}
    simple string: {{ webform_token('[webform_submission:values:simple_string]', webform_submission) }}
    complex string: {{ webform_token('[webform_submission:values:complex_string]', webform_submission) }}
    text_format: {{ webform_token('[webform_submission:values:text_format]', webform_submission) }}
    xss: {{ webform_token('[webform_submission:values:xss]', webform_submission) }}
    + webform_computed_twig_html: '#type': webform_computed_twig '#title': webform_computed_twig_html '#mode': html '#display_on': view - '#value': | + '#template': | number: {{ (webform_token('[webform_submission:values:number:clear]', webform_submission) ?: 0) }} * 2 = {{ (webform_token('[webform_submission:values:number:clear]', webform_submission) ?: 0) * 2 }}
    simple string: {{ webform_token('[webform_submission:values:simple_string]', webform_submission) }}
    complex string: {{ webform_token('[webform_submission:values:complex_string]', webform_submission) }}
    text_format: {{ webform_token('[webform_submission:values:text_format]', webform_submission) }}
    xss: {{ webform_token('[webform_submission:values:xss]', webform_submission) }}
    + webform_computed_twig_text: '#type': webform_computed_twig '#title': webform_computed_twig_text '#mode': text '#display_on': view - '#value': | + '#template': | number: {{ (webform_token('[webform_submission:values:number:clear]', webform_submission) ?: 0) }} * 2 = {{ (webform_token('[webform_submission:values:number:clear]', webform_submission) ?: 0) * 2 }} simple string: {{ webform_token('[webform_submission:values:simple_string]', webform_submission) }} complex string: {{ webform_token('[webform_submission:values:complex_string]', webform_submission) }} text_format: {{ webform_token('[webform_submission:values:text_format]', webform_submission) }} xss: {{ webform_token('[webform_submission:values:xss]', webform_submission) }} + webform_computed_twig_data: '#type': webform_computed_twig '#title': webform_computed_twig_data '#display_on': view - '#value': | + '#template': | number: {{ data.number }} * 2 = {{ data.number * 2 }}
    simple string: {{ data.simple_string }}
    complex string: {{ data.complex_string }}
    text_format: {{ data.text_format.value }}
    xss: {{ data.xss }}
    + webform_computed_twig_store: '#type': webform_computed_twig '#title': webform_computed_twig_store '#mode': text '#display_on': none - '#value': 'sid: {{ data.sid }}' '#store': true + '#template': 'sid: {{ data.sid }}' webform_computed_twig_trim: '#type': webform_computed_twig '#title': webform_computed_twig_trim - '#whitespace': 'trim' - '#value': ' This is trimmed
    ' + '#whitespace': trim + '#template': ' This is trimmed
    ' webform_computed_twig_spaceless: '#type': webform_computed_twig '#title': webform_computed_twig_spaceless - '#whitespace': 'spaceless' - '#value': ' This is spaceless
    ' + '#whitespace': spaceless + '#template': ' This is spaceless
    ' css: '' javascript: '' @@ -113,6 +118,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -245,4 +251,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_container.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_container.yml index 5eb336978..75cbf779a 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_container.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_container.yml @@ -38,7 +38,7 @@ elements: | '#title': details_closed '#description': 'This is a details_closed description.' '#open': false - '#format': 'details-closed' + '#format': details-closed details_value: '#markup': 'This is a details_closed value.' details_textfield: @@ -91,6 +91,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -223,4 +224,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_counter.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_counter.yml index 912ab8338..ba3403f1e 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_counter.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_counter.yml @@ -96,6 +96,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -228,6 +229,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: debug: id: debug diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_date.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_date.yml index 7d2bc45e2..c12373283 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_date.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_date.yml @@ -23,23 +23,23 @@ elements: | '#type': date '#title': date_custom '#date_date_format': d-M-Y - '#min': '2008-01-01' - '#max': '2010-12-31' + '#date_date_min': '2008-01-01' + '#date_date_max': '2010-12-31' '#default_value': '2009-08-18' '#description': '(2008-01-01 to 2010-12-31) + (d-M-Y)' date_min_max: '#type': date '#title': date_min_max '#description': '(2009-01-01 to 2009-12-31)' - '#min': '2009-01-01' - '#max': '2009-12-31' + '#date_date_min': '2009-01-01' + '#date_date_max': '2009-12-31' '#default_value': '2009-08-18' date_min_max_dynamic: '#type': date '#title': date_min_max_dynamic '#description': '(-1 year to +1 year)' - '#min': '-1 year' - '#max': '+1 year' + '#date_date_min': '-1 year' + '#date_date_max': '+1 year' '#default_value': now date_datepicker: '#type': date @@ -47,6 +47,13 @@ elements: | '#datepicker': true '#date_date_format': 'D, m/d/Y' '#default_value': '2009-08-18' + date_datepicker_button: + '#type': date + '#title': date_datepicker_button + '#datepicker': true + '#datepicker_button': true + '#date_date_format': 'D, m/d/Y' + '#default_value': '2009-08-18' date_datepicker_custom: '#type': date '#title': date_datepicker_custom @@ -59,8 +66,8 @@ elements: | '#datepicker': true '#date_date_format': 'D, m/d/Y' '#description': '(-1 year to +1 year)' - '#min': '-1 year' - '#max': '+1 year' + '#date_date_min': '-1 year' + '#date_date_max': '+1 year' '#default_value': now css: '' @@ -79,6 +86,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -211,4 +219,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_datelist.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_datelist.yml index 402e62f05..0c493b59e 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_datelist.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_datelist.yml @@ -19,6 +19,23 @@ elements: | '#type': datelist '#title': datelist_default '#default_value': '2009-08-18T01:00:00-05:00' + datelist_no_abbreviate: + '#type': datelist + '#title': datelist_no_abbreviate + '#default_value': '2009-08-18T01:00:00-05:00' + '#date_abbreviate': false + datelist_text_parts: + '#type': datelist + '#title': datelist_text_parts + '#default_value': '2009-08-18T01:00:00-05:00' + '#date_text_parts': + - month + - day + - year + - hour + - minute + - second + - ampm datelist_datetime: '#type': datelist '#title': datelist_datetime @@ -43,14 +60,21 @@ elements: | '#type': datelist '#title': datelist_min_max '#description': '(2009-01-01 to 2009-12-31)' - '#min': '2009-01-01' - '#max': '2009-12-31' + '#date_date_min': '2009-01-01' + '#date_date_max': '2009-12-31' '#default_value': '2009-08-18' + datelist_min_max_time: + '#type': datelist + '#title': datelist_min_max_time + '#description': '(2009-01-01 09:00:00 to 2009-12-31 17:00:00)' + '#date_min': '2009-01-01 09:00:00' + '#date_max': '2009-12-31 17:00:00' + '#default_value': '2009-01-01 09:00:00' datelist_date_year_range_reverse: '#type': datelist '#title': datelist_date_year_range_reverse '#date_year_range': '2005:2010' - '#date_year_range_reverse': TRUE + '#date_year_range_reverse': true datelist_required_error: '#type': datelist '#title': datelist_required_error @@ -74,6 +98,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -206,4 +231,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_datetime.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_datetime.yml index cb44f3a8d..72b3a141b 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_datetime.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_datetime.yml @@ -54,9 +54,16 @@ elements: | '#type': datetime '#title': datetime_min_max '#description': '(2009-01-01 to 2009-12-31)' - '#min': '2009-01-01' - '#max': '2009-12-31' + '#date_date_min': '2009-01-01' + '#date_date_max': '2009-12-31' '#default_value': '2009-08-18' + datetime_min_max_time: + '#type': datetime + '#title': datetime_min_max_time + '#description': '(2009-01-01 09:00:00 to 2009-12-31 17:00:00)' + '#date_min': '2009-01-01 09:00:00' + '#date_max': '2009-12-31 17:00:00' + '#default_value': '2009-01-01 09:00:00' datetime_datepicker_timepicker: '#type': datetime '#title': datetime_datepicker_timepicker @@ -65,12 +72,26 @@ elements: | '#date_date_format': 'D, m/d/Y' '#date_time_element': timepicker '#date_time_format': 'g:i A' + datetime_datepicker_time_text: + '#type': datetime + '#title': datetime_datepicker_time_text + '#default_value': '2009-08-18T01:00:00-05:00' + '#date_time_element': text + datetime_datepicker_timepicker_button: + '#type': datetime + '#title': datetime_datepicker_timepicker_button + '#default_value': '2009-08-18T01:00:00-05:00' + '#date_date_element': datepicker + '#date_date_datepicker_button': true + '#date_date_format': 'D, m/d/Y' + '#date_time_element': timepicker + '#date_time_format': 'g:i A' datetime_time_min_max: '#type': datetime '#title': datetime_time_min_max '#description': '(2009-01-01 to 2009-12-31 and 09:00:00 to 17:00:00)' - '#min': '2009-01-01' - '#max': '2009-12-31' + '#date_date_min': '2009-01-01' + '#date_date_max': '2009-12-31' '#date_time_min': '09:00:00' '#date_time_max': '17:00:00' '#date_time_step': '1800' @@ -79,8 +100,8 @@ elements: | '#type': datetime '#title': datetime_datepicker_timepicker_time_min_max '#description': '(2009-01-01 to 2009-12-31 and 09:00:00 to 17:00:00)' - '#min': '2009-01-01' - '#max': '2009-12-31' + '#date_date_min': '2009-01-01' + '#date_date_max': '2009-12-31' '#date_time_min': '09:00:00' '#date_time_max': '17:00:00' '#date_time_step': '1800' @@ -93,8 +114,9 @@ elements: | '#type': datetime '#title': datetime_no_seconds '#description': | - @see Issue #2917107: Date and Time validation problem - @see Issue #2723159: Datetime form element cannot validate when using a format without seconds + @see Issue #2917107: Date and Time validation problem
    + @see Issue #2723159: Datetime form element cannot validate when using a format without seconds
    + '#date_date_element': datepicker '#date_time_element': text '#date_time_format': 'H:i' @@ -117,6 +139,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -249,4 +272,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_description_tooltip.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_description_tooltip.yml index 2912c5c95..41d0aec90 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_description_tooltip.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_description_tooltip.yml @@ -351,15 +351,15 @@ elements: | webform_computed_token: '#type': webform_computed_token '#title': 'Computed token' - '#value': 'This is a Computed token value.' '#description': 'This is a description for the ''webform_computed_token'' element.' '#description_display': tooltip + '#template': 'This is a Computed token value.' webform_computed_twig: '#type': webform_computed_twig '#title': 'Computed Twig' - '#value': 'This is a Computed Twig value.' '#description': 'This is a description for the ''webform_computed_twig'' element.' '#description_display': tooltip + '#template': 'This is a Computed Twig value.' date_time_elements: '#type': details '#title': 'Date/time elements' @@ -490,6 +490,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -622,4 +623,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_details.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_details.yml index 6e9e67b6c..285baea02 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_details.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_details.yml @@ -17,7 +17,7 @@ category: 'Test: Element' elements: | details: '#type': details - '#title': 'details' + '#title': details '#description': 'This is a description.' '#help': 'This is help text.' '#more': 'This is more text' @@ -47,6 +47,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -179,4 +180,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_disabled.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_disabled.yml index 26fcc1ce4..f8affa87e 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_disabled.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_disabled.yml @@ -395,6 +395,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -527,4 +528,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_email.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_email.yml index 9f68afac4..9a6aa2a22 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_email.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_email.yml @@ -69,6 +69,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -201,6 +202,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: debug: id: debug diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_entity_reference.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_entity_reference.yml index e40c6eab1..2048aa236 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_entity_reference.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_entity_reference.yml @@ -133,6 +133,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -265,6 +266,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: debug: id: debug diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_fieldset.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_fieldset.yml index 848bf4b8d..f476c4f04 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_fieldset.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_fieldset.yml @@ -22,8 +22,8 @@ elements: | '#help': 'This is help text.' '#more': 'This is more text' '#required': true - '#field_prefix': 'prefix' - '#field_suffix': 'suffix' + '#field_prefix': prefix + '#field_suffix': suffix fieldset_markup: '#markup': '

    This is some markup

    ' fieldset_title_invisible: @@ -35,24 +35,24 @@ elements: | '#type': fieldset '#title': fieldset_description_before '#description': 'This is a description before.' - '#description_display': 'before' + '#description_display': before '#help': 'This is help text.' '#more': 'This is more text' '#required': true - '#field_prefix': 'prefix' - '#field_suffix': 'suffix' + '#field_prefix': prefix + '#field_suffix': suffix fieldset_markup: '#markup': '

    This is some markup

    ' fieldset_description_tooltip: '#type': fieldset '#title': fieldset_description_tooltip '#description': 'This is a description tooltip.' - '#description_display': 'tooltip' + '#description_display': tooltip '#help': 'This is help text.' '#more': 'This is more text' '#required': true - '#field_prefix': 'prefix' - '#field_suffix': 'suffix' + '#field_prefix': prefix + '#field_suffix': suffix fieldset_markup: '#markup': '

    This is some markup

    ' @@ -72,6 +72,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -204,4 +205,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_flexbox.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_flexbox.yml index a2b04e510..566a08ae8 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_flexbox.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_flexbox.yml @@ -220,21 +220,21 @@ elements: | flex_webform_computed_token_left: '#type': webform_computed_token '#title': 'Computed token 01' - '#value': 'This is a Computed token value.' + '#template': 'This is a Computed token value.' flex_webform_computed_token_right: '#type': webform_computed_token '#title': 'Computed token 02' - '#value': 'This is a Computed token value.' + '#template': 'This is a Computed token value.' flexbox_webform_computed_twig: '#type': webform_flexbox flex_webform_computed_twig_left: '#type': webform_computed_twig '#title': 'Computed Twig 01' - '#value': 'This is a Computed Twig value.' + '#template': 'This is a Computed Twig value.' flex_webform_computed_twig_right: '#type': webform_computed_twig '#title': 'Computed Twig 02' - '#value': 'This is a Computed Twig value.' + '#template': 'This is a Computed Twig value.' flexbox_webform_contact: '#type': webform_flexbox flex_webform_contact_left: @@ -983,6 +983,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -1115,4 +1116,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_flexbox_flex.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_flexbox_flex.yml index 65dee9c32..c93713a09 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_flexbox_flex.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_flexbox_flex.yml @@ -822,6 +822,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -954,4 +955,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_format.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_format.yml index 69e4b77de..61ee32e96 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_format.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_format.yml @@ -558,26 +558,26 @@ elements: | webform_computed_token_value: '#type': webform_computed_token '#title': 'Computed token (Value)' - '#value': 'This is a Computed token value.' '#format': value + '#template': 'This is a Computed token value.' webform_computed_token_raw: '#type': webform_computed_token '#title': 'Computed token (Raw value)' - '#value': 'This is a Computed token value.' '#format': raw + '#template': 'This is a Computed token value.' webform_computed_twig: '#type': details '#title': 'Computed Twig' webform_computed_twig_value: '#type': webform_computed_twig '#title': 'Computed Twig (Value)' - '#value': 'This is a Computed Twig value.' '#format': value + '#template': 'This is a Computed Twig value.' webform_computed_twig_raw: '#type': webform_computed_twig '#title': 'Computed Twig (Raw value)' - '#value': 'This is a Computed Twig value.' '#format': raw + '#template': 'This is a Computed Twig value.' date_time_elements: '#type': details '#title': 'Date/time elements' @@ -1217,6 +1217,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -1349,6 +1350,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: email_text: id: email diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_format_custom.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_format_custom.yml index 2b4a35007..44d59ac7f 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_format_custom.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_format_custom.yml @@ -21,8 +21,10 @@ elements: | '#format': custom '#format_html': | {{ value }} + '#format_text': | /{{ value }}/ + '#default_value': '{textfield_custom}' textfield_custom_value_multiple: '#type': textfield @@ -31,8 +33,10 @@ elements: | '#format': custom '#format_html': | {{ value }} + '#format_text': | /{{ value }}/ + '#format_items': custom '#format_items_html': | @@ -40,10 +44,12 @@ elements: | {% endfor %}
    {{ item }}
    + '#format_items_text': | {% for item in items %} ⦿ {{ item }} {% endfor %} + '#default_value': - One - Two @@ -64,6 +70,7 @@ elements: | item['original:image']:
    {{ item['original:image'] }}
    item['original:link']:
    {{ item['original:link'] }}
    item['original:modal']:
    {{ item['original:modal'] }}
    + '#format_text': | value: {{ value }} item['value']: {{ item['value'] }} @@ -71,6 +78,7 @@ elements: | item['link']: {{ item['link'] }} item['id']: {{ item['id'] }} item['url']: {{ item['url'] }} + address_custom: '#type': webform_address '#title': address_custom @@ -82,6 +90,7 @@ elements: | element.state_province: {{ element.state_province }}
    element.postal_code: {{ element.postal_code }}
    element.country: {{ element.country }}
    + '#format_text': | element.address: {{ element.address }} element.address_2: {{ element.address_2 }} @@ -89,6 +98,7 @@ elements: | element.state_province: {{ element.state_province }} element.postal_code: {{ element.postal_code }} element.country: {{ element.country }} + '#state_province__type': webform_select_other '#country__type': webform_select_other '#default_value': @@ -104,8 +114,10 @@ elements: | '#format': custom '#format_html': | {{ item.details }} + '#format_text': | {{ item.details }} + fieldset_custom_textfield: '#type': textfield '#title': fieldset_custom_textfield @@ -118,10 +130,12 @@ elements: |

    fieldset_custom_children


    {{ children }} + '#format_text': | fieldset_custom_children ------------------------ {{ children }} + fieldset_custom_children_textfield: '#type': textfield '#title': fieldset_custom_children_textfield @@ -143,6 +157,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -275,4 +290,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_format_multiple.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_format_multiple.yml index b3fc1fed0..7c909a692 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_format_multiple.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_format_multiple.yml @@ -1629,6 +1629,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -1761,6 +1762,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: email_text: id: email diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_format_token.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_format_token.yml index ec44eabc4..a96709df8 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_format_token.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_format_token.yml @@ -43,6 +43,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -175,6 +176,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: email_html: id: email diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_help.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_help.yml index a1cb5fae1..ad609250b 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_help.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_help.yml @@ -87,6 +87,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -219,4 +220,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_horizontal_rule.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_horizontal_rule.yml index 84060c30f..20c26fdd2 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_horizontal_rule.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_horizontal_rule.yml @@ -118,6 +118,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -250,6 +251,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: debug: id: debug diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_html_editor.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_html_editor.yml index d7ab49191..5ffbc5d64 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_html_editor.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_html_editor.yml @@ -34,7 +34,7 @@ elements: | '#title': 'webform_html_editor (format)' '#required': true '#default_value': 'Hello World!!!' - '#format': 'basic_html' + '#format': basic_html webform_html_editor_codemirror: '#type': webform_html_editor '#title': 'webform_html_editor_codemirror (none)' @@ -58,6 +58,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -190,6 +191,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: debug: id: debug diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_html_escape.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_html_escape.yml index 61a88144d..c2f932081 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_html_escape.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_html_escape.yml @@ -349,11 +349,11 @@ elements: | webform_computed_token: '#type': webform_computed_token '#title': 'Computed token | ' - '#value': 'This is a Computed token value.' + '#template': 'This is a Computed token value.' webform_computed_twig: '#type': webform_computed_twig '#title': 'Computed Twig | ' - '#value': 'This is a Computed Twig value.' + '#template': 'This is a Computed Twig value.' containers: '#type': details '#title': 'Containers | ' @@ -535,6 +535,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -667,4 +668,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_html_markup.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_html_markup.yml index 87407ee76..b9fba038e 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_html_markup.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_html_markup.yml @@ -349,11 +349,11 @@ elements: | webform_computed_token: '#type': webform_computed_token '#title': 'Computed token' - '#value': 'This is a Computed token value.' + '#template': 'This is a Computed token value.' webform_computed_twig: '#type': webform_computed_twig '#title': 'Computed Twig' - '#value': 'This is a Computed Twig value.' + '#template': 'This is a Computed Twig value.' containers: '#type': details '#title': 'Containers' @@ -535,6 +535,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -667,4 +668,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_icheck.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_icheck.yml index 99dedb1c7..aac1b5ae3 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_icheck.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_icheck.yml @@ -86,8 +86,8 @@ elements: | '#type': textfield '#title': 'Please enter a value' checkbox_target: - '#type': 'checkboxes' - '#title': 'Checkboxes' + '#type': checkboxes + '#title': Checkboxes '#options': 1: One 2: Two @@ -114,6 +114,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -246,4 +247,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_icheck_styles.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_icheck_styles.yml index 972e4df9c..c928b5e52 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_icheck_styles.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_icheck_styles.yml @@ -29,7 +29,7 @@ elements: | three: Three '#default_value': one '#wrapper_attributes': - class: container-inline + - class: container-inline '#icheck': minimal minimal_radios: '#type': radios @@ -51,7 +51,7 @@ elements: | three: Three '#default_value': one '#wrapper_attributes': - class: container-inline + - class: container-inline '#icheck': minimal-grey minimal_grey_radios: '#type': radios @@ -73,7 +73,7 @@ elements: | three: Three '#default_value': one '#wrapper_attributes': - class: container-inline + - class: container-inline '#icheck': minimal-yellow minimal_yellow_radios: '#type': radios @@ -95,7 +95,7 @@ elements: | three: Three '#default_value': one '#wrapper_attributes': - class: container-inline + - class: container-inline '#icheck': minimal-orange minimal_orange_radios: '#type': radios @@ -117,7 +117,7 @@ elements: | three: Three '#default_value': one '#wrapper_attributes': - class: container-inline + - class: container-inline '#icheck': minimal-red minimal_red_radios: '#type': radios @@ -139,7 +139,7 @@ elements: | three: Three '#default_value': one '#wrapper_attributes': - class: container-inline + - class: container-inline '#icheck': minimal-pink minimal_pink_radios: '#type': radios @@ -161,7 +161,7 @@ elements: | three: Three '#default_value': one '#wrapper_attributes': - class: container-inline + - class: container-inline '#icheck': minimal-purple minimal_purple_radios: '#type': radios @@ -183,7 +183,7 @@ elements: | three: Three '#default_value': one '#wrapper_attributes': - class: container-inline + - class: container-inline '#icheck': minimal-blue minimal_blue_radios: '#type': radios @@ -205,7 +205,7 @@ elements: | three: Three '#default_value': one '#wrapper_attributes': - class: container-inline + - class: container-inline '#icheck': minimal-green minimal_green_radios: '#type': radios @@ -227,7 +227,7 @@ elements: | three: Three '#default_value': one '#wrapper_attributes': - class: container-inline + - class: container-inline '#icheck': minimal-aero minimal_aero_radios: '#type': radios @@ -253,7 +253,7 @@ elements: | three: Three '#default_value': one '#wrapper_attributes': - class: container-inline + - class: container-inline '#icheck': flat flat_radios: '#type': radios @@ -275,7 +275,7 @@ elements: | three: Three '#default_value': one '#wrapper_attributes': - class: container-inline + - class: container-inline '#icheck': flat-grey flat_grey_radios: '#type': radios @@ -297,7 +297,7 @@ elements: | three: Three '#default_value': one '#wrapper_attributes': - class: container-inline + - class: container-inline '#icheck': flat-yellow flat_yellow_radios: '#type': radios @@ -319,7 +319,7 @@ elements: | three: Three '#default_value': one '#wrapper_attributes': - class: container-inline + - class: container-inline '#icheck': flat-orange flat_orange_radios: '#type': radios @@ -341,7 +341,7 @@ elements: | three: Three '#default_value': one '#wrapper_attributes': - class: container-inline + - class: container-inline '#icheck': flat-red flat_red_radios: '#type': radios @@ -363,7 +363,7 @@ elements: | three: Three '#default_value': one '#wrapper_attributes': - class: container-inline + - class: container-inline '#icheck': flat-pink flat_pink_radios: '#type': radios @@ -385,7 +385,7 @@ elements: | three: Three '#default_value': one '#wrapper_attributes': - class: container-inline + - class: container-inline '#icheck': flat-purple flat_purple_radios: '#type': radios @@ -407,7 +407,7 @@ elements: | three: Three '#default_value': one '#wrapper_attributes': - class: container-inline + - class: container-inline '#icheck': flat-blue flat_blue_radios: '#type': radios @@ -429,7 +429,7 @@ elements: | three: Three '#default_value': one '#wrapper_attributes': - class: container-inline + - class: container-inline '#icheck': flat-green flat_green_radios: '#type': radios @@ -451,7 +451,7 @@ elements: | three: Three '#default_value': one '#wrapper_attributes': - class: container-inline + - class: container-inline '#icheck': flat-aero flat_aero_radios: '#type': radios @@ -477,7 +477,7 @@ elements: | three: Three '#default_value': one '#wrapper_attributes': - class: container-inline + - class: container-inline '#icheck': line line_radios: '#type': radios @@ -499,7 +499,7 @@ elements: | three: Three '#default_value': one '#wrapper_attributes': - class: container-inline + - class: container-inline '#icheck': line-grey line_grey_radios: '#type': radios @@ -521,7 +521,7 @@ elements: | three: Three '#default_value': one '#wrapper_attributes': - class: container-inline + - class: container-inline '#icheck': line-yellow line_yellow_radios: '#type': radios @@ -543,7 +543,7 @@ elements: | three: Three '#default_value': one '#wrapper_attributes': - class: container-inline + - class: container-inline '#icheck': line-orange line_orange_radios: '#type': radios @@ -565,7 +565,7 @@ elements: | three: Three '#default_value': one '#wrapper_attributes': - class: container-inline + - class: container-inline '#icheck': line-red line_red_radios: '#type': radios @@ -587,7 +587,7 @@ elements: | three: Three '#default_value': one '#wrapper_attributes': - class: container-inline + - class: container-inline '#icheck': line-pink line_pink_radios: '#type': radios @@ -609,7 +609,7 @@ elements: | three: Three '#default_value': one '#wrapper_attributes': - class: container-inline + - class: container-inline '#icheck': line-purple line_purple_radios: '#type': radios @@ -631,7 +631,7 @@ elements: | three: Three '#default_value': one '#wrapper_attributes': - class: container-inline + - class: container-inline '#icheck': line-blue line_blue_radios: '#type': radios @@ -653,7 +653,7 @@ elements: | three: Three '#default_value': one '#wrapper_attributes': - class: container-inline + - class: container-inline '#icheck': line-green line_green_radios: '#type': radios @@ -675,7 +675,7 @@ elements: | three: Three '#default_value': one '#wrapper_attributes': - class: container-inline + - class: container-inline '#icheck': line-aero line_aero_radios: '#type': radios @@ -701,7 +701,7 @@ elements: | three: Three '#default_value': one '#wrapper_attributes': - class: container-inline + - class: container-inline '#icheck': square square_radios: '#type': radios @@ -723,7 +723,7 @@ elements: | three: Three '#default_value': one '#wrapper_attributes': - class: container-inline + - class: container-inline '#icheck': square-grey square_grey_radios: '#type': radios @@ -745,7 +745,7 @@ elements: | three: Three '#default_value': one '#wrapper_attributes': - class: container-inline + - class: container-inline '#icheck': square-yellow square_yellow_radios: '#type': radios @@ -767,7 +767,7 @@ elements: | three: Three '#default_value': one '#wrapper_attributes': - class: container-inline + - class: container-inline '#icheck': square-orange square_orange_radios: '#type': radios @@ -789,7 +789,7 @@ elements: | three: Three '#default_value': one '#wrapper_attributes': - class: container-inline + - class: container-inline '#icheck': square-red square_red_radios: '#type': radios @@ -811,7 +811,7 @@ elements: | three: Three '#default_value': one '#wrapper_attributes': - class: container-inline + - class: container-inline '#icheck': square-pink square_pink_radios: '#type': radios @@ -833,7 +833,7 @@ elements: | three: Three '#default_value': one '#wrapper_attributes': - class: container-inline + - class: container-inline '#icheck': square-purple square_purple_radios: '#type': radios @@ -855,7 +855,7 @@ elements: | three: Three '#default_value': one '#wrapper_attributes': - class: container-inline + - class: container-inline '#icheck': square-blue square_blue_radios: '#type': radios @@ -877,7 +877,7 @@ elements: | three: Three '#default_value': one '#wrapper_attributes': - class: container-inline + - class: container-inline '#icheck': square-green square_green_radios: '#type': radios @@ -899,7 +899,7 @@ elements: | three: Three '#default_value': one '#wrapper_attributes': - class: container-inline + - class: container-inline '#icheck': square-aero square_aero_radios: '#type': radios @@ -928,6 +928,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -1060,4 +1061,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_ignored_properties.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_ignored_properties.yml index d865ac92c..36f3661d9 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_ignored_properties.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_ignored_properties.yml @@ -46,6 +46,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -178,4 +179,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_image_file.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_image_file.yml index 72ba39fca..0334117aa 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_image_file.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_image_file.yml @@ -21,8 +21,7 @@ elements: | webform_image_file_advanced: '#type': webform_image_file '#title': 'webform_image_file_advanced (max: 20x20)' - '#max_resolution': '20x20' - + '#max_resolution': 20x20 css: '' javascript: '' settings: @@ -39,6 +38,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -171,6 +171,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: debug: id: debug diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_image_resolution.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_image_resolution.yml index c4d6f7885..0b70956cf 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_image_resolution.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_image_resolution.yml @@ -24,7 +24,7 @@ elements: | '#description': '{description}' '#height_title': '{height_title}' '#width_title': '{width_title}' - '#default_value': '300x400' + '#default_value': 300x400 css: '' javascript: '' @@ -42,6 +42,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -174,6 +175,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: debug: id: debug diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_input_mask.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_input_mask.yml new file mode 100644 index 000000000..21913d8f2 --- /dev/null +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_input_mask.yml @@ -0,0 +1,240 @@ +langcode: en +status: open +dependencies: + enforced: + module: + - webform_test +open: null +close: null +weight: 0 +uid: null +template: false +archive: false +id: test_element_input_mask +title: 'Test: Element: Input Mask' +description: 'Tests input mask.' +category: 'Test: Element' +elements: | + currency: + '#type': textfield + '#title': currency + '#input_mask': '''alias'': ''currency''' + datetime: + '#type': textfield + '#title': datetime + '#input_mask': '''alias'': ''datetime''' + decimal: + '#type': textfield + '#title': decimal + '#input_mask': '''alias'': ''decimal''' + email: + '#type': textfield + '#title': email + '#input_mask': '''alias'': ''email''' + ip: + '#type': textfield + '#title': ip + '#input_mask': '''alias'': ''ip''' + license_plate: + '#type': textfield + '#title': license_plate + '#input_mask': '[9-]AAA-999' + mac: + '#type': textfield + '#title': mac + '#input_mask': '''alias'': ''mac''' + percentage: + '#type': textfield + '#title': percentage + '#input_mask': '''alias'': ''percentage''' + phone: + '#type': textfield + '#title': phone + '#input_mask': '(999) 999-9999' + ssn: + '#type': textfield + '#title': ssn + '#input_mask': 999-99-9999 + vin: + '#type': textfield + '#title': vin + '#input_mask': '''alias'': ''vin''' + zip: + '#type': textfield + '#title': zip + '#input_mask': '99999[-9999]' + uppercase: + '#type': textfield + '#title': uppercase + '#input_mask': '''casing'': ''upper''' + lowercase: + '#type': textfield + '#title': lowercase + '#input_mask': '''casing'': ''lower''' + custom: + '#type': textfield + '#title': custom + '#input_mask': '''alias'': ''numeric'', ''groupSeparator'': '','', ''autoGroup'': true, ''digits'': 2, ''digitsOptional'': false, ''prefix'': ''$ '', ''placeholder'': ''0''' + +css: '' +javascript: '' +settings: + ajax: false + ajax_scroll_top: form + page: true + page_submit_path: '' + page_confirm_path: '' + form_title: source_entity_webform + form_submit_once: false + form_exception_message: '' + form_open_message: '' + form_close_message: '' + form_previous_submissions: true + form_confidential: false + form_confidential_message: '' + form_remote_addr: true + form_convert_anonymous: false + form_prepopulate: false + form_prepopulate_source_entity: false + form_prepopulate_source_entity_required: false + form_prepopulate_source_entity_type: '' + form_reset: false + form_disable_autocomplete: false + form_novalidate: false + form_disable_inline_errors: false + form_required: false + form_unsaved: false + form_disable_back: false + form_submit_back: false + form_autofocus: false + form_details_toggle: false + form_access_denied: default + form_access_denied_title: '' + form_access_denied_message: '' + form_access_denied_attributes: { } + form_file_limit: '' + submission_label: '' + submission_log: false + submission_views: { } + submission_views_replace: { } + submission_user_columns: { } + submission_user_duplicate: false + submission_access_denied: default + submission_access_denied_title: '' + submission_access_denied_message: '' + submission_access_denied_attributes: { } + submission_exception_message: '' + submission_locked_message: '' + submission_excluded_elements: { } + submission_exclude_empty: false + submission_exclude_empty_checkbox: false + previous_submission_message: '' + previous_submissions_message: '' + autofill: false + autofill_message: '' + autofill_excluded_elements: { } + wizard_progress_bar: true + wizard_progress_pages: false + wizard_progress_percentage: false + wizard_progress_link: false + wizard_start_label: '' + wizard_preview_link: false + wizard_confirmation: true + wizard_confirmation_label: '' + wizard_track: '' + preview: 0 + preview_label: '' + preview_title: '' + preview_message: '' + preview_attributes: { } + preview_excluded_elements: { } + preview_exclude_empty: true + preview_exclude_empty_checkbox: false + draft: none + draft_multiple: false + draft_auto_save: false + draft_saved_message: '' + draft_loaded_message: '' + confirmation_type: page + confirmation_title: '' + confirmation_message: '' + confirmation_url: '' + confirmation_attributes: { } + confirmation_back: true + confirmation_back_label: '' + confirmation_back_attributes: { } + confirmation_exclude_query: false + confirmation_exclude_token: false + limit_total: null + limit_total_interval: null + limit_total_message: '' + limit_total_unique: false + limit_user: null + limit_user_interval: null + limit_user_message: '' + limit_user_unique: false + entity_limit_total: null + entity_limit_total_interval: null + entity_limit_user: null + entity_limit_user_interval: null + purge: none + purge_days: null + results_disabled: false + results_disabled_ignore: false + token_update: false +access: + create: + roles: + - anonymous + - authenticated + users: { } + permissions: { } + view_any: + roles: { } + users: { } + permissions: { } + update_any: + roles: { } + users: { } + permissions: { } + delete_any: + roles: { } + users: { } + permissions: { } + purge_any: + roles: { } + users: { } + permissions: { } + view_own: + roles: { } + users: { } + permissions: { } + update_own: + roles: { } + users: { } + permissions: { } + delete_own: + roles: { } + users: { } + permissions: { } + administer: + roles: { } + users: { } + permissions: { } + test: + roles: { } + users: { } + permissions: { } + configuration: + roles: { } + users: { } + permissions: { } +handlers: + debug: + id: debug + label: Debug + handler_id: debug + status: true + conditions: { } + weight: 1 + settings: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_invalid.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_invalid.yml index 272a01235..b3f8f3f1c 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_invalid.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_invalid.yml @@ -14,11 +14,7 @@ id: test_element_invalid title: 'Test: Element: Invalid' description: 'Test invalid elements YAML.' category: 'Test: Element' -elements: | - not - valid - yaml - +elements: '''not valid yaml''' css: '' javascript: '' settings: @@ -35,6 +31,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -167,4 +164,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_likert.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_likert.yml index a2ca12a18..b34ca6cd2 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_likert.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_likert.yml @@ -70,14 +70,14 @@ elements: | '#title': likert_values '#na_answer': true '#questions': - 0: 'Question 0' - 1: 'Question 1' - 2: 'Question 2' + - 'Question 0' + - 'Question 1' + - 'Question 2' '#answers': - 0: 'Option 0' - 1: 'Option 1' - 2: 'Option 2' - 3: 'Option 3' + - 'Option 0' + - 'Option 1' + - 'Option 2' + - 'Option 3' css: '' javascript: '' @@ -95,6 +95,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -227,6 +228,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: debug: id: debug diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_loc_geocomplete.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_loc_geocomplete.yml index 578805874..4750a8e2c 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_loc_geocomplete.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_loc_geocomplete.yml @@ -111,6 +111,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -243,6 +244,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: debug: id: debug diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_loc_places.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_loc_places.yml index 39528c152..8204e4ff8 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_loc_places.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_loc_places.yml @@ -65,6 +65,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -197,6 +198,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: debug: id: debug diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_managed_file.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_managed_file.yml index 3fbd14a3e..8d716cff5 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_managed_file.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_managed_file.yml @@ -48,7 +48,18 @@ elements: | '#title': managed_file_sanitize '#file_extensions': txt '#sanitize': true - + managed_file_single_placeholder: + '#type': managed_file + '#title': managed_file_single_placeholder + '#file_extensions': txt + '#file_placeholder': 'This is the single file upload placeholder' + managed_file_multiple_placeholder: + '#type': managed_file + '#title': managed_file_multiple_placeholder + '#file_extensions': txt + '#file_placeholder': 'This is the multiple file upload placeholder' + '#multiple': true + css: '' javascript: '' settings: @@ -65,6 +76,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -197,4 +209,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_managed_file_dis.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_managed_file_dis.yml index ca860a4ab..d75965591 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_managed_file_dis.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_managed_file_dis.yml @@ -36,6 +36,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -168,4 +169,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_managed_file_help.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_managed_file_help.yml new file mode 100644 index 000000000..1822f408b --- /dev/null +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_managed_file_help.yml @@ -0,0 +1,229 @@ +langcode: en +status: open +dependencies: + enforced: + module: + - webform_test +open: null +close: null +weight: 0 +uid: null +template: false +archive: false +id: test_element_managed_file_help +title: 'Test: File upload help' +description: 'Test file upload help.' +category: 'Test: Element' +elements: | + description: + '#type': details + '#title': description + '#open': true + managed_file_help_description: + '#type': managed_file + '#title': managed_file_help_description + managed_file_help_description_custom: + '#type': managed_file + '#title': managed_file_help_description_custom + '#description': 'This is a custom description' + '#description_display': before + '#multiple': true + help: + '#type': details + '#title': help + '#open': true + managed_file_help_help: + '#type': managed_file + '#title': managed_file_help_help + '#file_help': help + managed_file_help_help_custom: + '#type': managed_file + '#title': managed_file_help_help_custom + '#file_help': help + '#help': 'This is custom help' + '#multiple': true + more: + '#type': details + '#title': more + '#open': true + managed_file_help_more: + '#type': managed_file + '#title': managed_file_help_more + '#file_help': more + managed_file_help_more_custom: + '#type': managed_file + '#title': managed_file_help_more_custom + '#file_help': more + '#more': 'This is custom help' + '#multiple': true + none: + '#type': details + '#title': none + '#open': true + managed_file_help_none: + '#type': managed_file + '#title': managed_file_help_none + '#file_help': none + +css: '' +javascript: '' +settings: + ajax: false + ajax_scroll_top: form + page: true + page_submit_path: '' + page_confirm_path: '' + form_title: source_entity_webform + form_submit_once: false + form_exception_message: '' + form_open_message: '' + form_close_message: '' + form_previous_submissions: true + form_confidential: false + form_confidential_message: '' + form_remote_addr: true + form_convert_anonymous: false + form_prepopulate: false + form_prepopulate_source_entity: false + form_prepopulate_source_entity_required: false + form_prepopulate_source_entity_type: '' + form_reset: false + form_disable_autocomplete: false + form_novalidate: false + form_disable_inline_errors: false + form_required: false + form_unsaved: false + form_disable_back: false + form_submit_back: false + form_autofocus: false + form_details_toggle: false + form_access_denied: default + form_access_denied_title: '' + form_access_denied_message: '' + form_access_denied_attributes: { } + form_file_limit: '' + submission_label: '' + submission_log: false + submission_views: { } + submission_views_replace: { } + submission_user_columns: { } + submission_user_duplicate: false + submission_access_denied: default + submission_access_denied_title: '' + submission_access_denied_message: '' + submission_access_denied_attributes: { } + submission_exception_message: '' + submission_locked_message: '' + submission_excluded_elements: { } + submission_exclude_empty: false + submission_exclude_empty_checkbox: false + previous_submission_message: '' + previous_submissions_message: '' + autofill: false + autofill_message: '' + autofill_excluded_elements: { } + wizard_progress_bar: true + wizard_progress_pages: false + wizard_progress_percentage: false + wizard_progress_link: false + wizard_start_label: '' + wizard_preview_link: false + wizard_confirmation: true + wizard_confirmation_label: '' + wizard_track: '' + preview: 0 + preview_label: '' + preview_title: '' + preview_message: '' + preview_attributes: { } + preview_excluded_elements: { } + preview_exclude_empty: true + preview_exclude_empty_checkbox: false + draft: none + draft_multiple: false + draft_auto_save: false + draft_saved_message: '' + draft_loaded_message: '' + confirmation_type: page + confirmation_title: '' + confirmation_message: '' + confirmation_url: '' + confirmation_attributes: { } + confirmation_back: true + confirmation_back_label: '' + confirmation_back_attributes: { } + confirmation_exclude_query: false + confirmation_exclude_token: false + limit_total: null + limit_total_interval: null + limit_total_message: '' + limit_total_unique: false + limit_user: null + limit_user_interval: null + limit_user_message: '' + limit_user_unique: false + entity_limit_total: null + entity_limit_total_interval: null + entity_limit_user: null + entity_limit_user_interval: null + purge: none + purge_days: null + results_disabled: false + results_disabled_ignore: false + token_update: false +access: + create: + roles: + - anonymous + - authenticated + users: { } + permissions: { } + view_any: + roles: { } + users: { } + permissions: { } + update_any: + roles: { } + users: { } + permissions: { } + delete_any: + roles: { } + users: { } + permissions: { } + purge_any: + roles: { } + users: { } + permissions: { } + view_own: + roles: { } + users: { } + permissions: { } + update_own: + roles: { } + users: { } + permissions: { } + delete_own: + roles: { } + users: { } + permissions: { } + administer: + roles: { } + users: { } + permissions: { } + test: + roles: { } + users: { } + permissions: { } + configuration: + roles: { } + users: { } + permissions: { } +handlers: + debug: + id: debug + label: Debug + handler_id: debug + status: true + conditions: { } + weight: 0 + settings: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_managed_file_limit.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_managed_file_limit.yml index 2440083e8..632d6809c 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_managed_file_limit.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_managed_file_limit.yml @@ -44,6 +44,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -176,4 +177,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_managed_file_name.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_managed_file_name.yml index 183d58a59..202585ea9 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_managed_file_name.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_managed_file_name.yml @@ -44,6 +44,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -176,6 +177,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: debug: id: debug diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_managed_file_prev.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_managed_file_prev.yml new file mode 100644 index 000000000..7e28be31f --- /dev/null +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_managed_file_prev.yml @@ -0,0 +1,217 @@ +langcode: en +status: open +dependencies: + enforced: + module: + - webform_test +open: null +close: null +weight: 0 +uid: null +template: false +archive: false +id: test_element_managed_file_prev +title: 'Test: Element: Managed file preview' +description: 'Test file upload previews using managed file element.' +category: 'Test: Element' +elements: | + webform_image_file: + '#type': webform_image_file + '#title': webform_image_file + '#file_preview': 'thumbnail:modal' + '#file_extensions': gif + webform_image_file_multiple: + '#type': webform_image_file + '#title': webform_image_file_multiple + '#file_preview': 'thumbnail:modal' + '#file_extensions': gif + '#multiple': true + webform_audio_file: + '#type': webform_audio_file + '#title': webform_audio_file + '#file_preview': file + '#file_extensions': mp3 + webform_audio_file_multiple: + '#type': webform_audio_file + '#title': webform_audio_file_multiple + '#file_preview': file + '#file_extensions': mp3 + '#multiple': true + webform_video_file: + '#type': webform_video_file + '#title': webform_video_file + '#file_preview': file + '#file_extensions': mp4 + webform_video_file_multiple: + '#type': webform_video_file + '#title': webform_video_file_multiple + '#file_preview': file + '#file_extensions': mp4 + '#multiple': true + webform_document_file: + '#type': webform_document_file + '#title': webform_document_file + '#file_preview': url + '#file_extensions': txt + webform_document_file_multiple: + '#type': webform_document_file + '#title': webform_document_file_multiple + '#file_preview': url + '#file_extensions': txt + '#multiple': true +css: '' +javascript: '' +settings: + ajax: false + ajax_scroll_top: form + page: true + page_submit_path: '' + page_confirm_path: '' + form_title: source_entity_webform + form_submit_once: false + form_exception_message: '' + form_open_message: '' + form_close_message: '' + form_previous_submissions: true + form_confidential: false + form_confidential_message: '' + form_remote_addr: true + form_convert_anonymous: false + form_prepopulate: false + form_prepopulate_source_entity: false + form_prepopulate_source_entity_required: false + form_prepopulate_source_entity_type: '' + form_reset: false + form_disable_autocomplete: false + form_novalidate: false + form_disable_inline_errors: false + form_required: false + form_unsaved: false + form_disable_back: false + form_submit_back: false + form_autofocus: false + form_details_toggle: false + form_access_denied: default + form_access_denied_title: '' + form_access_denied_message: '' + form_access_denied_attributes: { } + form_file_limit: '' + submission_label: '' + submission_log: false + submission_views: { } + submission_views_replace: { } + submission_user_columns: { } + submission_user_duplicate: false + submission_access_denied: default + submission_access_denied_title: '' + submission_access_denied_message: '' + submission_access_denied_attributes: { } + submission_exception_message: '' + submission_locked_message: '' + submission_excluded_elements: { } + submission_exclude_empty: false + submission_exclude_empty_checkbox: false + previous_submission_message: '' + previous_submissions_message: '' + autofill: false + autofill_message: '' + autofill_excluded_elements: { } + wizard_progress_bar: true + wizard_progress_pages: false + wizard_progress_percentage: false + wizard_progress_link: false + wizard_start_label: '' + wizard_preview_link: false + wizard_confirmation: true + wizard_confirmation_label: '' + wizard_track: '' + preview: 0 + preview_label: '' + preview_title: '' + preview_message: '' + preview_attributes: { } + preview_excluded_elements: { } + preview_exclude_empty: true + preview_exclude_empty_checkbox: false + draft: none + draft_multiple: false + draft_auto_save: false + draft_saved_message: '' + draft_loaded_message: '' + confirmation_type: page + confirmation_title: '' + confirmation_message: '' + confirmation_url: '' + confirmation_attributes: { } + confirmation_back: true + confirmation_back_label: '' + confirmation_back_attributes: { } + confirmation_exclude_query: false + confirmation_exclude_token: false + limit_total: null + limit_total_interval: null + limit_total_message: '' + limit_total_unique: false + limit_user: null + limit_user_interval: null + limit_user_message: '' + limit_user_unique: false + entity_limit_total: null + entity_limit_total_interval: null + entity_limit_user: null + entity_limit_user_interval: null + purge: none + purge_days: null + results_disabled: false + results_disabled_ignore: false + token_update: false +access: + create: + roles: + - anonymous + - authenticated + users: { } + permissions: { } + view_any: + roles: { } + users: { } + permissions: { } + update_any: + roles: { } + users: { } + permissions: { } + delete_any: + roles: { } + users: { } + permissions: { } + purge_any: + roles: { } + users: { } + permissions: { } + view_own: + roles: { } + users: { } + permissions: { } + update_own: + roles: { } + users: { } + permissions: { } + delete_own: + roles: { } + users: { } + permissions: { } + administer: + roles: { } + users: { } + permissions: { } + test: + roles: + - anonymous + - authenticated + users: { } + permissions: { } + configuration: + roles: { } + users: { } + permissions: { } +handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_mapping.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_mapping.yml index e4b584cfc..2141d3ffe 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_mapping.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_mapping.yml @@ -36,7 +36,7 @@ elements: | '#source__title': '{Custom source}' '#destination__title': '{Destination source}' '#destination__description': '{Destination description}' - '#arrow': '»' + '#arrow': » '#format': table '#source': days '#destination': @@ -124,6 +124,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -256,6 +257,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: debug: id: debug diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_markup.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_markup.yml index 71aa6371c..a25482dc4 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_markup.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_markup.yml @@ -46,6 +46,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -178,4 +179,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_media_file.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_media_file.yml index 7f5950d70..09d2276ca 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_media_file.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_media_file.yml @@ -88,6 +88,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -220,4 +221,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_message.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_message.yml index 760a59014..bf2bd10d6 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_message.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_message.yml @@ -108,6 +108,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -240,4 +241,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_more.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_more.yml index fef84bad0..f94c04b24 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_more.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_more.yml @@ -38,7 +38,7 @@ elements: | '#type': textfield '#title': more_title_description_hidden '#description': '{This is an example of a hidden description}' - '#description_display': 'invisible' + '#description_display': invisible '#more_title': '{Custom more title}' '#more': '{This is an example of more}' more_datetime: @@ -78,6 +78,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -210,4 +211,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_multiple.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_multiple.yml index 19c9ba983..49732cd47 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_multiple.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_multiple.yml @@ -208,7 +208,7 @@ elements: | '#help': 'This is custom help text' option: '#type': container - '#title': 'text/description' + '#title': text/description '#title_display': invisible '#help': 'This is custom help text' text: @@ -224,10 +224,10 @@ elements: | '#default_value': - value: one text: One - description: This is the number 1. + description: 'This is the number 1.' - value: two text: Two - description: This is the number 2. + description: 'This is the number 2.' webform_multiple_no_items: '#type': webform_multiple '#title': webform_multiple_no_items @@ -250,6 +250,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -382,6 +383,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: debug: id: debug diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_multiple_date.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_multiple_date.yml index e7a09e713..26f14b540 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_multiple_date.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_multiple_date.yml @@ -29,15 +29,15 @@ elements: | '#open': true date_basic: '#type': date - '#title': 'date_basic' + '#title': date_basic '#multiple': true datetime_basic: '#type': datetime - '#title': 'datetime_basic' + '#title': datetime_basic '#multiple': true datelist_basic: '#type': datelist - '#title': 'datelist_basic' + '#title': datelist_basic '#multiple': true css: '' @@ -56,6 +56,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -188,6 +189,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: debug: id: debug diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_multiple_property.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_multiple_property.yml index 775eb6785..9cfdace69 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_multiple_property.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_multiple_property.yml @@ -21,11 +21,11 @@ elements: | webform_element_multiple_true: '#type': webform_element_multiple '#title': webform_element_multiple_true - '#default_value': TRUE + '#default_value': true webform_element_multiple_false: '#type': webform_element_multiple '#title': webform_element_multiple_false - '#default_value': FALSE + '#default_value': false webform_element_multiple_custom: '#type': webform_element_multiple '#title': webform_element_multiple_custom @@ -52,6 +52,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -184,6 +185,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: debug: id: debug diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_multiple_text.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_multiple_text.yml index 1131c1c6b..2cb8ce434 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_multiple_text.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_multiple_text.yml @@ -99,6 +99,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -231,6 +232,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: debug: id: debug diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_options.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_options.yml index ce1a60c6d..a3bb2d271 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_options.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_options.yml @@ -24,14 +24,14 @@ elements: | '#title': webform_options webform_options_default_value: '#type': webform_options - '#title': 'webform_options_default_value' + '#title': webform_options_default_value '#default_value': one: One two: Two three: Three webform_options_maxlength: '#type': webform_options - '#title': 'webform_options_maxlength' + '#title': webform_options_maxlength '#options_text_maxlength': 20 '#options_value_maxlength': 20 '#default_value': @@ -40,7 +40,7 @@ elements: | three: Three webform_options_optgroup: '#type': webform_options - '#title': 'webform_options_optgroup' + '#title': webform_options_optgroup '#required': true '#default_value': 'Group One': @@ -55,12 +55,12 @@ elements: | '#open': true webform_element_options_entity: '#type': webform_element_options - '#title': 'webform_element_options_entity' + '#title': webform_element_options_entity '#required': true '#default_value': yes_no webform_element_options_custom: '#type': webform_element_options - '#title': 'webform_element_options_custom' + '#title': webform_element_options_custom '#required': true '#default_value': one: One @@ -83,6 +83,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -215,6 +216,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: debug: id: debug diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_other.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_other.yml index ee3ee11ae..bd7a8e746 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_other.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_other.yml @@ -155,6 +155,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -287,6 +288,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: debug: id: debug diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_pattern.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_pattern.yml index bf7bf47c2..4878d0653 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_pattern.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_pattern.yml @@ -18,18 +18,18 @@ elements: | pattern: '#type': textfield '#title': pattern - '#pattern': 'Hello' + '#pattern': Hello '#description': 'Enter ''Hello''' pattern_error: '#type': textfield '#title': pattern_error - '#pattern': 'Hello' + '#pattern': Hello '#pattern_error': 'You did not enter ''Hello''' '#description': 'Enter ''Hello''' pattern_unicode: '#type': textfield '#title': pattern_unicode - '#pattern': '\u2E8F' + '#pattern': \u2E8F '#description': 'Enter unicode CJK characters ''⺏''' css: '' @@ -48,6 +48,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -180,6 +181,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: debug: id: debug diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_prepopulate.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_prepopulate.yml index f3b9b5c48..58a4f74a6 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_prepopulate.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_prepopulate.yml @@ -21,11 +21,11 @@ elements: | textfield_prepopulate: '#type': textfield '#title': textfield_prepopulate - '#prepopulate': true + '#prepopulate': true managed_file_prepopulate: '#type': managed_file '#title': managed_file_prepopulate - '#prepopulate': true + '#prepopulate': true prepopulate_test: '#markup': '?textfield=value&textfield_prepopulate=value' @@ -45,6 +45,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -177,4 +178,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_private.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_private.yml index 9129b3412..cc34f5783 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_private.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_private.yml @@ -40,6 +40,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -172,4 +173,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_radios.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_radios.yml index c911288e8..0e37276e0 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_radios.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_radios.yml @@ -118,6 +118,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -250,6 +251,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: debug: id: debug diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_range.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_range.yml index 18b78be9c..5aad3f234 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_range.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_range.yml @@ -39,7 +39,7 @@ elements: | '#attributes': style: 'width: 500px' '#output': below - '#output__field_prefix': '$' + '#output__field_prefix': $ '#output__field_suffix': '.00' '#output__attributes': style: 'background-color: yellow' @@ -53,10 +53,10 @@ elements: | '#min': 0 '#max': 10000 '#step': 100 - '#field_prefix': '$0.00' + '#field_prefix': $0.00 '#field_suffix': '$10,000' '#output': left - '#output__field_prefix': '$' + '#output__field_prefix': $ '#output__field_suffix': '.00' '#output__attributes': style: 'background-color: yellow' @@ -87,6 +87,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -219,6 +220,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: debug: id: debug diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_rating.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_rating.yml index dc235849f..7c77adae8 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_rating.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_rating.yml @@ -50,6 +50,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -182,6 +183,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: debug: id: debug diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_readonly.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_readonly.yml index 160219ae9..a35c053a0 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_readonly.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_readonly.yml @@ -40,6 +40,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -172,6 +173,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: debug: id: debug diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_section.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_section.yml index c6f6f4893..8f525dc94 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_section.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_section.yml @@ -33,7 +33,7 @@ elements: | '#title': webform_section_title_custom '#title_tag': h5 '#title_attributes': - 'style': 'color: red' + style: 'color: red' css: '' javascript: '' @@ -51,6 +51,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -183,4 +184,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_select.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_select.yml index 0ed6c4842..e35932426 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_select.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_select.yml @@ -17,7 +17,7 @@ category: 'Test: Element' elements: | select_examples: '#type': details - '#title': 'Select' + '#title': Select '#open': true select: '#type': select @@ -220,6 +220,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -352,6 +353,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: debug: id: debug diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_signature.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_signature.yml index 9d5e83a8d..550ebb5bd 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_signature.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_signature.yml @@ -35,6 +35,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -167,6 +168,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: debug: id: debug diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_states.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_states.yml index 1dbd5d79c..87d7f6363 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_states.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_states.yml @@ -22,6 +22,16 @@ elements: | selector_01: 'Selector 01 (selector_01)' selector_02: 'Selector 02 (selector_02)' selector_03: 'Selector 03 (selector_03)' + '#selector_sources': + selector_01: + option_a: 'Option A' + option_b: 'Option B' + selector_02: + option_c: 'Option C' + option_d: 'Option D' + selector_03: + option_e: 'Option E' + option_f: 'Option F' '#default_value': enabled: selector_01: @@ -130,6 +140,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -262,6 +273,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: debug: id: debug diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_submission_views.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_submission_views.yml index 5317c3d3a..49942d0c4 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_submission_views.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_submission_views.yml @@ -63,6 +63,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -195,6 +196,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: debug: id: debug diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_submission_views_r.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_submission_views_r.yml index 450d7a54d..d576b248e 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_submission_views_r.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_submission_views_r.yml @@ -57,6 +57,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -189,6 +190,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: debug: id: debug diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_submitted_value.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_submitted_value.yml index 01da8cd88..f870b96f4 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_submitted_value.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_submitted_value.yml @@ -71,6 +71,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -203,6 +204,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: debug: id: debug diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_table.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_table.yml index 858a2561f..83f54800a 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_table.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_table.yml @@ -200,6 +200,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -332,6 +333,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: debug: id: debug diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_telephone.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_telephone.yml index 0fdd9e109..2a953f2db 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_telephone.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_telephone.yml @@ -39,6 +39,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -171,6 +172,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: debug: id: debug diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_term_reference.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_term_reference.yml index f1b5da686..d64d2fe1a 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_term_reference.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_term_reference.yml @@ -32,7 +32,7 @@ elements: | '#title': webform_term_checkboxes_tree_advanced '#vocabulary': tags '#multiple': true - '#tree_delimiter': '..' + '#tree_delimiter': .. '#scroll': false '#format': breadcrumb '#format_items': ul @@ -73,7 +73,7 @@ elements: | '#title': webform_term_select_tree_advanced '#vocabulary': tags '#multiple': true - '#tree_delimiter': '..' + '#tree_delimiter': .. '#format': breadcrumb '#format_items': ul webform_term_select_breadcrumb: @@ -113,6 +113,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -245,4 +246,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_terms_of_service.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_terms_of_service.yml index fdca63a0c..c67f89b57 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_terms_of_service.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_terms_of_service.yml @@ -17,19 +17,19 @@ category: 'Test: Element' elements: | terms_of_service_default: '#type': webform_terms_of_service - '#title': I agree to the {terms of service}. (default) + '#title': 'I agree to the {terms of service}. (default)' '#terms_title': terms_of_service_default '#terms_content': 'These are the terms of service.' '#required': true terms_of_service_modal: '#type': webform_terms_of_service - '#title': I agree to the {terms of service}. (modal) + '#title': 'I agree to the {terms of service}. (modal)' '#terms_type': modal '#terms_title': terms_of_service_modal '#terms_content': 'These are the terms of service.' terms_of_service_slideout: '#type': webform_terms_of_service - '#title': I agree to the {terms of service}. (slideout) + '#title': 'I agree to the {terms of service}. (slideout)' '#terms_type': slideout '#terms_title': terms_of_service_slideout '#terms_content': 'These are the terms of service.' @@ -50,6 +50,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -182,4 +183,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_text_format.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_text_format.yml index 2394f3ff6..a236c7b42 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_text_format.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_text_format.yml @@ -38,6 +38,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -170,4 +171,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_time.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_time.yml index 720d333dd..4fe1e7fb6 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_time.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_time.yml @@ -79,6 +79,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -211,4 +212,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_toggle.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_toggle.yml index e97383dc0..948e6dabe 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_toggle.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_toggle.yml @@ -66,6 +66,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -198,6 +199,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: debug: id: debug diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_users_roles.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_users_roles.yml index ad7b55da9..8d6a55902 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_users_roles.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_users_roles.yml @@ -49,6 +49,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -181,6 +182,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: debug: id: debug diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_validate_minlength.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_validate_minlength.yml index d4faf3ea0..bf1c220d4 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_validate_minlength.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_validate_minlength.yml @@ -43,6 +43,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -175,4 +176,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_validate_multiple.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_validate_multiple.yml index eced906ad..70687a783 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_validate_multiple.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_validate_multiple.yml @@ -22,7 +22,7 @@ elements: | webform_element_multiple_textfield_unlimited: '#type': textfield '#title': webform_element_multiple_textfield_unlimited - '#multiple': TRUE + '#multiple': true webform_element_multiple_textfield_three: '#type': textfield '#title': webform_element_multiple_textfield_three @@ -39,7 +39,7 @@ elements: | webform_element_multiple_link_unlimited: '#type': webform_link '#title': webform_element_multiple_link_unlimited - '#multiple': TRUE + '#multiple': true '#multiple__header': true checkboxes: '#type': details @@ -95,6 +95,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -227,6 +228,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: debug: id: debug diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_validate_required.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_validate_required.yml index d4e0a385a..47849beaf 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_validate_required.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_validate_required.yml @@ -46,6 +46,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -178,4 +179,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_validate_unique.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_validate_unique.yml index 3e5109318..752fa80e5 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_validate_unique.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_element_validate_unique.yml @@ -42,17 +42,14 @@ elements: | '#title': unique_error '#unique': true '#unique_error': 'unique_error error message.' - unique_ignored: + unique_multiple: '#type': checkboxes - '#title': unique_ignored + '#title': unique_multiple '#unique': true - '#unique_error': 'unique_ignored error message.' + '#unique_error': 'unique_multiple error message.' '#options': 1: one 2: two - '#default_value': - - 1 - - 2 css: '' javascript: '' @@ -70,6 +67,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: true @@ -202,4 +200,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_example_elements.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_example_elements.yml index 9a69d2196..7c889b204 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_example_elements.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_example_elements.yml @@ -349,11 +349,11 @@ elements: | webform_computed_token: '#type': webform_computed_token '#title': 'Computed token' - '#value': 'This is a Computed token value.' + '#template': 'This is a Computed token value.' webform_computed_twig: '#type': webform_computed_twig '#title': 'Computed Twig' - '#value': 'This is a Computed Twig value.' + '#template': 'This is a Computed Twig value.' containers: '#type': details '#title': Containers @@ -535,6 +535,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -667,4 +668,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_example_elements_composite.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_example_elements_composite.yml index 424aa5c1a..7e78023f9 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_example_elements_composite.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_example_elements_composite.yml @@ -193,6 +193,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -325,4 +326,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_exporter_entity_reference.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_exporter_entity_reference.yml index 2724f431f..e53324773 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_exporter_entity_reference.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_exporter_entity_reference.yml @@ -50,6 +50,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -182,4 +183,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_exporter_options.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_exporter_options.yml index 691c22202..d21f24359 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_exporter_options.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_exporter_options.yml @@ -60,6 +60,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -192,4 +193,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_access_denied.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_access_denied.yml index 55b7c0cd1..e293a3acf 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_access_denied.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_access_denied.yml @@ -35,6 +35,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -166,4 +167,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_api.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_api.yml index bfceb91ff..a3116254d 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_api.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_api.yml @@ -135,6 +135,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -267,4 +268,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_archived.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_archived.yml index b099164ac..f0ae56f40 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_archived.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_archived.yml @@ -34,6 +34,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -166,4 +167,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_assets.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_assets.yml index 8a5e3cbb9..9b45ab379 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_assets.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_assets.yml @@ -47,6 +47,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -179,4 +180,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_autofill.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_autofill.yml index 34c5733bf..5ddfe2be5 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_autofill.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_autofill.yml @@ -38,6 +38,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -171,4 +172,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_autofocus.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_autofocus.yml index 7a43cbaf2..e2106483e 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_autofocus.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_autofocus.yml @@ -35,6 +35,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -167,4 +168,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_closed.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_closed.yml index 03fa0110d..02b8b2228 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_closed.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_closed.yml @@ -34,6 +34,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -166,4 +167,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_confidential.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_confidential.yml index 689c02dc6..1cb66ae92 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_confidential.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_confidential.yml @@ -35,6 +35,7 @@ settings: form_previous_submissions: true form_confidential: true form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -167,4 +168,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_details_toggle.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_details_toggle.yml index d99ce19f2..e0ca72fde 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_details_toggle.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_details_toggle.yml @@ -42,6 +42,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -174,4 +175,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_disable_autocomplete.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_disable_autocomplete.yml index f10a9106b..f3b6c7cbb 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_disable_autocomplete.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_disable_autocomplete.yml @@ -37,6 +37,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -169,4 +170,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_disable_back.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_disable_back.yml index f42cfe18d..eda591055 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_disable_back.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_disable_back.yml @@ -362,6 +362,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -494,4 +495,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_disable_inline_errors.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_disable_inline_errors.yml index 00eb6554a..9bfd1f59f 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_disable_inline_errors.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_disable_inline_errors.yml @@ -36,6 +36,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -168,4 +169,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_draft_anonymous.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_draft_anonymous.yml index a679902d1..2ca1638fc 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_draft_anonymous.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_draft_anonymous.yml @@ -39,6 +39,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: true form_prepopulate: true form_prepopulate_source_entity: false @@ -171,4 +172,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_draft_authenticated.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_draft_authenticated.yml index ea6f42c0c..64d9b8666 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_draft_authenticated.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_draft_authenticated.yml @@ -39,6 +39,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: true form_prepopulate_source_entity: false @@ -171,4 +172,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_draft_multiple.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_draft_multiple.yml index d356fc530..d0879fd5c 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_draft_multiple.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_draft_multiple.yml @@ -39,6 +39,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: true form_prepopulate_source_entity: false @@ -171,4 +172,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_inline_errors.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_inline_errors.yml index 7530076e0..c56c922be 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_inline_errors.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_inline_errors.yml @@ -143,6 +143,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -275,4 +276,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_limit.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_limit.yml index 45dfcc168..fc9bd5fe7 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_limit.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_limit.yml @@ -35,6 +35,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: true form_prepopulate_source_entity: false @@ -167,4 +168,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_limit_total_unique.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_limit_total_unique.yml index 86a74dbae..b6736f69d 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_limit_total_unique.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_limit_total_unique.yml @@ -35,6 +35,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: true form_prepopulate_source_entity: false @@ -167,4 +168,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_limit_user_unique.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_limit_user_unique.yml index 9a55b4ff9..07e50212d 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_limit_user_unique.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_limit_user_unique.yml @@ -35,6 +35,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: true form_prepopulate_source_entity: false @@ -167,4 +168,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_long_100.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_long_100.yml index ff08151aa..e9d4b858c 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_long_100.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_long_100.yml @@ -332,6 +332,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -464,4 +465,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_long_200.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_long_200.yml index a8c5a042f..73d891ca7 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_long_200.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_long_200.yml @@ -632,6 +632,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -764,4 +765,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_long_300.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_long_300.yml index 66c0280c3..e046d996f 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_long_300.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_long_300.yml @@ -932,6 +932,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -1064,4 +1065,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_novalidate.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_novalidate.yml index 63e88b44b..a5552d3bc 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_novalidate.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_novalidate.yml @@ -39,6 +39,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -171,4 +172,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_opening.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_opening.yml index e36d4b6f7..448160e45 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_opening.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_opening.yml @@ -34,6 +34,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -166,4 +167,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_prepopulate.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_prepopulate.yml index 4c357ca75..e99cc697d 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_prepopulate.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_prepopulate.yml @@ -44,6 +44,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: true form_prepopulate_source_entity: true @@ -176,4 +177,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_preview.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_preview.yml index 208ae4461..d1147bdd9 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_preview.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_preview.yml @@ -15,17 +15,49 @@ title: 'Test: Webform: Preview' description: 'Test submission preview.' category: 'Test: Webform' elements: | - name: - '#type': textfield - '#title': Name - email: - '#type': email - '#title': Email - checkbox: + fieldset: + '#type': fieldset + '#title': fieldset + '#format_attributes': + class: + - format-attributes-class + name: + '#type': textfield + '#title': Name + '#format_attributes': + class: + - format-attributes-class + container: + '#type': container + '#title': container + '#format_attributes': + class: + - format-attributes-class + email: + '#type': email + '#title': Email + '#format_attributes': + class: + - format-attributes-class + section: + '#type': webform_section + '#title': section + '#format_attributes': + class: + - format-attributes-class + checkbox: '#type': checkbox '#title': Checkbox + '#format_attributes': + class: + - format-attributes-class + +css: | + .format-attributes-class { + border: 1px dashed #ccc; + padding: 10px; + } -css: '' javascript: '' settings: ajax: false @@ -41,6 +73,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: true form_prepopulate_source_entity: false @@ -173,4 +206,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_properties.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_properties.yml index 1c16bf148..def22e4ee 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_properties.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_properties.yml @@ -47,6 +47,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: true form_prepopulate_source_entity: false @@ -179,4 +180,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_remote_addr.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_remote_addr.yml new file mode 100644 index 000000000..b815e754b --- /dev/null +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_remote_addr.yml @@ -0,0 +1,175 @@ +langcode: en +status: open +dependencies: + enforced: + module: + - webform_test +open: null +close: null +weight: 0 +uid: null +template: false +archive: false +id: test_form_remote_addr +title: 'Test: Webform: Remote IP Address' +description: 'Test disabling the tracking of remote IP address.' +category: 'Test: Webform' +elements: | + name: + '#type': textfield + '#title': Name + +css: '' +javascript: '' +settings: + ajax: false + ajax_scroll_top: form + page: true + page_submit_path: '' + page_confirm_path: '' + form_title: source_entity_webform + form_submit_once: false + form_exception_message: '' + form_open_message: '' + form_close_message: '' + form_previous_submissions: true + form_confidential: false + form_confidential_message: '' + form_remote_addr: false + form_convert_anonymous: false + form_prepopulate: false + form_prepopulate_source_entity: false + form_prepopulate_source_entity_required: false + form_prepopulate_source_entity_type: '' + form_reset: false + form_disable_autocomplete: false + form_novalidate: false + form_disable_inline_errors: false + form_required: false + form_unsaved: false + form_disable_back: false + form_submit_back: false + form_autofocus: false + form_details_toggle: false + form_access_denied: default + form_access_denied_title: '' + form_access_denied_message: '' + form_access_denied_attributes: { } + form_file_limit: '' + submission_label: '' + submission_log: false + submission_views: { } + submission_views_replace: { } + submission_user_columns: { } + submission_user_duplicate: false + submission_access_denied: default + submission_access_denied_title: '' + submission_access_denied_message: '' + submission_access_denied_attributes: { } + submission_exception_message: '' + submission_locked_message: '' + submission_excluded_elements: { } + submission_exclude_empty: false + submission_exclude_empty_checkbox: false + previous_submission_message: '' + previous_submissions_message: '' + autofill: false + autofill_message: '' + autofill_excluded_elements: { } + wizard_progress_bar: true + wizard_progress_pages: false + wizard_progress_percentage: false + wizard_progress_link: false + wizard_start_label: '' + wizard_preview_link: false + wizard_confirmation: true + wizard_confirmation_label: '' + wizard_track: '' + preview: 0 + preview_label: '' + preview_title: '' + preview_message: '' + preview_attributes: { } + preview_excluded_elements: { } + preview_exclude_empty: true + preview_exclude_empty_checkbox: false + draft: none + draft_multiple: false + draft_auto_save: false + draft_saved_message: '' + draft_loaded_message: '' + confirmation_type: page + confirmation_title: '' + confirmation_message: '' + confirmation_url: '' + confirmation_attributes: { } + confirmation_back: true + confirmation_back_label: '' + confirmation_back_attributes: { } + confirmation_exclude_query: false + confirmation_exclude_token: false + limit_total: null + limit_total_interval: null + limit_total_message: '' + limit_total_unique: false + limit_user: null + limit_user_interval: null + limit_user_message: '' + limit_user_unique: false + entity_limit_total: null + entity_limit_total_interval: null + entity_limit_user: null + entity_limit_user_interval: null + purge: none + purge_days: null + results_disabled: false + results_disabled_ignore: true + token_update: false +access: + create: + roles: + - anonymous + - authenticated + users: { } + permissions: { } + view_any: + roles: { } + users: { } + permissions: { } + update_any: + roles: { } + users: { } + permissions: { } + delete_any: + roles: { } + users: { } + permissions: { } + purge_any: + roles: { } + users: { } + permissions: { } + view_own: + roles: { } + users: { } + permissions: { } + update_own: + roles: { } + users: { } + permissions: { } + delete_own: + roles: { } + users: { } + permissions: { } + administer: + roles: { } + users: { } + permissions: { } + test: + roles: { } + users: { } + permissions: { } + configuration: + roles: { } + users: { } + permissions: { } +handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_required.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_required.yml index 72f16bf34..134bc1458 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_required.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_required.yml @@ -36,6 +36,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -168,4 +169,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_reset.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_reset.yml index ccf447814..a97986dee 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_reset.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_reset.yml @@ -36,6 +36,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -168,4 +169,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_results_disabled.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_results_disabled.yml index 8bd01667c..a41740334 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_results_disabled.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_results_disabled.yml @@ -34,6 +34,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -166,4 +167,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_submit_back.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_submit_back.yml index 2e3eb5692..489fbb41f 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_submit_back.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_submit_back.yml @@ -46,6 +46,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -178,4 +179,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_submit_once.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_submit_once.yml index 1865a41d2..01c90c1b1 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_submit_once.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_submit_once.yml @@ -43,6 +43,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -175,4 +176,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_submit_text.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_submit_text.yml index d072d550f..38191ad6c 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_submit_text.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_submit_text.yml @@ -36,6 +36,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -168,4 +169,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_template.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_template.yml index 10fe5baae..098c1e08d 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_template.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_template.yml @@ -34,6 +34,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -166,4 +167,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_unsaved.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_unsaved.yml index d346ad30a..8f8dc885c 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_unsaved.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_unsaved.yml @@ -40,6 +40,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -172,4 +173,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_validate.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_validate.yml index fe49427af..3fb040837 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_validate.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_validate.yml @@ -35,6 +35,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -167,4 +168,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_wizard_access.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_wizard_access.yml index 7475ff912..fb3296926 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_wizard_access.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_wizard_access.yml @@ -73,6 +73,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -209,4 +210,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_wizard_advanced.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_wizard_advanced.yml index 4a10fbfb5..5e1472b4c 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_wizard_advanced.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_wizard_advanced.yml @@ -77,6 +77,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -209,4 +210,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_wizard_basic.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_wizard_basic.yml index 2b36b9ca6..2c4ac838b 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_wizard_basic.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_wizard_basic.yml @@ -46,6 +46,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -178,4 +179,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_wizard_conditional.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_wizard_conditional.yml index bcce30590..0b3065033 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_wizard_conditional.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_wizard_conditional.yml @@ -18,7 +18,7 @@ elements: | start: '#title': Start '#type': webform_wizard_page - 'trigger_pages': + trigger_pages: '#type': checkboxes '#title': trigger_pages '#options': @@ -40,7 +40,7 @@ elements: | disabled: ':input[name="trigger_none"]': checked: true - 'trigger_none': + trigger_none: '#type': checkbox '#title': trigger_none page_1: @@ -52,7 +52,7 @@ elements: | checked: true ':input[name="trigger_none"]': unchecked: true - 'page_1_markup': + page_1_markup: '#markup': 'This is page 1.' page_2: '#title': 'Page 2' @@ -63,7 +63,7 @@ elements: | checked: true ':input[name="trigger_none"]': unchecked: true - 'page_2_markup': + page_2_markup: '#markup': 'This is page 2.' page_3: '#title': 'Page 3' @@ -74,7 +74,7 @@ elements: | checked: true ':input[name="trigger_none"]': unchecked: true - 'page_3_markup': + page_3_markup: '#markup': 'This is page 3.' page_4: '#title': 'Page 4' @@ -85,7 +85,7 @@ elements: | checked: true ':input[name="trigger_none"]': unchecked: true - 'page_4_markup': + page_4_markup: '#markup': 'This is page 4.' page_5: '#title': 'Page 5' @@ -96,7 +96,7 @@ elements: | checked: true ':input[name="trigger_none"]': unchecked: true - 'page_5_markup': + page_5_markup: '#markup': 'This is page 5.' css: '' @@ -115,6 +115,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -247,4 +248,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_wizard_custom.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_wizard_custom.yml index 338bf1ce9..f774d15fc 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_wizard_custom.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_wizard_custom.yml @@ -78,6 +78,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: true form_prepopulate_source_entity: false @@ -210,4 +211,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_wizard_links.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_wizard_links.yml index 6d99db114..0c7106077 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_wizard_links.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_wizard_links.yml @@ -46,6 +46,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -178,4 +179,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_wizard_long_100.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_wizard_long_100.yml index 03f86b2bb..6031745c0 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_wizard_long_100.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_wizard_long_100.yml @@ -362,6 +362,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -494,4 +495,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_wizard_long_200.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_wizard_long_200.yml index 7d68e7dc1..7d4639b91 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_wizard_long_200.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_wizard_long_200.yml @@ -692,6 +692,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -824,4 +825,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_wizard_long_300.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_wizard_long_300.yml index f63c7126e..7020459c2 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_wizard_long_300.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_wizard_long_300.yml @@ -1022,6 +1022,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -1154,4 +1155,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_wizard_validate.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_wizard_validate.yml index b6f7745a6..ec5d9f3e1 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_wizard_validate.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_wizard_validate.yml @@ -75,6 +75,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: true form_prepopulate_source_entity: false @@ -207,6 +208,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: debug: id: debug diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_wizard_validate_comp.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_wizard_validate_comp.yml index 504b6422c..090d6d916 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_wizard_validate_comp.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_wizard_validate_comp.yml @@ -123,6 +123,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: true form_prepopulate_source_entity: false @@ -255,6 +256,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: debug: id: debug diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_handler_action.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_handler_action.yml index 8861bc7ed..21df4463f 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_handler_action.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_handler_action.yml @@ -64,6 +64,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -196,6 +197,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: notes: id: action diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_handler_email.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_handler_email.yml index 794519db6..e97e2e2c2 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_handler_email.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_handler_email.yml @@ -57,6 +57,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -189,6 +190,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: email: id: email diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_handler_email_advanced.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_handler_email_advanced.yml index cfc24ad50..5d71ae0fd 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_handler_email_advanced.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_handler_email_advanced.yml @@ -72,6 +72,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -204,6 +205,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: email: id: email diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_handler_email_mapping.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_handler_email_mapping.yml index 35d0638bc..4037f3f60 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_handler_email_mapping.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_handler_email_mapping.yml @@ -47,6 +47,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -179,6 +180,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: select: id: email diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_handler_email_roles.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_handler_email_roles.yml index 32fad5402..41ef51025 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_handler_email_roles.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_handler_email_roles.yml @@ -21,7 +21,7 @@ elements: | '#options': authenticated: 'Authenticated (authenticated)' administrator: 'Administrator (administrator)' - other: 'Other' + other: Other css: '' javascript: '' @@ -39,6 +39,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -171,6 +172,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: email: id: email diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_handler_email_states.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_handler_email_states.yml index 717315640..91abd9e87 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_handler_email_states.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_handler_email_states.yml @@ -34,6 +34,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: true form_prepopulate: false form_prepopulate_source_entity: false @@ -166,6 +167,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: email_draft: id: email diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_handler_email_twig.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_handler_email_twig.yml index 1cbcee195..45dd3b707 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_handler_email_twig.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_handler_email_twig.yml @@ -57,6 +57,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -189,6 +190,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: email: id: email diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_handler_settings.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_handler_settings.yml index a00fd0451..181b1c262 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_handler_settings.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_handler_settings.yml @@ -77,6 +77,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -209,6 +210,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: preview: id: settings diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_libraries_optional.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_libraries_optional.yml index 7b2c4695e..748d2542c 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_libraries_optional.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_libraries_optional.yml @@ -110,6 +110,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -242,4 +243,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_rendering.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_rendering.yml index 51bd32f21..956f85e91 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_rendering.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_rendering.yml @@ -66,6 +66,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -198,6 +199,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: email_html: id: email diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_states.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_states.yml similarity index 99% rename from web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_states.yml rename to web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_states.yml index b2095d4f3..7a31559d7 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_states.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_states.yml @@ -10,7 +10,7 @@ weight: 0 uid: null template: false archive: false -id: test_form_states +id: test_states title: 'Test: Form API #states' description: 'Test Drupal''s #states API states (visible, required, disabled, checked, and expanded).' category: 'Test: Form API #states' @@ -269,7 +269,6 @@ elements: | visible_webform_computed_token: '#type': webform_computed_token '#title': 'Computed token' - '#value': 'This is a Computed token value.' '#states': visible: ':input[name="visible_trigger"]': @@ -277,10 +276,10 @@ elements: | required: ':input[name="visible_trigger"]': checked: true + '#template': 'This is a Computed token value.' visible_webform_computed_twig: '#type': webform_computed_twig '#title': 'Computed Twig' - '#value': 'This is a Computed Twig value.' '#states': visible: ':input[name="visible_trigger"]': @@ -288,6 +287,7 @@ elements: | required: ':input[name="visible_trigger"]': checked: true + '#template': 'This is a Computed Twig value.' visible_webform_contact: '#type': webform_contact '#title': Contact @@ -1255,19 +1255,19 @@ elements: | invisible_webform_computed_token: '#type': webform_computed_token '#title': 'Computed token' - '#value': 'This is a Computed token value.' '#states': invisible: ':input[name="invisible_trigger"]': checked: true + '#template': 'This is a Computed token value.' invisible_webform_computed_twig: '#type': webform_computed_twig '#title': 'Computed Twig' - '#value': 'This is a Computed Twig value.' '#states': invisible: ':input[name="invisible_trigger"]': checked: true + '#template': 'This is a Computed Twig value.' invisible_webform_contact: '#type': webform_contact '#title': Contact @@ -2037,19 +2037,19 @@ elements: | disabled_webform_computed_token: '#type': webform_computed_token '#title': 'Computed token' - '#value': 'This is a Computed token value.' '#states': disabled: ':input[name="disabled_trigger"]': checked: true + '#template': 'This is a Computed token value.' disabled_webform_computed_twig: '#type': webform_computed_twig '#title': 'Computed Twig' - '#value': 'This is a Computed Twig value.' '#states': disabled: ':input[name="disabled_trigger"]': checked: true + '#template': 'This is a Computed Twig value.' disabled_webform_contact: '#type': webform_contact '#title': Contact @@ -2675,6 +2675,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -2807,4 +2808,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_states_autocomplete.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_states_autocomplete.yml new file mode 100644 index 000000000..45e26c673 --- /dev/null +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_states_autocomplete.yml @@ -0,0 +1,316 @@ +langcode: en +status: open +dependencies: + enforced: + module: + - webform_test +open: null +close: null +weight: 0 +uid: null +template: false +archive: false +id: test_states_autocomplete +title: 'Test: Form API #states autocomplete' +description: 'Test Drupal''s #states autocomplete.' +category: 'Test: Form API #states' +elements: | + select: + '#type': select + '#title': select + '#options': + One: One + Two: Two + Three: Three + select_multiple: + '#type': select + '#title': select_multiple + '#multiple': true + '#options': + One: One + Two: Two + Three: Three + webform_select_other: + '#type': webform_select_other + '#title': webform_select_other + '#options': + One: One + Two: Two + Three: Three + radios: + '#type': radios + '#title': radios + '#options': + One: One + Two: Two + Three: Three + webform_radios_other: + '#type': webform_radios_other + '#title': webform_radios_other + '#options': + One: One + Two: Two + Three: Three + checkboxes: + '#type': checkboxes + '#title': checkboxes + '#options': + One: One + Two: Two + Three: Three + webform_checkboxes_other: + '#type': webform_checkboxes_other + '#title': webform_checkboxes_other + '#options': + One: One + Two: Two + Three: Three + webform_buttons: + '#type': webform_buttons + '#title': webform_buttons + '#options': + One: One + Two: Two + Three: Three + webform_buttons_other: + '#type': webform_buttons_other + '#title': webform_buttons_other + '#options': + One: One + Two: Two + Three: Three + tableselect_single: + '#type': tableselect + '#title': tableselect_single + '#multiple': false + '#options': + One: One + Two: Two + Three: Three + tableselect_multiple: + '#type': tableselect + '#title': tableselect_multiple + '#options': + One: One + Two: Two + Three: Three + webform_entity_select: + '#type': webform_entity_select + '#title': webform_entity_select + '#target_type': user + '#selection_handler': 'default:user' + '#selection_settings': + include_anonymous: true + webform_likert: + '#type': webform_likert + '#title': webform_likert + '#questions': + q1: 'Question 1' + q2: 'Question 2' + q3: 'Question 3' + '#answers': + 1: 'Option 1' + 2: 'Option 2' + 3: 'Option 3' + webform_address: + '#type': webform_address + '#title': webform_address + '#state_province__type': webform_select_other + webform_custom_composite: + '#type': webform_custom_composite + '#title': webform_custom_composite + '#element': + textfield: + '#type': textfield + '#title': textfield + select: + '#type': select + '#title': select + '#options': + One: One + Two: Two + Three: Three + webform_element_composite: + '#type': webform_element_composite + '#title': webform_element_composite + '#default_value': + first_name: + '#type': textfield + '#title': 'First name' + last_name: + '#type': textfield + '#title': 'Last name' + gender: + '#type': select + '#options': + Male: Male + Female: Female + '#title': Gender + webform_image_select: + '#type': webform_image_select + '#title': webform_image_select + '#images': + kitten_1: + text: 'Cute Kitten 1' + src: 'http://placekitten.com/220/200' + kitten_2: + text: 'Cute Kitten 2' + src: 'http://placekitten.com/180/200' + kitten_3: + text: 'Cute Kitten 3' + src: 'http://placekitten.com/130/200' + +css: '' +javascript: '' +settings: + ajax: false + ajax_scroll_top: form + page: true + page_submit_path: '' + page_confirm_path: '' + form_title: source_entity_webform + form_submit_once: false + form_exception_message: '' + form_open_message: '' + form_close_message: '' + form_previous_submissions: true + form_confidential: false + form_confidential_message: '' + form_remote_addr: true + form_convert_anonymous: false + form_prepopulate: false + form_prepopulate_source_entity: false + form_prepopulate_source_entity_required: false + form_prepopulate_source_entity_type: '' + form_reset: false + form_disable_autocomplete: false + form_novalidate: true + form_disable_inline_errors: false + form_required: false + form_unsaved: false + form_disable_back: false + form_submit_back: false + form_autofocus: false + form_details_toggle: false + form_access_denied: default + form_access_denied_title: '' + form_access_denied_message: '' + form_access_denied_attributes: { } + form_file_limit: '' + submission_label: '' + submission_log: false + submission_views: { } + submission_views_replace: { } + submission_user_columns: { } + submission_user_duplicate: false + submission_access_denied: default + submission_access_denied_title: '' + submission_access_denied_message: '' + submission_access_denied_attributes: { } + submission_exception_message: '' + submission_locked_message: '' + submission_excluded_elements: { } + submission_exclude_empty: false + submission_exclude_empty_checkbox: false + previous_submission_message: '' + previous_submissions_message: '' + autofill: false + autofill_message: '' + autofill_excluded_elements: { } + wizard_progress_bar: true + wizard_progress_pages: false + wizard_progress_percentage: false + wizard_progress_link: false + wizard_start_label: '' + wizard_preview_link: false + wizard_confirmation: true + wizard_confirmation_label: '' + wizard_track: '' + preview: 0 + preview_label: '' + preview_title: '' + preview_message: '' + preview_attributes: { } + preview_excluded_elements: { } + preview_exclude_empty: true + preview_exclude_empty_checkbox: false + draft: none + draft_multiple: false + draft_auto_save: false + draft_saved_message: '' + draft_loaded_message: '' + confirmation_type: message + confirmation_title: '' + confirmation_message: '' + confirmation_url: '' + confirmation_attributes: { } + confirmation_back: true + confirmation_back_label: '' + confirmation_back_attributes: { } + confirmation_exclude_query: false + confirmation_exclude_token: false + limit_total: null + limit_total_interval: null + limit_total_message: '' + limit_total_unique: false + limit_user: null + limit_user_interval: null + limit_user_message: '' + limit_user_unique: false + entity_limit_total: null + entity_limit_total_interval: null + entity_limit_user: null + entity_limit_user_interval: null + purge: none + purge_days: null + results_disabled: true + results_disabled_ignore: true + token_update: false +access: + create: + roles: + - anonymous + - authenticated + users: { } + permissions: { } + view_any: + roles: { } + users: { } + permissions: { } + update_any: + roles: { } + users: { } + permissions: { } + delete_any: + roles: { } + users: { } + permissions: { } + purge_any: + roles: { } + users: { } + permissions: { } + view_own: + roles: { } + users: { } + permissions: { } + update_own: + roles: { } + users: { } + permissions: { } + delete_own: + roles: { } + users: { } + permissions: { } + administer: + roles: { } + users: { } + permissions: { } + test: + roles: { } + users: { } + permissions: { } + configuration: + roles: { } + users: { } + permissions: { } +handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_states_server_nested.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_states_crosspage.yml similarity index 73% rename from web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_states_server_nested.yml rename to web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_states_crosspage.yml index 041ba4417..1b41843a1 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_states_server_nested.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_states_crosspage.yml @@ -10,54 +10,41 @@ weight: 0 uid: null template: false archive: false -id: test_form_states_server_nested -title: 'Test: Form API #states nested elements in a conditional hidden container' -description: 'Test Drupal''s #states for nested elements in a conditional hidden container.' +id: test_states_crosspage +title: 'Test: Form API #states cross page conditions' +description: 'Test Drupal''s #states cross page conditions.' category: 'Test: Form API #states' elements: | - visible_trigger: - '#type': checkbox - '#title': visible_trigger - visible_fieldset: - '#type': fieldset - '#title': visible_fieldset - '#states': - visible: - ':input[name="visible_trigger"]': - checked: true - visible_textfield: - '#type': textfield - '#title': visible_textfield - '#required': true - visible_custom_textfield: - '#type': textfield - '#title': visible_custom_textfield - '#states': - required: - ':input[name="visible_trigger"]': - checked: true - ':input[name="visible_textfield"]': - filled: true - visible_slide_fieldset: - '#type': fieldset - '#title': visible_slide_fieldset - '#states': - 'visible-slide': - ':input[name="visible_trigger"]': - checked: true - visible_slide_textfield: - '#type': textfield - '#title': visible_slide_textfield - '#required': true - visible_slide_custom_textfield: - '#type': textfield - '#title': visible_slide_custom_textfield - '#states': - required: - ':input[name="visible_trigger"]': - checked: true - ':input[name="visible_slide_textfield"]': - filled: true + page_1: + '#type': webform_wizard_page + '#title': page_1 + trigger_1: + '#type': checkbox + '#title': trigger_1 + dependent_1: + '#type': textfield + '#title': dependent_1 + '#states': + visible: + ':input[name="trigger_1"]': + checked: true + ':input[name="trigger_2"]': + checked: true + page_2: + '#type': webform_wizard_page + '#title': page_2 + trigger_2: + '#type': checkbox + '#title': trigger_2 + dependent_2: + '#type': textfield + '#title': dependent_2 + '#states': + visible: + ':input[name="trigger_1"]': + checked: true + ':input[name="trigger_2"]': + checked: true css: '' javascript: '' @@ -75,6 +62,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -207,4 +195,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_states_server_clear.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_states_server_clear.yml similarity index 94% rename from web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_states_server_clear.yml rename to web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_states_server_clear.yml index 97820b44d..eadbdd9cb 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_states_server_clear.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_states_server_clear.yml @@ -10,7 +10,7 @@ weight: 0 uid: null template: false archive: false -id: test_form_states_server_clear +id: test_states_server_clear title: 'Test: Form API #states save hide/show element without clearing default value' description: 'Test Drupal's #states API hide/show element without clearing default value.' category: 'Test: Form API #states' @@ -22,7 +22,7 @@ elements: | '#type': hidden '#title': dependent_hidden '#default_value': '{dependent_hidden}' - '#states_clear': FALSE + '#states_clear': false '#states': visible: ':input[name="trigger_checkbox"]': @@ -30,8 +30,8 @@ elements: | dependent_checkbox: '#type': checkbox '#title': dependent_checkbox - '#default_value': TRUE - '#states_clear': FALSE + '#default_value': true + '#states_clear': false '#states': visible: ':input[name="trigger_checkbox"]': @@ -44,7 +44,7 @@ elements: | One: One Two: Two Three: Three - '#states_clear': FALSE + '#states_clear': false '#states': visible: ':input[name="trigger_checkbox"]': @@ -53,7 +53,7 @@ elements: | '#type': value '#title': dependent_value '#value': '{value}' - '#states_clear': FALSE + '#states_clear': false '#states': visible: ':input[name="trigger_checkbox"]': @@ -62,7 +62,7 @@ elements: | '#type': textfield '#title': dependent_textfield '#default_value': '{dependent_textfield}' - '#states_clear': FALSE + '#states_clear': false '#states': visible: ':input[name="trigger_checkbox"]': @@ -73,7 +73,7 @@ elements: | '#multiple': true '#default_value': - '{dependent_textfield}' - '#states_clear': FALSE + '#states_clear': false '#states': visible: ':input[name="trigger_checkbox"]': @@ -85,7 +85,7 @@ elements: | '#default_value': - first: John last: Smith - '#states_clear': FALSE + '#states_clear': false '#states': visible: ':input[name="trigger_checkbox"]': @@ -93,7 +93,7 @@ elements: | dependent_details: '#type': details '#title': dependent_details - '#states_clear': FALSE + '#states_clear': false '#states': visible: ':input[name="trigger_checkbox"]': @@ -119,6 +119,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -251,6 +252,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: debug: id: debug diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_states_server_comp.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_states_server_comp.yml similarity index 88% rename from web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_states_server_comp.yml rename to web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_states_server_comp.yml index 75596ee51..11fd1f842 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_states_server_comp.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_states_server_comp.yml @@ -10,7 +10,7 @@ weight: 0 uid: null template: false archive: false -id: test_form_states_server_comp +id: test_states_server_comp title: 'Test: Form API #states server-side composite elements' description: 'Test Drupal''s #states API for composite elements via server-side.' category: 'Test: Form API #states' @@ -58,7 +58,24 @@ elements: | visible: ':input[name="webform_name_multiple_header_trigger"]': checked: true - + webform_name_nested_trigger: + '#type': checkbox + '#title': webform_name_nested_trigger + '#default_value': false + webform_name_nested_trigger_fieldset: + '#type': fieldset + '#title': webform_name_nested_fieldset + '#states': + visible: + ':input[name="webform_name_nested_trigger"]': + checked: true + webform_name_nested: + '#type': webform_name + '#title': webform_name_nested + '#first__required': true + '#first__title': webform_name_nested_first + '#last__required': true + '#last__title': webform_name_nested_last css: '' javascript: '' settings: @@ -75,6 +92,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -207,4 +225,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_states_server_containers.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_states_server_containers.yml new file mode 100644 index 000000000..b3e8cbc15 --- /dev/null +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_states_server_containers.yml @@ -0,0 +1,230 @@ +langcode: en +status: open +dependencies: + enforced: + module: + - webform_test +open: null +close: null +weight: 0 +uid: null +template: false +archive: false +id: test_states_server_containers +title: 'Test: Form API #states nested elements in a conditional hidden container' +description: 'Test Drupal''s #states for nested elements in a conditional hidden container.' +category: 'Test: Form API #states' +elements: | + visible_trigger: + '#type': checkbox + '#title': visible_trigger + visible_fieldset: + '#type': fieldset + '#title': visible_fieldset + '#states': + visible: + ':input[name="visible_trigger"]': + checked: true + visible_textfield: + '#type': textfield + '#title': visible_textfield + '#required': true + visible_composite: + '#type': webform_custom_composite + '#title': visible_composite + '#element': + textfield: + '#type': textfield + '#title': textfield + '#required': true + select_other: + '#type': webform_select_other + '#title': select_other + '#options': + one: One + two: Two + '#required': true + visible_custom_textfield: + '#type': textfield + '#title': visible_custom_textfield + '#states': + required: + ':input[name="visible_trigger"]': + checked: true + ':input[name="visible_textfield"]': + filled: true + visible_slide_fieldset: + '#type': fieldset + '#title': visible_slide_fieldset + '#states': + visible-slide: + ':input[name="visible_trigger"]': + checked: true + visible_slide_textfield: + '#type': textfield + '#title': visible_slide_textfield + '#required': true + visible_slide_custom_textfield: + '#type': textfield + '#title': visible_slide_custom_textfield + '#states': + required: + ':input[name="visible_trigger"]': + checked: true + ':input[name="visible_slide_textfield"]': + filled: true + +css: '' +javascript: '' +settings: + ajax: false + ajax_scroll_top: form + page: true + page_submit_path: '' + page_confirm_path: '' + form_title: source_entity_webform + form_submit_once: false + form_exception_message: '' + form_open_message: '' + form_close_message: '' + form_previous_submissions: true + form_confidential: false + form_confidential_message: '' + form_remote_addr: true + form_convert_anonymous: false + form_prepopulate: false + form_prepopulate_source_entity: false + form_prepopulate_source_entity_required: false + form_prepopulate_source_entity_type: '' + form_reset: false + form_disable_autocomplete: false + form_novalidate: true + form_disable_inline_errors: false + form_required: false + form_unsaved: false + form_disable_back: false + form_submit_back: false + form_autofocus: false + form_details_toggle: false + form_access_denied: default + form_access_denied_title: '' + form_access_denied_message: '' + form_access_denied_attributes: { } + form_file_limit: '' + submission_label: '' + submission_log: false + submission_views: { } + submission_views_replace: { } + submission_user_columns: { } + submission_user_duplicate: false + submission_access_denied: default + submission_access_denied_title: '' + submission_access_denied_message: '' + submission_access_denied_attributes: { } + submission_exception_message: '' + submission_locked_message: '' + submission_excluded_elements: { } + submission_exclude_empty: false + submission_exclude_empty_checkbox: false + previous_submission_message: '' + previous_submissions_message: '' + autofill: false + autofill_message: '' + autofill_excluded_elements: { } + wizard_progress_bar: true + wizard_progress_pages: false + wizard_progress_percentage: false + wizard_progress_link: false + wizard_start_label: '' + wizard_preview_link: false + wizard_confirmation: true + wizard_confirmation_label: '' + wizard_track: '' + preview: 0 + preview_label: '' + preview_title: '' + preview_message: '' + preview_attributes: { } + preview_excluded_elements: { } + preview_exclude_empty: true + preview_exclude_empty_checkbox: false + draft: none + draft_multiple: false + draft_auto_save: false + draft_saved_message: '' + draft_loaded_message: '' + confirmation_type: message + confirmation_title: '' + confirmation_message: '' + confirmation_url: '' + confirmation_attributes: { } + confirmation_back: true + confirmation_back_label: '' + confirmation_back_attributes: { } + confirmation_exclude_query: false + confirmation_exclude_token: false + limit_total: null + limit_total_interval: null + limit_total_message: '' + limit_total_unique: false + limit_user: null + limit_user_interval: null + limit_user_message: '' + limit_user_unique: false + entity_limit_total: null + entity_limit_total_interval: null + entity_limit_user: null + entity_limit_user_interval: null + purge: none + purge_days: null + results_disabled: true + results_disabled_ignore: true + token_update: false +access: + create: + roles: + - anonymous + - authenticated + users: { } + permissions: { } + view_any: + roles: { } + users: { } + permissions: { } + update_any: + roles: { } + users: { } + permissions: { } + delete_any: + roles: { } + users: { } + permissions: { } + purge_any: + roles: { } + users: { } + permissions: { } + view_own: + roles: { } + users: { } + permissions: { } + update_own: + roles: { } + users: { } + permissions: { } + delete_own: + roles: { } + users: { } + permissions: { } + administer: + roles: { } + users: { } + permissions: { } + test: + roles: { } + users: { } + permissions: { } + configuration: + roles: { } + users: { } + permissions: { } +handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_states_server_custom.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_states_server_custom.yml similarity index 97% rename from web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_states_server_custom.yml rename to web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_states_server_custom.yml index bb6328275..1800ec043 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_states_server_custom.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_states_server_custom.yml @@ -10,7 +10,7 @@ weight: 0 uid: null template: false archive: false -id: test_form_states_server_custom +id: test_states_server_custom title: 'Test: Form API #states custom pattern, less, and greater condition validation' description: 'Test Drupal''s #states API custom pattern, less, and greater condition validation.' category: 'Test: Form API #states' @@ -42,11 +42,11 @@ elements: | visible: ':input[name="trigger_not_pattern"]': value: - '!pattern': '^$' + '!pattern': ^$ required: ':input[name="trigger_not_pattern"]': value: - '!pattern': '^$' + '!pattern': ^$ trigger_less: '#type': number '#title': trigger_less @@ -106,6 +106,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -238,4 +239,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_states_server_multiple.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_states_server_multiple.yml similarity index 96% rename from web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_states_server_multiple.yml rename to web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_states_server_multiple.yml index a619cef97..2810ee153 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_states_server_multiple.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_states_server_multiple.yml @@ -10,14 +10,14 @@ weight: 0 uid: null template: false archive: false -id: test_form_states_server_multiple +id: test_states_server_multiple title: 'Test: Form API #states server-side multiple elements' description: 'Test Drupal''s #states API for multiple elements via server-side.' category: 'Test: Form API #states' elements: | trigger_required: '#type': checkbox - '#title': trigger_required + '#title': trigger_required '#default_value': false textfield_multiple: '#type': textfield @@ -44,6 +44,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -176,4 +177,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_states_server_nested.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_states_server_nested.yml new file mode 100644 index 000000000..d87df30f2 --- /dev/null +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_states_server_nested.yml @@ -0,0 +1,215 @@ +langcode: en +status: open +dependencies: + enforced: + module: + - webform_test +open: null +close: null +weight: 0 +uid: null +template: false +archive: false +id: test_states_server_nested +title: 'Test: Form API #states nested conditions' +description: 'Test Drupal''s #states nested conditions support.' +category: 'Test: Form API #states' +elements: | + page_1: + '#type': webform_wizard_page + '#title': page_1 + a: + '#type': checkbox + '#title': a + '#default_value': true + b: + '#type': checkbox + '#title': b + '#default_value': true + c: + '#type': checkbox + '#title': c + page_1_target: + '#type': textfield + '#title': 'page_1_target: [a and b] or c = required' + '#states': + required: + - ':input[name="c"]': + checked: true + - or + - + - ':input[name="a"]': + checked: true + ':input[name="b"]': + checked: true + page_2: + '#type': webform_wizard_page + '#title': page_2 + page_2_target: + '#type': textfield + '#title': 'page_2_target: [a and b] or c = required' + '#states': + required: + - ':input[name="c"]': + checked: true + - or + - + - ':input[name="a"]': + checked: true + ':input[name="b"]': + checked: true + +css: '' +javascript: '' +settings: + ajax: false + ajax_scroll_top: form + page: true + page_submit_path: '' + page_confirm_path: '' + form_title: source_entity_webform + form_submit_once: false + form_exception_message: '' + form_open_message: '' + form_close_message: '' + form_previous_submissions: true + form_confidential: false + form_confidential_message: '' + form_remote_addr: true + form_convert_anonymous: false + form_prepopulate: false + form_prepopulate_source_entity: false + form_prepopulate_source_entity_required: false + form_prepopulate_source_entity_type: '' + form_reset: false + form_disable_autocomplete: false + form_novalidate: true + form_disable_inline_errors: false + form_required: false + form_unsaved: false + form_disable_back: false + form_submit_back: false + form_autofocus: false + form_details_toggle: false + form_access_denied: default + form_access_denied_title: '' + form_access_denied_message: '' + form_access_denied_attributes: { } + form_file_limit: '' + submission_label: '' + submission_log: false + submission_views: { } + submission_views_replace: { } + submission_user_columns: { } + submission_user_duplicate: false + submission_access_denied: default + submission_access_denied_title: '' + submission_access_denied_message: '' + submission_access_denied_attributes: { } + submission_exception_message: '' + submission_locked_message: '' + submission_excluded_elements: { } + submission_exclude_empty: false + submission_exclude_empty_checkbox: false + previous_submission_message: '' + previous_submissions_message: '' + autofill: false + autofill_message: '' + autofill_excluded_elements: { } + wizard_progress_bar: true + wizard_progress_pages: false + wizard_progress_percentage: false + wizard_progress_link: false + wizard_start_label: '' + wizard_preview_link: false + wizard_confirmation: true + wizard_confirmation_label: '' + wizard_track: '' + preview: 0 + preview_label: '' + preview_title: '' + preview_message: '' + preview_attributes: { } + preview_excluded_elements: { } + preview_exclude_empty: true + preview_exclude_empty_checkbox: false + draft: none + draft_multiple: false + draft_auto_save: false + draft_saved_message: '' + draft_loaded_message: '' + confirmation_type: message + confirmation_title: '' + confirmation_message: '' + confirmation_url: '' + confirmation_attributes: { } + confirmation_back: true + confirmation_back_label: '' + confirmation_back_attributes: { } + confirmation_exclude_query: false + confirmation_exclude_token: false + limit_total: null + limit_total_interval: null + limit_total_message: '' + limit_total_unique: false + limit_user: null + limit_user_interval: null + limit_user_message: '' + limit_user_unique: false + entity_limit_total: null + entity_limit_total_interval: null + entity_limit_user: null + entity_limit_user_interval: null + purge: none + purge_days: null + results_disabled: true + results_disabled_ignore: true + token_update: false +access: + create: + roles: + - anonymous + - authenticated + users: { } + permissions: { } + view_any: + roles: { } + users: { } + permissions: { } + update_any: + roles: { } + users: { } + permissions: { } + delete_any: + roles: { } + users: { } + permissions: { } + purge_any: + roles: { } + users: { } + permissions: { } + view_own: + roles: { } + users: { } + permissions: { } + update_own: + roles: { } + users: { } + permissions: { } + delete_own: + roles: { } + users: { } + permissions: { } + administer: + roles: { } + users: { } + permissions: { } + test: + roles: { } + users: { } + permissions: { } + configuration: + roles: { } + users: { } + permissions: { } +handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_states_server_preview.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_states_server_preview.yml similarity index 97% rename from web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_states_server_preview.yml rename to web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_states_server_preview.yml index 98af22857..77ee9668a 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_states_server_preview.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_states_server_preview.yml @@ -10,7 +10,7 @@ weight: 0 uid: null template: false archive: false -id: test_form_states_server_preview +id: test_states_server_preview title: 'Test: Form API #states preview hide/show condition validation' description: 'Test Drupal''s #states API hide/show condition validation.' category: 'Test: Form API #states' @@ -69,6 +69,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -201,4 +202,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_states_server_required.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_states_server_required.yml similarity index 99% rename from web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_states_server_required.yml rename to web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_states_server_required.yml index fec096efa..4b6e119a9 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_states_server_required.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_states_server_required.yml @@ -10,7 +10,7 @@ weight: 0 uid: null template: false archive: false -id: test_form_states_server_required +id: test_states_server_required title: 'Test: Form API #states server-side required validation' description: 'Test Drupal''s #states API via server-side required validation.' category: 'Test: Form API #states' @@ -356,7 +356,7 @@ elements: | '#states': required: ':input[name="composite_required_trigger"]': - 'checked': true + checked: true composite_sub_elements_required_details: '#type': details '#title': composite_sub_elements_required @@ -447,6 +447,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -579,4 +580,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_states_server_save.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_states_server_save.yml similarity index 97% rename from web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_states_server_save.yml rename to web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_states_server_save.yml index 35bfc928b..cb298af6a 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_states_server_save.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_states_server_save.yml @@ -10,7 +10,7 @@ weight: 0 uid: null template: false archive: false -id: test_form_states_server_save +id: test_states_server_save title: 'Test: Form API #states save hide/show element' description: 'Test Drupal's #states API hide/show element.' category: 'Test: Form API #states' @@ -87,6 +87,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -219,6 +220,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: debug: id: debug diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_states_server_wizard.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_states_server_wizard.yml similarity index 96% rename from web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_states_server_wizard.yml rename to web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_states_server_wizard.yml index b64fac21e..0f5bcf2ac 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_states_server_wizard.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_states_server_wizard.yml @@ -10,7 +10,7 @@ weight: 0 uid: null template: false archive: false -id: test_form_states_server_wizard +id: test_states_server_wizard title: 'Test: Form API #states server-side wizard pages' description: 'Test Drupal''s #states API for wizard pages via server-side.' category: 'Test: Form API #states' @@ -113,7 +113,7 @@ elements: | page_01_trigger_checkbox_computed: '#type': webform_computed_twig '#title': trigger_checkbox - '#value': '{{ data.page_01_trigger_checkbox ? ''Yes'' : ''No'' }}' + '#template': '{{ data.page_01_trigger_checkbox ? ''Yes'' : ''No'' }}' page_02_textfield_required: '#type': textfield '#title': page_02_textfield_required @@ -161,12 +161,12 @@ elements: | '#title': page_02_textfield_visible_slide '#description': 'Visible (Slide): page_01_trigger_checkbox:checked' '#states': - 'visible-slide': + visible-slide: ':input[name="page_01_trigger_checkbox"]': checked: true page_02_textfield_invisible: '#type': textfield - '#title': 'page_02_textfield_invisible' + '#title': page_02_textfield_invisible '#description': 'Invisible: page_01_trigger_checkbox:checked' '#states': invisible: @@ -174,10 +174,10 @@ elements: | checked: true page_02_textfield_invisible_slide: '#type': textfield - '#title': 'page_02_textfield_invisible_slide' + '#title': page_02_textfield_invisible_slide '#description': 'Invisible (Slide): page_01_trigger_checkbox:checked' '#states': - 'invisible-slide': + invisible-slide: ':input[name="page_01_trigger_checkbox"]': checked: true page_02_checkbox_checked: @@ -233,6 +233,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -365,4 +366,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_states_triggers.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_states_triggers.yml similarity index 98% rename from web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_states_triggers.yml rename to web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_states_triggers.yml index 30f47fbc6..5fb486db2 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_form_states_triggers.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_states_triggers.yml @@ -10,7 +10,7 @@ weight: 0 uid: null template: false archive: false -id: test_form_states_triggers +id: test_states_triggers title: 'Test: Form API #states: Triggers and Operators' description: 'Test Drupal''s #states API triggers (empty, checked, value, and collapsed).' category: 'Test: Form API #states' @@ -147,6 +147,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -279,4 +280,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_submission_label.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_submission_label.yml index aa0819f02..32ddaeb3c 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_submission_label.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_submission_label.yml @@ -36,6 +36,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -168,4 +169,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_submission_log.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_submission_log.yml index e0847b0d0..00071a12e 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_submission_log.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_submission_log.yml @@ -35,6 +35,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: true form_prepopulate: false form_prepopulate_source_entity: false @@ -167,4 +168,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_submission_views.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_submission_views.yml index 70bdbcfde..1bd430d66 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_submission_views.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_submission_views.yml @@ -35,6 +35,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -197,4 +198,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_token.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_token.yml index 97f655a23..427e7ac9a 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_token.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_token.yml @@ -31,6 +31,7 @@ elements: | Open long: [webform:open:long] Close: [webform:close] Close long: [webform:close:long] + webform_submission_tokens: '#type': webform_codemirror '#mode': text @@ -61,12 +62,14 @@ elements: | URL: [webform_submission:url] URL Edit Webform: [webform_submission:url:edit-form] UUID: [webform_submission:uuid] + webform_submission_data_tokens: '#type': webform_codemirror '#mode': text '#title': 'Webform Submission Data Tokens' '#default_value': | Submission values: [webform_submission:values] + webform_submission_source_entity_tokens: '#type': webform_codemirror '#mode': text @@ -95,6 +98,7 @@ elements: | Summary: [webform_submission:source-entity:summary] Title: [webform_submission:source-entity:title] URL: [webform_submission:source-entity:url] + webform_submission_node_tokens: '#type': webform_codemirror '#mode': text @@ -140,6 +144,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -272,6 +277,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: email: id: email diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_token_submission_value.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_token_submission_value.yml index 1008e88b1..03f9e4e4e 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_token_submission_value.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_token_submission_value.yml @@ -18,18 +18,18 @@ elements: | email: '#type': email '#title': email - '#default_value': 'example@example.com' + '#default_value': example@example.com emails: '#type': email '#title': emails '#multiple': true '#default_value': - - 'one@example.com' - - 'two@example.com' - - 'three@example.com' + - one@example.com + - two@example.com + - three@example.com user: '#type': webform_entity_select - '#title': 'user' + '#title': user '#target_type': user '#selection_handler': 'default:user' '#selection_settings': @@ -37,7 +37,7 @@ elements: | '#default_value': 1 users: '#type': webform_entity_select - '#title': 'user' + '#title': user '#multiple': true '#target_type': user '#selection_handler': 'default:user' @@ -78,8 +78,8 @@ elements: | '#type': webform_contact '#title': contact '#default_value': - name: John Smith - email: 'john@example.com' + name: 'John Smith' + email: john@example.com address: '10 Main Street' city: Springfield state_province: Alabama @@ -91,14 +91,14 @@ elements: | '#multiple': true '#default_value': - name: 'John Smith' - email: 'john@example.com' + email: john@example.com address: '10 Main Street' city: Springfield state_province: Alabama postal_code: 12345 country: 'United States' - name: 'Jane Doe' - email: 'jane@example.com' + email: jane@example.com address: '10 Main Street' city: Springfield state_province: Alabama @@ -144,6 +144,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -380,4 +381,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_token_update.yml b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_token_update.yml index ae59cd33e..ef4fea45d 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_token_update.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/config/install/webform.webform.test_token_update.yml @@ -35,6 +35,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -167,6 +168,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: email: id: email diff --git a/web/modules/contrib/webform/tests/modules/webform_test/includes/webform_test.test_form_states.inc b/web/modules/contrib/webform/tests/modules/webform_test/includes/webform_test.test_form_states.inc index 18a2841a3..eb86179d3 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/includes/webform_test.test_form_states.inc +++ b/web/modules/contrib/webform/tests/modules/webform_test/includes/webform_test.test_form_states.inc @@ -13,7 +13,7 @@ use Drupal\webform\Entity\Webform; * @return array * An array containing test elements with #states. */ -function webform_test_test_form_states() { +function webform_test_test_states() { $elements = []; // Visible. @@ -25,7 +25,7 @@ function webform_test_test_form_states() { '#type' => 'checkbox', '#title' => 'Displays and require elements', ]; - $elements['visible'] += _webform_test_form_states('visible', [ + $elements['visible'] += _webform_test_states('visible', [ '#states' => [ 'visible' => [ ':input[name="visible_trigger"]' => [ @@ -49,7 +49,7 @@ function webform_test_test_form_states() { '#type' => 'checkbox', '#title' => 'Hide and empty elements', ]; - $elements['invisible'] += _webform_test_form_states('invisible', [ + $elements['invisible'] += _webform_test_states('invisible', [ '#states' => [ 'invisible' => [ ':input[name="invisible_trigger"]' => [ @@ -68,7 +68,7 @@ function webform_test_test_form_states() { '#type' => 'checkbox', '#title' => 'Disable elements', ]; - $elements['disabled'] += _webform_test_form_states('disabled', [ + $elements['disabled'] += _webform_test_states('disabled', [ '#states' => [ 'disabled' => [ ':input[name="disabled_trigger"]' => [ @@ -92,7 +92,7 @@ function webform_test_test_form_states() { * @return array * A render array of example elements */ -function _webform_test_form_states($type, array $default_properties = []) { +function _webform_test_states($type, array $default_properties = []) { $data = [ 'containers' => [], 'elements' => [], diff --git a/web/modules/contrib/webform/tests/modules/webform_test/webform_test.info.yml b/web/modules/contrib/webform/tests/modules/webform_test/webform_test.info.yml index dd95d1a4c..4c608362a 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test/webform_test.info.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test/webform_test.info.yml @@ -6,8 +6,8 @@ package: Testing dependencies: - 'webform:webform' -# Information added by Drupal.org packaging script on 2018-11-06 -version: '8.x-5.0-rc26' +# Information added by Drupal.org packaging script on 2019-01-02 +version: '8.x-5.1' core: '8.x' project: 'webform' -datestamp: 1541466489 +datestamp: 1546458493 diff --git a/web/modules/contrib/webform/tests/modules/webform_test_ajax/webform_test_ajax.info.yml b/web/modules/contrib/webform/tests/modules/webform_test_ajax/webform_test_ajax.info.yml index 3be1f01c1..40424cf35 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test_ajax/webform_test_ajax.info.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test_ajax/webform_test_ajax.info.yml @@ -7,8 +7,8 @@ dependencies: - 'drupal:block' - 'webform:webform' -# Information added by Drupal.org packaging script on 2018-11-06 -version: '8.x-5.0-rc26' +# Information added by Drupal.org packaging script on 2019-01-02 +version: '8.x-5.1' core: '8.x' project: 'webform' -datestamp: 1541466489 +datestamp: 1546458493 diff --git a/web/modules/contrib/webform/tests/modules/webform_test_alter_hooks/webform_test_alter_hooks.info.yml b/web/modules/contrib/webform/tests/modules/webform_test_alter_hooks/webform_test_alter_hooks.info.yml index 9e4eef072..347233f70 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test_alter_hooks/webform_test_alter_hooks.info.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test_alter_hooks/webform_test_alter_hooks.info.yml @@ -6,8 +6,8 @@ package: Testing dependencies: - 'webform:webform' -# Information added by Drupal.org packaging script on 2018-11-06 -version: '8.x-5.0-rc26' +# Information added by Drupal.org packaging script on 2019-01-02 +version: '8.x-5.1' core: '8.x' project: 'webform' -datestamp: 1541466489 +datestamp: 1546458493 diff --git a/web/modules/contrib/webform/tests/modules/webform_test_block_context/webform_test_block_context.info.yml b/web/modules/contrib/webform/tests/modules/webform_test_block_context/webform_test_block_context.info.yml index d0d383a3e..24dd741c2 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test_block_context/webform_test_block_context.info.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test_block_context/webform_test_block_context.info.yml @@ -7,8 +7,8 @@ dependencies: - 'drupal:block' - 'webform:webform' -# Information added by Drupal.org packaging script on 2018-11-06 -version: '8.x-5.0-rc26' +# Information added by Drupal.org packaging script on 2019-01-02 +version: '8.x-5.1' core: '8.x' project: 'webform' -datestamp: 1541466489 +datestamp: 1546458493 diff --git a/web/modules/contrib/webform/tests/modules/webform_test_block_custom/webform_test_block_custom.info.yml b/web/modules/contrib/webform/tests/modules/webform_test_block_custom/webform_test_block_custom.info.yml index 3d7154704..6ab16e476 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test_block_custom/webform_test_block_custom.info.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test_block_custom/webform_test_block_custom.info.yml @@ -8,8 +8,8 @@ dependencies: - 'drupal:block_content' - 'webform:webform' -# Information added by Drupal.org packaging script on 2018-11-06 -version: '8.x-5.0-rc26' +# Information added by Drupal.org packaging script on 2019-01-02 +version: '8.x-5.1' core: '8.x' project: 'webform' -datestamp: 1541466489 +datestamp: 1546458493 diff --git a/web/modules/contrib/webform/tests/modules/webform_test_block_submission_limit/webform_test_block_submission_limit.info.yml b/web/modules/contrib/webform/tests/modules/webform_test_block_submission_limit/webform_test_block_submission_limit.info.yml index 3ffdc47a2..903cfe6de 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test_block_submission_limit/webform_test_block_submission_limit.info.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test_block_submission_limit/webform_test_block_submission_limit.info.yml @@ -7,8 +7,8 @@ dependencies: - 'drupal:block' - 'webform:webform' -# Information added by Drupal.org packaging script on 2018-11-06 -version: '8.x-5.0-rc26' +# Information added by Drupal.org packaging script on 2019-01-02 +version: '8.x-5.1' core: '8.x' project: 'webform' -datestamp: 1541466489 +datestamp: 1546458493 diff --git a/web/modules/contrib/webform/tests/modules/webform_test_config_performance/webform_test_config_performance.info.yml b/web/modules/contrib/webform/tests/modules/webform_test_config_performance/webform_test_config_performance.info.yml index 15b53e414..915f38e56 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test_config_performance/webform_test_config_performance.info.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test_config_performance/webform_test_config_performance.info.yml @@ -6,8 +6,8 @@ package: Testing dependencies: - 'webform:webform' -# Information added by Drupal.org packaging script on 2018-11-06 -version: '8.x-5.0-rc26' +# Information added by Drupal.org packaging script on 2019-01-02 +version: '8.x-5.1' core: '8.x' project: 'webform' -datestamp: 1541466489 +datestamp: 1546458493 diff --git a/web/modules/contrib/webform/tests/modules/webform_test_custom_properties/webform_test_custom_properties.info.yml b/web/modules/contrib/webform/tests/modules/webform_test_custom_properties/webform_test_custom_properties.info.yml index 0cad73c8f..4a822494e 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test_custom_properties/webform_test_custom_properties.info.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test_custom_properties/webform_test_custom_properties.info.yml @@ -7,8 +7,8 @@ dependencies: - 'webform:webform' - 'webform:webform_ui' -# Information added by Drupal.org packaging script on 2018-11-06 -version: '8.x-5.0-rc26' +# Information added by Drupal.org packaging script on 2019-01-02 +version: '8.x-5.1' core: '8.x' project: 'webform' -datestamp: 1541466489 +datestamp: 1546458493 diff --git a/web/modules/contrib/webform/tests/modules/webform_test_element/config/install/webform.webform.test_element_comp_file_plugin.yml b/web/modules/contrib/webform/tests/modules/webform_test_element/config/install/webform.webform.test_element_comp_file_plugin.yml index f653f7bca..8365d12f6 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test_element/config/install/webform.webform.test_element_comp_file_plugin.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test_element/config/install/webform.webform.test_element_comp_file_plugin.yml @@ -44,6 +44,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -176,6 +177,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: debug: id: debug diff --git a/web/modules/contrib/webform/tests/modules/webform_test_element/config/install/webform.webform.test_element_composite_plugin.yml b/web/modules/contrib/webform/tests/modules/webform_test_element/config/install/webform.webform.test_element_composite_plugin.yml index 30fbffe0c..adcb3756c 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test_element/config/install/webform.webform.test_element_composite_plugin.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test_element/config/install/webform.webform.test_element_composite_plugin.yml @@ -44,6 +44,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -176,6 +177,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: debug: id: debug diff --git a/web/modules/contrib/webform/tests/modules/webform_test_element/config/install/webform.webform.test_element_plugin.yml b/web/modules/contrib/webform/tests/modules/webform_test_element/config/install/webform.webform.test_element_plugin.yml index 6dd6eb891..306e08575 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test_element/config/install/webform.webform.test_element_plugin.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test_element/config/install/webform.webform.test_element_plugin.yml @@ -18,6 +18,7 @@ elements: | description: '#markup': |

    This webform includes a #test elememt which will trigger all methods associated with a WebformElement plugin.

    + test: '#type': webform_test_element '#title': 'This is a test element' @@ -39,6 +40,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -171,4 +173,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test_element/webform_test_element.info.yml b/web/modules/contrib/webform/tests/modules/webform_test_element/webform_test_element.info.yml index 8fe8e70e7..46c9888cb 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test_element/webform_test_element.info.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test_element/webform_test_element.info.yml @@ -6,8 +6,8 @@ package: Testing dependencies: - 'webform:webform' -# Information added by Drupal.org packaging script on 2018-11-06 -version: '8.x-5.0-rc26' +# Information added by Drupal.org packaging script on 2019-01-02 +version: '8.x-5.1' core: '8.x' project: 'webform' -datestamp: 1541466489 +datestamp: 1546458493 diff --git a/web/modules/contrib/webform/tests/modules/webform_test_exporter/webform_test_exporter.info.yml b/web/modules/contrib/webform/tests/modules/webform_test_exporter/webform_test_exporter.info.yml index 43586a103..2ccf77a6d 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test_exporter/webform_test_exporter.info.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test_exporter/webform_test_exporter.info.yml @@ -6,8 +6,8 @@ package: Testing dependencies: - 'webform:webform' -# Information added by Drupal.org packaging script on 2018-11-06 -version: '8.x-5.0-rc26' +# Information added by Drupal.org packaging script on 2019-01-02 +version: '8.x-5.1' core: '8.x' project: 'webform' -datestamp: 1541466489 +datestamp: 1546458493 diff --git a/web/modules/contrib/webform/tests/modules/webform_test_handler/config/install/webform.webform.test_handler_conditions.yml b/web/modules/contrib/webform/tests/modules/webform_test_handler/config/install/webform.webform.test_handler_conditions.yml index 99355fdef..91a89ea93 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test_handler/config/install/webform.webform.test_handler_conditions.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test_handler/config/install/webform.webform.test_handler_conditions.yml @@ -40,6 +40,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -172,6 +173,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: test_a: id: test diff --git a/web/modules/contrib/webform/tests/modules/webform_test_handler/config/install/webform.webform.test_handler_test.yml b/web/modules/contrib/webform/tests/modules/webform_test_handler/config/install/webform.webform.test_handler_test.yml index e6eec37a1..499ff6a6e 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test_handler/config/install/webform.webform.test_handler_test.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test_handler/config/install/webform.webform.test_handler_test.yml @@ -38,6 +38,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -170,6 +171,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: test: id: test @@ -180,3 +185,11 @@ handlers: weight: 1 settings: message: 'One two one two this is just a test' + debug: + id: debug + label: Debug + handler_id: debug + status: false + conditions: { } + weight: 2 + settings: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test_handler/config/schema/webform_test_handler.webform.schema.yml b/web/modules/contrib/webform/tests/modules/webform_test_handler/config/schema/webform_test_handler.webform.schema.yml index f38347823..81017d2da 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test_handler/config/schema/webform_test_handler.webform.schema.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test_handler/config/schema/webform_test_handler.webform.schema.yml @@ -1,13 +1,10 @@ -# Schema for the configuration files of the webform test handler module. - webform.handler.test: type: mapping - label: 'Test' + label: Test mapping: message: - label: 'Message' + label: Message type: string - webform.handler.test_entity_mapping: type: mapping label: 'Test entity mapping' @@ -16,8 +13,8 @@ webform.handler.test_entity_mapping: label: 'Entity type' type: string bundle: - label: 'Bundle' + label: Bundle type: string fields: type: ignore - label: 'Fields' + label: Fields diff --git a/web/modules/contrib/webform/tests/modules/webform_test_handler/src/Plugin/WebformHandler/TestEntityMappingWebformHandler.php b/web/modules/contrib/webform/tests/modules/webform_test_handler/src/Plugin/WebformHandler/TestEntityMappingWebformHandler.php index 089bc2d4b..de5e365a9 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test_handler/src/Plugin/WebformHandler/TestEntityMappingWebformHandler.php +++ b/web/modules/contrib/webform/tests/modules/webform_test_handler/src/Plugin/WebformHandler/TestEntityMappingWebformHandler.php @@ -115,7 +115,6 @@ class TestEntityMappingWebformHandler extends WebformHandlerBase { $form['container']['bundle'] = [ '#type' => 'select', '#title' => $this->t('Bundles'), - '#parents' => ['settings', 'bundle'], '#default_value' => $this->configuration['bundle'], '#options' => $bundle_options, '#ajax' => $ajax, @@ -147,12 +146,11 @@ class TestEntityMappingWebformHandler extends WebformHandlerBase { '#description_display' => 'before', '#default_value' => $this->configuration['fields'], '#required' => TRUE, - '#parents' => ['settings', 'fields'], '#source' => $element_options, '#destination' => $field_options, ]; - return $form; + return $this->setSettingsParents($form); } /** diff --git a/web/modules/contrib/webform/tests/modules/webform_test_handler/webform_test_handler.info.yml b/web/modules/contrib/webform/tests/modules/webform_test_handler/webform_test_handler.info.yml index c05765d58..4be8ea5a6 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test_handler/webform_test_handler.info.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test_handler/webform_test_handler.info.yml @@ -6,8 +6,8 @@ package: Testing dependencies: - 'webform:webform' -# Information added by Drupal.org packaging script on 2018-11-06 -version: '8.x-5.0-rc26' +# Information added by Drupal.org packaging script on 2019-01-02 +version: '8.x-5.1' core: '8.x' project: 'webform' -datestamp: 1541466489 +datestamp: 1546458493 diff --git a/web/modules/contrib/webform/tests/modules/webform_test_handler_invoke_alter/webform_test_handler_invoke_alter.info.yml b/web/modules/contrib/webform/tests/modules/webform_test_handler_invoke_alter/webform_test_handler_invoke_alter.info.yml index 88dea975a..a68ca571a 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test_handler_invoke_alter/webform_test_handler_invoke_alter.info.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test_handler_invoke_alter/webform_test_handler_invoke_alter.info.yml @@ -6,8 +6,8 @@ package: Testing dependencies: - 'webform:webform' -# Information added by Drupal.org packaging script on 2018-11-06 -version: '8.x-5.0-rc26' +# Information added by Drupal.org packaging script on 2019-01-02 +version: '8.x-5.1' core: '8.x' project: 'webform' -datestamp: 1541466489 +datestamp: 1546458493 diff --git a/web/modules/contrib/webform/tests/modules/webform_test_handler_remote_post/config/install/webform.webform.test_handler_remote_get.yml b/web/modules/contrib/webform/tests/modules/webform_test_handler_remote_post/config/install/webform.webform.test_handler_remote_get.yml index c62876311..8bf1befcb 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test_handler_remote_post/config/install/webform.webform.test_handler_remote_get.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test_handler_remote_post/config/install/webform.webform.test_handler_remote_get.yml @@ -54,6 +54,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: true form_prepopulate: false form_prepopulate_source_entity: false @@ -188,6 +189,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: remote_post: id: remote_post diff --git a/web/modules/contrib/webform/tests/modules/webform_test_handler_remote_post/config/install/webform.webform.test_handler_remote_post.yml b/web/modules/contrib/webform/tests/modules/webform_test_handler_remote_post/config/install/webform.webform.test_handler_remote_post.yml index d33297286..35464c3f3 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test_handler_remote_post/config/install/webform.webform.test_handler_remote_post.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test_handler_remote_post/config/install/webform.webform.test_handler_remote_post.yml @@ -55,6 +55,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: true form_prepopulate: false form_prepopulate_source_entity: false @@ -189,6 +190,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: remote_post: id: remote_post diff --git a/web/modules/contrib/webform/tests/modules/webform_test_handler_remote_post/config/install/webform.webform.test_handler_remote_post_file.yml b/web/modules/contrib/webform/tests/modules/webform_test_handler_remote_post/config/install/webform.webform.test_handler_remote_post_file.yml index b51d4b2cf..b94f477d6 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test_handler_remote_post/config/install/webform.webform.test_handler_remote_post_file.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test_handler_remote_post/config/install/webform.webform.test_handler_remote_post_file.yml @@ -43,6 +43,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: true form_prepopulate: false form_prepopulate_source_entity: false @@ -177,6 +178,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: remote_post: id: remote_post diff --git a/web/modules/contrib/webform/tests/modules/webform_test_handler_remote_post/config/install/webform.webform.test_handler_remote_put.yml b/web/modules/contrib/webform/tests/modules/webform_test_handler_remote_post/config/install/webform.webform.test_handler_remote_put.yml index a1062a573..cec9caef8 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test_handler_remote_post/config/install/webform.webform.test_handler_remote_put.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test_handler_remote_post/config/install/webform.webform.test_handler_remote_put.yml @@ -54,6 +54,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: true form_prepopulate: false form_prepopulate_source_entity: false @@ -188,6 +189,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: remote_post: id: remote_post diff --git a/web/modules/contrib/webform/tests/modules/webform_test_handler_remote_post/webform_test_handler_remote_post.info.yml b/web/modules/contrib/webform/tests/modules/webform_test_handler_remote_post/webform_test_handler_remote_post.info.yml index fcecdd19f..39b5ef67a 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test_handler_remote_post/webform_test_handler_remote_post.info.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test_handler_remote_post/webform_test_handler_remote_post.info.yml @@ -6,8 +6,8 @@ package: Testing dependencies: - 'webform:webform' -# Information added by Drupal.org packaging script on 2018-11-06 -version: '8.x-5.0-rc26' +# Information added by Drupal.org packaging script on 2019-01-02 +version: '8.x-5.1' core: '8.x' project: 'webform' -datestamp: 1541466489 +datestamp: 1546458493 diff --git a/web/modules/contrib/webform/tests/modules/webform_test_message_custom/webform_test_message_custom.info.yml b/web/modules/contrib/webform/tests/modules/webform_test_message_custom/webform_test_message_custom.info.yml index ee2911318..8650cca90 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test_message_custom/webform_test_message_custom.info.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test_message_custom/webform_test_message_custom.info.yml @@ -6,8 +6,8 @@ package: Testing dependencies: - 'webform:webform' -# Information added by Drupal.org packaging script on 2018-11-06 -version: '8.x-5.0-rc26' +# Information added by Drupal.org packaging script on 2019-01-02 +version: '8.x-5.1' core: '8.x' project: 'webform' -datestamp: 1541466489 +datestamp: 1546458493 diff --git a/web/modules/contrib/webform/tests/modules/webform_test_options/config/install/webform.webform.test_options.yml b/web/modules/contrib/webform/tests/modules/webform_test_options/config/install/webform.webform.test_options.yml index e0765c269..e5d27cade 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test_options/config/install/webform.webform.test_options.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test_options/config/install/webform.webform.test_options.yml @@ -236,6 +236,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -368,4 +369,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test_options/webform_test_options.info.yml b/web/modules/contrib/webform/tests/modules/webform_test_options/webform_test_options.info.yml index 8bf4920ff..96e70af6b 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test_options/webform_test_options.info.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test_options/webform_test_options.info.yml @@ -6,8 +6,8 @@ package: Testing dependencies: - 'webform:webform' -# Information added by Drupal.org packaging script on 2018-11-06 -version: '8.x-5.0-rc26' +# Information added by Drupal.org packaging script on 2019-01-02 +version: '8.x-5.1' core: '8.x' project: 'webform' -datestamp: 1541466489 +datestamp: 1546458493 diff --git a/web/modules/contrib/webform/tests/modules/webform_test_paragraphs/webform_test_paragraphs.info.yml b/web/modules/contrib/webform/tests/modules/webform_test_paragraphs/webform_test_paragraphs.info.yml index 01c115803..285936cee 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test_paragraphs/webform_test_paragraphs.info.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test_paragraphs/webform_test_paragraphs.info.yml @@ -7,8 +7,8 @@ dependencies: - 'paragraphs:paragraphs' - 'webform:webform' -# Information added by Drupal.org packaging script on 2018-11-06 -version: '8.x-5.0-rc26' +# Information added by Drupal.org packaging script on 2019-01-02 +version: '8.x-5.1' core: '8.x' project: 'webform' -datestamp: 1541466489 +datestamp: 1546458493 diff --git a/web/modules/contrib/webform/tests/modules/webform_test_rest/webform_test_rest.info.yml b/web/modules/contrib/webform/tests/modules/webform_test_rest/webform_test_rest.info.yml index e211dc932..615c7dfa8 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test_rest/webform_test_rest.info.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test_rest/webform_test_rest.info.yml @@ -9,8 +9,8 @@ dependencies: - 'drupal:serialization' - 'webform:webform' -# Information added by Drupal.org packaging script on 2018-11-06 -version: '8.x-5.0-rc26' +# Information added by Drupal.org packaging script on 2019-01-02 +version: '8.x-5.1' core: '8.x' project: 'webform' -datestamp: 1541466489 +datestamp: 1546458493 diff --git a/web/modules/contrib/webform/tests/modules/webform_test_submission_views/webform_test_submission_views.info.yml b/web/modules/contrib/webform/tests/modules/webform_test_submission_views/webform_test_submission_views.info.yml deleted file mode 100644 index af98c2161..000000000 --- a/web/modules/contrib/webform/tests/modules/webform_test_submission_views/webform_test_submission_views.info.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: 'Webform module Submission Views tests' -type: module -description: 'Support module for Webform that provides Submission Views integration.' -package: Testing -# core: 8.x -dependencies: - - 'drupal:node' - - 'drupal:user' - - 'drupal:views' - - 'webform:webform' - -# Information added by Drupal.org packaging script on 2018-11-06 -version: '8.x-5.0-rc26' -core: '8.x' -project: 'webform' -datestamp: 1541466489 diff --git a/web/modules/contrib/webform/tests/modules/webform_test_submissions/config/install/webform.webform.test_submissions.yml b/web/modules/contrib/webform/tests/modules/webform_test_submissions/config/install/webform.webform.test_submissions.yml index 8eef99cea..1a6a514b3 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test_submissions/config/install/webform.webform.test_submissions.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test_submissions/config/install/webform.webform.test_submissions.yml @@ -75,6 +75,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -207,4 +208,8 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test_submissions/webform_test_submissions.info.yml b/web/modules/contrib/webform/tests/modules/webform_test_submissions/webform_test_submissions.info.yml index 2d0f9e90d..a182320aa 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test_submissions/webform_test_submissions.info.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test_submissions/webform_test_submissions.info.yml @@ -7,8 +7,8 @@ dependencies: - 'drupal:node' - 'webform:webform' -# Information added by Drupal.org packaging script on 2018-11-06 -version: '8.x-5.0-rc26' +# Information added by Drupal.org packaging script on 2019-01-02 +version: '8.x-5.1' core: '8.x' project: 'webform' -datestamp: 1541466489 +datestamp: 1546458493 diff --git a/web/modules/contrib/webform/tests/modules/webform_test_third_party_settings/webform_test_third_party_settings.info.yml b/web/modules/contrib/webform/tests/modules/webform_test_third_party_settings/webform_test_third_party_settings.info.yml index cf5729e78..2d9762d88 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test_third_party_settings/webform_test_third_party_settings.info.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test_third_party_settings/webform_test_third_party_settings.info.yml @@ -6,8 +6,8 @@ package: Testing dependencies: - 'webform:webform' -# Information added by Drupal.org packaging script on 2018-11-06 -version: '8.x-5.0-rc26' +# Information added by Drupal.org packaging script on 2019-01-02 +version: '8.x-5.1' core: '8.x' project: 'webform' -datestamp: 1541466489 +datestamp: 1546458493 diff --git a/web/modules/contrib/webform/tests/modules/webform_test_translation/config/install/language/es/webform.settings.yml b/web/modules/contrib/webform/tests/modules/webform_test_translation/config/install/language/es/webform.settings.yml index ca873beb2..d05e881fd 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test_translation/config/install/language/es/webform.settings.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test_translation/config/install/language/es/webform.settings.yml @@ -16,10 +16,11 @@ mail: default_body: | Enviada [webform_submission:created] Presentado por:[webform_submission:user] - + Los valores presentados son: - + [webform_submission:values] + test: types: | checkbox: @@ -80,6 +81,7 @@ test: webform_time: - '09:00' - '17:00' + names: | first_name: - 'John' diff --git a/web/modules/contrib/webform/tests/modules/webform_test_translation/config/install/language/es/webform.webform.test_translation.yml b/web/modules/contrib/webform/tests/modules/webform_test_translation/config/install/language/es/webform.webform.test_translation.yml index 486b8cbee..73f75dbe1 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test_translation/config/install/language/es/webform.webform.test_translation.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test_translation/config/install/language/es/webform.webform.test_translation.yml @@ -26,6 +26,14 @@ elements: | age: '#title': Edad '#field_suffix': 'años. antiguo' + address: + '#title': 'Dirección' + '#address__title': 'Dirección' + '#address_2__title': 'Dirección 2' + '#city__title': 'Ciudad / Pueblo' + '#state_province__title': 'Estado / Provincia' + '#postal_code__title': 'ZIP / Código Postal' + '#country__title': 'Acciones de país' actions: '#type': webform_actions '#title': 'Submit button(s)' diff --git a/web/modules/contrib/webform/tests/modules/webform_test_translation/config/install/language/es/webform.webform_options.test_translation.yml b/web/modules/contrib/webform/tests/modules/webform_test_translation/config/install/language/es/webform.webform_options.test_translation.yml index e3fa6e5f7..28ac3d8f7 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test_translation/config/install/language/es/webform.webform_options.test_translation.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test_translation/config/install/language/es/webform.webform_options.test_translation.yml @@ -3,6 +3,7 @@ options: | 1: Uno 2: Dos 3: Tres + dependencies: enforced: module: diff --git a/web/modules/contrib/webform/tests/modules/webform_test_translation/config/install/webform.webform.test_translation.yml b/web/modules/contrib/webform/tests/modules/webform_test_translation/config/install/webform.webform.test_translation.yml index 3d4c20e82..437d5f98a 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test_translation/config/install/webform.webform.test_translation.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test_translation/config/install/webform.webform.test_translation.yml @@ -47,10 +47,13 @@ elements: | '#title': 'Last name' age: '#type': number - '#title': 'Age' + '#title': Age '#field_suffix': ' yrs. old' '#min': 1 '#max': 125 + address: + '#type': webform_address + '#title': Address token: '#type': webform_computed_token '#title': 'Computed (token)' @@ -76,6 +79,7 @@ settings: form_previous_submissions: true form_confidential: false form_confidential_message: '' + form_remote_addr: true form_convert_anonymous: false form_prepopulate: false form_prepopulate_source_entity: false @@ -208,6 +212,10 @@ access: roles: { } users: { } permissions: { } + configuration: + roles: { } + users: { } + permissions: { } handlers: email_confirmation: id: email diff --git a/web/modules/contrib/webform/tests/modules/webform_test_translation/webform_test_translation.info.yml b/web/modules/contrib/webform/tests/modules/webform_test_translation/webform_test_translation.info.yml index 9d852d909..f4e06274d 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test_translation/webform_test_translation.info.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test_translation/webform_test_translation.info.yml @@ -9,8 +9,8 @@ dependencies: - 'drupal:locale' - 'webform:webform' -# Information added by Drupal.org packaging script on 2018-11-06 -version: '8.x-5.0-rc26' +# Information added by Drupal.org packaging script on 2019-01-02 +version: '8.x-5.1' core: '8.x' project: 'webform' -datestamp: 1541466489 +datestamp: 1546458493 diff --git a/web/modules/contrib/webform/tests/modules/webform_test_translation_lingotek/webform_test_translation_lingotek.info.yml b/web/modules/contrib/webform/tests/modules/webform_test_translation_lingotek/webform_test_translation_lingotek.info.yml index 7062f0985..8aa37c5fe 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test_translation_lingotek/webform_test_translation_lingotek.info.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test_translation_lingotek/webform_test_translation_lingotek.info.yml @@ -10,8 +10,8 @@ dependencies: - 'lingotek:lingotek' - 'webform:webform' -# Information added by Drupal.org packaging script on 2018-11-06 -version: '8.x-5.0-rc26' +# Information added by Drupal.org packaging script on 2019-01-02 +version: '8.x-5.1' core: '8.x' project: 'webform' -datestamp: 1541466489 +datestamp: 1546458493 diff --git a/web/modules/contrib/webform/tests/modules/webform_test_validate/webform_test_validate.info.yml b/web/modules/contrib/webform/tests/modules/webform_test_validate/webform_test_validate.info.yml index eda9b95a2..c5a3f1c7b 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test_validate/webform_test_validate.info.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test_validate/webform_test_validate.info.yml @@ -6,8 +6,8 @@ package: Testing dependencies: - 'webform:webform' -# Information added by Drupal.org packaging script on 2018-11-06 -version: '8.x-5.0-rc26' +# Information added by Drupal.org packaging script on 2019-01-02 +version: '8.x-5.1' core: '8.x' project: 'webform' -datestamp: 1541466489 +datestamp: 1546458493 diff --git a/web/modules/contrib/webform/tests/modules/webform_test_views/config/install/views.view.webform_test_views_access.yml b/web/modules/contrib/webform/tests/modules/webform_test_views/config/install/views.view.webform_test_views_access.yml new file mode 100644 index 000000000..5cbf535ae --- /dev/null +++ b/web/modules/contrib/webform/tests/modules/webform_test_views/config/install/views.view.webform_test_views_access.yml @@ -0,0 +1,298 @@ +langcode: en +status: true +dependencies: + enforced: + module: + - webform_test_views + module: + - user + - webform +id: webform_test_views_access +label: 'Webform test: Views access' +module: views +description: 'Test webform submission access.' +tag: '' +base_table: webform_submission +base_field: sid +core: 8.x +display: + default: + display_plugin: default + id: default + display_title: Master + position: 0 + display_options: + access: + type: perm + options: + perm: 'access webform overview' + cache: + type: tag + options: { } + query: + type: views_query + options: + disable_sql_rewrite: false + distinct: false + replica: false + query_comment: '' + query_tags: { } + exposed_form: + type: basic + options: + submit_button: Apply + reset_button: false + reset_button_label: Reset + exposed_sorts_label: 'Sort by' + expose_sort_order: true + sort_asc_label: Asc + sort_desc_label: Desc + pager: + type: full + options: + items_per_page: 50 + offset: 0 + id: 0 + total_pages: null + tags: + previous: ‹‹ + next: ›› + first: '« First' + last: 'Last »' + expose: + items_per_page: true + items_per_page_label: 'Items per page' + items_per_page_options: '5, 10, 25, 50, 100, 200' + items_per_page_options_all: false + items_per_page_options_all_label: '- All -' + offset: false + offset_label: Offset + quantity: 9 + style: + type: table + options: + grouping: { } + row_class: '' + default_row_class: true + override: true + sticky: false + caption: '' + summary: '' + description: '' + columns: + sid: sid + webform_id: webform_id + info: + sid: + sortable: true + default_sort_order: desc + align: '' + separator: '' + empty_column: false + responsive: '' + webform_id: + sortable: true + default_sort_order: asc + align: '' + separator: '' + empty_column: false + responsive: '' + default: sid + empty_table: false + row: + type: fields + options: + inline: { } + separator: '' + hide_empty: false + default_field_elements: true + fields: + sid: + id: sid + table: webform_submission + field: sid + relationship: none + group_type: group + admin_label: '' + label: '#' + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: value + type: number_integer + settings: + thousand_separator: '' + prefix_suffix: true + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + entity_type: webform_submission + entity_field: sid + plugin_id: field + webform_id: + id: webform_id + table: webform_submission + field: webform_id + relationship: none + group_type: group + admin_label: '' + label: Webform + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: true + ellipsis: true + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: true + element_wrapper_type: '' + element_wrapper_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + click_sort_column: target_id + type: entity_reference_label + settings: + link: true + group_column: target_id + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + entity_type: webform_submission + entity_field: webform_id + plugin_id: field + filters: { } + sorts: { } + header: { } + footer: { } + empty: + area_text_custom: + id: area_text_custom + table: views + field: area_text_custom + relationship: none + group_type: group + admin_label: '' + empty: true + tokenize: false + content: 'No submissions available.' + plugin_id: text_custom + relationships: { } + arguments: { } + display_extenders: { } + filter_groups: + operator: AND + groups: { } + title: 'Views bulk form' + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url.query_args + - user + - user.permissions + tags: { } + page: + display_plugin: page + id: page + display_title: Page + position: 1 + display_options: + display_extenders: { } + path: admin/structure/webform/test/views_access + menu: + type: normal + title: 'Views access' + description: 'Test webform submission access.' + expanded: false + parent: webform_test.index + weight: 0 + context: '0' + menu_name: admin + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url.query_args + - user + - user.permissions + tags: { } diff --git a/web/modules/contrib/webform/tests/modules/webform_test_views/webform_test_views.info.yml b/web/modules/contrib/webform/tests/modules/webform_test_views/webform_test_views.info.yml index 74c49a2ec..820e0f099 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test_views/webform_test_views.info.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test_views/webform_test_views.info.yml @@ -9,8 +9,8 @@ dependencies: - 'drupal:views' - 'webform:webform' -# Information added by Drupal.org packaging script on 2018-11-06 -version: '8.x-5.0-rc26' +# Information added by Drupal.org packaging script on 2019-01-02 +version: '8.x-5.1' core: '8.x' project: 'webform' -datestamp: 1541466489 +datestamp: 1546458493 diff --git a/web/modules/contrib/webform/tests/modules/webform_test_wizard_custom/webform_test_wizard_custom.info.yml b/web/modules/contrib/webform/tests/modules/webform_test_wizard_custom/webform_test_wizard_custom.info.yml index a61e979ec..cae478659 100644 --- a/web/modules/contrib/webform/tests/modules/webform_test_wizard_custom/webform_test_wizard_custom.info.yml +++ b/web/modules/contrib/webform/tests/modules/webform_test_wizard_custom/webform_test_wizard_custom.info.yml @@ -6,8 +6,8 @@ package: Testing dependencies: - 'webform:webform' -# Information added by Drupal.org packaging script on 2018-11-06 -version: '8.x-5.0-rc26' +# Information added by Drupal.org packaging script on 2019-01-02 +version: '8.x-5.1' core: '8.x' project: 'webform' -datestamp: 1541466489 +datestamp: 1546458493 diff --git a/web/modules/contrib/webform/tests/src/Functional/WebformAssertLegacyTrait.php b/web/modules/contrib/webform/tests/src/Functional/WebformAssertLegacyTrait.php new file mode 100644 index 000000000..f13a61198 --- /dev/null +++ b/web/modules/contrib/webform/tests/src/Functional/WebformAssertLegacyTrait.php @@ -0,0 +1,768 @@ +assertEquals($expected, $actual, $message); + } + + /** + * @see \Drupal\simpletest\TestBase::assertNotEqual() + */ + protected function assertNotEqual($actual, $expected, $message = '') { + $this->assertNotEquals($expected, $actual, $message); + } + + /** + * @see \Drupal\simpletest\TestBase::assertIdentical() + */ + protected function assertIdentical($actual, $expected, $message = '') { + $this->assertSame($expected, $actual, $message); + } + + /** + * @see \Drupal\simpletest\TestBase::assertNotIdentical() + */ + protected function assertNotIdentical($actual, $expected, $message = '') { + $this->assertNotSame($expected, $actual, $message); + } + + /** + * @see \Drupal\simpletest\TestBase::assertIdenticalObject() + */ + protected function assertIdenticalObject($actual, $expected, $message = '') { + // Note: ::assertSame checks whether its the same object. ::assertEquals + // though compares + $this->assertEquals($expected, $actual, $message); + } + + /** + * @see \Drupal\simpletest\TestBase::pass() + */ + protected function pass($message) { + $this->assertTrue(TRUE, $message); + } + + /** + * @see \Drupal\simpletest\TestBase::verbose() + */ + protected function verbose($message) { + if (in_array('--debug', $_SERVER['argv'], TRUE)) { + // Write directly to STDOUT to not produce unexpected test output. + // The STDOUT stream does not obey output buffering. + fwrite(STDOUT, $message . "\n"); + } + } + + /** + * Asserts that the element with the given CSS selector is present. + * + * @param string $css_selector + * The CSS selector identifying the element to check. + */ + protected function assertElementPresent($css_selector) { + $this->assertSession()->elementExists('css', $css_selector); + } + + /** + * Asserts that the element with the given CSS selector is not present. + * + * @param string $css_selector + * The CSS selector identifying the element to check. + */ + protected function assertElementNotPresent($css_selector) { + $this->assertSession()->elementNotExists('css', $css_selector); + } + + /** + * Passes if the page (with HTML stripped) contains the text. + * + * Note that stripping HTML tags also removes their attributes, such as + * the values of text fields. + * + * @param string $text + * Plain text to look for. + */ + protected function assertText($text) { + // Cast MarkupInterface to string. + $text = (string) $text; + + $content_type = $this->getSession()->getResponseHeader('Content-type'); + // In case of a Non-HTML response (example: XML) check the original + // response. + if (strpos($content_type, 'html') === FALSE) { + $this->assertSession()->responseContains($text); + } + else { + $this->assertTextHelper($text, FALSE); + } + } + + /** + * Passes if the page (with HTML stripped) does not contains the text. + * + * Note that stripping HTML tags also removes their attributes, such as + * the values of text fields. + * + * @param string $text + * Plain text to look for. + */ + protected function assertNoText($text) { + // Cast MarkupInterface to string. + $text = (string) $text; + + $content_type = $this->getSession()->getResponseHeader('Content-type'); + // In case of a Non-HTML response (example: XML) check the original + // response. + if (strpos($content_type, 'html') === FALSE) { + $this->assertSession()->responseNotContains($text); + } + else { + $this->assertTextHelper($text); + } + } + + /** + * Helper for assertText and assertNoText. + * + * @param string $text + * Plain text to look for. + * @param bool $not_exists + * (optional) TRUE if this text should not exist, FALSE if it should. + * Defaults to TRUE. + * + * @return bool + * TRUE on pass, FALSE on fail. + */ + protected function assertTextHelper($text, $not_exists = TRUE) { + $args = ['@text' => $text]; + $message = $not_exists ? new FormattableMarkup('"@text" not found', $args) : new FormattableMarkup('"@text" found', $args); + + $raw_content = $this->getSession()->getPage()->getContent(); + // Trying to simulate what the user sees, given that it removes all text + // inside the head tags, removes inline Javascript, fix all HTML entities, + // removes dangerous protocols and filtering out all HTML tags, as they are + // not visible in a normal browser. + $raw_content = preg_replace('@(.+?)@si', '', $raw_content); + $page_text = Xss::filter($raw_content, []); + + $actual = $not_exists == (strpos($page_text, (string) $text) === FALSE); + $this->assertTrue($actual, $message); + + return $actual; + } + + /** + * Passes if the text is found ONLY ONCE on the text version of the page. + * + * The text version is the equivalent of what a user would see when viewing + * through a web browser. In other words the HTML has been filtered out of + * the contents. + * + * @param string|\Drupal\Component\Render\MarkupInterface $text + * Plain text to look for. + * @param string $message + * (optional) A message to display with the assertion. Do not translate + * messages with t(). If left blank, a default message will be displayed. + */ + protected function assertUniqueText($text, $message = NULL) { + // Cast MarkupInterface objects to string. + $text = (string) $text; + + $message = $message ?: "'$text' found only once on the page"; + $page_text = $this->getSession()->getPage()->getText(); + $nr_found = substr_count($page_text, $text); + $this->assertSame(1, $nr_found, $message); + } + + /** + * Passes if the text is found MORE THAN ONCE on the text version of the page. + * + * The text version is the equivalent of what a user would see when viewing + * through a web browser. In other words the HTML has been filtered out of + * the contents. + * + * @param string|\Drupal\Component\Render\MarkupInterface $text + * Plain text to look for. + * @param string $message + * (optional) A message to display with the assertion. Do not translate + * messages with t(). If left blank, a default message will be displayed. + */ + protected function assertNoUniqueText($text, $message = '') { + // Cast MarkupInterface objects to string. + $text = (string) $text; + + $message = $message ?: "'$text' found more than once on the page"; + $page_text = $this->getSession()->getPage()->getText(); + $nr_found = substr_count($page_text, $text); + $this->assertGreaterThan(1, $nr_found, $message); + } + + /** + * Asserts the page responds with the specified response code. + * + * @param int $code + * Response code. For example 200 is a successful page request. For a list + * of all codes see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html. + */ + protected function assertResponse($code) { + $this->assertSession()->statusCodeEquals($code); + } + + /** + * Asserts that a field exists with the given name and value. + * + * @param string $name + * Name of field to assert. + * @param string $value + * (optional) Value of the field to assert. You may pass in NULL (default) + * to skip checking the actual value, while still checking that the field + * exists. + */ + protected function assertFieldByName($name, $value = NULL) { + $this->assertFieldByXPath($this->constructFieldXpath('name', $name), $value); + } + + /** + * Asserts that a field does not exist with the given name and value. + * + * @param string $name + * Name of field to assert. + * @param string $value + * (optional) Value for the field, to assert that the field's value on the + * page does not match it. You may pass in NULL to skip checking the + * value, while still checking that the field does not exist. However, the + * default value ('') asserts that the field value is not an empty string. + */ + protected function assertNoFieldByName($name, $value = '') { + $this->assertNoFieldByXPath($this->constructFieldXpath('name', $name), $value); + } + + /** + * Asserts that a field exists with the given ID and value. + * + * @param string $id + * ID of field to assert. + * @param string|\Drupal\Component\Render\MarkupInterface $value + * (optional) Value for the field to assert. You may pass in NULL to skip + * checking the value, while still checking that the field exists. + * However, the default value ('') asserts that the field value is an empty + * string. + * + * @throws \Behat\Mink\Exception\ElementNotFoundException + */ + protected function assertFieldById($id, $value = '') { + $this->assertFieldByXPath($this->constructFieldXpath('id', $id), $value); + } + + /** + * Asserts that a field exists with the given name or ID. + * + * @param string $field + * Name or ID of field to assert. + */ + protected function assertField($field) { + $this->assertFieldByXPath($this->constructFieldXpath('name', $field) . '|' . $this->constructFieldXpath('id', $field)); + } + + /** + * Asserts that a field does NOT exist with the given name or ID. + * + * @param string $field + * Name or ID of field to assert. + */ + protected function assertNoField($field) { + $this->assertNoFieldByXPath($this->constructFieldXpath('name', $field) . '|' . $this->constructFieldXpath('id', $field)); + } + + /** + * Passes if the raw text IS found on the loaded page, fail otherwise. + * + * Raw text refers to the raw HTML that the page generated. + * + * @param string $raw + * Raw (HTML) string to look for. + */ + protected function assertRaw($raw) { + $this->assertSession()->responseContains($raw); + } + + /** + * Passes if the raw text IS not found on the loaded page, fail otherwise. + * + * Raw text refers to the raw HTML that the page generated. + * + * @param string $raw + * Raw (HTML) string to look for. + */ + protected function assertNoRaw($raw) { + $this->assertSession()->responseNotContains($raw); + } + + /** + * Pass if the page title is the given string. + * + * @param string $expected_title + * The string the page title should be. + */ + protected function assertTitle($expected_title) { + // Cast MarkupInterface to string. + $expected_title = (string) $expected_title; + return $this->assertSession()->titleEquals($expected_title); + } + + /** + * Passes if a link with the specified label is found. + * + * An optional link index may be passed. + * + * @param string|\Drupal\Component\Render\MarkupInterface $label + * Text between the anchor tags. + * @param int $index + * Link position counting from zero. + */ + protected function assertLink($label, $index = 0) { + return $this->assertSession()->linkExists($label, $index); + } + + /** + * Passes if a link with the specified label is not found. + * + * @param string|\Drupal\Component\Render\MarkupInterface $label + * Text between the anchor tags. + */ + protected function assertNoLink($label) { + return $this->assertSession()->linkNotExists($label); + } + + /** + * Passes if a link containing a given href (part) is found. + * + * @param string $href + * The full or partial value of the 'href' attribute of the anchor tag. + * @param int $index + * Link position counting from zero. + */ + protected function assertLinkByHref($href, $index = 0) { + $this->assertSession()->linkByHrefExists($href, $index); + } + + /** + * Passes if a link containing a given href (part) is not found. + * + * @param string $href + * The full or partial value of the 'href' attribute of the anchor tag. + */ + protected function assertNoLinkByHref($href) { + $this->assertSession()->linkByHrefNotExists($href); + } + + /** + * Asserts that a field does not exist with the given ID and value. + * + * @param string $id + * ID of field to assert. + * @param string $value + * (optional) Value for the field, to assert that the field's value on the + * page doesn't match it. You may pass in NULL to skip checking the value, + * while still checking that the field doesn't exist. However, the default + * value ('') asserts that the field value is not an empty string. + * + * @throws \Behat\Mink\Exception\ExpectationException + */ + protected function assertNoFieldById($id, $value = '') { + $this->assertNoFieldByXPath($this->constructFieldXpath('id', $id), $value); + } + + /** + * Passes if the internal browser's URL matches the given path. + * + * @param \Drupal\Core\Url|string $path + * The expected system path or URL. + */ + protected function assertUrl($path) { + $this->assertSession()->addressEquals($path); + } + + /** + * Asserts that a select option in the current page exists. + * + * @param string $id + * ID of select field to assert. + * @param string $option + * Option to assert. + */ + protected function assertOption($id, $option) { + return $this->assertSession()->optionExists($id, $option); + } + + /** + * Asserts that a select option with the visible text exists. + * + * @param string $id + * The ID of the select field to assert. + * @param string $text + * The text for the option tag to assert. + */ + protected function assertOptionByText($id, $text) { + return $this->assertSession()->optionExists($id, $text); + } + + /** + * Asserts that a select option does NOT exist in the current page. + * + * @param string $id + * ID of select field to assert. + * @param string $option + * Option to assert. + */ + protected function assertNoOption($id, $option) { + return $this->assertSession()->optionNotExists($id, $option); + } + + /** + * Asserts that a select option in the current page is checked. + * + * @param string $id + * ID of select field to assert. + * @param string $option + * Option to assert. + * @param string $message + * (optional) A message to display with the assertion. Do not translate + * messages with t(). If left blank, a default message will be displayed. + */ + protected function assertOptionSelected($id, $option, $message = NULL) { + $option_field = $this->assertSession()->optionExists($id, $option); + $message = $message ?: "Option $option for field $id is selected."; + $this->assertTrue($option_field->hasAttribute('selected'), $message); + } + + /** + * Asserts that a checkbox field in the current page is checked. + * + * @param string $id + * ID of field to assert. + */ + protected function assertFieldChecked($id) { + $this->assertSession()->checkboxChecked($id); + } + + /** + * Asserts that a checkbox field in the current page is not checked. + * + * @param string $id + * ID of field to assert. + */ + protected function assertNoFieldChecked($id) { + $this->assertSession()->checkboxNotChecked($id); + } + + /** + * Asserts that a field exists in the current page by the given XPath. + * + * @param string $xpath + * XPath used to find the field. + * @param string $value + * (optional) Value of the field to assert. You may pass in NULL (default) + * to skip checking the actual value, while still checking that the field + * exists. + * @param string $message + * (optional) A message to display with the assertion. Do not translate + * messages with t(). + */ + protected function assertFieldByXPath($xpath, $value = NULL, $message = '') { + $fields = $this->xpath($xpath); + + $this->assertFieldsByValue($fields, $value, $message); + } + + /** + * Asserts that a field does not exist or its value does not match, by XPath. + * + * @param string $xpath + * XPath used to find the field. + * @param string $value + * (optional) Value of the field, to assert that the field's value on the + * page does not match it. + * @param string $message + * (optional) A message to display with the assertion. Do not translate + * messages with t(). + * + * @throws \Behat\Mink\Exception\ExpectationException + */ + protected function assertNoFieldByXPath($xpath, $value = NULL, $message = '') { + $fields = $this->xpath($xpath); + + if (!empty($fields)) { + if (isset($value)) { + $found = FALSE; + try { + $this->assertFieldsByValue($fields, $value); + $found = TRUE; + } + catch (\Exception $e) { + } + + if ($found) { + throw new ExpectationException(sprintf('The field resulting from %s was found with the provided value %s.', $xpath, $value), $this->getSession()->getDriver()); + } + } + else { + throw new ExpectationException(sprintf('The field resulting from %s was found.', $xpath), $this->getSession()->getDriver()); + } + } + } + + /** + * Asserts that a field exists in the current page with a given Xpath result. + * + * @param \Behat\Mink\Element\NodeElement[] $fields + * Xml elements. + * @param string $value + * (optional) Value of the field to assert. You may pass in NULL (default) to skip + * checking the actual value, while still checking that the field exists. + * @param string $message + * (optional) A message to display with the assertion. Do not translate + * messages with t(). + */ + protected function assertFieldsByValue($fields, $value = NULL, $message = '') { + // If value specified then check array for match. + $found = TRUE; + if (isset($value)) { + $found = FALSE; + if ($fields) { + foreach ($fields as $field) { + if ($field->getAttribute('type') == 'checkbox') { + if (is_bool($value)) { + $found = $field->isChecked() == $value; + } + else { + $found = TRUE; + } + } + elseif ($field->getAttribute('value') == $value) { + // Input element with correct value. + $found = TRUE; + } + elseif ($field->find('xpath', '//option[@value = ' . (new Escaper())->escapeLiteral($value) . ' and @selected = "selected"]')) { + // Select element with an option. + $found = TRUE; + } + elseif ($field->getTagName() === 'textarea' && $field->getValue() == $value) { + // Text area with correct text. Use getValue() here because + // getText() would remove any newlines in the value. + $found = TRUE; + } + elseif ($field->getTagName() !== 'input' && $field->getText() == $value) { + $found = TRUE; + } + } + } + } + $this->assertTrue($fields && $found, $message); + } + + /** + * Passes if the raw text IS found escaped on the loaded page, fail otherwise. + * + * Raw text refers to the raw HTML that the page generated. + * + * @param string $raw + * Raw (HTML) string to look for. + */ + protected function assertEscaped($raw) { + $this->assertSession()->assertEscaped($raw); + } + + /** + * Passes if the raw text is not found escaped on the loaded page. + * + * Raw text refers to the raw HTML that the page generated. + * + * @param string $raw + * Raw (HTML) string to look for. + */ + protected function assertNoEscaped($raw) { + $this->assertSession()->assertNoEscaped($raw); + } + + /** + * Triggers a pass if the Perl regex pattern is found in the raw content. + * + * @param string $pattern + * Perl regex to look for including the regex delimiters. + */ + protected function assertPattern($pattern) { + $this->assertSession()->responseMatches($pattern); + } + + /** + * Triggers a pass if the Perl regex pattern is not found in the raw content. + * + * @param string $pattern + * Perl regex to look for including the regex delimiters. + * + * @see https://www.drupal.org/node/2864262 + */ + protected function assertNoPattern($pattern) { + $this->assertSession()->responseNotMatches($pattern); + } + + /** + * Asserts whether an expected cache tag was present in the last response. + * + * @param string $expected_cache_tag + * The expected cache tag. + */ + protected function assertCacheTag($expected_cache_tag) { + $this->assertSession()->responseHeaderContains('X-Drupal-Cache-Tags', $expected_cache_tag); + } + + /** + * Asserts whether an expected cache tag was absent in the last response. + * + * @param string $cache_tag + * The cache tag to check. + * + * @see https://www.drupal.org/node/2864029 + */ + protected function assertNoCacheTag($cache_tag) { + $this->assertSession()->responseHeaderNotContains('X-Drupal-Cache-Tags', $cache_tag); + } + + /** + * Checks that current response header equals value. + * + * @param string $name + * Name of header to assert. + * @param string $value + * Value of the header to assert. + */ + protected function assertHeader($name, $value) { + $this->assertSession()->responseHeaderEquals($name, $value); + } + + /** + * Returns WebAssert object. + * + * @param string $name + * (optional) Name of the session. Defaults to the active session. + * + * @return \Drupal\Tests\WebAssert + * A new web-assert option for asserting the presence of elements with. + */ + abstract public function assertSession($name = NULL); + + /** + * Builds an XPath query. + * + * Builds an XPath query by replacing placeholders in the query by the value + * of the arguments. + * + * XPath 1.0 (the version supported by libxml2, the underlying XML library + * used by PHP) doesn't support any form of quotation. This function + * simplifies the building of XPath expression. + * + * @param string $xpath + * An XPath query, possibly with placeholders in the form ':name'. + * @param array $args + * An array of arguments with keys in the form ':name' matching the + * placeholders in the query. The values may be either strings or numeric + * values. + * + * @return string + * An XPath query with arguments replaced. + */ + protected function buildXPathQuery($xpath, array $args = []) { + return $this->assertSession()->buildXPathQuery($xpath, $args); + } + + /** + * Helper: Constructs an XPath for the given set of attributes and value. + * + * @param string $attribute + * Field attributes. + * @param string $value + * Value of field. + * + * @return string + * XPath for specified values. + */ + protected function constructFieldXpath($attribute, $value) { + $xpath = '//textarea[@' . $attribute . '=:value]|//input[@' . $attribute . '=:value]|//select[@' . $attribute . '=:value]'; + return $this->buildXPathQuery($xpath, [':value' => $value]); + } + + /** + * Gets the current raw content. + */ + protected function getRawContent() { + return $this->getSession()->getPage()->getContent(); + } + + /** + * Get all option elements, including nested options, in a select. + * + * @param \Behat\Mink\Element\NodeElement $element + * The element for which to get the options. + * + * @return \Behat\Mink\Element\NodeElement[] + * Option elements in select. + */ + protected function getAllOptions(NodeElement $element) { + return $element->findAll('xpath', '//option'); + } + +} diff --git a/web/modules/contrib/webform/tests/src/Functional/WebformBrowserTestBase.php b/web/modules/contrib/webform/tests/src/Functional/WebformBrowserTestBase.php new file mode 100644 index 000000000..3bce03f49 --- /dev/null +++ b/web/modules/contrib/webform/tests/src/Functional/WebformBrowserTestBase.php @@ -0,0 +1,475 @@ +loadWebforms(static::$testWebforms); + } + + /** + * {@inheritdoc} + */ + public function tearDown() { + $this->purgeSubmissions(); + parent::tearDown(); + } + + /****************************************************************************/ + // Block. + /****************************************************************************/ + + /** + * Place breadcrumb page, tasks, and actions. + */ + protected function placeBlocks() { + $this->drupalPlaceBlock('system_breadcrumb_block'); + $this->drupalPlaceBlock('page_title_block'); + $this->drupalPlaceBlock('local_tasks_block'); + $this->drupalPlaceBlock('local_actions_block'); + } + + /** + * Place webform test module blocks. + * + * @param string $module_name + * Test module name. + */ + protected function placeWebformBlocks($module_name) { + $config_directory = drupal_get_path('module', 'webform') . '/tests/modules/' . $module_name . '/config'; + $config_files = file_scan_directory($config_directory, '/block\..*/'); + foreach ($config_files as $config_file) { + $data = Yaml::decode(file_get_contents($config_file->uri)); + $plugin_id = $data['plugin']; + $settings = $data['settings']; + unset($settings['id']); + $this->drupalPlaceBlock($plugin_id, $settings); + } + } + + /****************************************************************************/ + // Filter. + /****************************************************************************/ + + /** + * Basic HTML filter format. + * + * @var \Drupal\filter\FilterFormatInterface + */ + protected $basicHtmlFilter; + + /** + * Full HTML filter format. + * + * @var \Drupal\filter\FilterFormatInterface + */ + protected $fullHtmlFilter; + + /** + * Create basic HTML filter format. + */ + protected function createFilters() { + $this->basicHtmlFilter = FilterFormat::create([ + 'format' => 'basic_html', + 'name' => 'Basic HTML', + 'filters' => [ + 'filter_html' => [ + 'status' => 1, + 'settings' => [ + 'allowed_html' => '


    ', + ], + ], + ], + ]); + $this->basicHtmlFilter->save(); + + $this->fullHtmlFilter = FilterFormat::create([ + 'format' => 'full_html', + 'name' => 'Full HTML', + ]); + $this->fullHtmlFilter->save(); + } + + /****************************************************************************/ + // Taxonomy. + /****************************************************************************/ + + /** + * Create the 'tags' taxonomy vocabulary. + */ + protected function createTags() { + $vocabulary = Vocabulary::create([ + 'name' => 'Tags', + 'vid' => 'tags', + 'langcode' => LanguageInterface::LANGCODE_NOT_SPECIFIED, + ]); + $vocabulary->save(); + for ($i = 1; $i <= 3; $i++) { + $parent_term = Term::create([ + 'name' => "Parent $i", + 'vid' => 'tags', + 'langcode' => LanguageInterface::LANGCODE_NOT_SPECIFIED, + ]); + $parent_term->save(); + for ($x = 1; $x <= 3; $x++) { + $child_term = Term::create([ + 'name' => "Parent $i: Child $x", + 'parent' => $parent_term->id(), + 'vid' => 'tags', + 'langcode' => LanguageInterface::LANGCODE_NOT_SPECIFIED, + ]); + $child_term->save(); + } + } + } + + /****************************************************************************/ + // Webform. + /****************************************************************************/ + + /** + * Lazy load a test webforms. + * + * @param array $ids + * Webform ids. + */ + protected function loadWebforms(array $ids) { + foreach ($ids as $id) { + $this->loadWebform($id); + } + $this->pass(new FormattableMarkup('Loaded webforms: %webforms.', [ + '%webforms' => implode(', ', $ids), + ])); + } + + /** + * Lazy load a test webform. + * + * @param string $id + * Webform id. + * + * @return \Drupal\webform\WebformInterface|null + * A webform. + * + * @see \Drupal\views\Tests\ViewTestData::createTestViews + */ + protected function loadWebform($id) { + $storage = \Drupal::entityTypeManager()->getStorage('webform'); + if ($webform = $storage->load($id)) { + return $webform; + } + else { + $config_name = 'webform.webform.' . $id; + if (strpos($id, 'test_') === 0) { + $config_directory = drupal_get_path('module', 'webform') . '/tests/modules/webform_test/config/install'; + } + elseif (strpos($id, 'example_') === 0) { + $config_directory = drupal_get_path('module', 'webform') . '/modules/webform_examples/config/install'; + } + elseif (strpos($id, 'template_') === 0) { + $config_directory = drupal_get_path('module', 'webform') . '/modules/webform_templates/config/install'; + } + else { + throw new \Exception("Webform $id not valid"); + } + + if (!file_exists("$config_directory/$config_name.yml")) { + throw new \Exception("Webform $id does not exist in $config_directory"); + } + + $file_storage = new FileStorage($config_directory); + $values = $file_storage->read($config_name); + $webform = $storage->create($values); + $webform->save(); + return $webform; + } + } + + /** + * Create a webform. + * + * @param array|null $values + * (optional) Array of values. + * @param array|null $elements + * (optional) Array of elements. + * @param array $settings + * (optional) Webform settings. + * + * @return \Drupal\webform\WebformInterface + * A webform. + */ + protected function createWebform($values = [], array $elements = [], array $settings = []) { + // Create new webform. + $id = $this->randomMachineName(8); + $webform = Webform::create($values + [ + 'langcode' => 'en', + 'status' => WebformInterface::STATUS_OPEN, + 'id' => $id, + 'title' => $id, + 'elements' => Yaml::encode($elements), + 'settings' => $settings + Webform::getDefaultSettings(), + ]); + $webform->save(); + return $webform; + } + + /****************************************************************************/ + // Submission. + /****************************************************************************/ + + /** + * Post a new submission to a webform. + * + * @param \Drupal\webform\WebformInterface $webform + * A webform. + * @param array $edit + * Submission values. + * @param string $submit + * Value of the submit button whose click is to be emulated. + * @param array $options + * Options to be forwarded to the url generator. + * + * @return int + * The created submission's sid. + */ + protected function postSubmission(WebformInterface $webform, array $edit = [], $submit = NULL, array $options = []) { + $submit = $this->getWebformSubmitButtonLabel($webform, $submit); + $this->drupalPostForm('webform/' . $webform->id(), $edit, $submit, $options); + return $this->getLastSubmissionId($webform); + } + + /** + * Post a new test submission to a webform. + * + * @param \Drupal\webform\WebformInterface $webform + * A webform. + * @param array $edit + * Submission values. + * @param string $submit + * Value of the submit button whose click is to be emulated. + * @param array $options + * Options to be forwarded to the url generator. + * + * @return int + * The created test submission's sid. + */ + protected function postSubmissionTest(WebformInterface $webform, array $edit = [], $submit = NULL, array $options = []) { + $submit = $this->getWebformSubmitButtonLabel($webform, $submit); + $this->drupalPostForm('webform/' . $webform->id() . '/test', $edit, $submit, $options); + return $this->getLastSubmissionId($webform); + } + + /****************************************************************************/ + // Submission. + /****************************************************************************/ + + /** + * Load the specified webform submission from the storage. + * + * @param int $sid + * The submission identifier. + * + * @return \Drupal\webform\WebformSubmissionInterface + * The loaded webform submission. + */ + protected function loadSubmission($sid) { + /** @var \Drupal\webform\WebformSubmissionStorage $storage */ + $storage = $this->container->get('entity_type.manager')->getStorage('webform_submission'); + $storage->resetCache([$sid]); + return $storage->load($sid); + } + + /** + * Purge all submission before the webform.module is uninstalled. + */ + protected function purgeSubmissions() { + \Drupal::database()->query('DELETE FROM {webform_submission}'); + } + + /** + * Get a webform's submit button label. + * + * @param \Drupal\webform\WebformInterface $webform + * A webform. + * @param string $submit + * Value of the submit button whose click is to be emulated. + * + * @return \Drupal\Core\StringTranslation\TranslatableMarkup|string + * The webform's submit button label. + */ + protected function getWebformSubmitButtonLabel(WebformInterface $webform, $submit = NULL) { + if ($submit) { + return $submit; + } + + $actions_element = $webform->getElement('actions'); + if ($actions_element && isset($actions_element['#submit__label'])) { + return $actions_element['#submit__label']; + } + + return t('Submit'); + } + + /** + * Get the last submission id. + * + * @param \Drupal\webform\WebformInterface $webform + * A webform. + * + * @return int|null + * The last submission id. NULL if saving of results is disabled. + */ + protected function getLastSubmissionId(WebformInterface $webform) { + if ($webform->getSetting('results_disabled')) { + return NULL; + } + + // Get submission sid. + $url = UrlHelper::parse($this->getUrl()); + if (isset($url['query']['sid'])) { + return $url['query']['sid']; + } + else { + $entity_ids = \Drupal::entityQuery('webform_submission') + ->sort('sid', 'DESC') + ->condition('webform_id', $webform->id()) + ->accessCheck(FALSE) + ->execute(); + return reset($entity_ids); + } + } + + /****************************************************************************/ + // Export. + /****************************************************************************/ + + /** + * Request a webform results export CSV. + * + * @param \Drupal\webform\WebformInterface $webform + * A webform. + * @param array $options + * An associative array of export options. + */ + protected function getExport(WebformInterface $webform, array $options = []) { + /** @var \Drupal\webform\WebformSubmissionExporterInterface $exporter */ + $exporter = \Drupal::service('webform_submission.exporter'); + $options += $exporter->getDefaultExportOptions(); + $this->drupalGet('admin/structure/webform/manage/' . $webform->id() . '/results/download', ['query' => $options]); + } + + /** + * Get webform export columns. + * + * @param \Drupal\webform\WebformInterface $webform + * A webform. + * + * @return array + * An array of exportable columns. + */ + protected function getExportColumns(WebformInterface $webform) { + /** @var \Drupal\webform\WebformSubmissionStorageInterface $submission_storage */ + $submission_storage = \Drupal::entityTypeManager()->getStorage('webform_submission'); + $field_definitions = $submission_storage->getFieldDefinitions(); + $field_definitions = $submission_storage->checkFieldDefinitionAccess($webform, $field_definitions); + $elements = $webform->getElementsInitializedAndFlattened(); + $columns = array_merge(array_keys($field_definitions), array_keys($elements)); + return array_combine($columns, $columns); + } + + /****************************************************************************/ + // Email. + /****************************************************************************/ + + /** + * Gets that last email sent during the currently running test case. + * + * @return array + * An array containing the last email message captured during the + * current test. + */ + protected function getLastEmail() { + $sent_emails = $this->getMails(); + $sent_email = end($sent_emails); + $this->debug($sent_email); + return $sent_email; + } + + /****************************************************************************/ + // Assert. + /****************************************************************************/ + + /** + * Passes if the CSS selector IS found on the loaded page, fail otherwise. + */ + protected function assertCssSelect($selector, $message = '') { + $element = $this->cssSelect($selector); + if (!$message) { + $message = new FormattableMarkup('Found @selector', ['@selector' => $selector]); + } + $this->assertTrue(!empty($element), $message); + } + + /** + * Passes if the CSS selector IS NOT found on the loaded page, fail otherwise. + */ + protected function assertNoCssSelect($selector, $message = '') { + $element = $this->cssSelect($selector); + $this->assertTrue(empty($element), $message); + } + + /****************************************************************************/ + // Debug. + /****************************************************************************/ + + /** + * Logs verbose (debug) message in a text file. + * + * @param mixed $data + * Data to be output. + */ + protected function debug($data) { + $string = var_export($data, TRUE); + $string = preg_replace('/=>\s*array\s*\(/', '=> array(', $string); + $this->htmlOutput('

    ' . htmlentities($string) . '
    '); + } + +} diff --git a/web/modules/contrib/webform/tests/src/Functional/WebformBrowserTestBaseTest.php b/web/modules/contrib/webform/tests/src/Functional/WebformBrowserTestBaseTest.php new file mode 100644 index 000000000..8e488eb35 --- /dev/null +++ b/web/modules/contrib/webform/tests/src/Functional/WebformBrowserTestBaseTest.php @@ -0,0 +1,81 @@ +assertNotNull(Webform::load('test_ajax')); + + // Check create webform. + $test_webform = $this->createWebform(); + $this->assertNotNull($test_webform); + + $webform = Webform::load('contact'); + + // Check post submission return NULL if post fails. + $sid = $this->postSubmission($webform); + $this->assertFalse($sid); + + // Login root user. + $this->drupalLogin($this->rootUser); + + // Check post test submission returns an sid. + $sid = $this->postSubmissionTest($webform); + $this->assertNotNull($sid); + + // Check submission load not from cache. + $webform_submission = $this->loadSubmission($sid); + $this->assertNotNull($webform_submission); + $this->assertEquals($webform_submission->getWebform()->id(), 'contact'); + + // Check submission email. + $last_email = $this->getLastEmail(); + $this->assertEquals($last_email['id'], 'webform_contact_email_notification'); + + // Check purge submission deletes the submission. + $this->purgeSubmissions(); + $webform_submission = $this->loadSubmission($sid); + $this->assertNull($webform_submission); + + // Check place blocks. + $this->placeBlocks(); + $this->drupalGet('webform/contact'); + $this->assertRaw('block-system-breadcrumb-block'); + $this->assertRaw('block-page-title-block'); + $this->assertRaw('block-local-tasks-block'); + } + +} diff --git a/web/modules/contrib/webform/tests/src/Functional/WebformContributeFunctionalTest.php b/web/modules/contrib/webform/tests/src/Functional/WebformContributeFunctionalTest.php index 8afe67e4f..8d84130c8 100644 --- a/web/modules/contrib/webform/tests/src/Functional/WebformContributeFunctionalTest.php +++ b/web/modules/contrib/webform/tests/src/Functional/WebformContributeFunctionalTest.php @@ -52,7 +52,7 @@ class WebformContributeFunctionalTest extends BrowserTestBase { $this->assertSession()->responseNotContains('Jacob Rockowitz'); // Check that 'Contribute' local task is visible. - $this->drupalGet('/admin/structure/webform'); + $this->drupalGet('/admin/structure/webform/help'); $this->assertSession()->linkExists('Contribute'); // Check that 'Contribute' route is accessible. @@ -64,7 +64,7 @@ class WebformContributeFunctionalTest extends BrowserTestBase { $this->drupalPostForm('/admin/structure/webform/config/advanced', $edit, t('Save')); // Check that 'Contribute' local task is hidden. - $this->drupalGet('/admin/structure/webform'); + $this->drupalGet('/admin/structure/webform/help'); $this->assertSession()->linkNotExists('Contribute'); // Check that 'Contribute' route is removed. diff --git a/web/modules/contrib/webform/tests/src/Functional/WebformSubmissionViewsAccessTest.php b/web/modules/contrib/webform/tests/src/Functional/WebformSubmissionViewsAccessTest.php new file mode 100644 index 000000000..a57430442 --- /dev/null +++ b/web/modules/contrib/webform/tests/src/Functional/WebformSubmissionViewsAccessTest.php @@ -0,0 +1,190 @@ +drupalCreateUser(['access webform overview']); + $own_user = $this->drupalCreateUser(['access webform overview']); + $without_access_user = $this->drupalCreateUser(['access webform overview']); + + // Grant any and own access to submissions. + $webform->setAccessRules([ + 'view_any' => ['users' => [$any_user->id()]], + 'view_own' => ['users' => [$own_user->id()]], + ])->save(); + + // Create an array of the accounts. + $accounts = [ + 'any_user' => $any_user, + 'own_user' => $own_user, + 'without_access' => $without_access_user, + ]; + + // Create test submissions. + $this->createSubmissions($webform, $accounts); + + // Check user submission access. + $this->checkUserSubmissionAccess($webform, $accounts); + + // Clear webform access rules. + $webform->setAccessRules([])->save(); + + // Check user submission access cache is cleared. + $this->checkUserSubmissionAccess($webform, $accounts); + } + + /** + * Tests webform submission views enforce access per user's permissions. + */ + public function testPermissionAccess() { + /** @var \Drupal\webform\WebformInterface $webform */ + $webform = Webform::load('contact'); + + // Create any access user, own access user, and no (anonymous) access user. + $any_user = $this->drupalCreateUser([ + 'access webform overview', + 'view any webform submission', + ]); + $own_user = $this->drupalCreateUser([ + 'access webform overview', + 'view own webform submission', + ]); + $without_access_user = $this->drupalCreateUser([ + 'access webform overview', + ]); + + // Create an array of the accounts. + /** @var \Drupal\user\Entity\User[] $accounts */ + $accounts = [ + 'any_user' => $any_user, + 'own_user' => $own_user, + 'without_access' => $without_access_user, + ]; + + // Create test submissions. + $this->createSubmissions($webform, $accounts); + + // Check user submission access. + $this->checkUserSubmissionAccess($webform, $accounts); + + // Clear any and own permissions for all accounts. + foreach ($accounts as &$account) { + $roles = $account->getRoles(TRUE); + $rid = reset($roles); + user_role_revoke_permissions($rid, [ + 'view any webform submission', + 'view own webform submission', + ]); + } + + // Check user submission access cache is cleared. + $this->checkUserSubmissionAccess($webform, $accounts); + } + + /** + * Create test a submission for each account. + * + * @param \Drupal\webform\WebformInterface $webform + * The webform. + * @param array $accounts + * An associative array of test users. + */ + protected function createSubmissions(WebformInterface $webform, array $accounts) { + /** @var \Drupal\webform\WebformSubmissionGenerateInterface $submission_generate */ + $submission_generate = \Drupal::service('webform_submission.generate'); + + // Create a test submission for each user account. + foreach ($accounts as $account) { + WebformSubmission::create([ + 'webform_id' => $webform->id(), + 'uid' => $account->id(), + 'data' => $submission_generate->getData($webform), + ])->save(); + } + } + + /** + * Check user submission access. + * + * @param \Drupal\webform\WebformInterface $webform + * The webform. + * @param array $accounts + * An associative array of test users. + */ + protected function checkUserSubmissionAccess(WebformInterface $webform, array $accounts) { + /** @var \Drupal\webform\WebformSubmissionStorageInterface $webform_submission_storage */ + $webform_submission_storage = \Drupal::entityTypeManager() + ->getStorage('webform_submission'); + + // Reset the static cache to make sure we are hitting actual fresh access + // results. + \Drupal::entityTypeManager()->getStorage('webform_submission')->resetCache(); + \Drupal::entityTypeManager()->getAccessControlHandler('webform_submission')->resetCache(); + + foreach ($accounts as $account_type => $account) { + // Login the current user. + $this->drupalLogin($account); + + // Get the webform_test_views_access view and the sid for each + // displayed record. Submission access is controlled via the query. + // @see webform_query_webform_submission_access_alter() + $this->drupalGet('admin/structure/webform/test/views_access'); + + $views_sids = []; + foreach ($this->getSession()->getPage()->findAll('css', '.view .view-content tbody .views-field-sid') as $node) { + $views_sids[] = $node->getText(); + } + sort($views_sids); + + $expected_sids = []; + + // Load all webform submissions and check access using the access method. + // @see \Drupal\webform\WebformSubmissionAccessControlHandler::checkAccess + $webform_submissions = $webform_submission_storage->loadByEntities($webform); + + foreach ($webform_submissions as $webform_submission) { + if ($webform_submission->access('view', $account)) { + $expected_sids[] = $webform_submission->id(); + } + } + + sort($expected_sids); + + // Check that the views sids is equal to the expected sids. + $this->assertSame($expected_sids, $views_sids, "User '" . $account_type . "' access has correct access through view on webform submission entity type."); + } + } + +} diff --git a/web/modules/contrib/webform/tests/src/Kernel/WebformEntityElementsValidationTest.php b/web/modules/contrib/webform/tests/src/Kernel/WebformEntityElementsValidationTest.php index 5a70b1f9d..887a9f545 100644 --- a/web/modules/contrib/webform/tests/src/Kernel/WebformEntityElementsValidationTest.php +++ b/web/modules/contrib/webform/tests/src/Kernel/WebformEntityElementsValidationTest.php @@ -97,6 +97,18 @@ duplicate: ], ], + // Check reserved names. + [ + 'getElementsRaw' => "name: + '#type': textfield +duplicate: + add: + '#type': textfield", + 'messages' => [ + 'The element key add on line 4 is a reserved key.', + ], + ], + // Check ignored properties. [ 'getElementsRaw' => "'tree': diff --git a/web/modules/contrib/webform/tests/src/Kernel/WebformSubmissionStorageTest.php b/web/modules/contrib/webform/tests/src/Kernel/WebformSubmissionStorageTest.php index 776b86b08..9407e08e4 100644 --- a/web/modules/contrib/webform/tests/src/Kernel/WebformSubmissionStorageTest.php +++ b/web/modules/contrib/webform/tests/src/Kernel/WebformSubmissionStorageTest.php @@ -90,11 +90,13 @@ class WebformSubmissionStorageTest extends KernelTestBase { // Make sure nothing has been purged in the webform where purging is // disabled. $query = \Drupal::entityTypeManager()->getStorage('webform_submission')->getQuery(); + $query->accessCheck(FALSE); $query->condition('webform_id', $webform_no_purging->id()); $result = $query->execute(); $this->assertEquals(count($webform_submissions_definition), count($result), 'No purging is executed when webform not not set up to purge.'); $query = \Drupal::entityTypeManager()->getStorage('webform_submission')->getQuery(); + $query->accessCheck(FALSE); $query->condition('webform_id', $webform->id()); $result = []; foreach (\Drupal::entityTypeManager()->getStorage('webform_submission')->loadMultiple($query->execute()) as $submission) { diff --git a/web/modules/contrib/webform/tests/src/Unit/Plugin/WebformSourceEntity/QueryStringWebformSourceEntityTest.php b/web/modules/contrib/webform/tests/src/Unit/Plugin/WebformSourceEntity/QueryStringWebformSourceEntityTest.php index 8e6b49ce0..fceba7fd9 100644 --- a/web/modules/contrib/webform/tests/src/Unit/Plugin/WebformSourceEntity/QueryStringWebformSourceEntityTest.php +++ b/web/modules/contrib/webform/tests/src/Unit/Plugin/WebformSourceEntity/QueryStringWebformSourceEntityTest.php @@ -115,10 +115,10 @@ class QueryStringWebformSourceEntityTest extends UnitTestCase { $webform_entity_reference_manager = $this->getMockBuilder(WebformEntityReferenceManagerInterface::class) ->disableOriginalConstructor() ->getMock(); - $webform_entity_reference_manager->method('getFieldName') + $webform_entity_reference_manager->method('getFieldNames') ->willReturnMap([ - [$source_entity, 'webform_field_name'], - [$source_entity_translation, 'webform_field_name'], + [$source_entity, ['webform_field_name']], + [$source_entity_translation, ['webform_field_name']], ]); // Mock language manager. diff --git a/web/modules/contrib/webform/tests/src/Unit/Utility/WebformDateHelperTest.php b/web/modules/contrib/webform/tests/src/Unit/Utility/WebformDateHelperTest.php deleted file mode 100644 index de1d1b005..000000000 --- a/web/modules/contrib/webform/tests/src/Unit/Utility/WebformDateHelperTest.php +++ /dev/null @@ -1,54 +0,0 @@ -assertEquals($expected, $result); - } - - /** - * Data provider for testisValidDateFormat(). - * - * @see testisValidDateFormat() - */ - public function providerisValidDateFormat() { - $tests[] = ['2013-13-01', 'Y-m-d', FALSE]; - $tests[] = ['2013-13-01', 'Y-m-d', FALSE]; - $tests[] = ['20132-13-01', 'Y-m-d', FALSE]; - $tests[] = ['2013-11-32', 'Y-m-d', FALSE]; - $tests[] = ['2012-2-25', 'Y-m-d', FALSE]; - $tests[] = ['2013-12-01', 'Y-m-d', TRUE]; - $tests[] = ['1970-12-01', 'Y-m-d', TRUE]; - $tests[] = ['2012-02-29', 'Y-m-d', TRUE]; - $tests[] = ['2013-13-01', 'Y-m-d', FALSE]; - return $tests; - } - -} diff --git a/web/modules/contrib/webform/tests/src/Unit/WebformEntityAccessControlHandlerTest.php b/web/modules/contrib/webform/tests/src/Unit/WebformEntityAccessControlHandlerTest.php index b81374e17..1044598e5 100644 --- a/web/modules/contrib/webform/tests/src/Unit/WebformEntityAccessControlHandlerTest.php +++ b/web/modules/contrib/webform/tests/src/Unit/WebformEntityAccessControlHandlerTest.php @@ -75,6 +75,8 @@ class WebformEntityAccessControlHandlerTest extends UnitTestCase { public function testCheckAccess($operation, array $options, array $expected, $assert_message = '') { // Set $options default value. $options += [ + // What is the request path. + 'request_path' => '', // What is the request format. 'request_format' => 'html', // Array of permissions to assign to a mocked account. @@ -237,7 +239,7 @@ class WebformEntityAccessControlHandlerTest extends UnitTestCase { [ 'access_result_is_allowed' => FALSE, 'access_result_cache_tags' => ['access_rules_cache_tag'], - 'access_result_cache_contexts' => ['access_rules_cache_context', 'request_format'], + 'access_result_cache_contexts' => ['access_rules_cache_context', 'request_format', 'url.path'], ], 'View when nobody', ]; @@ -280,7 +282,7 @@ class WebformEntityAccessControlHandlerTest extends UnitTestCase { [ 'access_result_is_allowed' => FALSE, 'access_result_cache_tags' => ['access_rules_cache_tag'], - 'access_result_cache_contexts' => ['access_rules_cache_context', 'request_format'], + 'access_result_cache_contexts' => ['access_rules_cache_context', 'request_format', 'url.path'], ], 'View when has "access any webform configuration" permission and request form is HTML', ]; @@ -294,7 +296,7 @@ class WebformEntityAccessControlHandlerTest extends UnitTestCase { [ 'access_result_is_allowed' => TRUE, 'access_result_cache_tags' => ['webform_cache_tag'], - 'access_result_cache_contexts' => ['request_format', 'user', 'user.permissions', 'webform_cache_context'], + 'access_result_cache_contexts' => ['request_format', 'url.path', 'user', 'user.permissions', 'webform_cache_context'], ], 'View when has "access any webform configuration" permission and request form is NOT HTML', ]; @@ -308,7 +310,7 @@ class WebformEntityAccessControlHandlerTest extends UnitTestCase { [ 'access_result_is_allowed' => FALSE, 'access_result_cache_tags' => ['access_rules_cache_tag'], - 'access_result_cache_contexts' => ['access_rules_cache_context', 'request_format'], + 'access_result_cache_contexts' => ['access_rules_cache_context', 'request_format', 'url.path'], ], 'View when has "access own webform configuration" permission and is not owner and request form is HTML', ]; @@ -323,7 +325,7 @@ class WebformEntityAccessControlHandlerTest extends UnitTestCase { [ 'access_result_is_allowed' => FALSE, 'access_result_cache_tags' => ['access_rules_cache_tag'], - 'access_result_cache_contexts' => ['access_rules_cache_context', 'request_format'], + 'access_result_cache_contexts' => ['access_rules_cache_context', 'request_format', 'url.path'], ], 'View when has "access own webform configuration" permission and is not owner and request form is NOT HTML', ]; @@ -337,7 +339,7 @@ class WebformEntityAccessControlHandlerTest extends UnitTestCase { [ 'access_result_is_allowed' => FALSE, 'access_result_cache_tags' => ['access_rules_cache_tag'], - 'access_result_cache_contexts' => ['access_rules_cache_context', 'request_format'], + 'access_result_cache_contexts' => ['access_rules_cache_context', 'request_format', 'url.path'], ], 'View when has "access own webform configuration" permission and is owner and request form is HTML', ]; @@ -352,7 +354,7 @@ class WebformEntityAccessControlHandlerTest extends UnitTestCase { [ 'access_result_is_allowed' => TRUE, 'access_result_cache_tags' => ['webform_cache_tag'], - 'access_result_cache_contexts' => ['request_format', 'user', 'user.permissions', 'webform_cache_context'], + 'access_result_cache_contexts' => ['request_format', 'url.path', 'user', 'user.permissions', 'webform_cache_context'], ], 'View when has "access own webform configuration" permission and is owner and request form is NOT HTML', ]; diff --git a/web/modules/contrib/webform/tests/themes/webform_test_bartik/webform_test_bartik.info.yml b/web/modules/contrib/webform/tests/themes/webform_test_bartik/webform_test_bartik.info.yml index 610315414..802b634ba 100644 --- a/web/modules/contrib/webform/tests/themes/webform_test_bartik/webform_test_bartik.info.yml +++ b/web/modules/contrib/webform/tests/themes/webform_test_bartik/webform_test_bartik.info.yml @@ -5,8 +5,8 @@ name: 'Webform Test Bartik' description: 'Test Webform Bartik integration.' package: 'Webform Test' -# Information added by Drupal.org packaging script on 2018-11-06 -version: '8.x-5.0-rc26' +# Information added by Drupal.org packaging script on 2019-01-02 +version: '8.x-5.1' core: '8.x' project: 'webform' -datestamp: 1541466489 +datestamp: 1546458493 diff --git a/web/modules/contrib/webform/webform.info.yml b/web/modules/contrib/webform/webform.info.yml index 96edefcd4..800bea935 100644 --- a/web/modules/contrib/webform/webform.info.yml +++ b/web/modules/contrib/webform/webform.info.yml @@ -10,11 +10,13 @@ dependencies: - 'drupal:user' test_dependencies: - 'address:address' + - 'chosen:chosen' - 'jsonapi:jsonapi' + - 'select2:select2' - 'token:token' -# Information added by Drupal.org packaging script on 2018-11-06 -version: '8.x-5.0-rc26' +# Information added by Drupal.org packaging script on 2019-01-02 +version: '8.x-5.1' core: '8.x' project: 'webform' -datestamp: 1541466489 +datestamp: 1546458493 diff --git a/web/modules/contrib/webform/webform.libraries.yml b/web/modules/contrib/webform/webform.libraries.yml index 58ac468b5..a3a7a3d46 100644 --- a/web/modules/contrib/webform/webform.libraries.yml +++ b/web/modules/contrib/webform/webform.libraries.yml @@ -105,7 +105,19 @@ webform.ajax: - core/jquery.once - core/jquery.form -# Block +# Announce. + +webform.announce: + version: VERSION + js: + js/webform.announce.js: {} + dependencies: + - core/jquery + - core/jquery.once + - core/drupal + - core/drupal.announce + +# Block. webform.block: version: VERSION @@ -308,6 +320,7 @@ webform.form.submit_once: js/webform.form.submit_once.js: {} dependencies: - core/drupal + - core/drupal.progress - core/jquery.once - system/base @@ -493,6 +506,7 @@ webform.element.computed: dependencies: - core/drupal.debounce - core/jquery.once + - webform/webform.announce webform.element.counter: version: VERSION @@ -508,12 +522,21 @@ webform.element.counter: webform.element.date: version: VERSION + css: + component: + css/webform.element.date.css: {} js: js/webform.element.date.js: {} dependencies: - core/drupal.date - core/drupalSettings +webform.element.datelist: + version: VERSION + css: + component: + css/webform.element.datelist.css: {} + webform.element.details.save: version: VERSION js: @@ -655,6 +678,9 @@ webform.element.location.places: webform.element.managed_file: version: VERSION + css: + component: + css/webform.element.managed_file.css: {} js: js/webform.element.managed_file.js: {} dependencies: @@ -773,6 +799,12 @@ webform.element.states: css: component: css/webform.element.states.css: {} + js: + js/webform.element.states.js: {} + dependencies: + - core/drupal + - core/jquery.once + - core/jquery.ui.autocomplete webform.element.telephone: version: VERSION @@ -889,14 +921,14 @@ imce.input: libraries.codemirror.text: remote: https://github.com/codemirror/codemirror - version: &webform_codemirror_version '5.41.0' + version: &webform_codemirror_version '5.42.0' license: &webform_codemirror_license name: MIT url: http://codemirror.net/LICENSE gpl-compatible: true cdn: &webform_codemirror_cdn - /libraries/codemirror/lib/: https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.41.0/ - /libraries/codemirror/: https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.41.0/ + /libraries/codemirror/lib/: https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.42.0/ + /libraries/codemirror/: https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.42.0/ css: component: /libraries/codemirror/lib/codemirror.css: {} @@ -975,13 +1007,13 @@ libraries.codemirror.twig: libraries.algolia.places: remote: https://github.com/algolia/places - version: '1.13.0' + version: '1.15.0' license: name: MIT url: https://github.com/algolia/places/blob/master/LICENSE gpl-compatible: true cdn: - /libraries/algolia.places/dist/cdn/: https://cdn.jsdelivr.net/npm/places.js@1.0.0/dist/cdn/ + /libraries/algolia.places/dist/cdn/: https://cdn.jsdelivr.net/npm/places.js@1.15.0/dist/cdn/ js: /libraries/algolia.places/dist/cdn/places.js: {} @@ -1056,13 +1088,13 @@ libraries.jquery.icheck.square: libraries.jquery.inputmask: remote: https://github.com/RobinHerbots/jquery.inputmask - version: '4.0.2' + version: '4.0.4' license: name: MIT url: http://opensource.org/licenses/mit-license.php gpl-compatible: true cdn: - /libraries/jquery.inputmask/: https://cdn.rawgit.com/RobinHerbots/Inputmask/4.0.2/ + /libraries/jquery.inputmask/: https://cdn.rawgit.com/RobinHerbots/Inputmask/4.0.4/ js: /libraries/jquery.inputmask/dist/min/jquery.inputmask.bundle.min.js: {} dependencies: @@ -1070,13 +1102,13 @@ libraries.jquery.inputmask: libraries.jquery.intl-tel-input: remote: https://github.com/jackocnr/intl-tel-input - version: 'v14.0.4' + version: 'v14.0.6' license: name: MIT url: https://github.com/jackocnr/intl-tel-input/blob/master/LICENSE gpl-compatible: true cdn: - /libraries/jquery.intl-tel-input/build/: https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/14.0.4/ + /libraries/jquery.intl-tel-input/build/: https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/14.0.6/ css: component: /libraries/jquery.intl-tel-input/build/css/intlTelInput.css: {} diff --git a/web/modules/contrib/webform/webform.links.task.yml b/web/modules/contrib/webform/webform.links.task.yml index ab3d3f849..1f1c5dc8c 100644 --- a/web/modules/contrib/webform/webform.links.task.yml +++ b/web/modules/contrib/webform/webform.links.task.yml @@ -26,12 +26,6 @@ entity.webform_submission.collection_purge: parent_id: entity.webform_submission.collection weight: 10 -entity.webform_submission.collection_log: - title: 'Log' - route_name: entity.webform_submission.collection_log - parent_id: entity.webform_submission.collection - weight: 20 - # Settings. webform.config: @@ -94,11 +88,23 @@ webform.addons: base_route: entity.webform.collection weight: 50 +webform.help: + title: 'Help' + route_name: webform.help + base_route: entity.webform.collection + weight: 60 + +webform.help.videos: + title: 'Videos' + route_name: webform.help + parent_id: webform.help + weight: 0 + webform.contribute: title: 'Contribute' route_name: webform.contribute - base_route: entity.webform.collection - weight: 60 + parent_id: webform.help + weight: 10 # Form @@ -142,12 +148,6 @@ entity.webform.results_clear: parent_id: entity.webform.results weight: 20 -entity.webform.results_log: - title: 'Log' - route_name: entity.webform.results_log - parent_id: entity.webform.results - weight: 30 - # Webform edit (build). entity.webform.edit_form: @@ -276,12 +276,6 @@ entity.webform_submission.resend_form: base_route: entity.webform_submission.canonical weight: 30 -entity.webform_submission.log: - title: 'Log' - route_name: entity.webform_submission.log - base_route: entity.webform_submission.canonical - weight: 40 - # User Submission entity.webform.user.submission: diff --git a/web/modules/contrib/webform/webform.module b/web/modules/contrib/webform/webform.module index be30f01f1..4277bf684 100644 --- a/web/modules/contrib/webform/webform.module +++ b/web/modules/contrib/webform/webform.module @@ -10,6 +10,7 @@ use Drupal\Component\Serialization\Json; use Drupal\Core\Access\AccessResult; use Drupal\Core\Asset\AttachedAssetsInterface; use Drupal\Core\Breadcrumb\Breadcrumb; +use Drupal\Core\Cache\Cache; use Drupal\Core\Database\Query\AlterableInterface; use Drupal\Core\Render\Element; use Drupal\Core\Render\Markup; @@ -23,6 +24,7 @@ use Drupal\webform\Entity\Webform; use Drupal\webform\Entity\WebformSubmission; use Drupal\webform\Element\WebformMessage; use Drupal\webform\Plugin\WebformElement\ManagedFile; +use Drupal\webform\Utility\Mail; use Drupal\webform\Utility\WebformArrayHelper; use Drupal\webform\Utility\WebformElementHelper; use Drupal\webform\Utility\WebformDialogHelper; @@ -149,6 +151,10 @@ function webform_local_tasks_alter(&$local_tasks) { $local_tasks['config_translation.local_tasks:entity.webform.config_translation_overview']['base_route'] = 'entity.webform.canonical'; } if (isset($local_tasks['config_translation.local_tasks:config_translation.item.overview.webform.config'])) { + // Set weight to 110 so that the 'Translate' tab comes after + // the 'Advanced' tab. + // @see webform.links.task.yml + $local_tasks['config_translation.local_tasks:config_translation.item.overview.webform.config']['weight'] = 110; $local_tasks['config_translation.local_tasks:config_translation.item.overview.webform.config']['parent_id'] = 'webform.config'; } @@ -163,10 +169,18 @@ function webform_local_tasks_alter(&$local_tasks) { * Implements hook_menu_local_tasks_alter(). */ function webform_menu_local_tasks_alter(&$data, $route_name) { - // Change 'Translate *' tab to be just label 'Translate'. - if (isset($data['tabs'][0]['config_translation.local_tasks:entity.webform.config_translation_overview']['#link']['title'])) { - $data['tabs'][0]['config_translation.local_tasks:entity.webform.config_translation_overview']['#link']['title'] = t('Translate'); + // Change config entities 'Translate *' tab to be just label 'Translate'. + $webform_entities = [ + 'webform', + 'webform_options', + ]; + foreach ($webform_entities as $webform_entity) { + if (isset($data['tabs'][0]["config_translation.local_tasks:entity.$webform_entity.config_translation_overview"]['#link']['title'])) { + $data['tabs'][0]["config_translation.local_tasks:entity.$webform_entity.config_translation_overview"]['#link']['title'] = t('Translate'); + } } + + // Change simple config 'Translate *' tab to be just label 'Translate'. if (isset($data['tabs'][1]['config_translation.local_tasks:config_translation.item.overview.webform.config'])) { $data['tabs'][1]['config_translation.local_tasks:config_translation.item.overview.webform.config']['#link']['title'] = t('Translate'); } @@ -384,10 +398,19 @@ function webform_token_info_alter(&$data) { } } +/** + * Implements hook_entity_presave(). + */ +function webform_entity_presave(EntityInterface $entity) { + _webform_clear_webform_submission_list_cache_tag($entity); +} + /** * Implements hook_entity_delete(). */ function webform_entity_delete(EntityInterface $entity) { + _webform_clear_webform_submission_list_cache_tag($entity); + /** @var \Drupal\webform\WebformEntityReferenceManagerInterface $entity_reference_manager */ $entity_reference_manager = \Drupal::service('webform.entity_reference_manager'); @@ -399,6 +422,27 @@ function webform_entity_delete(EntityInterface $entity) { } } +/** + * Invalidate 'webform_submission_list' cache tag when user or role is updated. + * + * Once the below issue is resolved we should rework this approach. + * + * Issue #2811041: Allow views base tables to define additional + * cache tags and max age. + * https://www.drupal.org/project/drupal/issues/2811041 + * + * @param \Drupal\Core\Entity\EntityInterface $entity + * An entity. + * + * @see \Drupal\webform\Entity\WebformSubmission + * @see webform_query_webform_submission_access_alter() + */ +function _webform_clear_webform_submission_list_cache_tag(EntityInterface $entity) { + if (in_array($entity->getEntityTypeId(), ['user', 'user_role'])) { + Cache::invalidateTags(['webform_submission_list']); + } +} + /** * Implements hook_mail(). */ @@ -426,11 +470,11 @@ function webform_mail($key, &$message, $params) { $message['body'][] = $params['body']; // Set the header 'From'. - // Usingthe 'from_mail' so that the webform's email from value is used + // Using the 'from_mail' so that the webform's email from value is used // instead of site's email address. // @see: \Drupal\Core\Mail\MailManager::mail. if (!empty($params['from_mail'])) { - $message['from'] = $message['headers']['From'] = (!empty($params['from_name'])) ? Unicode::mimeHeaderEncode($params['from_name'], TRUE) . ' <' . $params['from_mail'] . '>' : $params['from_mail']; + $message['from'] = $message['headers']['From'] = (!empty($params['from_name'])) ? Mail::formatDisplayName($params['from_name']) . ' <' . $params['from_mail'] . '>' : $params['from_mail']; } // Set header 'Cc'. @@ -463,7 +507,7 @@ function webform_mail($key, &$message, $params) { $sender_mail = $params['sender_mail'] ?: ''; $sender_name = $params['sender_name'] ?: $params['from_name'] ?: ''; if ($sender_mail) { - $message['headers']['Sender'] = ($sender_name) ? Unicode::mimeHeaderEncode($sender_name, TRUE) . ' <' . $sender_mail . '>' : $sender_mail; + $message['headers']['Sender'] = ($sender_name) ? Mail::formatDisplayName($sender_name) . ' <' . $sender_mail . '>' : $sender_mail; } } @@ -557,6 +601,9 @@ function _webform_page_attachments(array &$attachments) { $attachments['#attached']['library'][] = 'webform/webform.element.details.save'; } + // Add 'info' message style to all webform pages. + $attachments['#attached']['library'][] = 'webform/webform.element.message'; + // Assets: Add custom shared and webform specific CSS and JS. // @see webform_library_info_build() /** @var \Drupal\webform\WebformRequestInterface $request_handler */ @@ -907,21 +954,21 @@ function _webform_entity_element_validate_rendering_exception_handler($exception throw $exception; } +/******************************************************************************/ +// Query alter functions. +/******************************************************************************/ + /** - * Implements hook_query_alter(). + * Implements hook_query_TAG_alter(). * * Append EAV sort to webform_submission entity query. * * @see http://stackoverflow.com/questions/12893314/sorting-eav-database * @see \Drupal\webform\WebformSubmissionListBuilder::getEntityIds */ -function webform_query_alter(AlterableInterface $query) { +function webform_query_webform_submission_list_builder_alter(AlterableInterface $query) { /** @var \Drupal\Core\Database\Query\SelectInterface $query */ $name = $query->getMetaData('webform_submission_element_name'); - if (!$name) { - return; - } - $direction = $query->getMetaData('webform_submission_element_direction'); $property_name = $query->getMetaData('webform_submission_element_property_name'); @@ -934,3 +981,138 @@ function webform_query_alter(AlterableInterface $query) { } $query->orderBy('value', $direction); } + +/** + * Implements hook_query_TAG_alter(). + */ +function webform_query_entity_reference_alter(AlterableInterface $query) { + /** @var \Drupal\Core\Entity\Plugin\EntityReferenceSelection\DefaultSelection $handler */ + $handler = $query->getMetaData('entity_reference_selection_handler'); + + // Get webform settings used to limit and randomize results. + // @see \Drupal\webform\Plugin\WebformElement\WebformEntityReferenceTrait::getTestValues + // @see \Drupal\webform\Plugin\WebformElement\WebformEntityReferenceTrait::setOptions + // @see \Drupal\webform\Element\WebformEntityTrait::setOptions + $configuration = $handler->getConfiguration() + ['_webform_settings' => []]; + $settings = $configuration['_webform_settings']; + if (!empty($settings['random'])) { + $query->orderRandom(); + } + if (!empty($settings['limit'])) { + $query->range(0, $settings['limit']); + } +} + +/** + * Implements hook_query_TAG_alter(). + * + * This hook implementation adds webform submission access checks for the + * account stored in the 'account' meta-data (or current user if not provided), + * for an operation stored in the 'op' meta-data (or 'view' if not provided). + */ +function webform_query_webform_submission_access_alter(AlterableInterface $query) { + /** @var \Drupal\Core\Database\Query\SelectInterface $query */ + $op = $query->getMetaData('op') ?: 'view'; + $account = $query->getMetaData('account') ?: \Drupal::currentUser(); + + $entity_type = \Drupal::entityTypeManager()->getDefinition('webform_submission'); + + // Get webform submission tables which are used to build the alter query. + $webform_submission_tables = []; + foreach ($query->getTables() as $table) { + if (is_string($table['table']) && $table['table'] === $entity_type->getBaseTable()) { + $webform_submission_tables[] = [ + 'alias' => $table['alias'], + 'condition' => $query->orConditionGroup(), + ]; + } + } + + // If there are no webform submission tables then nothing needs to be altered. + if (empty($webform_submission_tables)) { + return; + } + + // If the user has administer access then exit. + if ($account->hasPermission('administer webform submission') + || $account->hasPermission('administer webform')) { + return; + } + + // Apply operation specific any and own permissions. + if (in_array($op, ['view', 'edit', 'delete'])) { + $permission_any = "$op any webform submission"; + $permission_own = "$op own webform submission"; + + // If the user has any permission the query does not have to be altered. + if ($account->hasPermission($permission_any)) { + return; + } + + // If the user has own permission, then add the account id to all + // webform submission tables conditions. + if ($account->hasPermission($permission_own)) { + foreach ($webform_submission_tables as $table) { + $table['condition']->condition($table['alias'] . '.uid', $account->id()); + } + } + } + + // Alter query based on access rules. + /** @var \Drupal\webform\WebformAccessRulesManagerInterface $access_rules_manager */ + $access_rules_manager = \Drupal::service('webform.access_rules_manager'); + + // Get cached webform access rules and cache tags so that we don't have + // to continually load every webform. + $cached = \Drupal::cache()->get('webform_submission_access__webform_access_rules'); + if ($cached) { + $webform_access_rules = $cached->data; + } + else { + /** @var \Drupal\webform\WebformInterface[] $webforms */ + $webforms = Webform::loadMultiple(); + $webform_access_rules = []; + foreach ($webforms as $webform_id => $webform) { + $webform_access_rules[$webform_id] = $access_rules_manager->getAccessRules($webform) ?: []; + } + \Drupal::cache()->set( + 'webform_submission_access__webform_access_rules', + $webform_access_rules, + Cache::PERMANENT, + ['config:webform_list'] + ); + } + + foreach ($webform_access_rules as $webform_id => $access_rules) { + // Check basic and any access rules and add webform id to all + // webform submission tables conditions. + if ($access_rules_manager->checkAccessRules($op, $account, $access_rules) + || $access_rules_manager->checkAccessRules($op . '_any', $account, $access_rules)) { + foreach ($webform_submission_tables as $table) { + $table['condition']->condition($table['alias'] . '.webform_id', $webform_id); + } + } + // If the user has own access rules, then add the account id to all + // webform submission tables conditions. + elseif ($access_rules_manager->checkAccessRules($op . '_own', $account, $access_rules)) { + foreach ($webform_submission_tables as $table) { + /** @var \Drupal\Core\Database\Query\SelectInterface $query */ + $condition = $query->andConditionGroup(); + $condition->condition($table['alias'] . '.uid', $account->id()); + $condition->condition($table['alias'] . '.webform_id', $webform_id); + $table['condition']->condition($condition); + } + } + } + + // Apply webform submission table conditions to query. + foreach ($webform_submission_tables as $table) { + // If a webform submission table does not have any conditions, + // we have to block access to the table. + if (count($table['condition']->conditions()) === 1) { + $table['condition']->where('1 = 0'); + } + + $query->condition($table['condition']); + } +} diff --git a/web/modules/contrib/webform/webform.permissions.yml b/web/modules/contrib/webform/webform.permissions.yml index c8121c25c..bd924cbff 100644 --- a/web/modules/contrib/webform/webform.permissions.yml +++ b/web/modules/contrib/webform/webform.permissions.yml @@ -1,9 +1,6 @@ 'access webform overview': title: 'Access the webform overview page' description: 'Get an overview of all webforms.' -'access webform submission log': - title: 'Access the webform submission log' - description: 'Allows viewing of all submission events, if the user can access a webform''s results.' 'access webform submission user': title: 'Access the webform user submission page' description: 'Allows a user to view their submissions via ''Submissions'' tab on their profile page.' @@ -21,6 +18,11 @@ title: 'Administer webform element access' description: 'Restrict webform element access to certain roles and users.' +'edit webform source': + title: 'Edit webform source code' + description: 'Editing webform source code allows users alter and possibly break a webform''s render array.' + restrict access: true + 'edit webform twig': title: 'Edit webform Twig templates' description: 'Editing inline Twig template allows users access any data exposed by Twig functions.' diff --git a/web/modules/contrib/webform/webform.routing.yml b/web/modules/contrib/webform/webform.routing.yml index f65db5c14..92422bac7 100644 --- a/web/modules/contrib/webform/webform.routing.yml +++ b/web/modules/contrib/webform/webform.routing.yml @@ -56,15 +56,6 @@ webform.config.advanced: requirements: _permission: 'administer webform' -# Help - -webform.help.video: - path: '/admin/help/webform/video/{id}' - defaults: - _form: '\Drupal\webform\Form\WebformHelpVideoForm' - requirements: - _permission: 'access content' - # Add-ons webform.addons: @@ -75,6 +66,24 @@ webform.addons: requirements: _permission: 'administer webform' +# Help + +# webform.help is dynamically added. +# @see \Drupal\webform\Routing\WebformRouteSubscriber +webform.help: + path: '/admin/structure/webform/help' + defaults: + _controller: '\Drupal\webform\Controller\WebformHelpController::index' + requirements: + _permission: 'access content' + +webform.help.video: + path: '/admin/help/webform/video/{id}' + defaults: + _form: '\Drupal\webform\Form\WebformHelpVideoForm' + requirements: + _permission: 'access content' + # Contribute webform.contribute: @@ -414,20 +423,6 @@ entity.webform.results_clear: _entity_access: 'webform.submission_purge_any' _custom_access: '\Drupal\webform\Access\WebformEntityAccess:checkResultsAccess' -entity.webform.results_log: - path: '/admin/structure/webform/manage/{webform}/results/log' - defaults: - _controller: '\Drupal\webform\Controller\WebformSubmissionLogController::overview' - _title_callback: '\Drupal\webform\Controller\WebformEntityController::title' - options: - parameters: - webform: - type: 'entity:webform' - requirements: - _permission: 'access webform submission log' - _entity_access: 'webform.submission_view_any' - _custom_access: '\Drupal\webform\Access\WebformEntityAccess:checkLogAccess' - # Webform options entity.webform_options.collection: @@ -438,6 +433,13 @@ entity.webform_options.collection: requirements: _permission: 'administer webform' +entity.webform_options.autocomplete: + path: '/admin/structure/webform/config/options/autocomplete' + defaults: + _controller: '\Drupal\webform\Controller\WebformOptionsController::autocomplete' + requirements: + _permission: 'administer webform' + entity.webform_options.add_form: path: '/admin/structure/webform/config/options/manage/add' defaults: @@ -504,17 +506,6 @@ entity.webform_submission.user: user: type: entity:user -# Webform log (submissions) - -entity.webform_submission.collection_log: - path: '/admin/structure/webform/submissions/log' - defaults: - _controller: '\Drupal\webform\Controller\WebformSubmissionLogController::overview' - _title: 'Webforms: Submissions log' - requirements: - _permission: 'access webform submission log' - _custom_access: '\Drupal\webform\Access\WebformAccountAccess:checkSubmissionAccess' - # Webform submissions entity.webform_submission.canonical: @@ -560,18 +551,9 @@ entity.webform_submission.yaml: _title_callback: '\Drupal\webform\Controller\WebformSubmissionViewController::title' view_mode: 'yaml' requirements: + _permission: 'edit webform source' _entity_access: 'webform_submission.view_any' -entity.webform_submission.log: - path: '/admin/structure/webform/manage/{webform}/submission/{webform_submission}/log' - defaults: - _controller: '\Drupal\webform\Controller\WebformSubmissionLogController::overview' - _title_callback: '\Drupal\webform\Controller\WebformSubmissionViewController::title' - requirements: - _permission: 'access webform submission log' - _entity_access: 'webform_submission.view_any' - _custom_access: '\Drupal\webform\Access\WebformEntityAccess::checkLogAccess' - entity.webform_submission.edit_form: path: '/admin/structure/webform/manage/{webform}/submission/{webform_submission}/edit' defaults: diff --git a/web/modules/contrib/webform/webform.services.yml b/web/modules/contrib/webform/webform.services.yml index 225a60367..180ccd222 100644 --- a/web/modules/contrib/webform/webform.services.yml +++ b/web/modules/contrib/webform/webform.services.yml @@ -25,6 +25,11 @@ services: factory: logger.factory:get arguments: ['webform'] + logger.channel.webform_submission: + class: Drupal\Core\Logger\LoggerChannel + factory: logger.factory:get + arguments: ['webform_submission'] + # Services. webform.addons_manager: @@ -75,7 +80,7 @@ services: webform_submission.exporter: class: Drupal\webform\WebformSubmissionExporter - arguments: ['@config.factory', '@file_system', '@entity_type.manager', '@stream_wrapper_manager', '@plugin.manager.webform.element', '@plugin.manager.webform.exporter'] + arguments: ['@config.factory', '@file_system', '@entity_type.manager', '@stream_wrapper_manager', '@plugin.manager.archiver', '@plugin.manager.webform.element', '@plugin.manager.webform.exporter'] webform.third_party_settings_manager: class: Drupal\webform\WebformThirdPartySettingsManager