1
0
Fork 0

Merge branch '1.8'

pull/8178/head
Jordi Boggiano 2019-06-07 13:12:21 +02:00
commit fbb964888d
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
5 changed files with 36 additions and 7 deletions

10
composer.lock generated
View File

@ -186,16 +186,16 @@
}, },
{ {
"name": "composer/xdebug-handler", "name": "composer/xdebug-handler",
"version": "1.3.2", "version": "1.3.3",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/composer/xdebug-handler.git", "url": "https://github.com/composer/xdebug-handler.git",
"reference": "d17708133b6c276d6e42ef887a877866b909d892" "reference": "46867cbf8ca9fb8d60c506895449eb799db1184f"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/composer/xdebug-handler/zipball/d17708133b6c276d6e42ef887a877866b909d892", "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/46867cbf8ca9fb8d60c506895449eb799db1184f",
"reference": "d17708133b6c276d6e42ef887a877866b909d892", "reference": "46867cbf8ca9fb8d60c506895449eb799db1184f",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -226,7 +226,7 @@
"Xdebug", "Xdebug",
"performance" "performance"
], ],
"time": "2019-01-28T20:25:53+00:00" "time": "2019-05-27T17:52:04+00:00"
}, },
{ {
"name": "justinrainbow/json-schema", "name": "justinrainbow/json-schema",

View File

@ -184,7 +184,9 @@ EOT
->setRunScripts(!$noScripts) ->setRunScripts(!$noScripts)
->setIgnorePlatformRequirements($ignorePlatformReqs) ->setIgnorePlatformRequirements($ignorePlatformReqs)
->setSuggestedPackagesReporter($this->suggestedPackagesReporter) ->setSuggestedPackagesReporter($this->suggestedPackagesReporter)
->setOptimizeAutoloader($config->get('optimize-autoloader')); ->setOptimizeAutoloader($config->get('optimize-autoloader'))
->setClassMapAuthoritative($config->get('classmap-authoritative'))
->setApcuAutoloader($config->get('apcu-autoloader'));
if ($disablePlugins) { if ($disablePlugins) {
$installer->disablePlugins(); $installer->disablePlugins();

View File

@ -22,7 +22,7 @@ class JsonManipulator
private static $DEFINES = '(?(DEFINE) private static $DEFINES = '(?(DEFINE)
(?<number> -? (?= [1-9]|0(?!\d) ) \d+ (\.\d+)? ([eE] [+-]? \d+)? ) (?<number> -? (?= [1-9]|0(?!\d) ) \d+ (\.\d+)? ([eE] [+-]? \d+)? )
(?<boolean> true | false | null ) (?<boolean> true | false | null )
(?<string> " ([^"\\\\]* | \\\\ ["\\\\bfnrt\/] | \\\\ u [0-9a-f]{4} )* " ) (?<string> " ([^"\\\\]* | \\\\ ["\\\\bfnrt\/] | \\\\ u [0-9A-Fa-f]{4} )* " )
(?<array> \[ (?: (?&json) \s* (?: , (?&json) \s* )* )? \s* \] ) (?<array> \[ (?: (?&json) \s* (?: , (?&json) \s* )* )? \s* \] )
(?<pair> \s* (?&string) \s* : (?&json) \s* ) (?<pair> \s* (?&string) \s* : (?&json) \s* )
(?<object> \{ (?: (?&pair) (?: , (?&pair) )* )? \s* \} ) (?<object> \{ (?: (?&pair) (?: , (?&pair) )* )? \s* \} )

View File

@ -218,6 +218,13 @@ abstract class BitbucketDriver extends VcsDriver
return $this->fallbackDriver->getChangeDate($identifier); return $this->fallbackDriver->getChangeDate($identifier);
} }
if (strpos($identifier, '/') !== false) {
$branches = $this->getBranches();
if (isset($branches[$identifier])) {
$identifier = $branches[$identifier];
}
}
$resource = sprintf( $resource = sprintf(
'https://api.bitbucket.org/2.0/repositories/%s/%s/commit/%s?fields=date', 'https://api.bitbucket.org/2.0/repositories/%s/%s/commit/%s?fields=date',
$this->owner, $this->owner,

View File

@ -2374,6 +2374,26 @@ class JsonManipulatorTest extends TestCase
"package/a": "*" "package/a": "*"
} }
} }
', $manipulator->getContents());
}
public function testEscapedUnicodeDoesNotCauseBacktrackLimitErrorGithubIssue8131()
{
$manipulator = new JsonManipulator('{
"description": "Some U\u00F1icode",
"require": {
"foo/bar": "^1.0"
}
}');
$this->assertTrue($manipulator->addLink('require', 'foo/baz', '^1.0'));
$this->assertEquals('{
"description": "Some U\u00F1icode",
"require": {
"foo/bar": "^1.0",
"foo/baz": "^1.0"
}
}
', $manipulator->getContents()); ', $manipulator->getContents());
} }
} }