diff --git a/src/Composer/Package/Archiver/PharArchiver.php b/src/Composer/Package/Archiver/PharArchiver.php index f9a392353..955d1b3c9 100644 --- a/src/Composer/Package/Archiver/PharArchiver.php +++ b/src/Composer/Package/Archiver/PharArchiver.php @@ -52,7 +52,12 @@ class PharArchiver implements ArchiverInterface $target = $filename . '.tar'; } - $phar = new \PharData($target, null, null, static::$formats[$format]); + $phar = new \PharData( + $target, + \FilesystemIterator::KEY_AS_PATHNAME | \FilesystemIterator::CURRENT_AS_FILEINFO, + '', + static::$formats[$format] + ); $files = new ArchivableFilesFinder($sources, $excludes, $ignoreFilters); $filesOnly = new ArchivableFilesFilter($files); $phar->buildFromIterator($filesOnly, $sources); diff --git a/src/Composer/Repository/Vcs/BitbucketDriver.php b/src/Composer/Repository/Vcs/BitbucketDriver.php index e1c45acde..1a9a8f6d8 100644 --- a/src/Composer/Repository/Vcs/BitbucketDriver.php +++ b/src/Composer/Repository/Vcs/BitbucketDriver.php @@ -86,7 +86,7 @@ abstract class BitbucketDriver extends VcsDriver $this->repository, http_build_query( array('fields' => '-project,-owner'), - null, + '', '&' ) ); @@ -286,7 +286,7 @@ abstract class BitbucketDriver extends VcsDriver 'fields' => 'values.name,values.target.hash,next', 'sort' => '-target.date', ), - null, + '', '&' ) ); @@ -330,7 +330,7 @@ abstract class BitbucketDriver extends VcsDriver 'fields' => 'values.name,values.target.hash,values.heads,next', 'sort' => '-target.date', ), - null, + '', '&' ) ); diff --git a/src/Composer/Util/GitLab.php b/src/Composer/Util/GitLab.php index 1ff2fbb96..1345eaff3 100644 --- a/src/Composer/Util/GitLab.php +++ b/src/Composer/Util/GitLab.php @@ -172,7 +172,7 @@ class GitLab 'username' => $username, 'password' => $password, 'grant_type' => 'password', - ), null, '&'); + ), '', '&'); $options = array( 'retry-auth-failure' => false, 'http' => array( diff --git a/src/Composer/Util/NoProxyPattern.php b/src/Composer/Util/NoProxyPattern.php index c391a7535..b8175f3c9 100644 --- a/src/Composer/Util/NoProxyPattern.php +++ b/src/Composer/Util/NoProxyPattern.php @@ -39,7 +39,7 @@ class NoProxyPattern */ public function __construct($pattern) { - $this->hostNames = preg_split('{[\s,]+}', $pattern, null, PREG_SPLIT_NO_EMPTY); + $this->hostNames = preg_split('{[\s,]+}', $pattern, -1, PREG_SPLIT_NO_EMPTY); $this->noproxy = empty($this->hostNames) || '*' === $this->hostNames[0]; } diff --git a/tests/Composer/Test/AllFunctionalTest.php b/tests/Composer/Test/AllFunctionalTest.php index 86e03f9e8..1cbf16ecc 100644 --- a/tests/Composer/Test/AllFunctionalTest.php +++ b/tests/Composer/Test/AllFunctionalTest.php @@ -181,7 +181,7 @@ class AllFunctionalTest extends TestCase private function parseTestFile($file) { - $tokens = preg_split('#(?:^|\n*)--([A-Z-]+)--\n#', file_get_contents($file), null, PREG_SPLIT_DELIM_CAPTURE); + $tokens = preg_split('#(?:^|\n*)--([A-Z-]+)--\n#', file_get_contents($file), -1, PREG_SPLIT_DELIM_CAPTURE); $data = array(); $section = null; diff --git a/tests/Composer/Test/DependencyResolver/PoolBuilderTest.php b/tests/Composer/Test/DependencyResolver/PoolBuilderTest.php index 88ea4c029..afa39e532 100644 --- a/tests/Composer/Test/DependencyResolver/PoolBuilderTest.php +++ b/tests/Composer/Test/DependencyResolver/PoolBuilderTest.php @@ -175,7 +175,7 @@ class PoolBuilderTest extends TestCase protected function readTestFile(\SplFileInfo $file, $fixturesDir) { - $tokens = preg_split('#(?:^|\n*)--([A-Z-]+)--\n#', file_get_contents($file->getRealPath()), null, PREG_SPLIT_DELIM_CAPTURE); + $tokens = preg_split('#(?:^|\n*)--([A-Z-]+)--\n#', file_get_contents($file->getRealPath()), -1, PREG_SPLIT_DELIM_CAPTURE); $sectionInfo = array( 'TEST' => true, diff --git a/tests/Composer/Test/InstallerTest.php b/tests/Composer/Test/InstallerTest.php index 3732941f0..8be804206 100644 --- a/tests/Composer/Test/InstallerTest.php +++ b/tests/Composer/Test/InstallerTest.php @@ -484,7 +484,7 @@ class InstallerTest extends TestCase protected function readTestFile(\SplFileInfo $file, $fixturesDir) { - $tokens = preg_split('#(?:^|\n*)--([A-Z-]+)--\n#', file_get_contents($file->getRealPath()), null, PREG_SPLIT_DELIM_CAPTURE); + $tokens = preg_split('#(?:^|\n*)--([A-Z-]+)--\n#', file_get_contents($file->getRealPath()), -1, PREG_SPLIT_DELIM_CAPTURE); $sectionInfo = array( 'TEST' => true,