Merge pull request #8865 from Ayesh/regex-improvements
Regex improvements with unnecessary `.*` matcherspull/8869/head
commit
c39391323d
|
@ -178,7 +178,7 @@ class SvnDownloader extends VcsDownloader
|
|||
*/
|
||||
protected function getCommitLogs($fromReference, $toReference, $path)
|
||||
{
|
||||
if (preg_match('{.*@(\d+)$}', $fromReference) && preg_match('{.*@(\d+)$}', $toReference)) {
|
||||
if (preg_match('{@(\d+)$}', $fromReference) && preg_match('{@(\d+)$}', $toReference)) {
|
||||
// retrieve the svn base url from the checkout folder
|
||||
$command = sprintf('svn info --non-interactive --xml %s', ProcessExecutor::escape($path));
|
||||
if (0 !== $this->process->execute($command, $output, $path)) {
|
||||
|
|
|
@ -997,7 +997,7 @@ class ComposerRepository extends ArrayRepository implements ConfigurableReposito
|
|||
}
|
||||
|
||||
// url-encode $ signs in URLs as bad proxies choke on them
|
||||
if (($pos = strpos($filename, '$')) && preg_match('{^https?://.*}i', $filename)) {
|
||||
if (($pos = strpos($filename, '$')) && preg_match('{^https?://}i', $filename)) {
|
||||
$filename = substr($filename, 0, $pos) . '%24' . substr($filename, $pos + 1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue