Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch '2.7'

* 2.7: (55 commits)
  CS: fix some license headers
  CS: Ensure there is no code on the same line as the PHP open tag and it is followed by a blankline
  Improve triggering of the deprecation error
  [SecurityBundle] Fix typos in LogoutUrlHelper
  [VarDumper] add caster for MongoCursor objects
  make it possible to dump inlined services to XML
  [VarDumper] Fixed notice when Exchange is mocked
  [Translation] keep old array structure of resourcesFiles to avoid BC.
  removed deprecated notices that make the tests fail
  use visited lookup with reference to gain performance
  [VarDumper] with-er interface for Cloner\Data
  Replace GET parameters when changed
  tweaked phpdocs
  [Process] Fix outdated Process->start() docblock
  prevent inlining service configurators
  Improve entropy of generated salt
  Complete the removal of API versions in the validator component
  [Validator] deprecated API version
  Removed 2.5 bc layer
  [SecurityBundle] UserPasswordEncoderCommand: fix help arguments order.
  ...

Conflicts:
	CHANGELOG-2.3.md
	CHANGELOG-2.6.md
	src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php
	src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php
	src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/FormHelperDivLayoutTest.php
	src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/FormHelperTableLayoutTest.php
	src/Symfony/Bundle/FrameworkBundle/composer.json
	src/Symfony/Bundle/SecurityBundle/composer.json
	src/Symfony/Component/Console/Helper/DialogHelper.php
	src/Symfony/Component/Console/Tests/Helper/LegacyTableHelperTest.php
	src/Symfony/Component/Form/ResolvedFormType.php
	src/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php
  • Loading branch information...
commit afb9d158555bee3441dc5c1e68d9c35d332543eb 2 parents c3b5e73 + 0d0790b
@fabpot fabpot authored
Showing with 10 additions and 12 deletions.
  1. +10 −12 Filesystem.php
View
22 Filesystem.php
@@ -43,10 +43,9 @@ public function copy($originFile, $targetFile, $override = false)
$this->mkdir(dirname($targetFile));
- if (!$override && is_file($targetFile) && null === parse_url($originFile, PHP_URL_HOST)) {
+ $doCopy = true;
+ if (!$override && null === parse_url($originFile, PHP_URL_HOST) && is_file($targetFile)) {
$doCopy = filemtime($originFile) > filemtime($targetFile);
- } else {
- $doCopy = true;
}
if ($doCopy) {
@@ -306,16 +305,15 @@ public function symlink($originDir, $targetDir, $copyOnWindows = false)
}
}
- if (!$ok) {
- if (true !== @symlink($originDir, $targetDir)) {
- $report = error_get_last();
- if (is_array($report)) {
- if ('\\' === DIRECTORY_SEPARATOR && false !== strpos($report['message'], 'error code(1314)')) {
- throw new IOException('Unable to create symlink due to error code 1314: \'A required privilege is not held by the client\'. Do you have the required Administrator-rights?');
- }
+ if (!$ok && true !== @symlink($originDir, $targetDir)) {
+ $report = error_get_last();
+ if (is_array($report)) {
+ if ('\\' === DIRECTORY_SEPARATOR && false !== strpos($report['message'], 'error code(1314)')) {
+ throw new IOException('Unable to create symlink due to error code 1314: \'A required privilege is not held by the client\'. Do you have the required Administrator-rights?');
}
throw new IOException(sprintf('Failed to create symbolic link from "%s" to "%s".', $originDir, $targetDir), 0, null, $targetDir);
}
+ throw new IOException(sprintf('Failed to create symbolic link from %s to %s', $originDir, $targetDir));
}
}
@@ -354,9 +352,9 @@ public function makePathRelative($endPath, $startPath)
$endPathRemainder = implode('/', array_slice($endPathArr, $index));
// Construct $endPath from traversing to the common path, then to the remaining $endPath
- $relativePath = $traverser.(strlen($endPathRemainder) > 0 ? $endPathRemainder.'/' : '');
+ $relativePath = $traverser.('' !== $endPathRemainder ? $endPathRemainder.'/' : '');
- return (strlen($relativePath) === 0) ? './' : $relativePath;
+ return '' === $relativePath ? './' : $relativePath;
}
/**
Please sign in to comment.
Something went wrong with that request. Please try again.