325 Commits (12d595757ca903954a2444a7c4236e2cc5facc00)

Author SHA1 Message Date
johnstevenson 74ba9decdf Rewrite NoProxyPattern to include IPv6
This includes two breaking changes:
- the hostname is not resolved in the case of an IP address.
- a hostname with a trailing period (FQDN) is not matched.

This brings the basic implementation in line with curl behaviour, with
the addition of full IP address and range matching (curl does not
differentiate between IP addresses host names).

The NO_PROXY environment variable can be set to either a comma-separated
list of host names that should not use a proxy, or single asterisk `*`
to match all hosts.

- Port numbers can be included by prefixing the port with a colon `:`.
- IP addresses can be used, but must be enclosed in square brackets
`[...]` if they include a port number.
- IP address ranges can specified in CIDR notation, separating the IP
address and prefix-length with a forward slash `/`.
5 years ago
Jordi Boggiano 88b051c96b
Merge branch 'master' into 2.0
Update deps
5 years ago
Stephan Vock b847115617 Git: fix authentication handling for private GitHub repositories 5 years ago
Jordi Boggiano bc2a1d762a
Merge branch 'master' into 2.0 5 years ago
johnstevenson 8d9b822413 Add messages to junction tests to see failures 5 years ago
Jordi Boggiano 6c4357a7ed
Merge branch 'master' into 2.0 5 years ago
Jordi Boggiano 26a3e12c96
Merge pull request #7994 from aschempp/feature/zip-util
Extract the ZIP utility functions from ArtifactRepository
5 years ago
Gabriel Caruso 6c8ddd4d57
Remove unused private properties 5 years ago
Nils Adermann d2fa1e1319 Merge branch 'master' into 2.0
* master: (48 commits)
  SVN: hide passwords for debug output
  Free $solver asap
  fixes #8179
  [minor] Fixed a typo in the CHANGELOG.md.
  Update deps
  Update changelog
  Revert "Allow overriding self-update target file with envvar COMPOSER_SELF_UPDATE_TARGET" Revert "Add docs for COMPOSER_SELF_UPDATE_TARGET, refs #8151"
  Add docs for COMPOSER_SELF_UPDATE_TARGET, refs #8151
  Fix display of HHVM warning appearing when HHVM is not in use, fixes #8138
  Read classmap-authoritative and apcu-autoloader from project config when installing via create-project, fixes #8155
  Use possessive quantifiers
  Update xdebug-handler to 1.3.3
  fixes #8159
  Allow overriding self-update target file with envvar COMPOSER_SELF_UPDATE_TARGET
  flag should come before script name
  use full command name, not abbreviated/alias
  modify text
  Document the alternatives to disable the default script timeout
  Anchor pattern
  Fix URL resolution for Composer repositories
  ...
