Nicolas Grekas
a812853fe4
Inline PackageEvents constants
2 years ago
Jordi Boggiano
fd2972247f
Add missing param types, fixes #10638
2 years ago
Jordi Boggiano
e63e15aea8
Fix usage of react/promise resolve() to prepare for v3
2 years ago
Jordi Boggiano
6a466a120a
Enable strict types on all files
2 years ago
Jordi Boggiano
0db443ba5f
Add visibility to all consts, fixes #10550
2 years ago
Jordi Boggiano
7abc8da7d3
Add more types
2 years ago
Jordi Boggiano
6da38f83a0
Add parameter types to all the things
2 years ago
Alexander Schranz
1321bfca36
Add return types to closures ( #9 )
2 years ago
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
2 years ago
Jordi Boggiano
eda9014bef
Add return types to all code which is not being extended by open source packages
2 years ago
Jordi Boggiano
a16ed3d0ed
Add return types to private/internal methods
2 years ago
Jordi Boggiano
abdc6893a6
Add void types where no return statement is present
2 years ago
Jordi Boggiano
ae68ada127
Merge branch '2.2' into main
2 years ago
Markus Staab
eefb4644b0
InstallerInterface: describe `getInstallPath()` to return a absolute path ( #10524 )
2 years ago
Jordi Boggiano
3446091027
Merge branch '2.2' into main
2 years ago
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
2 years ago
Jordi Boggiano
bab974575c
Merge branch '2.2' into main
2 years ago
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.
2 years ago
John Stevenson
db64534b26
Fixed bin proxies on PHP < 8 to support stream_seek ( #10468 )
2 years ago
Jordi Boggiano
13bd2120e9
Merge branch '2.2' into main
2 years ago
Jordi Boggiano
24b62a1002
Add support for sourcing binaries despite the bin proxy being present, take 2
2 years ago
Jordi Boggiano
e2ba625a93
Merge branch '2.2' into main
2 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
2 years ago
Jordi Boggiano
99fa6116f9
Merge branch '2.2' into main
2 years ago
Jordi Boggiano
8473592eda
Revert "Fix support for .jar binaries, fixes #10426"
...
This reverts commit fa65804c99
.
2 years ago
Jordi Boggiano
0be1e5a279
Merge branch '2.2' into main
2 years ago
Jordi Boggiano
fa65804c99
Fix support for .jar binaries, fixes #10426
2 years ago
Jordi Boggiano
4e6d54b731
Fix all 5.3 $this-in-closure usages
2 years ago
Jordi Boggiano
095c36ecf8
Fix some PHPStan errors/..
2 years ago
John Stevenson
4829a401d8
Fix symlink resolution in shell proxy ( #10412 )
2 years ago
Jordi Boggiano
75e4d30151
Fix warnings when some code reuses the phpvfscomposer:// stream wrapper to try and access other files, refs #10387
2 years ago
Jordi Boggiano
2cd16b4578
Suppress errors if realpath fails or is missing
2 years ago
Jordi Boggiano
390260c6a6
Resolve binary realpath to make sure symlinking bin proxies works, refs jakzal/phpqa#336
2 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
2 years ago
Jordi Boggiano
09d1330937
Fix is_file() not working on the phpvfscomposer:// file when filtering phpunit backtraces, refs #10387
2 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
2 years ago
Jordi Boggiano
2a731ef798
Add workaround for PHPUnit process isolation issues for PHPUnit <6.5 as well, fixes #10387
2 years ago
Jordi Boggiano
6f5baab77b
Make COMPOSER_BIN_DIR env or _composer_bin_dir global available to binaries, fixes #10389 ( #10402 )
2 years ago
Jordi Boggiano
c1c6698799
Fix phpunit workaround syntax
2 years ago
Jordi Boggiano
7d1ca1f56d
Add workaround for PHPUnit process isolation combined with bin proxies, fixes #10387
2 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