mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-12 23:14:18 +01:00
Merge remote-tracking branch 'origin/support/3.0' into develop
# Conflicts: # composer.json # composer.lock # core/email.class.inc.php # lib/composer/autoload_classmap.php # lib/composer/autoload_files.php # lib/composer/autoload_psr4.php # lib/composer/autoload_static.php # lib/composer/installed.json # lib/composer/installed.php # lib/swiftmailer/swiftmailer/.gitattributes # lib/swiftmailer/swiftmailer/.gitignore # lib/swiftmailer/swiftmailer/.php_cs.dist # lib/swiftmailer/swiftmailer/CHANGES # lib/swiftmailer/swiftmailer/LICENSE # lib/swiftmailer/swiftmailer/composer.json # lib/swiftmailer/swiftmailer/lib/classes/Swift.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Attachment.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/AbstractFilterableInputStream.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/ArrayByteStream.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/FileByteStream.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/TemporaryFileByteStream.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReader/GenericFixedWidthReader.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReader/UsAsciiReader.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReader/Utf8Reader.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/CharacterReaderFactory/SimpleCharacterReaderFactory.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/CharacterStream.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/CharacterStream/ArrayCharacterStream.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/CharacterStream/NgCharacterStream.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/ConfigurableSpool.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/DependencyContainer.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/EmbeddedFile.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Encoder/Base64Encoder.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Encoder/QpEncoder.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Encoder/Rfc2231Encoder.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Events/CommandEvent.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Events/CommandListener.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Events/EventDispatcher.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Events/EventObject.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Events/ResponseEvent.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Events/ResponseListener.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Events/SendEvent.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Events/SendListener.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Events/SimpleEventDispatcher.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Events/TransportChangeListener.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Events/TransportExceptionEvent.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Events/TransportExceptionListener.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/FailoverTransport.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/FileSpool.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Filterable.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Image.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/InputByteStream.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/IoException.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache/ArrayKeyCache.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache/DiskKeyCache.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache/KeyCacheInputStream.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache/NullKeyCache.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/KeyCache/SimpleKeyCacheInputStream.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/LoadBalancedTransport.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Mailer.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Mailer/ArrayRecipientIterator.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/MemorySpool.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Message.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Attachment.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/Base64ContentEncoder.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/NativeQpContentEncoder.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/PlainContentEncoder.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/QpContentEncoder.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/QpContentEncoderProxy.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Mime/ContentEncoder/RawContentEncoder.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Mime/EmbeddedFile.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Mime/EncodingObserver.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Header.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Mime/HeaderEncoder/Base64HeaderEncoder.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Mime/HeaderEncoder/QpHeaderEncoder.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/AbstractHeader.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/DateHeader.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/IdentificationHeader.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/OpenDKIMHeader.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/ParameterizedHeader.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/PathHeader.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/UnstructuredHeader.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Mime/MimePart.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleHeaderFactory.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleHeaderSet.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleMessage.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleMimeEntity.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/MimePart.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/NullTransport.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/AntiFloodPlugin.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/BandwidthMonitorPlugin.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/DecoratorPlugin.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/ImpersonatePlugin.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/LoggerPlugin.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Loggers/ArrayLogger.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Loggers/EchoLogger.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/MessageLogger.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/PopBeforeSmtpPlugin.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/RedirectingPlugin.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Reporter.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/ReporterPlugin.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Reporters/HitReporter.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Reporters/HtmlReporter.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/ThrottlerPlugin.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Preferences.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/SendmailTransport.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Signer.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Signers/BodySigner.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Signers/DKIMSigner.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Signers/DomainKeySigner.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Signers/HeaderSigner.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Signers/OpenDKIMSigner.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Signers/SMimeSigner.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/SmtpTransport.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Spool.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/SpoolTransport.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/StreamFilters/ByteArrayReplacementFilter.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/StreamFilters/StringReplacementFilter.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/StreamFilters/StringReplacementFilterFactory.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/SwiftException.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Transport.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Transport/AbstractSmtpTransport.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/CramMd5Authenticator.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/LoginAuthenticator.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/NTLMAuthenticator.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/PlainAuthenticator.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/XOAuth2Authenticator.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/AuthHandler.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Authenticator.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpHandler.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Transport/FailoverTransport.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Transport/IoBuffer.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Transport/LoadBalancedTransport.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Transport/NullTransport.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Transport/SendmailTransport.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Transport/SmtpAgent.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Transport/SpoolTransport.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/Transport/StreamBuffer.php # lib/swiftmailer/swiftmailer/lib/classes/Swift/TransportException.php # lib/swiftmailer/swiftmailer/lib/dependency_maps/cache_deps.php # lib/swiftmailer/swiftmailer/lib/dependency_maps/mime_deps.php # lib/swiftmailer/swiftmailer/lib/dependency_maps/transport_deps.php # lib/swiftmailer/swiftmailer/lib/mime_types.php # lib/swiftmailer/swiftmailer/lib/preferences.php # lib/swiftmailer/swiftmailer/lib/swift_required.php # lib/swiftmailer/swiftmailer/lib/swiftmailer_generate_mimes_config.php
This commit is contained in:
117
lib/bin/generate-deps-for-config-factory
Normal file
117
lib/bin/generate-deps-for-config-factory
Normal file
@@ -0,0 +1,117 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Proxy PHP file generated by Composer
|
||||
*
|
||||
* This file includes the referenced bin path (../laminas/laminas-servicemanager/bin/generate-deps-for-config-factory)
|
||||
* using a stream wrapper to prevent the shebang from being output on PHP<8
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
|
||||
namespace Composer;
|
||||
|
||||
$GLOBALS['_composer_bin_dir'] = __DIR__;
|
||||
$GLOBALS['_composer_autoload_path'] = __DIR__ . '/..'.'/autoload.php';
|
||||
|
||||
if (PHP_VERSION_ID < 80000) {
|
||||
if (!class_exists('Composer\BinProxyWrapper')) {
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
final class BinProxyWrapper
|
||||
{
|
||||
private $handle;
|
||||
private $position;
|
||||
private $realpath;
|
||||
|
||||
public function stream_open($path, $mode, $options, &$opened_path)
|
||||
{
|
||||
// get rid of phpvfscomposer:// prefix for __FILE__ & __DIR__ resolution
|
||||
$opened_path = substr($path, 17);
|
||||
$this->realpath = realpath($opened_path) ?: $opened_path;
|
||||
$opened_path = $this->realpath;
|
||||
$this->handle = fopen($this->realpath, $mode);
|
||||
$this->position = 0;
|
||||
|
||||
return (bool) $this->handle;
|
||||
}
|
||||
|
||||
public function stream_read($count)
|
||||
{
|
||||
$data = fread($this->handle, $count);
|
||||
|
||||
if ($this->position === 0) {
|
||||
$data = preg_replace('{^#!.*\r?\n}', '', $data);
|
||||
}
|
||||
|
||||
$this->position += strlen($data);
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function stream_cast($castAs)
|
||||
{
|
||||
return $this->handle;
|
||||
}
|
||||
|
||||
public function stream_close()
|
||||
{
|
||||
fclose($this->handle);
|
||||
}
|
||||
|
||||
public function stream_lock($operation)
|
||||
{
|
||||
return $operation ? flock($this->handle, $operation) : true;
|
||||
}
|
||||
|
||||
public function stream_seek($offset, $whence)
|
||||
{
|
||||
if (0 === fseek($this->handle, $offset, $whence)) {
|
||||
$this->position = ftell($this->handle);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function stream_tell()
|
||||
{
|
||||
return $this->position;
|
||||
}
|
||||
|
||||
public function stream_eof()
|
||||
{
|
||||
return feof($this->handle);
|
||||
}
|
||||
|
||||
public function stream_stat()
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
public function stream_set_option($option, $arg1, $arg2)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function url_stat($path, $flags)
|
||||
{
|
||||
$path = substr($path, 17);
|
||||
if (file_exists($path)) {
|
||||
return stat($path);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) {
|
||||
include("phpvfscomposer://" . __DIR__ . '/..'.'/laminas/laminas-servicemanager/bin/generate-deps-for-config-factory');
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
include __DIR__ . '/..'.'/laminas/laminas-servicemanager/bin/generate-deps-for-config-factory';
|
||||
5
lib/bin/generate-deps-for-config-factory.bat
Normal file
5
lib/bin/generate-deps-for-config-factory.bat
Normal file
@@ -0,0 +1,5 @@
|
||||
@ECHO OFF
|
||||
setlocal DISABLEDELAYEDEXPANSION
|
||||
SET BIN_TARGET=%~dp0/generate-deps-for-config-factory
|
||||
SET COMPOSER_RUNTIME_BIN_DIR=%~dp0
|
||||
php "%BIN_TARGET%" %*
|
||||
117
lib/bin/generate-factory-for-class
Normal file
117
lib/bin/generate-factory-for-class
Normal file
@@ -0,0 +1,117 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Proxy PHP file generated by Composer
|
||||
*
|
||||
* This file includes the referenced bin path (../laminas/laminas-servicemanager/bin/generate-factory-for-class)
|
||||
* using a stream wrapper to prevent the shebang from being output on PHP<8
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
|
||||
namespace Composer;
|
||||
|
||||
$GLOBALS['_composer_bin_dir'] = __DIR__;
|
||||
$GLOBALS['_composer_autoload_path'] = __DIR__ . '/..'.'/autoload.php';
|
||||
|
||||
if (PHP_VERSION_ID < 80000) {
|
||||
if (!class_exists('Composer\BinProxyWrapper')) {
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
final class BinProxyWrapper
|
||||
{
|
||||
private $handle;
|
||||
private $position;
|
||||
private $realpath;
|
||||
|
||||
public function stream_open($path, $mode, $options, &$opened_path)
|
||||
{
|
||||
// get rid of phpvfscomposer:// prefix for __FILE__ & __DIR__ resolution
|
||||
$opened_path = substr($path, 17);
|
||||
$this->realpath = realpath($opened_path) ?: $opened_path;
|
||||
$opened_path = $this->realpath;
|
||||
$this->handle = fopen($this->realpath, $mode);
|
||||
$this->position = 0;
|
||||
|
||||
return (bool) $this->handle;
|
||||
}
|
||||
|
||||
public function stream_read($count)
|
||||
{
|
||||
$data = fread($this->handle, $count);
|
||||
|
||||
if ($this->position === 0) {
|
||||
$data = preg_replace('{^#!.*\r?\n}', '', $data);
|
||||
}
|
||||
|
||||
$this->position += strlen($data);
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function stream_cast($castAs)
|
||||
{
|
||||
return $this->handle;
|
||||
}
|
||||
|
||||
public function stream_close()
|
||||
{
|
||||
fclose($this->handle);
|
||||
}
|
||||
|
||||
public function stream_lock($operation)
|
||||
{
|
||||
return $operation ? flock($this->handle, $operation) : true;
|
||||
}
|
||||
|
||||
public function stream_seek($offset, $whence)
|
||||
{
|
||||
if (0 === fseek($this->handle, $offset, $whence)) {
|
||||
$this->position = ftell($this->handle);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function stream_tell()
|
||||
{
|
||||
return $this->position;
|
||||
}
|
||||
|
||||
public function stream_eof()
|
||||
{
|
||||
return feof($this->handle);
|
||||
}
|
||||
|
||||
public function stream_stat()
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
public function stream_set_option($option, $arg1, $arg2)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function url_stat($path, $flags)
|
||||
{
|
||||
$path = substr($path, 17);
|
||||
if (file_exists($path)) {
|
||||
return stat($path);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) {
|
||||
include("phpvfscomposer://" . __DIR__ . '/..'.'/laminas/laminas-servicemanager/bin/generate-factory-for-class');
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
include __DIR__ . '/..'.'/laminas/laminas-servicemanager/bin/generate-factory-for-class';
|
||||
5
lib/bin/generate-factory-for-class.bat
Normal file
5
lib/bin/generate-factory-for-class.bat
Normal file
@@ -0,0 +1,5 @@
|
||||
@ECHO OFF
|
||||
setlocal DISABLEDELAYEDEXPANSION
|
||||
SET BIN_TARGET=%~dp0/generate-factory-for-class
|
||||
SET COMPOSER_RUNTIME_BIN_DIR=%~dp0
|
||||
php "%BIN_TARGET%" %*
|
||||
@@ -4,21 +4,114 @@
|
||||
/**
|
||||
* Proxy PHP file generated by Composer
|
||||
*
|
||||
* This file includes the referenced bin path (../nikic/php-parser/bin/php-parse) using eval to remove the shebang if present
|
||||
* This file includes the referenced bin path (../nikic/php-parser/bin/php-parse)
|
||||
* using a stream wrapper to prevent the shebang from being output on PHP<8
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
|
||||
$binPath = realpath(__DIR__ . "/" . '../nikic/php-parser/bin/php-parse');
|
||||
$contents = file_get_contents($binPath);
|
||||
$contents = preg_replace('{^#!/.+\r?\n<\?(php)?}', '', $contents, 1, $replaced);
|
||||
if ($replaced) {
|
||||
$contents = strtr($contents, array(
|
||||
'__FILE__' => var_export($binPath, true),
|
||||
'__DIR__' => var_export(dirname($binPath), true),
|
||||
));
|
||||
namespace Composer;
|
||||
|
||||
eval($contents);
|
||||
exit(0);
|
||||
$GLOBALS['_composer_bin_dir'] = __DIR__;
|
||||
$GLOBALS['_composer_autoload_path'] = __DIR__ . '/..'.'/autoload.php';
|
||||
|
||||
if (PHP_VERSION_ID < 80000) {
|
||||
if (!class_exists('Composer\BinProxyWrapper')) {
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
final class BinProxyWrapper
|
||||
{
|
||||
private $handle;
|
||||
private $position;
|
||||
private $realpath;
|
||||
|
||||
public function stream_open($path, $mode, $options, &$opened_path)
|
||||
{
|
||||
// get rid of phpvfscomposer:// prefix for __FILE__ & __DIR__ resolution
|
||||
$opened_path = substr($path, 17);
|
||||
$this->realpath = realpath($opened_path) ?: $opened_path;
|
||||
$opened_path = $this->realpath;
|
||||
$this->handle = fopen($this->realpath, $mode);
|
||||
$this->position = 0;
|
||||
|
||||
return (bool) $this->handle;
|
||||
}
|
||||
|
||||
public function stream_read($count)
|
||||
{
|
||||
$data = fread($this->handle, $count);
|
||||
|
||||
if ($this->position === 0) {
|
||||
$data = preg_replace('{^#!.*\r?\n}', '', $data);
|
||||
}
|
||||
|
||||
$this->position += strlen($data);
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function stream_cast($castAs)
|
||||
{
|
||||
return $this->handle;
|
||||
}
|
||||
|
||||
public function stream_close()
|
||||
{
|
||||
fclose($this->handle);
|
||||
}
|
||||
|
||||
public function stream_lock($operation)
|
||||
{
|
||||
return $operation ? flock($this->handle, $operation) : true;
|
||||
}
|
||||
|
||||
public function stream_seek($offset, $whence)
|
||||
{
|
||||
if (0 === fseek($this->handle, $offset, $whence)) {
|
||||
$this->position = ftell($this->handle);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function stream_tell()
|
||||
{
|
||||
return $this->position;
|
||||
}
|
||||
|
||||
public function stream_eof()
|
||||
{
|
||||
return feof($this->handle);
|
||||
}
|
||||
|
||||
public function stream_stat()
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
public function stream_set_option($option, $arg1, $arg2)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function url_stat($path, $flags)
|
||||
{
|
||||
$path = substr($path, 17);
|
||||
if (file_exists($path)) {
|
||||
return stat($path);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) {
|
||||
include("phpvfscomposer://" . __DIR__ . '/..'.'/nikic/php-parser/bin/php-parse');
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
include $binPath;
|
||||
|
||||
include __DIR__ . '/..'.'/nikic/php-parser/bin/php-parse';
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
@ECHO OFF
|
||||
setlocal DISABLEDELAYEDEXPANSION
|
||||
SET BIN_TARGET=%~dp0/../nikic/php-parser/bin/php-parse
|
||||
SET BIN_TARGET=%~dp0/php-parse
|
||||
SET COMPOSER_RUNTIME_BIN_DIR=%~dp0
|
||||
php "%BIN_TARGET%" %*
|
||||
|
||||
125
lib/bin/pscss
125
lib/bin/pscss
@@ -1,14 +1,117 @@
|
||||
#!/usr/bin/env sh
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
dir=$(cd "${0%[/\\]*}" > /dev/null; cd "../scssphp/scssphp/bin" && pwd)
|
||||
/**
|
||||
* Proxy PHP file generated by Composer
|
||||
*
|
||||
* This file includes the referenced bin path (../scssphp/scssphp/bin/pscss)
|
||||
* using a stream wrapper to prevent the shebang from being output on PHP<8
|
||||
*
|
||||
* @generated
|
||||
*/
|
||||
|
||||
if [ -d /proc/cygdrive ]; then
|
||||
case $(which php) in
|
||||
$(readlink -n /proc/cygdrive)/*)
|
||||
# We are in Cygwin using Windows php, so the path must be translated
|
||||
dir=$(cygpath -m "$dir");
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
namespace Composer;
|
||||
|
||||
"${dir}/pscss" "$@"
|
||||
$GLOBALS['_composer_bin_dir'] = __DIR__;
|
||||
$GLOBALS['_composer_autoload_path'] = __DIR__ . '/..'.'/autoload.php';
|
||||
|
||||
if (PHP_VERSION_ID < 80000) {
|
||||
if (!class_exists('Composer\BinProxyWrapper')) {
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
final class BinProxyWrapper
|
||||
{
|
||||
private $handle;
|
||||
private $position;
|
||||
private $realpath;
|
||||
|
||||
public function stream_open($path, $mode, $options, &$opened_path)
|
||||
{
|
||||
// get rid of phpvfscomposer:// prefix for __FILE__ & __DIR__ resolution
|
||||
$opened_path = substr($path, 17);
|
||||
$this->realpath = realpath($opened_path) ?: $opened_path;
|
||||
$opened_path = $this->realpath;
|
||||
$this->handle = fopen($this->realpath, $mode);
|
||||
$this->position = 0;
|
||||
|
||||
return (bool) $this->handle;
|
||||
}
|
||||
|
||||
public function stream_read($count)
|
||||
{
|
||||
$data = fread($this->handle, $count);
|
||||
|
||||
if ($this->position === 0) {
|
||||
$data = preg_replace('{^#!.*\r?\n}', '', $data);
|
||||
}
|
||||
|
||||
$this->position += strlen($data);
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function stream_cast($castAs)
|
||||
{
|
||||
return $this->handle;
|
||||
}
|
||||
|
||||
public function stream_close()
|
||||
{
|
||||
fclose($this->handle);
|
||||
}
|
||||
|
||||
public function stream_lock($operation)
|
||||
{
|
||||
return $operation ? flock($this->handle, $operation) : true;
|
||||
}
|
||||
|
||||
public function stream_seek($offset, $whence)
|
||||
{
|
||||
if (0 === fseek($this->handle, $offset, $whence)) {
|
||||
$this->position = ftell($this->handle);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function stream_tell()
|
||||
{
|
||||
return $this->position;
|
||||
}
|
||||
|
||||
public function stream_eof()
|
||||
{
|
||||
return feof($this->handle);
|
||||
}
|
||||
|
||||
public function stream_stat()
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
public function stream_set_option($option, $arg1, $arg2)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function url_stat($path, $flags)
|
||||
{
|
||||
$path = substr($path, 17);
|
||||
if (file_exists($path)) {
|
||||
return stat($path);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) {
|
||||
include("phpvfscomposer://" . __DIR__ . '/..'.'/scssphp/scssphp/bin/pscss');
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
include __DIR__ . '/..'.'/scssphp/scssphp/bin/pscss';
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
@ECHO OFF
|
||||
setlocal DISABLEDELAYEDEXPANSION
|
||||
SET BIN_TARGET=%~dp0/../scssphp/scssphp/bin/pscss
|
||||
SET BIN_TARGET=%~dp0/pscss
|
||||
SET COMPOSER_RUNTIME_BIN_DIR=%~dp0
|
||||
php "%BIN_TARGET%" %*
|
||||
|
||||
Reference in New Issue
Block a user