5 years ago
Stephan Vock 8da046e4e9 SVN: hide passwords for debug output 5 years ago
Andreas Schempp 0e2215dc6c Added full unit test coverage 5 years ago
Jordi Boggiano 64384f8b15 Fix tests 6 years ago
Jordi Boggiano fd11cf3618 Port/extract most behavior of RemoteFilesystem to CurlDownloader 6 years ago
Jordi Boggiano 1cd9f4f9db Disable request_fulluri by default for HTTPS connections 6 years ago
Jordi Boggiano 713bc4de1d Minor fixes and updated the rest of the code/tests to use HttpDownloader 6 years ago
Gabriel Caruso 2a13bb2649 Fixes from PHPStan (#7687)
* fix docblocks

* remove redundant conditional

* fix wrong variable name

* fix wrong namespaces

* add missing private members

* remove unused/redundant arguments

* move testcase class

* exclude TestCase.php

* Tweak RuleWatchGraph type hints

* Tweak doc comment
6 years ago
Jordi Boggiano bf125295df Fix escaping of URLs in Perforce and Subversion drivers 6 years ago
Jordi Boggiano ff59bbdab0 CS fixer 6 years ago
Jordi Boggiano 38866ba310 Merge remote-tracking branch 'johnstevenson/external-xdebug' 6 years ago
Jordi Boggiano bfa01285c2 Merge branch '1.6' 6 years ago
Jordi Boggiano 066351c5b9 Remove use of deprecated getMock method 6 years ago
johnstevenson ed97c2116c Use external XdebugHandler library 6 years ago
Jordi Boggiano ea9b7ecbb0
Merge pull request #6982 from carusogabriel/phpstan
Fixes from PHPStan level 0
7 years ago
Martin Hujer bbee0d7c6c Validation warns if script description for nonexistent script is present
Fixes #7010
7 years ago
Gabriel Caruso 3d262bd637 Fixes from PHPStan level 0
More fixes from PHPStan level 0
7 years ago
Tomas Klinkenberg 60106edd32 Added a test to confirm issue #6994.
Added a encapsulated group to the replacement parameter of the `preg_replace` for GitLab in `\Composer\Util\Url::updateDistReference()`. This fixes #6994.
7 years ago
Jordi Boggiano e6114b2ca7 Fix support for replacing dist refs in gitlab URLs and add support for gitlab/github enterprise too 7 years ago
Jordi Boggiano c8aea719b1 CS fixes 7 years ago
Gabriel Caruso 885da4c8ef Refactoring tests 7 years ago
Gabriel Caruso afc9a7643e Use PHPUnit\Framework\TestCase instead of PHPUnit_Framework_TestCase 7 years ago
Gabriel Caruso a4b220273e Refactoring Tests (#6849) 7 years ago
Jordi Boggiano eab826b00b Merge branch '1.5' 7 years ago
Jordi Boggiano 45cd26b2df Fix test and actually check that we get hasAuthentication called for different domains 7 years ago
Jordi Boggiano 0b3bc4ccb9 Merge branch '1.5' 7 years ago
johnstevenson b0922b95af Report multiple inis in php.ini specific messages
Where systems use multiple ini files it is perhaps more useful to
suggest running `php --ini` to see their locations, rather than showing
the loaded php.ini (if one exists).
7 years ago
croensch 6da92e98ac also support NO_PROXY
since WINDOWS can only have one case and that is usually upperase
7 years ago
Vladimir Reznichenko c8615358cb SCA with PHP Inspections (EA Extended) 7 years ago
Christian Ramelow f178c340e9 Fixed tests. 7 years ago
Christian Ramelow 39d8104897 Introduces a new method `copy()`.
Some packages, e. g. `tm/tooly-composer-script`, are using the composer classes to e. g. create symlinks or perform other file operations. While there's only a `copyThenRemove()` method this commit introduces a new `copy()` method. `copy()` behaves the same as the copy part of `copyThenRemove()` did with one exception: it returns `true` on success and `false` on failure. Copying a directory may lead to a `false`, while the whole directory or some of its files couldn't been copied. To ensure backwards compatibility `copyThenRemove()` calls `copy()` now. This commit also adds the necessary tests.
7 years ago
Martin Hasoň 88ec172bd8 Fix CS 7 years ago
Jordi Boggiano 122e422682 CS fixes 7 years ago
Stefan Grootscholten 512750a20e Add more tests to cover the new functionality. 8 years ago
Stefan Grootscholten a4af559ca8 Store access-token for re-use
Store the Bitbucket access-token (and the expiration time) so it can be re-used within the time it is valid.
The Bitbucket::requestToken and Bitbucket::getToken now only return the access-token and not all other parameters it receives from the Bitbucket API.
8 years ago
Jordi Boggiano e9d04f2b2d Merge branch '1.2' 8 years ago
Dries Vints 2ab7df5566 Do not add newlines to output 8 years ago
johnstevenson 379fb70ad9 Use random name for tmp ini and delete after use
Thanks to Patrick Rose for reporting this issue.
8 years ago
Jordi Boggiano 43903a3979 Merge branch '1.2' 8 years ago
Fabien Potencier 103624d4ed Remove usage of echo when executing Composer script 8 years ago
Jordi Boggiano 183398fe5e Merge pull request #5717 from berlinger-rarents/fix/5584_anon_redirect_bitbucket
prevent (prompt for) bitbucket auth when it redirected
8 years ago
Roel Arents d338a95174 use seldaek's bitbucket repo for unit tests instead of 3rd party 8 years ago
berlinger-rarents 8845ea467a try bitbucket downloads first time without auth
also add tests for #5584
8 years ago
Rob Bast b4fd19aae4
add test exposing the problem 8 years ago
Jordi Boggiano ff7daf0bd4 Fix handling of paths on windows when cwd is root of drive, fixes #5554 8 years ago
Stefan Grootscholten 9b00713a67 Update unit test for Bitbucket util 8 years ago
Jordi Boggiano 39c2c8c30a Add test for password escaping 8 years ago
Stefan Grootscholten 2d52531365 Add unit tests for the Bitbucket class. 8 years ago
Jordi Boggiano 73d9a4717d Update list of ciphers /cc @cs278 8 years ago
Hiraku NAKANO 8501bb71e2 Drop dependency on http://www.example.com 8 years ago
Jordi Boggiano d8c94c2640 Merge remote-tracking branch 'curry684/home-expansion' 8 years ago
Niels Keurentjes c9534d48c1 Made env variable parsing in path replacements generic across platforms and replaced old config.php implementation. 8 years ago
Niels Keurentjes f5422a441d Fixed Windows path separators and updated docs. 8 years ago
Niels Keurentjes 7e71b2bfbc Added support for expanding environment variables in paths, and tilde expansion on Windows. 8 years ago
Jordi Boggiano 4f0f8779cb Add filesystem tests for the static shortest path, refs #5174 8 years ago
Paul Wenke 9059d70ba0 Corrected username / access token parameters for $this->io->setAuthentication when read from git config. Grant type is now only set when requesting an access token. Removed bitbucket-domains and bitbucket-protocols from config. Fixed bitbucket typo in JsonConfigSource. Removed unecessary comments. Changed visibility of Composer/Util/Bitbucket properties to private. Added https to bitbucket url. Removed unused $note variable. 8 years ago
Paul.Wenke b4d9d0fd0d Added BitbucketTest class. Added is_array and is_object check to http content before calling http_build_query. 8 years ago
Rob Bast a245c4618b php-cs-fixer 8 years ago
Rob Bast dc2f201152 add trailing / and updated diagnose command 8 years ago
Rob Bast 4d975c49aa fix mocks 8 years ago
Niels Keurentjes 582e4796a3 Merge branch 'master' of https://github.com/composer/composer into pull-4690 9 years ago
Niels Keurentjes 0dab63e050 Unified all Windows tests throughout the code. 9 years ago
Niels Keurentjes f2a2b18367 Added Platform utility and unit test for it. 9 years ago
Niels Keurentjes b71c67239d Made NTFS junction detection more reliable and added unit tests for the junction functions. 9 years ago
Jordi Boggiano 1818b95149 CS fixes 9 years ago
Jordi Boggiano 783e0aec8a Merge remote-tracking branch 'alcohol/unique-test-directories' 9 years ago
Rob Bast adf3b956d0 try to use unique test directories
any tests that use the filesystem should have their own unique directory, as we run our test suite in parallel and
cleanup of tests (removing directories) should not interfere with currently running tests
9 years ago
Niels Keurentjes 2c3e7cf5f2 Unit tests fail in a nasty way if ErrorHandler test is run before the Silencer and it's not silencing itself. 9 years ago
Niels Keurentjes 76c1645a0e Merge remote-tracking branch 'upstream/master' into issue-4203 9 years ago
Niels Keurentjes 18cd4f966b Added silencer utility to more gracefully handle error suppression without hiding errors or worse. Fixes #4203, #4683 9 years ago
Chris Smith 304c268c3b Tidy up and general improvement of sAN handling code
* Move OpenSSL functions into a new TlsHelper class
* Add error when sAN certificate cannot be verified due to
  CVE-2013-6420
* Throw exception if PHP >= 5.6 manages to use fallback code
* Add support for wildcards in CN/sAN
* Add tests for cert name validation
* Check for backported security fix for CVE-2013-6420 using
  testcase from PHP tests.
* Whitelist some disto PHP versions that have the CVE-2013-6420
  fix backported.
9 years ago
Jordi Boggiano fb848d2e07 Code cleanups 9 years ago
Jordi Boggiano 5d015defb8 Merge remote-tracking branch 'origin/master' into tls-config 9 years ago
Alexander Loutsenko fa5de786ff clean garbage dirs in tmp after composer tests #4694 9 years ago
Jordi Boggiano fbab2bfa17 Move user agent definition to StreamContextFactory so it is available in all contexts 9 years ago
Jordi Boggiano 020c126c27 Fix CS 9 years ago
Jérôme Tamarelle 4255db9e31 Allows SSH urls for gitlab and detect the scheme
SSH urls uses HTTPS to request the API
9 years ago
Jérôme Tamarelle ac68a721f4 Merge remote-tracking branch 'composer/master' into gitlab
Conflicts:
	doc/04-schema.md
	src/Composer/Util/RemoteFilesystem.php
9 years ago
Jerome TAMARELLE 6ccc562c0f Add tests on GitLab class (copied from GitHubTest) 9 years ago
Jeroen Seegers 279b5f0156 Drop irrelevant properties from composer_commit-ref.json 9 years ago
Jeroen Seegers f3dc31839f Refactor commit-ref validation
The require and require-dev arrays have been merged into one and no
longer user private methods/properties to collect warnings.
9 years ago
Jeroen Seegers 476c6f279b Add fixture for composer.json with commit-ref 9 years ago
Jeroen Seegers 73e73c90fb Generate a warning when a commit reference is used
Closes #4485
9 years ago
Rob Bast b523fc0b7b ran fixers 9 years ago
Jordi Boggiano ce08582671 Fix CS 9 years ago
Jordi Boggiano 06feb19b2c Merge pull request #4169 from remicollet/patch-1
Set this test as slow
9 years ago
Rob Bast 5ae9e7fe22 remove spdx files, introduce external library 9 years ago
Rob Bast 4019f7bb44 Revert "apply a regex solution instead of tokenizer"
This reverts commit 33a7305e22c8d4e2ce38586855fd3d4b7b2af3dd.
9 years ago
Rob Bast b5d286e27b apply a regex solution instead of tokenizer 9 years ago
Rob Bast e4118385a0 updated spdx related files 9 years ago
Jordi Boggiano 6a64041055 CS fixes 9 years ago
Remi Collet c350bceeea Set this test as slow 9 years ago
gmsantosxl 84c9c30b63 Remove extra '/' when findShortestPath $from is a directory 9 years ago
Jordi Boggiano 52d290f5f2 trim token just in case and update tests 9 years ago
Possum 29ca21f30e PHP version checks tweaking 9 years ago
Adrian Dragus 7834dacb88 Forgot to remove the actual calls 9 years ago
Adrian Dragus 96ff1c5014 Use PHPUnit pre-conditions
See https://phpunit.de/manual/current/en/incomplete-and-skipped-tests.html#incomplete-and-skipped-tests.requires.tables.api
9 years ago
Jordi Boggiano 46924cf5f5 Merge pull request #3854 from hakre/fix/symlink-missing
Prevent fatal error on missing symlink() function in tests
9 years ago
jakoch 74a077dd3d updated spdx-license handling to include metadata
issue https://github.com/composer/composer/issues/3744

summary of changes
- replaced bin script "fetch-spdx-identifiers" by "update-spdx-licenses"
- "update-spdx-licenses" uses "Composer/Util/SpdxLicensesUpdater" to update "spdx-licenses.json" file with license identifier, fullname and osi-approved-status
- dropped "spdx-identifiers.json" (identifiers only)
- dropped "SpdxLicenseIdentifier", it's just "SpdxLicense" now
- modified "ShowCommand" to output the license with metadata and removed some unused method arguments (cleanup)
9 years ago
hakre 03b634d114 Prevent fatal error on missing symlink() function in tests
The testsuite didn't run through for me because the php symlink() function
was missing.

It is only available on Windows Visa/Server 2008 or higher.

This commit fixes the issue by checking if the method exists, and if not,
marks the test as skipped because of a non-matching precondition.
9 years ago
Rob Bast 3d329622d7 overwrite -> overwriteError 9 years ago
Rob Bast cb336a5416 Implement writeError throughout Composer 9 years ago
Jordi Boggiano 0b4a9235f4 CS fixes 9 years ago
Rob Bast a34335a9bb github deprecation changes
- added some tests
- minor bug fixes discovered during testing
- resolved two deprecations (rate limit api and authorizations api)
- added some more comments to make the flow more understandable
10 years ago
Padraic Brady 19e24c5804 Merge branch 'master' into tls-config
Conflicts:
	.travis.yml
	doc/03-cli.md
	src/Composer/Command/ConfigCommand.php
	src/Composer/Command/CreateProjectCommand.php
	src/Composer/Command/DiagnoseCommand.php
	src/Composer/Command/InstallCommand.php
	src/Composer/Command/RequireCommand.php
	src/Composer/Command/SelfUpdateCommand.php
	src/Composer/Command/ShowCommand.php
	src/Composer/Command/UpdateCommand.php
	src/Composer/Config.php
	src/Composer/Downloader/FileDownloader.php
	src/Composer/Factory.php
	src/Composer/Repository/ComposerRepository.php
	src/Composer/Repository/PearRepository.php
	src/Composer/Repository/Vcs/VcsDriver.php
	src/Composer/Util/GitHub.php
	src/Composer/Util/RemoteFilesystem.php
10 years ago
Jordi Boggiano da881c118b Fix failures 10 years ago
Jordi Boggiano 8dad846613 Add SNI settings for SSL URLs that are proxied, fixes #3204 10 years ago
Jordi Boggiano 7b13507dd4 Fix typo in test 10 years ago
Jordi Boggiano 4a6503fe36 Add suppor for https_proxy, fixes #3204 10 years ago
Jordi Boggiano 94926218e8 CS fixes 10 years ago
Jordi Boggiano 6e4a21d700 Merge remote-tracking branch 'hakre/patch-2' 10 years ago
Jordi Boggiano 923191a489 Merge remote-tracking branch 'hakre/patch-1' 10 years ago
Bastian Hofmann 204fc207fa Moved config option to not save subversion credentials to repository configuration, added documentation. 10 years ago
Bastian Hofmann 0d0ed59e5c Codestyle fix 10 years ago
Bastian Hofmann b132e4eae0 Added cacheCredentials config flag for saved SVN credentials to control the --no-auth-cache flag
Example config:

{
    "http-basic": {
        "svn.example.com": {
            "username": "user",
            "password": "password",
            "cacheCredentials": false
        }
    }
}
10 years ago
hakre 343d0b5af2 added test removing directory with trailing slash that is symlinked
#3144
#3157
10 years ago
hakre ed507dec9f added test unlinking directory
#3157
10 years ago
Jordi Boggiano ac497feaba CS fixes 10 years ago
Jordi Boggiano 08e34858d6 Fix code to use hostname only, refs #3026 10 years ago
Benjamin Grandfond a21b0f82db Allow SVN to connect with credentials provided with the auth.json file 10 years ago
Jordi Boggiano b437c1cc05 Support github auth directly in the RemoteFilesystem class 10 years ago
Clark Stuth a12c4e2a17 Removed getWindowsFlag and setWindowsFlag methods from Perforce object. 10 years ago
Clark Stuth 2651cbc5fe Fixing perforce dev-master stored reference bug. 10 years ago
Clark Stuth 8fc1961463 Fixing delete client workspace bug. 10 years ago
Clark Stuth c11105dd60 Fixing bug not cleaning up workspaces. 10 years ago
Clark Stuth 24dd42267f almost all unit tests passing after IOInterface dependency refactor. no longer passing IOInterface into any Perforce methods 10 years ago
Clark Stuth 0f7b078d6c added new dependency to Perforce object, updating some tests. 10 years ago
Pádraic Brady bf01a55e53 Patch RFS test to set private fileUrl property and pass 10 years ago
Pádraic Brady 81b86acc53 Merge branch 'master' of github.com:composer/composer into tls-config
Conflicts:
	src/Composer/Util/RemoteFilesystem.php
10 years ago
Jordi Boggiano 5067d76dbc Adjust test suite 10 years ago
Pádraic Brady 2648064e5a Some typos/corrections 10 years ago
Pádraic Brady 1e1e713329 Added test for RemoteFilesystem TLS options setup 10 years ago
ptarjan 09c0d971d3 don't require the error message have the first line of HTTP output in it 11 years ago
Jordi Boggiano e2671b6510 Add test and fix patch for #2304, refs #2341 11 years ago
Jordi Boggiano 08243ce2e3 Fix handling of urlencoded user and password in proxy urls, fixes #2339 11 years ago
Jordi Boggiano f8be812a49 Merge remote-tracking branch 'origin/master' 11 years ago
Nils Adermann 565f86f30d Fix stream context option test to really only verify content-type is last 11 years ago
Nils Adermann 42dd2f2ee8 Check only part of the error message as it's different in hhvm 11 years ago
Fabian Grutschus 20854a50b4 Removed unnecessary test and just check for return code 11 years ago
Fabian Grutschus 0c5bd559f2 Changes comparsion to strict and removed a comment 11 years ago
Fabian Grutschus 5ae5963acd Fix for Preforce utility does not check if p4 command exists 11 years ago
Jordi Boggiano 2b36106168 Fix tests, refs #2184 11 years ago