Jordi Boggiano
3556f6efa5
Always wait after an unzip completes to try and fix virtualbox issues, refs #9945
2021-06-05 20:45:37 +02:00
Jordi Boggiano
4c9e75c6e5
Fix CS
2021-06-03 10:38:38 +02:00
Jordi Boggiano
8bf0ddf905
Clean up ZipDownloader, always do async first if possible then fallback to non-async
2021-06-02 15:13:19 +02:00
Jordi Boggiano
28c7d0ea5d
Avoid creating new processes to remove directories which we know are empty, which speeds things up a lot on windows
2021-06-02 13:47:04 +02:00
Nicolas Grekas
bec76367db
Speedup extracting on Windows
2021-06-02 11:54:18 +02:00
Jordi Boggiano
b751156e1c
Prevent cache gc from happening during test suite runs, and add output so it is clear why it is blocking for a bit
2021-06-02 10:00:01 +02:00
Jordi Boggiano
40c7a725e1
Merge branch '2.0'
2021-04-27 13:06:49 +02:00
Jordi Boggiano
332c46af8b
Merge pull request from GHSA-h5h8-pc6h-jvvx
...
* Fix external process calls to avoid user input being able to pass extra parameters
* Tweak some fixes
2021-04-27 13:00:40 +02:00
Jordi Boggiano
d75d79b452
Merge pull request #9822 from phenaproxima/post-file-download
...
Fire POST_FILE_DOWNLOAD event for metadata fetched by ComposerRepository
2021-04-09 14:53:20 +02:00
Jordi Boggiano
7dd95a768b
Clean stuff up and deprecate old usages for PostFileDownloadEvent
2021-04-09 11:21:13 +02:00
Jordi Boggiano
bf73a20bc0
Merge branch '2.0'
2021-03-16 20:31:44 +01:00
Stephan
2f4b99eacd
MaxFileSizeException should reject download job ( #9778 )
2021-03-15 13:35:16 +01:00
Jordi Boggiano
5d6f9b2528
Prefer @phpstan- annotations as that is what we run against
2021-03-10 10:52:16 +01:00
Jordi Boggiano
4940009f83
Bump phpstan to level 3 ( #9734 )
...
Clean up PackageInterface/CompletePackageInterface, add missing methods, type things in solver as BasePackage, added CompleteAliasPackage, ..
2021-03-09 15:49:40 +01:00
Jordi Boggiano
8392508e23
Merge branch '2.0'
2021-03-09 15:29:19 +01:00
Jordi Boggiano
4a8e7daf56
Make sure that single files installed via file downloader get the executable bit set if they are a binary file, refs #9742
2021-03-09 14:13:19 +01:00
Jordi Boggiano
b451bcb1ac
Fix issue extracting archives into paths that already exist, fixes composer/installers#479
2021-03-09 11:53:52 +01:00
Jordi Boggiano
d0b399b788
Merge branch '2.0'
2021-03-09 09:54:39 +01:00
Jordi Boggiano
40800df6bd
Fix CS
2021-02-25 13:46:52 +01:00
Jordi Boggiano
52967c32cf
Remove unused var
2021-02-25 13:45:15 +01:00
Jordi Boggiano
48d02b479b
Fix output of PathDownloader during upgrades
2021-02-25 13:20:29 +01:00
Jordi Boggiano
fd88b3d48d
Fix DownloaderInterface return types
2021-02-25 13:18:08 +01:00
Jordi Boggiano
b3951b8804
Fix output of FileDownloader and related to avoid async issues
2021-02-25 12:03:09 +01:00
Jordi Boggiano
9809350753
Fix PathDownloader's remove implementation
2021-02-25 11:37:19 +01:00
Jordi Boggiano
67261e8d47
Make package removals async as well, refs #9618
2021-02-25 11:19:33 +01:00
Markus Staab
a5fecc4720
Filesystem: added removeDirectoryAsync() and use it in ArchiveDownloader ( #9618 )
...
This turns half of the `rm -rf ...` executions during package installs async and therefore improves performance
2021-02-25 11:15:28 +01:00
Jordi Boggiano
e3af4ee606
Include stdout as well as stderr if git stash/diff/.. fails, fixes #9720
2021-02-24 15:47:06 +01:00
Jordi Boggiano
f37f3dab04
Fix abort of downloads and zip extraction to happen immediately, fixes #9390
2021-02-10 17:34:15 +01:00
Jordi Boggiano
8d94e25c2f
Minor fixes
2021-02-10 11:28:01 +01:00
Jordi Boggiano
6a869ede77
Fail early if git/hg/svn can not be found on the system, so that download can be retried from dist, fixes #9681
2021-02-10 10:48:08 +01:00
Markus Staab
8dfe45a026
GitDownloader: combine checkout + reset commands into a single process
...
use a single process instead of 3 to improve performance
2021-01-16 22:26:20 +01:00
Jordi Boggiano
7f85367113
Make sure an array is always returned
2021-01-07 23:26:29 +01:00
Wissem Riahi
bdecb4711d
Add all curl_getinfo into the response and exception for curl requests
2021-01-07 12:01:19 +01:00
Wissem Riahi
370e082b4a
Add saving time duration for curl HTTP requests
2021-01-06 16:05:00 +01:00
Jordi Boggiano
1fb6b03e03
Fix a few edge cases in unpushed change handling
2020-11-26 16:03:38 +01:00
Jordi Boggiano
f86b3ad0fe
Make sure all remotes are checked for unpushed changes, fixes #9486
2020-11-26 15:42:39 +01:00
Jordi Boggiano
b7d770659b
CS fixes
2020-11-22 14:52:39 +01:00
Markus Staab
e8ce5a3db6
Remove unnecessary overridden method
...
The method just called its parent without further logic
2020-11-09 20:45:40 +01:00
Jordi Boggiano
c362d001f1
Fix regression handling installs with custom installers not passing a fully qualified path to downloaders, fixes #9431 , fixes #9434
2020-11-07 11:17:22 +01:00
Michaël Jacobs
611a9f5dab
Drop unused imports
2020-11-06 13:31:02 +01:00
Michaël Jacobs
c35a8e77c7
Fix missing directory separator in FileDownloader
2020-11-06 13:31:02 +01:00
Jordi Boggiano
bc9336946e
Trim trailing slash in path downloader to avoid symlink issues, and in FileDownloader::getLocalChanges as we append a string without slash, refs #9422
2020-11-05 16:54:06 +01:00
Jordi Boggiano
52faa3cdfb
Merge pull request #9388 from JasonStephensTAMU/remove-windows-junction
...
Remove Windows junctions first in PathDownloader
2020-11-04 21:05:57 +01:00
Jason Stephens
f486da4578
Remove junctions first in PathDownloader
...
When removing a package from a Path repository, ensure Windows junctions
are handled first. This avoids a potential problem using realpath() when
comparing dist and install paths.
See https://bugs.php.net/bug.php?id=77639
2020-11-02 08:30:15 -06:00
Ondřej Mirtes
48b23b1607
Simplify code in FileDownloader.php
2020-11-02 15:10:57 +01:00
Jordi Boggiano
1bf2df19dd
Avoid cleaning up $path in downloaders if it is the CWD (create-project use case), refs #9396
2020-11-02 13:53:44 +01:00
Jordi Boggiano
6cb0aff417
Fix issue preventing cleanup of vendor dir when it is nested in the install path on Windows, fixes #9396
2020-11-02 13:53:43 +01:00
Chauncey McAskill
1bb87babe6
Fix availability of $urls in FileDownloader
...
Fixed:
- Ensure manipulations to the first element of $urls in the $download callback are available in $accept and $reject
2020-10-15 16:11:16 -04:00
Jordi Boggiano
24abd233ec
Merge branch 'master' into code-improvements
2020-10-13 12:23:13 +02:00
Jordi Boggiano
a1b781a302
Merge pull request #9220 from ffraenz/pr
...
Composer 2: Adapt file download cache keys to changed processed URLs
2020-10-12 16:55:35 +02:00
Fränz Friederes
369c2ff552
Implement PR code style feedback
2020-10-05 20:52:27 +02:00
Jordi Boggiano
2a36c3a70a
Minor tweaks
2020-09-21 13:26:53 +02:00
Simon Berger
80a75e9959
Minor code improvements
2020-09-20 02:16:28 +02:00
Simon Berger
a6475a7118
Removed unused variables, properties and parameters of private functions
2020-09-20 02:16:28 +02:00
Simon Berger
002fd39bc6
Removed passing of parameters with default value
2020-09-20 02:16:28 +02:00
Simon Berger
cda6e8bea6
Removed unnecessary property initialization or declaration
2020-09-20 02:16:28 +02:00
Fränz Friederes
a1a3e29f52
Fix using inside anonymous function
2020-09-16 11:39:34 +02:00
Fränz Friederes
57e1ce6cdb
Change the file download cache key with the processed URL, implement custom cache key
2020-09-16 10:54:14 +02:00
Jordi Boggiano
90332f1dbd
Add a readonly mode to the cache, fixes #9150
2020-08-25 13:55:32 +02:00
Stephan
a16f32484b
Downloader: add a max_file_size to prevent too big files to be downloaded
2020-08-22 19:37:42 +01:00
Jordi Boggiano
c0eb9834fe
Merge pull request #9116 from ryanaslett/patch-1
...
Update PathDownloader.php
2020-08-11 09:54:09 +02:00
Jordi Boggiano
7649c8438d
Fix exception when using create-project in current directory, fixes #9073
2020-08-11 09:42:42 +02:00
Ryan Aslett
c0309f22d7
Update PathDownloader.php
...
If a path repository points at a directory that is managed by composer installers, the path that gets set ends up being relative, and this check fails to see that the source is already present, and therefore removes it.
Since ->install is already using realpath around the $path argument, remove should as well.
For an example repository that demonstrates this bug See: https://github.com/ryanaslett/pathrepotestcase
2020-08-10 12:51:48 -07:00
Jordi Boggiano
7bcde1481d
Fix git downloader syntax for windows cmd when updating packages, fixes #9089
2020-07-30 14:38:48 +02:00
Jordi Boggiano
04381c70fe
Merge branch '1.10'
2020-06-17 17:37:39 +02:00
Michael Stucki
0278e7453d
Clean Git repos during discard
2020-06-17 17:00:35 +02:00
Jordi Boggiano
93d4cf6f91
Add --no-show-signature where git supports it, fixes #8966
2020-06-17 16:37:06 +02:00
Jordi Boggiano
83c64a9d19
Reuse operation formatting logic in downloaders
2020-06-17 12:33:02 +02:00
Jordi Boggiano
aaef3ff5ff
Improve error reporting when unzip fails due to race condition in unhandled Promise, refs #8988
2020-06-17 10:44:50 +02:00
Jordi Boggiano
d1fedc3bd6
Restore old behavior of wiping dir contents before installing, fixes #8988
2020-06-17 10:42:05 +02:00
Jordi Boggiano
09fc263d37
Fix status command bug
2020-06-16 16:27:36 +02:00
Jordi Boggiano
0d369c87bc
Merge pull request #8975 from ffraenz/pr
...
Composer 2: Allow plugins to override the URL before triggering the download
2020-06-16 14:44:03 +02:00
Jordi Boggiano
aea074308c
Update batching to install plugin deps before the plugin (alone an own batch)
2020-06-16 14:07:30 +02:00
Jordi Boggiano
9c78eda7db
Fix FileDownloader::update impl to handle promises
2020-06-16 14:00:23 +02:00
Jordi Boggiano
87a0fc5506
Execute operations in batches to make sure plugins install in the expected order
2020-06-16 14:00:22 +02:00
Jordi Boggiano
3af617efe8
Parallelize zip extraction using async unzip processes
2020-06-16 14:00:20 +02:00
Jordi Boggiano
d5286d0cb8
Add a way for FileDownloader subclasses to add paths to the cleanup stage
2020-06-16 14:00:18 +02:00
Jordi Boggiano
da6c0635d2
Merge pull request #8980 from stucki/discard-using-git-clean
...
Discard changes is incomplete if Git project has additional folders
2020-06-16 11:08:44 +02:00
Fränz Friederes
5c13c97428
Implement type and context properties in PreFileDownloadEvent
2020-06-15 21:43:41 +02:00
Michael Stucki
ae59047166
Clean Git repos during discard
2020-06-15 21:42:41 +02:00
Fränz Friederes
13bdf8553a
Add setProcessedUrl method to PreFileDownloadEvent
2020-06-11 21:53:31 +02:00
Jordi Boggiano
a4a617abb4
Reduce amount of Filesystem/ProcessExecutor instantiations, add lots of docblocks
2020-06-04 16:08:23 +02:00
Jordi Boggiano
90bd351b8b
Allow downgrades to go through even though the target dir for archive extraction exists
2020-06-03 15:37:36 +02:00
Jordi Boggiano
02059d96e7
Fail early if an archive extraction is going to fail at install/update stage to avoid leaving the vendor dir in a half up to date state
2020-06-03 15:19:02 +02:00
Jordi Boggiano
385655f02a
Mark temp files as such for clarity in case any gets left over
2020-05-22 13:23:14 +02:00
Ayesh Karunaratne
aa20413990
Improve regex in \Composer\Downloader\SvnDownloader::getCommitLogs() by removing unnecessary greedy operator
2020-05-04 01:03:15 +07:00
Lucas D Hedding
2bf2e9fc60
fix failing tests
2020-04-20 14:40:25 -06:00
Lucas D Hedding
3e2163de5c
#8809 : expand context for post file download event
2020-04-20 13:50:42 -06:00
Jérôme Tamarelle
bd34ff1328
Remove unused property $httpDownloader
2020-04-16 01:14:56 +02:00
Jordi Boggiano
44a4429978
Remove PEAR installer/downloader/repos/..., fixes #8778
2020-04-15 00:24:13 +02:00
Lucas Hedding
1883832ddc
Provides a post download event ( #8655 )
2020-04-14 23:48:18 +02:00
Jordi Boggiano
7d3f45cf04
Avoid errors in cleanup, fixes #8766 , fixes #8764
2020-04-13 12:15:17 +02:00
Jordi Boggiano
096b507050
Merge branch '1.10'
2020-04-09 17:07:58 +02:00
Jordi Boggiano
e121de35a3
Fix variable used for symlinking absolute paths, refs #8700
2020-04-09 17:01:48 +02:00
Markus Staab
6f6974df70
added phpdocs ( #8754 )
2020-04-09 13:44:30 +02:00
Jordi Boggiano
55f122008b
Make sure we avoid cleanup running more than once per package on VcsDownloader
2020-04-09 10:32:59 +02:00
Jordi Boggiano
9575c7623f
Update changelog, add upgrade guide
2020-04-08 16:44:32 +02:00
Adam Žurek
25cd2382cb
Raise phpstan level to 1 ( #8027 )
2020-04-07 14:13:50 +02:00
Jordi Boggiano
87757de6bc
Merge branch '2.0'
2020-04-07 09:39:00 +02:00
Jordi Boggiano
800491175b
Avoid failing cleanup when a package gets uninstalled
2020-03-28 20:50:49 +01:00