56 Commits (6a466a120a404d1c5d492e5ca715841c491517fc)

Author SHA1 Message Date
Jordi Boggiano 6a466a120a
Enable strict types on all files 2 years ago
Jordi Boggiano 6da38f83a0
Add parameter types to all the things 2 years ago
Niels Vanpachtenbeke 1c928466a9
Remove code blocks for php <7.2 compatibility (#10417) 2 years ago
Jordi Boggiano 0b3adc84da
Fix a few phpstan errors and add a php8+ baseline for the rest 2 years ago
Jordi Boggiano cc32ebcabd
Search improvements (#10336)
* Search performance improvements, add SEARCH_VENDOR type, fixes #10326, fixes #10324, fixes #10325

* Add extra optimization path for autocompletion of ^foo/* whereas the vendor is fully known, refs #10320
2 years ago
Jordi Boggiano 24ce1eddbd
Add composer/pcre dependency and use it everywhere instead of preg_* 2 years ago
Jordi Boggiano bd4d624cc7
Read first from $_SERVER and $_ENV before using getenv (#10218) 3 years ago
Martin Herndl 3645d3042c
Add types to root namespace (#10213) 3 years ago
Jordi Boggiano 9599eb613b
Type annotations 3 years ago
Jordi Boggiano 79727d35c4
Avoid warning due to invalid cache dir during init, wait for first use, fixes #10125 3 years ago
Jordi Boggiano d1c8a4d1b4
Lots of typing improvements 3 years ago
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 3 years ago
Ilya Urvachev cee8e3e3b7
fix `dirname` usage 3 years ago
Ilya Urvachev ab6e0fa961
use `.tmp` extension for temporary files
also updated `catch` block to use temporary filename
3 years ago
Ilya Urvachev e829ff80bc
feat(Cache): make cache writes more atomic
Fixes #9568
3 years ago
Jordi Boggiano 00aaffb8f9
Make cache writes atomic 4 years ago
Jordi Boggiano b7d770659b
CS fixes 4 years ago
Jordi Boggiano 90332f1dbd
Add a readonly mode to the cache, fixes #9150 4 years ago
Nils Adermann 392d0abd21 Rename test files and standardize on allow list rather than whitelist 4 years ago
Christian Ego 7c64300a1b using emptyDirectory instead of remove for clearing the cache 5 years ago
Jordi Boggiano 02ceb74151 Tweak --no-cache option to be available globally and to not break VCS drivers relying on it, refs #7880, refs #6650 5 years ago
Markus Staab 3b647f8686
prevent preg_replace() calls when cache is not enabled 6 years ago
Brandon Max 24b8fea48a Cache: clear cache using removeDirectory 7 years ago
Jordi Boggiano 122e422682 CS fixes 7 years ago
Jordi Boggiano fd6455218e Avoid warnings in case cache dir is explicitly directed to /dev/null, fixes #5468 8 years ago
Niels Keurentjes 254453f5b5 Wrap final attempt to touch a cache file in Silencer. 8 years ago
Jordi Boggiano 49d7d65933 Add verbosity input support to IOInterface 8 years ago
Niels Keurentjes 18cd4f966b Added silencer utility to more gracefully handle error suppression without hiding errors or worse. Fixes #4203, #4683 8 years ago
Jordi Boggiano fc0da27d84 Add more debug output when writing to cache 9 years ago
Jordi Boggiano 3c5f3e6dc7 Warn if cache isnt writable as well 9 years ago
Rob Bast 61dc752c78 Warn if cache directory cannot be created
closes #1161
9 years ago
Jordi Boggiano 812523f1ab Add more debug info on cache write failure, refs #4249 9 years ago
Jordi Boggiano b181822e90 Fix case where touch() fails due to incorrect ownership, fixes #4070 9 years ago
Josh Di Fabio 051b7bd44b Touch access time only when reading from cache 9 years ago
Rob Bast cb336a5416 Implement writeError throughout Composer 9 years ago
Jordi Boggiano 94926218e8 CS fixes 10 years ago
Jordi Boggiano be53c5dd2c Merge pull request #3207 from cs278/handle-low-diskspace
Handle low diskspace errors
10 years ago
Chris Smith 439095e446 Handle incomplete file write to cache 10 years ago
Jordi Boggiano 745dcbce33 Fix file deletions to always use a delayed retry on windows, fixes #3074 10 years ago
Jordi Boggiano ac497feaba CS fixes 10 years ago
Michael Kühn 5b7e39e919 fixed: dead symlink breaks gc 10 years ago
Guillaume LECERF 44fd75ef38 Fix Cache::gc() when COMPOSER_CACHE_DIR=/dev/null
If we set COMPOSER_CACHE_DIR=/dev/null, and the garbage collector
is triggered, we end up with the following error :

The "/dev/null/" directory does not exist.

This is because the Cache::gc() function does not check for Cache::enabled
and instanciates a Finder unconditionnaly.

Fix this by adding a check on Cache::enabled.
10 years ago
user a956ce9bb1 Use 'cache-files-ttl' for cache gc, fixes #2441
The configuration option 'cache-ttl' was used instead of 'cache-files-ttl' to determine
whether or not a cache gc should be performed.

* changed 'cache-ttl' to 'cache-files-ttl' to determine if a gc should be performed
* refactored FileDownloader to allow for easier testing
* added test to ensure that the gc is called with the proper config option
11 years ago
Jordi Boggiano 8d0b7f278e CS fixes 11 years ago
Jordi Boggiano 950fc7e66e Add debug output to cache class 11 years ago
Jordi Boggiano 514a3cde77 CS fixes 12 years ago
Galymzhan 219b489d01 add size-based limit for files cache, fixes #1321 12 years ago
Jordi Boggiano 07f7487c60 Clear cached files when they fail to extract or validate, refs #941 12 years ago
Jordi Boggiano 15475f0ef2 Rename cache dirs to consolidate them by purpose 12 years ago
Jordi Boggiano 5a9d986e67 Implement cache GC and fix keys 12 years ago