Jordi Boggiano
0d1922dc27
Add a Composer\Versions class which is available in all projects at runtime to query installed packages/versions
4 years ago
Kuba Werłos
a54bf0e2d4
Use flags instead of boolean in ConfigValidator for checking version field
4 years ago
Kuba Werłos
4ec73874cb
Add "no-check-version" option to ValidateCommand
4 years ago
Ayesh Karunaratne
280f02b4bc
Update HTTP URLs to their HTTPS if they already redirect automatically
4 years ago
Jordi Boggiano
40a35abb94
Resolve options when creating requests to fix 5.3 build
4 years ago
Jordi Boggiano
4cb74d33e6
Forward default HttpDownloader options to RemoteFilesystem/CurlDownloader, fixes #8757
4 years ago
Jordi Boggiano
8e664a37f5
Merge branch '1.10'
4 years ago
Matthias Van Woensel
067101dbf5
Only send GitHub API token to api.github.com domain ( #8747 )
4 years ago
Jordi Boggiano
aa6be02c64
Allow COMPOSER_DISABLE_NETWORK to work with GitHubDriver by doing a cache priming pass first
4 years ago
Adam Žurek
25cd2382cb
Raise phpstan level to 1 ( #8027 )
4 years ago
Jordi Boggiano
d63eb8179e
Merge branch 'master' into 2.0
4 years ago
Jordi Boggiano
0b993ba4b9
Merge pull request #8671 from ethanclevenger91/ethanclevenger91/explicit-bearer-support
...
Bearer support.
4 years ago
Jordi Boggiano
479414d8bd
Move bearer auth to be first to make sure it does not get shadowed by github/gitlab/.. configs
4 years ago
Jordi Boggiano
9d72c92f07
Avoid looping endlessly for invalid GitLab tokens in git config, fixes #8667
4 years ago
Ethan Clevenger
cbec8ceb53
Bearer support.
4 years ago
Jordi Boggiano
c5ce4de89e
Consistently return void
4 years ago
arai
e61b559eb2
delete 'return' in Filesystem.php
4 years ago
Jordi Boggiano
bc002ae1fb
Merge branch 'master' into 2.0
4 years ago
Stephan Vock
243ee9b1e4
Git: log error for sync mirror with existing local copy
4 years ago
Jordi Boggiano
006c3de542
Fix tests and make TTY usage on ProcessExecutor cleaner
4 years ago
Jordi Boggiano
f572636628
Add support for TTY mode on Linux/OSX in script handlers when running in interactive mode, fixes #5856 , fixes #3299 , closes #4036
4 years ago
Jordi Boggiano
1e68555e0a
Sanitize URLs in getRepoName and centralize the Url sanitization process
4 years ago
Jordi Boggiano
e6749d8717
Add comment, fix 5.3 build
5 years ago
Jordi Boggiano
30b6a41035
Extract MetadataMinifier util
5 years ago
Jordi Boggiano
4b6c25d4bc
Use Authorization header instead of deprecated access_token query param, fixes #8454
5 years ago
Jordi Boggiano
a6176a7beb
Add IOInterface methods
5 years ago
Jordi Boggiano
23359f2db6
Merge branch 'master' into 2.0
5 years ago
Jordi Boggiano
3d72b56ed6
Merge branch '1.9'
5 years ago
Jordi Boggiano
d3f1c664d4
Avoid formatting output from external processes, fixes #8524
5 years ago
Tyson Andre
6827105a5b
Fix nits on typos
5 years ago
Adam Žurek
406a28708f
updated phpstan to 0.12
5 years ago
Jordi Boggiano
5fc31716dd
Avoid using CURLPIPE_HTTP1 in php7.4+
5 years ago
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
Jordi Boggiano
67e170eaa8
Merge branch '1.9'
5 years ago
Jordi Boggiano
89f6b2c54c
Merge pull request #8418 from glaubinix/f/github-authentication-behaviour
...
Git: fix authentication handling for private GitHub repositories
5 years ago
Stephan Vock
b847115617
Git: fix authentication handling for private GitHub repositories
5 years ago
Jordi Boggiano
eb3e3063b8
Revert "When network is disabled all uncached requests result in 404"
...
This reverts commit c325112670
.
5 years ago
Nils Adermann
c325112670
When network is disabled all uncached requests result in 404
5 years ago
Nils Adermann
7ef3a31de7
Make TransportException in network disabled case clearer
...
Otherwise it's a bit hard to work out what request triggered the exception
5 years ago
johnstevenson
7e649fac41
Fix Windows test regression from commit 149250a
...
Commit: 149250ab92
ProcessExecutor::escape handled a false value inconsistently across
platforms, returning an emtpy string on Windows, otherwise `''`. This
is fixed to return `""` on Windows.
The GitDownloaderTest code has been appropriately updated.
5 years ago
Jordi Boggiano
f867c407c7
Merge branch 'master' into 2.0
5 years ago
Jordi Boggiano
a0690525b5
Merge branch '1.9'
5 years ago
Jordi Boggiano
149250ab92
Remove credentials from git remotes in cache and vendor dirs
...
This only removes the credentials if they are managed by composer auth.json or equivalent, if the credentials were present in the package URL to begin with they might remain
Refs #8293
Fixes #3644
Closes #3608
5 years ago
Jordi Boggiano
4e43f849c7
Avoid overwriting credentials with existing ones from git repos, refs #8293
5 years ago
Jordi Boggiano
12184aa9c5
Fix github auth to try https with pwd also, fixes #8356
5 years ago
Jordi Boggiano
b925d06861
Fix gitlab support for basic-auth fallback from ssh URLs
5 years ago
Jordi Boggiano
ae9cc3db58
Avoid clearing the error output during removeDirectory execution, losing git error output, fixes #8351
5 years ago
Jordi Boggiano
bc2a1d762a
Merge branch 'master' into 2.0
5 years ago
Jordi Boggiano
78b8c365cd
Merge branch '1.9'
5 years ago
Jordi Boggiano
f2700bbd98
Merge pull request #8377 from TysonAndre/misc-nit
...
Fix misc phpdoc and strpos arg order nits for suggestions
5 years ago
Mikhail Fesenko
c2f1a6b643
Added clear cache for windows, fix tests
5 years ago
Tyson Andre
4c8e41d9a9
Fix misc phpdoc and strpos arg order nits
...
https://www.php.net/strpos has the signature
`strpos ( string $haystack , mixed $needle [, int $offset = 0 ] ) : int`
(The needle is usually the constant)
`strpos('/', $suggestion)` would only be `false` for `''` and `'/'`
So the existing check would just not suggest **anything** that was
already installed (from pecl, built-in, or composer).
The intent seems to be to not suggest non-vendored php packages
that were already installed. (b20cc22ebb
)
5 years ago
Stephan Vock
0d1d35c346
Debug: display used authentication for http calls
5 years ago
Jordi Boggiano
f0d565bb6d
Avoid transforming the origins when prompting for auth, fixes #8300
5 years ago
Jordi Boggiano
fd70d9cdc3
Stripe access tokens in a more generic way
5 years ago
Jordi Boggiano
53d2ab2253
Split up steps on VCS downloaders to allow doing network operations before touching the filesystem on GitDownloader, fixes #7903
5 years ago
Stephan Vock
f9fccbab1e
GitHub: don't display access token in debug log
5 years ago
Jordi Boggiano
4dabc17ec1
Fix use statement
5 years ago
Jordi Boggiano
bfee701f9b
Deduplicate findHeaderValue code
5 years ago
Jordi Boggiano
6c4357a7ed
Merge branch 'master' into 2.0
5 years ago
Jordi Boggiano
0261ce8092
Improve handling of non-standard ports for GitLab and GitHub installs, fixes #8173
5 years ago
Thomas Perez
3e66d0514a
Fix error_handler return type declaration
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
Jordi Boggiano
7edd689533
Merge pull request #8243 from carusogabriel/remove-explict-void-return
...
Remove explicits void returns
5 years ago
Gabriel Caruso
8b5be1d08c
Remove explicts void returns
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
Nils Adermann
e022c07370
Merge branch '1.8'
...
* 1.8:
SVN: hide passwords for debug output
5 years ago
Stephan Vock
8da046e4e9
SVN: hide passwords for debug output
5 years ago
Nicolas Grekas
794234946c
Let curl handle proxy and cipher list itself
5 years ago
Dane Powell
d4150cafc4
Move sortPackages to static helper class.
5 years ago
Dane Powell
266a41e046
Refactor sortPackageMap to depend on separate sortPackage function.
5 years ago
Jordi Boggiano
0317199507
Merge branch 'master' into 2.0
5 years ago
Jordi Boggiano
a186620210
Merge branch '1.8'
5 years ago
Jordi Boggiano
625bcee63a
Fix handling of warnings to incl all 4xx responses
5 years ago
Jordi Boggiano
8944627245
Fix syntax and backslash escaping
5 years ago
Novicaine
486b25fd30
Fix for UNC Windows paths
...
Made isAbsolutePath recognize Windows UNC-style absolute paths starting with \\
5 years ago
Andreas Schempp
0e2215dc6c
Added full unit test coverage
5 years ago
Andreas Schempp
a91fd20673
Return the composer.json content instead of a zip:// path
5 years ago
Andreas Schempp
0d0cb53f31
Adjust Zip Util to only find the root composer.json
5 years ago
Andreas Schempp
05d6b21785
Use self:: for private method
5 years ago
Andreas Schempp
9de07bed1b
Fixed docblocks
5 years ago
Jordi Boggiano
f77285916a
Clean up temp file on curl request failure and make sure the response body is avaiable on 3xx/4xx/5xx responses
5 years ago
Jordi Boggiano
d37642d9f2
Add missing use
5 years ago
Jordi Boggiano
3f5a986170
Show warning in all 400/500 responses if available, fixes #7814
5 years ago
Jordi Boggiano
5f988a34a6
Merge branch 'master' into 2.0
5 years ago
Jordi Boggiano
4271167495
Improve version reporting
5 years ago
Matthew Brown
65903aacfd
Fix type issues ( #7996 )
...
* Fix type issues found by Psalm
5 years ago
Jordi Boggiano
6c782599f1
Make IOInterface implement psr-4 LoggerInterface, fixes #5180
5 years ago
CZechBoY
a062cd1a31
added phpstan on level 0
5 years ago
Jordi Boggiano
9957807990
Merge branch 'master' into 2.0
5 years ago
Andreas Schempp
4d85e217c3
Extract the ZIP utility functions from ArtifactRepository
5 years ago
Markus Staab
0aa030f09d
Fixed typo introduced in recent fix
5 years ago
Markus Staab
fc2c445c06
Make sure we properly usleep() on windows rmdir/unlink
...
usleep() returns void, therefore the previous code didn't work
5 years ago
johnstevenson
6212eadcb0
Only use junctions if they can be safely removed
5 years ago
johnstevenson
d1cf69fa92
Remove junctions with PHP rather than system rmdir
...
PHP will happily remove junctions using its `rmdir` function (tested on
versions back to 5.2.17). This saves invoking system `rmdir` through
cmd.exe.
5 years ago
johnstevenson
da0dc74414
Update doc block, remove redundant clearstatcache
5 years ago
johnstevenson
e085a72f64
Fix mode bitmask when detecting a Windows junction
6 years ago
Jordi Boggiano
4517c00d40
Merge branch 'master' into 2.0
6 years ago
Andrew Gillis
dec2b5cd50
add gitlab token auth for git clone
6 years ago
Jordi Boggiano
b89720b52a
Merge branch 'master' into 2.0
6 years ago
Jordi Boggiano
a9aaa25d4c
Fix compat with Symfony Process 4.2, fixes #7923
6 years ago
Jordi Boggiano
3dfcae99a9
Add parallel download capability to FileDownloader and derivatives
6 years ago
Jordi Boggiano
4b7658a2a8
Small tweaks and make sure composer fails properly in a plane
6 years ago
Jordi Boggiano
137c32e72e
Do not prohibit http for old provider URLs on .org in case they are used
6 years ago
Jordi Boggiano
b47330adf1
Refactor ComposerRepository to work with combined repos having lazy providers and partial packages
6 years ago
Jordi Boggiano
14d6bcedda
Fix redirect handling and some output tweaks
6 years ago
Jordi Boggiano
fc03ab9bba
Add COMPOSER_DISABLE_NETWORK env var for debugging
6 years ago
Jordi Boggiano
788a822b24
Add some phpdocs
6 years ago
Jordi Boggiano
5d2b3276eb
Avoid starting all jobs immediately
6 years ago
Jordi Boggiano
64384f8b15
Fix tests
6 years ago
Jordi Boggiano
9986b797fb
Add support for redirects/retries in curl downloader
6 years ago
Jordi Boggiano
fd11cf3618
Port/extract most behavior of RemoteFilesystem to CurlDownloader
6 years ago
Jordi Boggiano
09fd239f24
Fix factory test
6 years ago
Jordi Boggiano
1cd9f4f9db
Disable request_fulluri by default for HTTPS connections
6 years ago
Jordi Boggiano
f946d8eb5a
More RemoteFilesystem usage removals and some repository/vcs driver refactorings
6 years ago
Jordi Boggiano
713bc4de1d
Minor fixes and updated the rest of the code/tests to use HttpDownloader
6 years ago
Jordi Boggiano
56805ecafe
Add HttpDownloader to wrap/replace RemoteFilesystem with a new curl multi implementation
6 years ago
Jordi Boggiano
411dd51f20
Merge branch 'master' into 2.0
6 years ago
Michele Locati
04098153c8
Add support for running composer with phpdbg ( #7798 )
6 years ago
Jordi Boggiano
2e0f31106a
Merge remote-tracking branch 'origin/master' into 2.0
6 years ago
Jordi Boggiano
5a56bb6971
Remove BC event and constraint classes
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
2528654c53
Merge branch '1.7'
6 years ago
Seven Du
148e503b31
Modified comment block ( #7700 )
...
* Modified comment block
6 years ago
Michele Locati
41458c7518
Don't call Symfony ProcessUtils::escapeArgument
6 years ago
François-Xavier de Guillebon
114217c6e3
Fix ini_get() for boolean values
6 years ago
Gabriel Caruso
2805a69e58
Simplify conditions and inline temp variables
6 years ago
Gabriel Caruso
a64b652a6b
Use func_num_args instead of counting on func_get_args
6 years ago
Stephan Vock
8b8df01336
Bitbucket: fix redirect behaviour
6 years ago
Gabriel Caruso
71c8735e11
Use combined assignment operators
6 years ago
Jordi Boggiano
bf125295df
Fix escaping of URLs in Perforce and Subversion drivers
6 years ago
Daniel Karl
849f4eda56
Using cwd for 2nd process-execution (auth) in HgUtils
6 years ago
Jordi Boggiano
e718f34ba4
Properly detect rate limit errors on github before outputting messages, fixes #6621
6 years ago
Jordi Boggiano
e7a9bd3362
Attempt workaround for repo.packagist.org domain SSL on very old PHP, fixes #7530
6 years ago
Nicolas Grekas
a3bbcf9c77
Make RemoteFilesystem::getRemoteContents() report response headers also on exceptions
6 years ago
Markus Staab
eb94f8346a
Fixed typo
6 years ago
Jordi Boggiano
ff59bbdab0
CS fixer
6 years ago
Jordi Boggiano
c5fa3bdde0
Migrate to repo.packagist.org for package metadata
6 years ago
Jordi Boggiano
1983a450b4
Use rawurldecode instead of urldecode, fixes #7407
6 years ago
Jordi Boggiano
d64f95b70c
Merge pull request #7475 from Elendev/mercurial-auth-json
...
Add support for authentication with mercurial repositories.
6 years ago
Elendev
ea5644281a
Display the error output in the thrown exception
6 years ago
Elendev
5c2b34a1af
Encode the username correctly (fix typo)
6 years ago
Jonas Renaudot
1a725d5e1f
Add support for authentication with mercurial repositories.
6 years ago
Vladimir Reznichenko
cd39efc72c
New finding by Static Code Analysis
6 years ago
Gabriel Caruso
7d9f8e2247
Improvements
...
Small improvements, such as remove unused imports, unecessaries casts, parentheses, etc.
6 years ago
zefrog
fd00ea7ce8
Fix Git detection of authentication failure when no tty is attached to the process
6 years ago
Jordi Boggiano
4ebb747e12
Merge branch '1.6'
6 years ago
Jordi Boggiano
e697293cd9
Handle broken symlinks more cleanly, fixes #7255
6 years ago
Jordi Boggiano
38866ba310
Merge remote-tracking branch 'johnstevenson/external-xdebug'
6 years ago
Jordi Boggiano
2bd34c0534
Merge branch '1.6'
6 years ago
Fabio Bas
c9aa9c0d2f
Fix usage of svn user-provided credentials, fixes #7114 , closes #7228
6 years ago
Jordi Boggiano
174c71de04
Handle http 401/403 differently to allow reading warning message
6 years ago
Markus Staab
71d058b97b
refactored "svn --version" calls into a single place, closes #7152
...
this saves a lot of process-spawning as we re-use the result of a process started once.
6 years ago
Jordi Boggiano
e76d32817e
Merge pull request #7070 from nicolas-grekas/fix
...
Fix RemoteFilesystem::getRemoteContents() on-failure behavior
6 years ago
johnstevenson
ed97c2116c
Use external XdebugHandler library
6 years ago
Jordi Boggiano
08f769220a
Merge branch '1.6'
7 years ago
Jordi Boggiano
f857da7c29
Remove deprecated license check from ValidatingArrayLoader, fixes #7026 , fixes #7073
7 years ago
Nicolas Grekas
3b391191b9
Fix RemoteFilesystem::getRemoteContents() on-failure behavior
7 years ago
Jordi Boggiano
5f97eb1578
Merge branch '1.6'
7 years ago
Markus Staab
9bc83d698e
Pass auth credentials to svn log while retrieving commit logs
7 years ago
Jordi Boggiano
2224989430
Merge pull request #7036 from kalessil/master
...
[minor] SCA: reduced repetitive method calls
7 years ago
Jordi Boggiano
dae3c5bc2d
Merge branch '1.6'
7 years ago
Vladimir Reznichenko
da9e00066c
SCA: reduced repetitive methods references, used specialized PhpUnit assertions
7 years ago
Narration SD
fd61a21bff
Fix detection of junction points, fixes #7025
7 years ago
Martin Hujer
bbee0d7c6c
Validation warns if script description for nonexistent script is present
...
Fixes #7010
7 years ago
Jordi Boggiano
59fcb91912
Merge pull request #6985 from nicolas-grekas/get-url-contents
...
Add RemoteFilesystem::getRemoteContents() extension point
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
Nicolas Grekas
5601f07bfa
Add RemoteFilesystem::getRemoteContents() extension point
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
5cd0fef7ff
Upgrade to SPDX License 3.0 and handle deprecations more gracefully, fixes #6951
7 years ago
Jordi Boggiano
50665aa18d
Simplify check for current revision, refs #6684
7 years ago
Jordi Boggiano
93cd9d874b
Merge remote-tracking branch 'RobberPhex/git-repo'
7 years ago
Gabriel Caruso
50045a7536
Add no_useless_else in phpcs
7 years ago
Jordi Boggiano
c8aea719b1
CS fixes
7 years ago
Gabriel Caruso
32a409a3ee
Clean elses
7 years ago
Jordi Boggiano
eab826b00b
Merge branch '1.5'
7 years ago
Jordi Boggiano
b52fd60873
Always follow redirects in userland as we need to check if we have authentication every time for the new domain
7 years ago
Jordi Boggiano
b59dd23bb4
Merge branch '1.5'
7 years ago
Jordi Boggiano
743153e862
Tweak so that we allow authentication for domains we redirect to, refs #6717
7 years ago
Maarten Balliauw
128e424c90
Avoid sending Authorization header to another domain on redirect, fixes #6716
7 years ago
Jordi Boggiano
5130d02208
Update to latest ca-bundle
7 years ago
Jordi Boggiano
9850621c6b
Merge pull request #6788 from GawainLynch/symfony-4
...
Symfony 4
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
Jordi Boggiano
3c76e36e2c
Fix regex, refs #6735
7 years ago
gregory
8a136d18e5
Correctly extract username/password from URL
7 years ago
Robert Lu
e768e297cd
fetch tag,commit form local but not ref
7 years ago
Robert Lu
0ad985122d
Don't fetch when ref already on local
7 years ago
Gawain Lynch
8b42aed060
Create a local escapeArgument() for Symfony 4 compatibility.
7 years ago
Jordi Boggiano
bfed974ae9
Merge branch '1.5'
7 years ago
Jordi Boggiano
fc9f8c2007
Fix tests
7 years ago
Jordi Boggiano
26a50b3762
Merge branch '1.5'
7 years ago
Jordi Boggiano
11f1e03739
CS tweaks
7 years ago
Minh-Quan TRAN
007ca5ff6a
workaround for gitlab installation with relative url
...
Signed-off-by: Minh-Quan TRAN <account@itscaro.me>
7 years ago
croensch
bd6168ef85
fix pull 6740
...
wrongly copied the check, either must be in not-empty
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
Jordi Boggiano
a53f2ce7c7
Merge branch '1.5'
7 years ago
Jordi Boggiano
f71baa5e0c
Try fixing 404s gitlab handling when unauthenticated, refs #6669
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
Jordi Boggiano
1a488bce01
Base64 encode debug output to avoid dumping binary and push it to the end of the line
7 years ago
Jordi Boggiano
221d80d1e1
Merge branch '1.4'
7 years ago
Jordi Boggiano
2eb69cd679
Always recommend using global config to store auth tokens
7 years ago
Matt Isenhower
4dc8748e68
Update GitLab personal access token URL and the token config command
7 years ago
Jordi Boggiano
0723654362
Merge branch '1.4'
7 years ago
Jordi Boggiano
d0e780a8eb
Allow php_uname to be disabled, fixes composer/getcomposer.org#112
7 years ago
Martin Hasoň
88ec172bd8
Fix CS
7 years ago
Jordi Boggiano
bf82bfdb10
More debug output, refs #6342
7 years ago
Jordi Boggiano
1fe5064560
Better debuggability of content-length mismatch
7 years ago
Jordi Boggiano
0d5ff633b5
Merge branch '1.4'
7 years ago
Jordi Boggiano
72616a9635
Only check for safe mode on versions that have it, refs #6300
7 years ago
Jordi Boggiano
0efc66d968
Tweak message
7 years ago
Nicola Spanti (RyDroid)
5cd080dfac
Add a specific message for stupid users that put useless spaces in license
7 years ago
Alejandro Celaya
d20494ddf6
Removed duplicated "to"
7 years ago
Jordi Boggiano
122e422682
CS fixes
7 years ago
Jordi Boggiano
c8cf24daad
Minor tweaks and CS fixes to new bitbucket integration, refs #6094
7 years ago
Jordi Boggiano
44ea284ab9
Merge remote-tracking branch 'stefangr/implement_bitbucket_api_v2'
7 years ago
Jordi Boggiano
daff57189f
Add http_build_query 3rd param to make it more explicit
7 years ago
Jordi Boggiano
260b85882f
Merge remote-tracking branch 'dzuelke/installmsgs' into 1.3
7 years ago
Jordi Boggiano
63447cf724
Avoid retrying forever if a gitlab token has insufficient rights, fixes #6189
7 years ago
Jordi Boggiano
08fc56b38a
Avoid using null value as string, fixes #6134
7 years ago
Stefan Grootscholten
966d0bec10
One more non-camelCase variable.
8 years ago
David Zuelke
17d5f6d88a
fix some install msg corner cases
...
mostly around updates; had to go back to a colon even for 'from cache'
8 years ago
Stefan Grootscholten
4377ba2bcb
Implement changes after review by stof.
...
- Use camelCase variable names.
- Set 3rd argument of http_build_query
- Remove obsolete checks
8 years ago
David Zuelke
2d36324e99
streamline install progress messages
8 years ago
Stefan Grootscholten
3eeb6214eb
Fix RemoteFilesystem::isPublicBitBucketDownload
...
The access token was added to requests to third party hosts the bitbucket api is redirecting to.
8 years ago
Stefan Grootscholten
b3b05949bb
Implement most desirable Authorization method.
...
As per https://developer.atlassian.com/bitbucket/api/2/reference/meta/authentication#make-requests
adding the OAuth access token in the Authorization header is desired above adding it to the URL.
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
0bc75c3fb6
Bump memory limit to 1.5G
8 years ago
Plamen Garkov
ab4322148f
adding "fatal: unable to access" to authFalures
8 years ago
Stefan Grootscholten
d80d266201
Fix dist download from bitbucket.
...
URL https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2
results in the following $pathParts:
array(5) {
[0]=>
string(0) ""
[1]=>
string(5) "ariya"
[2]=>
string(9) "phantomjs"
[3]=>
string(9) "downloads"
[4]=>
string(36) "phantomjs-2.1.1-linux-x86_64.tar.bz2"
}
A dist download URL is like:
https://bitbucket.org/user/repo/get/[git-hash].zip
array(5) {
[0]=>
string(0) ""
[1]=>
string(4) "user"
[2]=>
string(4) "repo"
[3]=>
string(3) "get"
[4]=>
string(14) "[git-hash].zip"
}
8 years ago
Jordi Boggiano
4d082f77b8
Simplify composer output to take less lines
8 years ago
Jordi Boggiano
e9d04f2b2d
Merge branch '1.2'
8 years ago
Dries Vints
58b27289d0
Do not add newlines for errors
8 years ago
Dries Vints
2ab7df5566
Do not add newlines to output
8 years ago
Jordi Boggiano
f1eb787013
Merge pull request #5882 from johnstevenson/xdebug-handler-ini
...
Use random name for tmp ini and delete after use
8 years ago
Sergey Beresnev
2717e115c8
windows remote path treats as remote now
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
Thomas Flori
7896b1ffab
cache only rendered composer information
...
As suggested we cache now only composer information and also the rendered version again. Perforce is using the same property cache as others and the `Util\Perforce::getComposerInformation()` is using the newly created methods.
8 years ago
Thomas Flori
ec27777341
code improvements as suggested
...
Thanks for your input!
8 years ago
Thomas Flori
33d026bb06
fix code style to be PSR-2 conform
...
I tried to solve all PSR-2 style guide violations in files that I changed. One I could not solve: const can not concatenate in php 5.3.
8 years ago
Thomas Flori
597f834ae9
add getFileContent function
...
This function is very similar to a part from getComposerInformation - so we can use this function in getComposerInformation too. And because it is almost everywhere the same we can put it to abstract class.
By implementing getComposerInformation in abstract class we need to add the getChangeDate to interface too. Only Problem: perforce seems not to support a ChangeDate. For this we use 'now' to have at least something.
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
0f455be01c
Add CI flag in UA header
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
Jordi Boggiano
c0e28a9043
Remove static/public method
8 years ago
Roel Arents
489a8f3d5a
revert to simply making an exception (no acces_token) for bitbucket/user/repo/downloads URLs
...
[#5584 ]
8 years ago
berlinger-rarents
5123c5cf76
remove redundant truth check
8 years ago
berlinger-rarents
8845ea467a
try bitbucket downloads first time without auth
...
also add tests for #5584
8 years ago
Rob Bast
e60eff5f2e
apply patch
8 years ago
berlinger-rarents
64fc8ffe3d
prevent (prompt for) auth for bitbucket public downloads
...
#5584
8 years ago
berlinger-rarents
a4e3e1b584
prevent (prompt for) bitbucket auth when it redirected
...
#5584
8 years ago
Jordi Boggiano
285c4a1ac6
Merge branch '1.2'
8 years ago
Jordi Boggiano
ff7daf0bd4
Fix handling of paths on windows when cwd is root of drive, fixes #5554
8 years ago
Jordi Boggiano
cada55dde6
Merge pull request #5491 from moolex/support_gitlab_private_token
...
Support gitlab private-token for easier access via Gitlab API
8 years ago
Rob Bast
02455712cf
check for additional possible output strings, fixes #5543
8 years ago
Jordi Boggiano
3455380413
Patch Httpoxy vulnerability
8 years ago
moyo
997a062ebd
Support gitlab private-token (or personal-access-token) for easier access via gitlab API
...
Config example:
$HOME/.composer/auth.json
{
"gitlab-token": {
"gitlab.com": "YOUR-TOKEN-HERE"
}
}
Gitlab API authentication doc: http://doc.gitlab.com/ce/api/README.html
8 years ago
Jordi Boggiano
87fbf4a6cd
Clean ups, refs #5485
8 years ago
Jordi Boggiano
8ffe224c0d
Merge remote-tracking branch 'stefangr/fix_minor_bitbucket_oauth_issues'
8 years ago
Jordi Boggiano
4998ee27b3
Re-use mirror code from the git driver, refs #5384
8 years ago
Jordi Boggiano
55e90093a4
Merge remote-tracking branch 'marvil07/faster-git-clones-using-cache'
8 years ago
Stefan Grootscholten
5a31c75289
Fix some of the remaining OAuth issues.
...
- Bitbucket will silently redirect to a login page when downloading a zip.
Added a check to see if the content-type is not text/html
- Make the path from Basic Authentication to OAuth as smooth as possible.
8 years ago
Jordi Boggiano
efb24846cb
Merge branch '1.1'
8 years ago
Jordi Boggiano
f94d06ff0a
Fix escaping
8 years ago
Jordi Boggiano
39c2c8c30a
Add test for password escaping
8 years ago
Marco Villegas
75b88a13fe
Use regex to capture git version.
8 years ago
Stefan Grootscholten
1241e3e83c
Simplify the if statement.
8 years ago
Stefan Grootscholten
42f4d344a4
Fix the replacement of the credentials.
...
://username:password@domain
was replaced by ://://:***@domain
instead of ://username:***@domain or ://***:***@domain
8 years ago
Stefan Grootscholten
ea11a95359
Provide fallback when using basic authentication.
...
When composer is configured to use bitbucket basic authentication (a bitbucket username and password), you get an error
when trying to install dependencies.
This commit prevent the install process to be aborted due to uncaught exceptions.
8 years ago
Stefan Grootscholten
7716ef059b
Add the access token as query string parameter.
8 years ago
Stefan Grootscholten
6c8b0cc2c1
Change authentication for bitbucket to oauth.
8 years ago
Stefan Grootscholten
0e500d4c91
Make API URL available for external use.
8 years ago
Jordi Boggiano
a8edaad381
Merge pull request #5335 from carlcraig/1.1
...
Update bitbucket oauth instructions
8 years ago
Jordi Boggiano
73d9a4717d
Update list of ciphers /cc @cs278
8 years ago
Marco Villegas
5bb0433a51
Provide a way to retirve git version from the related util class.
8 years ago
Jordi Boggiano
e2c3bc5e89
Merge branch '1.1'
8 years ago
Jordi Boggiano
3ac822d5e2
Fix access_token param being incorrectly added on github requests after a redirection, fixes #5099
8 years ago
Jordi Boggiano
32a8a60695
Merge branch '1.1'
8 years ago
Jordi Boggiano
143db7a9f5
Fix degraded mode usage on packagist, fixes #5350
8 years ago
ReenExe
53fc30fe56
clear code
8 years ago
Carl Craig
e43912735b
Update bitbucket oauth instructions
8 years ago
Jordi Boggiano
046c2d64a5
Fix ProcessExecutor url escaping
8 years ago
Jordi Boggiano
9cb6c2322a
Fix more git URL escaping
8 years ago
Jordi Boggiano
e3ae45fa12
Replace username as well if it looks like a github oauth token
8 years ago
Stefan Grootscholten
9b654048ed
Fix regex for bitbucket https URLs.
...
If the bitbucket URL has the .git extension, the compiling of the authUrl and sshUrl result in invalid URLs.
8 years ago
Stefan Grootscholten
591f68288b
Provide a fallback to ssh for https bitbucket URLs.
...
When running in non-interactive mode, there is no way to ask for credentials.
If there are no credentials available, no attempt is made to execute the command.
This commit provides a fallback to SSH for non authenticated, non-interactive install/updates of bitbucket https URLs.
8 years ago
Jordi Boggiano
36665d791d
Merge branch '1.0'
8 years ago
Jordi Boggiano
c66639fe03
Fix content-length check to look at the last header received, fixes #5268
8 years ago
Jordi Boggiano
38c49b32cb
Less regex escaping and removed $..$ match, refs #5184
8 years ago
Jordi Boggiano
d8c94c2640
Merge remote-tracking branch 'curry684/home-expansion'
8 years ago
Jordi Boggiano
95e0347917
Merge branch '1.0'
8 years ago
Jordi Boggiano
ff46816e79
Add support for file:///c:/-style paths, refs #3338
8 years ago
Jordi Boggiano
2062070be9
Warn users with secure-http disabled once per hostname they access insecurely to avoid bad URLs going by undetected, fixes #5008
8 years ago
Jordi Boggiano
31dcc0bdea
Merge branch '1.0'
8 years ago
Jordi Boggiano
1bf711fe1f
Guard against mbstring func_overload, fixes #5218
8 years ago
David Zuelke
d716c73333
fail download on content-length mismatch
8 years ago