diff --git a/src/Composer/Package/Archiver/PharArchiver.php b/src/Composer/Package/Archiver/PharArchiver.php index f9a392353e8c..955d1b3c93e9 100644 --- a/src/Composer/Package/Archiver/PharArchiver.php +++ b/src/Composer/Package/Archiver/PharArchiver.php @@ -52,7 +52,12 @@ public function archive($sources, $target, $format, array $excludes = array(), $ $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 e1c45acdef10..1a9a8f6d8bb9 100644 --- a/src/Composer/Repository/Vcs/BitbucketDriver.php +++ b/src/Composer/Repository/Vcs/BitbucketDriver.php @@ -86,7 +86,7 @@ protected function getRepoData() $this->repository, http_build_query( array('fields' => '-project,-owner'), - null, + '', '&' ) ); @@ -286,7 +286,7 @@ public function getTags() 'fields' => 'values.name,values.target.hash,next', 'sort' => '-target.date', ), - null, + '', '&' ) ); @@ -330,7 +330,7 @@ public function getBranches() '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 1ff2fbb96e61..1345eaff3844 100644 --- a/src/Composer/Util/GitLab.php +++ b/src/Composer/Util/GitLab.php @@ -172,7 +172,7 @@ private function createToken($scheme, $originUrl) '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 c391a7535cd5..b8175f3c96e8 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 86e03f9e83bf..1cbf16ecc584 100644 --- a/tests/Composer/Test/AllFunctionalTest.php +++ b/tests/Composer/Test/AllFunctionalTest.php @@ -181,7 +181,7 @@ public function getTestFiles() 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 88ea4c029e2a..afa39e532b96 100644 --- a/tests/Composer/Test/DependencyResolver/PoolBuilderTest.php +++ b/tests/Composer/Test/DependencyResolver/PoolBuilderTest.php @@ -175,7 +175,7 @@ public function getIntegrationTests() 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 3732941f0dfe..8be80420683e 100644 --- a/tests/Composer/Test/InstallerTest.php +++ b/tests/Composer/Test/InstallerTest.php @@ -484,7 +484,7 @@ public function loadIntegrationTests($path) 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,