-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Implement PEAR support. #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…n would look like {"repositories":{"doctrine": {"pear":"http://pear.doctrine-project.org"},"requires":{"DoctrineORM":"2.0.5"}}. You can use pear repositories this way for now. PEAR packages are not downloaded via pear, only via their .tgz packages in the PEAR repository. Automatically detecting dependencies will require reverse-engineering the PEAR protocol a little bit more, however from looking at a pirum output it looks simple.
…f, taking longer then pear remote-list, but at least showing ALL available versions, making arbitrary dependencies possible.
|
Doh, rebased the commits by mistake when updating the README fix. It's merged. |
igorw
pushed a commit
to igorw/composer
that referenced
this pull request
Mar 25, 2012
Improve 'getTags()' and 'getBranches()'
Closed
digitalkaoz
pushed a commit
to digitalkaoz/composer
that referenced
this pull request
Nov 22, 2013
Improve 'getTags()' and 'getBranches()'
digitalkaoz
pushed a commit
to digitalkaoz/composer
that referenced
this pull request
Nov 22, 2013
Tweak option composer#3 for including dependencies in a GIT repo.
Seldaek
pushed a commit
that referenced
this pull request
Mar 26, 2014
Fixing perforce driver/downloader bugs
Closed
jrfnl
added a commit
to jrfnl/composer
that referenced
this pull request
Aug 5, 2021
The default value for the `preg_split()` `$limit` parameter is `-1`, not `null`. Fixes numerous `preg_split(): Passing null to parameter composer#3 ($limit) of type int is deprecated` notices when running the test suite. Ref: https://www.php.net/manual/en/function.preg-split.php
jrfnl
added a commit
to jrfnl/composer
that referenced
this pull request
Aug 5, 2021
Discovered while running the existing unit tests on PHP 8.1. Fixes: ``` Deprecation triggered by Composer\Test\DependencyResolver\PoolBuilderTest::testPoolBuilder: preg_match(): Passing null to parameter composer#2 ($subject) of type string is deprecated Stack trace: #0 [internal function]: Symfony\Bridge\PhpUnit\DeprecationErrorHandler->handleError(8192, '...', '...', 597) composer#1 src/Composer/Package/Package.php(597): preg_match('...', NULL) composer#2 src/Composer/DependencyResolver/PoolBuilder.php(360): Composer\Package\Package->setSourceDistReferences('...') composer#3 src/Composer/DependencyResolver/PoolBuilder.php(338): Composer\DependencyResolver\PoolBuilder->loadPackage(Object(Composer\DependencyResolver\Request), Object(Composer\Package\CompletePackage)) composer#4 src/Composer/DependencyResolver/PoolBuilder.php(195): Composer\DependencyResolver\PoolBuilder->loadPackagesMarkedForLoading(Object(Composer\DependencyResolver\Request), Array) composer#5 src/Composer/Repository/RepositorySet.php(229): Composer\DependencyResolver\PoolBuilder->buildPool(Array, Object(Composer\DependencyResolver\Request)) composer#6 tests/Composer/Test/DependencyResolver/PoolBuilderTest.php(110): Composer\Repository\RepositorySet->createPool(Object(Composer\DependencyResolver\Request), Object(Composer\IO\NullIO)) ... ```
jrfnl
added a commit
to jrfnl/composer
that referenced
this pull request
Aug 5, 2021
The default value for the `preg_split()` `$limit` parameter is `-1`, not `null`. Fixes numerous `preg_split(): Passing null to parameter composer#3 ($limit) of type int is deprecated` notices when running the test suite. Ref: https://www.php.net/manual/en/function.preg-split.php
jrfnl
added a commit
to jrfnl/composer
that referenced
this pull request
Aug 5, 2021
The return type of the `Rule::getRequiredPackage()` method effectively was `?string` as if no matching reason was found, the function wasn't returning anything. In PHP 8.1, this results in the following notice from existing tests: ``` Deprecation triggered by Composer\Test\DependencyResolver\SolverTest::testConflictResultEmpty: strpos(): Passing null to parameter composer#1 ($haystack) of type string is deprecated Stack trace: #0 [internal function]: Symfony\Bridge\PhpUnit\DeprecationErrorHandler->handleError(8192, '...', '...', 111) composer#1 src/Composer/DependencyResolver/SolverProblemsException.php(111): strpos(NULL, '...') composer#2 src/Composer/DependencyResolver/SolverProblemsException.php(44): Composer\DependencyResolver\SolverProblemsException->hasExtensionProblems(Array) composer#3 tests/Composer/Test/DependencyResolver/SolverTest.php(659): Composer\DependencyResolver\SolverProblemsException->getPrettyString(Object(Composer\Repository\RepositorySet), Object(Composer\DependencyResolver\Request), Object(Composer\DependencyResolver\Pool), false) .... ``` Fixed by returning an empty string if no reason was matched.
jrfnl
added a commit
to jrfnl/composer
that referenced
this pull request
Aug 5, 2021
The return type of the `Rule::getRequiredPackage()` method effectively was `?string` as if no matching reason was found, the function wasn't returning anything. In PHP 8.1, this results in the following notice from existing tests: ``` Deprecation triggered by Composer\Test\DependencyResolver\SolverTest::testConflictResultEmpty: strpos(): Passing null to parameter composer#1 ($haystack) of type string is deprecated Stack trace: #0 [internal function]: Symfony\Bridge\PhpUnit\DeprecationErrorHandler->handleError(8192, '...', '...', 111) composer#1 src/Composer/DependencyResolver/SolverProblemsException.php(111): strpos(NULL, '...') composer#2 src/Composer/DependencyResolver/SolverProblemsException.php(44): Composer\DependencyResolver\SolverProblemsException->hasExtensionProblems(Array) composer#3 tests/Composer/Test/DependencyResolver/SolverTest.php(659): Composer\DependencyResolver\SolverProblemsException->getPrettyString(Object(Composer\Repository\RepositorySet), Object(Composer\DependencyResolver\Request), Object(Composer\DependencyResolver\Pool), false) .... ``` Fixed by returning an empty string if no reason was matched.
jrfnl
added a commit
to jrfnl/composer
that referenced
this pull request
Aug 5, 2021
The default value for the `preg_split()` `$limit` parameter is `-1`, not `null`. Fixes numerous `preg_split(): Passing null to parameter composer#3 ($limit) of type int is deprecated` notices when running the test suite. Ref: https://www.php.net/manual/en/function.preg-split.php
jrfnl
added a commit
to jrfnl/composer
that referenced
this pull request
Aug 5, 2021
The default value for the `preg_split()` `$limit` parameter is `-1`, not `null`. Fixes numerous `preg_split(): Passing null to parameter composer#3 ($limit) of type int is deprecated` notices when running the test suite. Ref: https://www.php.net/manual/en/function.preg-split.php
jrfnl
added a commit
to jrfnl/composer
that referenced
this pull request
Aug 5, 2021
The default value for the `preg_split()` `$limit` parameter is `-1`, not `null`. Fixes numerous `preg_split(): Passing null to parameter composer#3 ($limit) of type int is deprecated` notices when running the test suite. Ref: https://www.php.net/manual/en/function.preg-split.php
jrfnl
added a commit
to jrfnl/composer
that referenced
this pull request
Aug 5, 2021
Discovered while running the existing unit tests on PHP 8.1. Fixes: ``` Deprecation triggered by Composer\Test\Downloader\FossilDownloaderTest::testUpdate: trim(): Passing null to parameter composer#1 ($string) of type string is deprecated Stack trace: #0 [internal function]: Symfony\Bridge\PhpUnit\DeprecationErrorHandler->handleError(8192, '...', '...', 93) composer#1 src/Composer/Downloader/FossilDownloader.php(93): trim(NULL) composer#2 src/Composer/Downloader/VcsDownloader.php(267): Composer\Downloader\FossilDownloader->getLocalChanges(Object(Mock_PackageInterface_c17fec12), '...') composer#3 src/Composer/Downloader/VcsDownloader.php(99): Composer\Downloader\VcsDownloader->cleanChanges(Object(Mock_PackageInterface_c17fec12), '...', true) composer#4 tests/Composer/Test/Downloader/FossilDownloaderTest.php(143): Composer\Downloader\VcsDownloader->prepare('...', Object(Mock_PackageInterface_c17fec12), '...', Object(Mock_PackageInterface_c17fec12)) ... ```
jrfnl
added a commit
to jrfnl/composer
that referenced
this pull request
Aug 5, 2021
The default value for the `preg_split()` `$limit` parameter is `-1`, not `null`. Fixes numerous `preg_split(): Passing null to parameter composer#3 ($limit) of type int is deprecated` notices when running the test suite. ``` Deprecation triggered by Composer\Test\Util\Http\ProxyManagerTest::testGetProxyForRequest: preg_split(): Passing null to parameter composer#3 ($limit) of type int is deprecated Stack trace: 0 [internal function]: Symfony\Bridge\PhpUnit\DeprecationErrorHandler->handleError(8192, '...', '...', 42) 1 src/Composer/Util/NoProxyPattern.php(42): preg_split('...', '...', NULL, 1) 2 src/Composer/Util/Http/ProxyManager.php(148): Composer\Util\NoProxyPattern->__construct('...') 3 src/Composer/Util/Http/ProxyManager.php(50): Composer\Util\Http\ProxyManager->initProxyData() 4 src/Composer/Util/Http/ProxyManager.php(59): Composer\Util\Http\ProxyManager->__construct() 5 tests/Composer/Test/Util/Http/ProxyManagerTest.php(75): Composer\Util\Http\ProxyManager::getInstance() ... ``` Ref: https://www.php.net/manual/en/function.preg-split.php
jrfnl
added a commit
to jrfnl/composer
that referenced
this pull request
Aug 5, 2021
The default value for the `preg_split()` `$limit` parameter is `-1`, not `null`. Fixes numerous `preg_split(): Passing null to parameter composer#3 ($limit) of type int is deprecated` notices when running the test suite. Ref: https://www.php.net/manual/en/function.preg-split.php
jrfnl
added a commit
to jrfnl/composer
that referenced
this pull request
Aug 5, 2021
The default value for the `preg_split()` `$limit` parameter is `-1`, not `null`. Fixes some `preg_split(): Passing null to parameter composer#3 ($limit) of type int is deprecated` notices when running the test suite. ``` Deprecation triggered by Composer\Test\Util\Http\ProxyManagerTest::testGetProxyForRequest: preg_split(): Passing null to parameter composer#3 ($limit) of type int is deprecated Stack trace: 0 [internal function]: Symfony\Bridge\PhpUnit\DeprecationErrorHandler->handleError(8192, '...', '...', 42) 1 src/Composer/Util/NoProxyPattern.php(42): preg_split('...', '...', NULL, 1) 2 src/Composer/Util/Http/ProxyManager.php(148): Composer\Util\NoProxyPattern->__construct('...') 3 src/Composer/Util/Http/ProxyManager.php(50): Composer\Util\Http\ProxyManager->initProxyData() 4 src/Composer/Util/Http/ProxyManager.php(59): Composer\Util\Http\ProxyManager->__construct() 5 tests/Composer/Test/Util/Http/ProxyManagerTest.php(75): Composer\Util\Http\ProxyManager::getInstance() ... ``` Ref: https://www.php.net/manual/en/function.preg-split.php
jrfnl
added a commit
to jrfnl/composer
that referenced
this pull request
Aug 5, 2021
The default value for the `preg_split()` `$limit` parameter is `-1`, not `null`. Fixes numerous `preg_split(): Passing null to parameter composer#3 ($limit) of type int is deprecated` notices when running the test suite. Ref: https://www.php.net/manual/en/function.preg-split.php
jrfnl
added a commit
to jrfnl/composer
that referenced
this pull request
Aug 5, 2021
The default value for the `preg_split()` `$limit` parameter is `-1`, not `null`. Fixes numerous `preg_split(): Passing null to parameter composer#3 ($limit) of type int is deprecated` notices when running the test suite. ``` Deprecation triggered by Composer\Test\Util\Http\ProxyManagerTest::testGetProxyForRequest: preg_split(): Passing null to parameter composer#3 ($limit) of type int is deprecated Stack trace: 0 [internal function]: Symfony\Bridge\PhpUnit\DeprecationErrorHandler->handleError(8192, '...', '...', 42) 1 src/Composer/Util/NoProxyPattern.php(42): preg_split('...', '...', NULL, 1) 2 src/Composer/Util/Http/ProxyManager.php(148): Composer\Util\NoProxyPattern->__construct('...') 3 src/Composer/Util/Http/ProxyManager.php(50): Composer\Util\Http\ProxyManager->initProxyData() 4 src/Composer/Util/Http/ProxyManager.php(59): Composer\Util\Http\ProxyManager->__construct() 5 tests/Composer/Test/Util/Http/ProxyManagerTest.php(75): Composer\Util\Http\ProxyManager::getInstance() ... ``` Ref: https://www.php.net/manual/en/function.preg-split.php
jrfnl
added a commit
to jrfnl/composer
that referenced
this pull request
Aug 5, 2021
The default value for the `ProcessExecutor::$errorOutput` property is `null`, so the return value of `$this->process->getErrorOutput()` could well be `null`. In that case, we may as well bypass the whole `foreach` as it will never match any of the recognized authentication failure messages. Fixes: ``` Deprecation triggered by Composer\Test\Downloader\GitDownloaderTest::testDownloadThrowsRuntimeExceptionIfGitCommandFails: strpos(): Passing null to parameter composer#1 ($haystack) of type string is deprecated Stack trace: #0 [internal function]: Symfony\Bridge\PhpUnit\DeprecationErrorHandler->handleError(8192, '...', '...', 340) composer#1 src/Composer/Util/Git.php(340): strpos(NULL, '...') composer#2 src/Composer/Util/Git.php(200): Composer\Util\Git->isAuthenticationFailure('...', Array) composer#3 src/Composer/Downloader/GitDownloader.php(121): Composer\Util\Git->runCommand(Object(Closure), '...', NULL, true) composer#4 src/Composer/Downloader/VcsDownloader.php(137): Composer\Downloader\GitDownloader->doInstall(Object(Mock_PackageInterface_f8be9ebd), '...', '...') composer#5 tests/Composer/Test/Downloader/GitDownloaderTest.php(349): Composer\Downloader\VcsDownloader->install(Object(Mock_PackageInterface_f8be9ebd), '...') ... ```
jrfnl
added a commit
to jrfnl/composer
that referenced
this pull request
Aug 5, 2021
The default value for the `ProcessExecutor::$errorOutput` property is `null`, so the return value of `$this->process->getErrorOutput()` could well be `null`. In that case, we may as well bypass the whole `foreach` as it will never match any of the recognized authentication failure messages. Fixes: ``` Deprecation triggered by Composer\Test\Downloader\GitDownloaderTest::testDownloadThrowsRuntimeExceptionIfGitCommandFails: strpos(): Passing null to parameter composer#1 ($haystack) of type string is deprecated Stack trace: #0 [internal function]: Symfony\Bridge\PhpUnit\DeprecationErrorHandler->handleError(8192, '...', '...', 340) composer#1 src/Composer/Util/Git.php(340): strpos(NULL, '...') composer#2 src/Composer/Util/Git.php(200): Composer\Util\Git->isAuthenticationFailure('...', Array) composer#3 src/Composer/Downloader/GitDownloader.php(121): Composer\Util\Git->runCommand(Object(Closure), '...', NULL, true) composer#4 src/Composer/Downloader/VcsDownloader.php(137): Composer\Downloader\GitDownloader->doInstall(Object(Mock_PackageInterface_f8be9ebd), '...', '...') composer#5 tests/Composer/Test/Downloader/GitDownloaderTest.php(349): Composer\Downloader\VcsDownloader->install(Object(Mock_PackageInterface_f8be9ebd), '...') ... ```
jrfnl
added a commit
to jrfnl/composer
that referenced
this pull request
Aug 5, 2021
Fixes: ``` Deprecation triggered by Composer\Test\Installer\LibraryInstallerTest::testUninstall: strpos(): Passing null to parameter composer#1 ($haystack) of type string is deprecated Stack trace: #0 [internal function]: Symfony\Bridge\PhpUnit\DeprecationErrorHandler->handleError(8192, '...', '...', 202) composer#1 src/Composer/Installer/LibraryInstaller.php(202): strpos(NULL, '...') composer#2 vendor/react/promise/src/FulfilledPromise.php(28): Composer\Installer\LibraryInstaller->Composer\Installer\{closure}(NULL) composer#3 src/Composer/Installer/LibraryInstaller.php(208): React\Promise\FulfilledPromise->then(Object(Closure)) composer#4 tests/Composer/Test/Installer/LibraryInstallerTest.php(221): Composer\Installer\LibraryInstaller->uninstall(Object(Mock_InstalledRepositoryInterface_e3699f95), Object(Mock_Package_e4571076)) ... ```
jrfnl
added a commit
to jrfnl/composer
that referenced
this pull request
Aug 5, 2021
…ctation Fixes: ``` Deprecation triggered by Composer\Test\Installer\LibraryInstallerTest::testUninstall: strpos(): Passing null to parameter composer#1 ($haystack) of type string is deprecated Stack trace: #0 [internal function]: Symfony\Bridge\PhpUnit\DeprecationErrorHandler->handleError(8192, '...', '...', 202) composer#1 src/Composer/Installer/LibraryInstaller.php(202): strpos(NULL, '...') composer#2 vendor/react/promise/src/FulfilledPromise.php(28): Composer\Installer\LibraryInstaller->Composer\Installer\{closure}(NULL) composer#3 src/Composer/Installer/LibraryInstaller.php(208): React\Promise\FulfilledPromise->then(Object(Closure)) composer#4 tests/Composer/Test/Installer/LibraryInstallerTest.php(221): Composer\Installer\LibraryInstaller->uninstall(Object(Mock_InstalledRepositoryInterface_e3699f95), Object(Mock_Package_e4571076)) ... ```
Seldaek
pushed a commit
that referenced
this pull request
Aug 11, 2021
) * PHP 8.1/Tests: fix some deprecation warnings The default value for the `preg_split()` `$limit` parameter is `-1`, not `null`. Fixes numerous `preg_split(): Passing null to parameter #3 ($limit) of type int is deprecated` notices when running the test suite. Ref: https://www.php.net/manual/en/function.preg-split.php * PHP 8.1/NoProxyPattern: fix deprecation warning The default value for the `preg_split()` `$limit` parameter is `-1`, not `null`. Fixes some `preg_split(): Passing null to parameter #3 ($limit) of type int is deprecated` notices when running the test suite. ``` Deprecation triggered by Composer\Test\Util\Http\ProxyManagerTest::testGetProxyForRequest: preg_split(): Passing null to parameter #3 ($limit) of type int is deprecated Stack trace: 0 [internal function]: Symfony\Bridge\PhpUnit\DeprecationErrorHandler->handleError(8192, '...', '...', 42) 1 src/Composer/Util/NoProxyPattern.php(42): preg_split('...', '...', NULL, 1) 2 src/Composer/Util/Http/ProxyManager.php(148): Composer\Util\NoProxyPattern->__construct('...') 3 src/Composer/Util/Http/ProxyManager.php(50): Composer\Util\Http\ProxyManager->initProxyData() 4 src/Composer/Util/Http/ProxyManager.php(59): Composer\Util\Http\ProxyManager->__construct() 5 tests/Composer/Test/Util/Http/ProxyManagerTest.php(75): Composer\Util\Http\ProxyManager::getInstance() ... ``` Ref: https://www.php.net/manual/en/function.preg-split.php * PHP 8.1: fix deprecation warnings / http_build_query() This fixes all relevant calls to the PHP native `http_build_query()` function. The second parameter of which is the _optional_ `$numeric_prefix` parameter which expects a `string`. A parameter being optional, however, does not automatically make it nullable. As of PHP 8.1, passing `null` to a non-nullable PHP native function will generate a deprecation notice. In this case, these function calls yielded a `http_build_query(): Passing null to parameter #2 ($numeric_prefix) of type string is deprecated` notice. Changing the `null` to an empty string fixes this without BC-break. Fixes a few deprecation warnings found when running the tests. Refs: * https://www.php.net/manual/en/function.http-build-query.php * https://wiki.php.net/rfc/deprecate_null_to_scalar_internal_arg * PHP 8.1: fix deprecation notices / PharData::__construct() This fixes all relevant calls to the PHP native `PharData::__construct()` method. The second parameter of this method is the _optional_ `$flags` parameter which expects an `int` of flags to be passed to the `Phar` parent class `RecursiveDirectoryIterator`. Fixed by passing the default value for the `$flags` parameter as per the `RecursiveDirectoryIterator::__construct()` method. The third parameter of the method is the _optional_ `$alias` parameter which expects an `string`. Fixed by passing an empty string. Fixes various notices along the lines of: ``` Deprecation triggered by Composer\Test\Package\Archiver\ArchiveManagerTest::testArchiveTar: PharData::__construct(): Passing null to parameter #2 ($flags) of type int is deprecated Stack trace: 0 [internal function]: Symfony\Bridge\PhpUnit\DeprecationErrorHandler->handleError(8192, '...', '...', 55) 1 src/Composer/Package/Archiver/PharArchiver.php(55): PharData->__construct('...', NULL, NULL, 2) 2 src/Composer/Package/Archiver/ArchiveManager.php(193): Composer\Package\Archiver\PharArchiver->archive('...', '...', '...', Array, false) 3 tests/Composer/Test/Package/Archiver/ArchiveManagerTest.php(65): Composer\Package\Archiver\ArchiveManager->archive(Object(Composer\Package\CompletePackage), '...', '...') ... ``` Refs: * https://www.php.net/manual/en/phardata.construct.php * https://www.php.net/manual/en/recursivedirectoryiterator.construct.php Co-authored-by: jrfnl <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This implements PEAR support. Yes, this uses the work that @beberlei did, but he no longer appears to be interested in implementing this.
I also understand that this needs to be modified to make the
PEARRepositoryintegrate into theComposerRepositoryor something?Thanks.