From 50b23b0d007a750c2e92c88071f2224cb81db10e Mon Sep 17 00:00:00 2001 From: Greg Roach Date: Sat, 22 Jun 2019 21:23:30 +0100 Subject: Fix: #2359 - updated language negotiation for chinese in fisharebest/localization --- vendor/doctrine/lexer/LICENSE | 2 +- vendor/doctrine/lexer/README.md | 2 ++ vendor/doctrine/lexer/composer.json | 20 ++++++++++++++++---- .../lib/Doctrine/Common/Lexer/AbstractLexer.php | 7 ++++++- 4 files changed, 25 insertions(+), 6 deletions(-) (limited to 'vendor/doctrine') diff --git a/vendor/doctrine/lexer/LICENSE b/vendor/doctrine/lexer/LICENSE index 5e781fce4b..e8fdec4afb 100644 --- a/vendor/doctrine/lexer/LICENSE +++ b/vendor/doctrine/lexer/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2006-2013 Doctrine Project +Copyright (c) 2006-2018 Doctrine Project Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/vendor/doctrine/lexer/README.md b/vendor/doctrine/lexer/README.md index 66f443089e..3a74c1c31c 100644 --- a/vendor/doctrine/lexer/README.md +++ b/vendor/doctrine/lexer/README.md @@ -3,3 +3,5 @@ Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers. This lexer is used in Doctrine Annotations and in Doctrine ORM (DQL). + +https://www.doctrine-project.org/projects/lexer.html diff --git a/vendor/doctrine/lexer/composer.json b/vendor/doctrine/lexer/composer.json index 8cd694c652..6ea83543a3 100644 --- a/vendor/doctrine/lexer/composer.json +++ b/vendor/doctrine/lexer/composer.json @@ -1,9 +1,15 @@ { "name": "doctrine/lexer", "type": "library", - "description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.", - "keywords": ["lexer", "parser"], - "homepage": "http://www.doctrine-project.org", + "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", + "keywords": [ + "php", + "parser", + "lexer", + "annotations", + "docblock" + ], + "homepage": "https://www.doctrine-project.org/projects/lexer.html", "license": "MIT", "authors": [ {"name": "Guilherme Blanco", "email": "guilhermeblanco@gmail.com"}, @@ -13,8 +19,14 @@ "require": { "php": ">=5.3.2" }, + "require-dev": { + "phpunit/phpunit": "^4.5" + }, "autoload": { - "psr-0": { "Doctrine\\Common\\Lexer\\": "lib/" } + "psr-4": { "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" } + }, + "autoload-dev": { + "psr-4": { "Doctrine\\Tests\\": "tests/Doctrine" } }, "extra": { "branch-alias": { diff --git a/vendor/doctrine/lexer/lib/Doctrine/Common/Lexer/AbstractLexer.php b/vendor/doctrine/lexer/lib/Doctrine/Common/Lexer/AbstractLexer.php index 399a55230b..317ff69d65 100644 --- a/vendor/doctrine/lexer/lib/Doctrine/Common/Lexer/AbstractLexer.php +++ b/vendor/doctrine/lexer/lib/Doctrine/Common/Lexer/AbstractLexer.php @@ -132,7 +132,7 @@ abstract class AbstractLexer } /** - * Retrieve the original lexer's input until a given position. + * Retrieve the original lexer's input until a given position. * * @param integer $position * @@ -258,6 +258,11 @@ abstract class AbstractLexer $flags = PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_OFFSET_CAPTURE; $matches = preg_split($regex, $input, -1, $flags); + if (false === $matches) { + // Work around https://bugs.php.net/78122 + $matches = array(array($input, 0)); + } + foreach ($matches as $match) { // Must remain before 'value' assignment since it can change content $type = $this->getType($match[0]); -- cgit v1.3