1
0
Fork 0
Commit Graph

392 Commits (978037fbfad71ff9da87f3baaa86e350a62af175)

Author SHA1 Message Date
Mathias Reker ⚡️ 4131f7cf4c
Static lambda (#10854)
Lambdas not (indirect) referencing $this must be declared static.
2022-06-22 14:19:18 +02:00
Jordi Boggiano 16ee2e479f
Merge branch '2.2' into 2.3 2022-06-22 09:16:23 +02:00
Chris Reed 03fbcdbf07
Fix exported path with space in binary installer proxy (#10836) 2022-06-10 21:56:11 +02:00
Jordi Boggiano cb76394800
Merge branch '2.2' into 2.3 2022-06-06 16:34:34 +02:00
Stephan Jorek fbc85dede8
allow chained proxy-binary php-inclusions (#10823)
* allow chained proxy-binary php-inclusion by skipping redundant “phpvfscomposer” stream-wrapper registration
2022-06-06 16:14:54 +02:00
Jordi Boggiano e3527ea37f
Detect broken symlinks when checking for a package's presence, fixes #6708 2022-06-06 15:22:49 +02:00
Nicolas Grekas a812853fe4 Inline PackageEvents constants 2022-05-02 11:51:40 +02:00
Jordi Boggiano fd2972247f
Add missing param types, fixes #10638 2022-03-18 14:45:59 +01:00
Jordi Boggiano e63e15aea8
Fix usage of react/promise resolve() to prepare for v3 2022-03-18 09:20:42 +01:00
Jordi Boggiano 6a466a120a
Enable strict types on all files 2022-02-24 13:24:34 +01:00
Jordi Boggiano 0db443ba5f
Add visibility to all consts, fixes #10550 2022-02-23 14:28:04 +01:00
Jordi Boggiano 7abc8da7d3
Add more types 2022-02-23 11:37:32 +01:00
Jordi Boggiano 6da38f83a0
Add parameter types to all the things 2022-02-22 16:48:53 +01:00
Alexander Schranz 1321bfca36
Add return types to closures (#9) 2022-02-21 13:37:49 +01:00
Jordi Boggiano 84f0f19112
Split Composer into PartialComposer & Composer classes to avoid nullable properties on Composer for non-fully-loaded instances, add types to Composer\Factory 2022-02-18 14:45:08 +01:00
Jordi Boggiano eda9014bef
Add return types to all code which is not being extended by open source packages 2022-02-18 14:32:38 +01:00
Jordi Boggiano a16ed3d0ed
Add return types to private/internal methods 2022-02-18 11:22:01 +01:00
Jordi Boggiano abdc6893a6
Add void types where no return statement is present 2022-02-18 10:38:54 +01:00
Jordi Boggiano ae68ada127
Merge branch '2.2' into main 2022-02-08 14:55:10 +01:00
Markus Staab eefb4644b0
InstallerInterface: describe `getInstallPath()` to return a absolute path (#10524) 2022-02-08 14:24:59 +01:00
Jordi Boggiano 3446091027
Merge branch '2.2' into main 2022-02-04 16:31:14 +01:00
Jordi Boggiano 7c2954d349
Minor BC Break! Rename COMPOSER_BIN_DIR available inside binaries to COMPOSER_RUNTIME_BIN_DIR (#10512)
This was available to non-PHP binaries as env var since Composer 2.2.2, and the rename is needed to fix a regression due to a name clash. 

Fixes #10504
2022-02-04 09:23:00 +01:00
Jordi Boggiano bab974575c
Merge branch '2.2' into main 2022-01-21 16:00:50 +01:00
David Buchmann 6b8f1409e4
report error if binary is a directory (#10463)
file_exists is true also for directory and symlink. but later in generateUnixyProxyCode we call `file_get_contents` on the binary, which fails with `file_get_contents(): read of 8192 bytes failed with errno=21 Is a directory` if the binary is a directory.
2022-01-21 14:52:39 +01:00
John Stevenson db64534b26
Fixed bin proxies on PHP < 8 to support stream_seek (#10468) 2022-01-21 10:09:58 +01:00
Jordi Boggiano 13bd2120e9
Merge branch '2.2' into main 2022-01-07 15:04:08 +01:00
Jordi Boggiano 24b62a1002
Add support for sourcing binaries despite the bin proxy being present, take 2 2022-01-07 15:04:02 +01:00
Jordi Boggiano e2ba625a93
Merge branch '2.2' into main 2022-01-07 14:29:59 +01:00
Jordi Boggiano 6dea58c9f3
Add support for sourcing binaries despite the bin proxy being present
Fixes https://github.com/composer/composer/issues/10389#issuecomment-1007372740
2022-01-07 14:28:53 +01:00
Jordi Boggiano 99fa6116f9
Merge branch '2.2' into main 2022-01-04 16:31:36 +01:00
Jordi Boggiano 8473592eda
Revert "Fix support for .jar binaries, fixes #10426"
This reverts commit fa65804c99.
2022-01-04 16:19:29 +01:00
Jordi Boggiano 0be1e5a279
Merge branch '2.2' into main 2022-01-04 14:58:07 +01:00
Jordi Boggiano fa65804c99
Fix support for .jar binaries, fixes #10426 2022-01-04 14:55:56 +01:00
Jordi Boggiano 4e6d54b731
Fix all 5.3 $this-in-closure usages 2022-01-03 16:32:39 +01:00
Jordi Boggiano 095c36ecf8
Fix some PHPStan errors/.. 2022-01-01 14:54:20 +01:00
John Stevenson 4829a401d8
Fix symlink resolution in shell proxy (#10412) 2021-12-31 21:56:46 +01:00
Jordi Boggiano 75e4d30151
Fix warnings when some code reuses the phpvfscomposer:// stream wrapper to try and access other files, refs #10387 2021-12-31 10:33:54 +01:00
Jordi Boggiano 2cd16b4578
Suppress errors if realpath fails or is missing 2021-12-30 21:52:57 +01:00
Jordi Boggiano 390260c6a6
Resolve binary realpath to make sure symlinking bin proxies works, refs jakzal/phpqa#336 2021-12-30 21:49:20 +01:00
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 2021-12-30 21:23:29 +01:00
Jordi Boggiano 09d1330937
Fix is_file() not working on the phpvfscomposer:// file when filtering phpunit backtraces, refs #10387 2021-12-30 20:49:44 +01:00
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 2021-12-30 20:40:55 +01:00
Jordi Boggiano 2a731ef798
Add workaround for PHPUnit process isolation issues for PHPUnit <6.5 as well, fixes #10387 2021-12-30 10:42:35 +01:00
Jordi Boggiano 6f5baab77b
Make COMPOSER_BIN_DIR env or _composer_bin_dir global available to binaries, fixes #10389 (#10402) 2021-12-28 21:31:52 +01:00
Jordi Boggiano c1c6698799
Fix phpunit workaround syntax 2021-12-23 13:57:18 +01:00
Jordi Boggiano 7d1ca1f56d
Add workaround for PHPUnit process isolation combined with bin proxies, fixes #10387 2021-12-23 12:38:35 +01:00
Jordi Boggiano 24ce1eddbd
Add composer/pcre dependency and use it everywhere instead of preg_* 2021-12-07 12:37:19 +01:00
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.
2021-12-03 11:16:58 +01:00
Jordi Boggiano 8a36c88cac
Get rid of $binPath global in bin proxies 2021-11-29 09:39:13 +01:00
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>
2021-11-25 09:53:03 +01:00