362 Commits (e103ee0249ca2b0e513a79280ab19cda87778c99)

Author SHA1 Message Date
John Stevenson db64534b26
Fixed bin proxies on PHP < 8 to support stream_seek (#10468) 2 years ago
Jordi Boggiano 24b62a1002
Add support for sourcing binaries despite the bin proxy being present, take 2 3 years ago
Jordi Boggiano 6dea58c9f3
Add support for sourcing binaries despite the bin proxy being present
Fixes https://github.com/composer/composer/issues/10389#issuecomment-1007372740
3 years ago
Jordi Boggiano 8473592eda
Revert "Fix support for .jar binaries, fixes #10426"
This reverts commit fa65804c99.
3 years ago
Jordi Boggiano fa65804c99
Fix support for .jar binaries, fixes #10426 3 years ago
John Stevenson 4829a401d8
Fix symlink resolution in shell proxy (#10412) 3 years ago
Jordi Boggiano 75e4d30151
Fix warnings when some code reuses the phpvfscomposer:// stream wrapper to try and access other files, refs #10387 3 years ago
Jordi Boggiano 2cd16b4578
Suppress errors if realpath fails or is missing 3 years ago
Jordi Boggiano 390260c6a6
Resolve binary realpath to make sure symlinking bin proxies works, refs jakzal/phpqa#336 3 years ago
Jordi Boggiano d1d5d75c5f
Fix detection of PHP files to match also broken ones with leading whitespace or whitespace between shebang and <?php, refs jakzal/phpqa#336 3 years ago
Jordi Boggiano 09d1330937
Fix is_file() not working on the phpvfscomposer:// file when filtering phpunit backtraces, refs #10387 3 years ago
Jordi Boggiano 164a769dc6
Avoid returning actual fstat information as it induces modern PHPs in error when the returned file size is bigger than the fstat size, refs #10387 3 years ago
Jordi Boggiano 2a731ef798
Add workaround for PHPUnit process isolation issues for PHPUnit <6.5 as well, fixes #10387 3 years ago
Jordi Boggiano 6f5baab77b
Make COMPOSER_BIN_DIR env or _composer_bin_dir global available to binaries, fixes #10389 (#10402) 3 years ago
Jordi Boggiano c1c6698799
Fix phpunit workaround syntax 3 years ago
Jordi Boggiano 7d1ca1f56d
Add workaround for PHPUnit process isolation combined with bin proxies, fixes #10387 3 years ago
Jordi Boggiano 24ce1eddbd
Add composer/pcre dependency and use it everywhere instead of preg_* 3 years ago
Helmut Hummel 483eac1c2f
Install full binaries on Windows by default (#10327)
A bug was introduced in #10137 that leads
to the situation that by default .bat binaries
are not installed on Windows any more.

Check the correct variable to install .bat
files on Windows by default again.
3 years ago
Jordi Boggiano 8a36c88cac
Get rid of $binPath global in bin proxies 3 years ago
Helmut Hummel f12a5b8214
Expose path to autoload in a global var for binaries (#10137)
Always create proxy files for package binaries,
to avoid not working binaries in case the package
was installed from a path repository and is itself linked

If the binary is a PHP script, a global variable is now exposed,
which holds the path to the vendor/autoload.php file.
This variable can the be used in the binaries to include this file
without guessing where the path to the vendor folder might be.

Additionally it is now checked on binary creation whether
the reference binary has a shebang and if not, generates
a much simple proxy code, because the stream wrapper code,
that is required for PHP <8 to omit the shebang from the output,
can be skipped.

Fixes: #10119

Co-authored-by: Jordi Boggiano <j.boggiano@seld.be>
3 years ago
Jordi Boggiano f509c41280
Upgrade PHPStan to 1.0 (#10253)
Co-authored-by: Martin Herndl <martin@herndl.org>
3 years ago
Jordi Boggiano bd4d624cc7
Read first from $_SERVER and $_ENV before using getenv (#10218) 3 years ago
Jordi Boggiano 28c34128ee
Fix php proxies to resolve __FILE__ and __DIR__ using realpath on PHP <8, fixes #10261 3 years ago
Jordi Boggiano 90087b4fb3
Fix handling of php bin proxies combined with declare() on php <8, fixes #10246 (#10249) 3 years ago
Jordi Boggiano 3f243d37c3
Add temporary metadata for download size tracking 3 years ago
Jordi Boggiano c65d09dff7
Fix @inheritDoc annotations 3 years ago
Jordi Boggiano df6c2ce1db
Simplify php bin proxies further 3 years ago
Jordi Boggiano e1dbd65aff
Fix bin proxies to use output buffering instead of the eval hack, as the __FILE__ and __DIR__ replacement is not safe when done in strings/nowdocs/.. 3 years ago
Paolo Rossi a921d9b233
Reaching phpstan level 6 in EventDispatcher Exception and Installer folders (#10192) 3 years ago
Jordi Boggiano d1c8a4d1b4
Lots of typing improvements 3 years ago
Jordi Boggiano 4bcd860b65
Add more type annotations 3 years ago
Jordi Boggiano 01d734125c
Add more type info 3 years ago
Andreas Schempp 0bed60e631 Correctly resolve promises when package type changes 3 years ago
Jordi Boggiano d3c176ec69
PHPStan Level 5 (#10070)
* Bump PHPStan to level 5

* Update seld/phar-utils to latest

* Add phpstan-setup / phpstan scripts
3 years ago
Jordi Boggiano bf3713072c
Fix source binaries not being made executable when symlinks cannot be used, fixes #9961 3 years ago
Sebastian Blank a9031e40eb
Add "symlink" option for "bin-compat" config (#9959) 3 years ago
Jordi Boggiano 4c9e75c6e5
Fix CS 3 years ago
Jordi Boggiano 6f255d1230
Merge branch '2.0' 3 years ago
Jordi Boggiano 8874ca0e5a
Fix regression introduced in dd54f295fe 3 years ago
Jordi Boggiano 991985792d
Merge branch '2.0' 3 years ago
Jordi Boggiano 8427b6c8ed
Also make sure filesystem is up to date before generating binary links, refs #9627 3 years ago
Jordi Boggiano 5bf614a762
Merge branch '2.0' 3 years ago
Jordi Boggiano dd54f295fe
Fix progress output, and remove progress bar on CI env, fixes #9621, closes #9880 3 years ago
Jordi Boggiano 3380178798
Introduce a cross-platform safe version of is_readable to support UNC / wsl$ paths on Windows (#9861) 3 years ago
Markus Staab bfea0f7d1e
BinaryInstaller: install full binaries on WSL when bin-compat=auto (#9855) 3 years ago
Jordi Boggiano bf73a20bc0
Merge branch '2.0' 3 years ago
Jordi Boggiano 3b89a9c3b4
Also attempt working around Vagrant filesystem issues when installing plugins initially, refs #9627 3 years ago
Brandon Kelly 7652408829
Only call sapi_windows_set_ctrl_handler() for CLI requests (#9771) 3 years ago
Jordi Boggiano b40b93bc7d
Merge branch '2.0' 3 years ago
Jordi Boggiano 414586ba05
Attempt working around Vagrant filesystem issues, added COMPOSER_RUNTIME_ENV env var (set to vagrant), fixes #9627 3 years ago