Commit 56116f3f by lmf

产品详情页面完成布局

parent 816e0903
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
</body>
</html>
\ No newline at end of file
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<attribute name="class" value="breeze-theme"/>
<move element="skip_to_content" destination="header.panel" before="-"/>
<referenceBlock name="cookie-status-check" remove="true"/>
<referenceBlock name="report.bugs" remove="true"/>
<referenceBlock name="sale.reorder.sidebar" remove="true"/>
<referenceBlock name="main_css_preloader" remove="true"/>
<referenceBlock name="critical_css_block" remove="true"/>
<referenceBlock name="css_rel_preload_script" remove="true"/>
<!-- Set default logo dimensions. 2.4.3 fixes config values: https://github.com/magento/magento2/commit/e1aaf74d2eebfb54a152d857dcd2934a3eb79bf8 -->
<referenceBlock name="logo">
<arguments>
<argument name="logo_img_width" xsi:type="number">155</argument>
<argument name="logo_img_height" xsi:type="number">28</argument>
<argument name="logo_width" xsi:type="number">155</argument>
<argument name="logo_height" xsi:type="number">28</argument>
</arguments>
</referenceBlock>
<!-- CMS block inside header panel -->
<referenceContainer name="header.panel">
<block class="Magento\Cms\Block\Block" name="header_panel_info" after="skip_to_content">
<arguments>
<argument name="block_id" xsi:type="string">header_panel_info</argument>
</arguments>
</block>
</referenceContainer>
<!-- Cleanup and move top links to header account dropdown -->
<referenceBlock name="header" remove="true"/> <!-- Welcome message -->
<referenceBlock name="catalog.compare.link" remove="true"/>
<move element="top.links" destination="header.account"/>
<move element="wishlist_sidebar" destination="header.wishlist"/>
<referenceContainer name="header-wrapper">
<block class="Swissup\Breeze\Block\Theme\Dropdown" name="header.account">
<arguments>
<argument name="title" xsi:type="string" translate="true">My Account</argument>
<argument name="sr_only" xsi:type="boolean">true</argument>
<argument name="href" xsi:type="url" path="customer/account"/>
<argument name="css_class" xsi:type="string">no-chevron account-dropdown</argument>
</arguments>
</block>
<block class="Swissup\Breeze\Block\Theme\Dropdown" name="header.wishlist">
<arguments>
<argument name="title" xsi:type="string" translate="true">Wishlist</argument>
<argument name="sr_only" xsi:type="boolean">true</argument>
<argument name="href" xsi:type="url" path="wishlist"/>
<argument name="css_class" xsi:type="string">no-chevron wishlist-dropdown dropdown-lg</argument>
<argument name="is_dialog" xsi:type="boolean">true</argument>
</arguments>
</block>
</referenceContainer>
<move element="minicart" destination="header-wrapper" after="header.wishlist"/>
<!-- Navigation -->
<referenceBlock name="navigation.sections" remove="true"/>
<referenceContainer name="page.top">
<container name="navigation.wrapper" before="-" htmlTag="div" htmlClass="navigation-wrapper">
<block class="Magento\Framework\View\Element\Text" name="navigation.close">
<arguments>
<argument name="text" xsi:type="string"><![CDATA[<span data-action="toggle-nav" class="button-close" tabindex="0"></span>]]></argument>
</arguments>
</block>
</container>
</referenceContainer>
<move element="store.menu" destination="navigation.wrapper"/>
<!-- <move element="navigation.wrapper" destination="header-wrapper" after="logo"/> -->
<!-- Before Footer -->
<referenceContainer name="page.bottom.container">
<container name="before-footer.top-wrapper" htmlTag="div">
<container name="before-footer.top" htmlTag="div" htmlClass="container"/>
</container>
<container name="before-footer.middle-wrapper" htmlTag="div">
<container name="before-footer.middle" htmlTag="div" htmlClass="container"/>
</container>
<container name="before-footer.bottom-wrapper" htmlTag="div">
<container name="before-footer.bottom" htmlTag="div" htmlClass="container"/>
</container>
</referenceContainer>
<!-- Footer -->
<referenceContainer name="footer-container">
<container name="footer-top" htmlTag="div" htmlClass="footer-top"/>
<container name="footer-middle" htmlTag="div" htmlClass="footer-middle"/>
<container name="footer-bottom" htmlTag="div" htmlClass="footer-bottom"/>
<referenceBlock name="copyright" remove="true"/>
</referenceContainer>
<referenceContainer name="before.body.end">
<block class="Magento\Theme\Block\Html\Footer" name="footer" template="Magento_Theme::html/footer.phtml" />
</referenceContainer>
<move element="footer" destination="footer-middle"/>
</body>
</page>
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
<meta name="format-detection" content="telephone=no"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<css src="css/footer.css" rel="stylesheet" type="text/css" />
</head>
<body>
<referenceBlock name="breeze.css">
<arguments>
<argument name="bundles" xsi:type="array">
<item name="default" xsi:type="array">
<item name="deferred" xsi:type="boolean">true</item>
</item>
</argument>
</arguments>
</referenceBlock>
<referenceBlock name="breeze.js">
<arguments>
<argument name="bundles" xsi:type="array">
<item name="default" xsi:type="array">
<item name="items" xsi:type="array">
<item name="theme-breeze-blank" xsi:type="string">js/breeze/theme-blank</item>
<item name="theme-breeze-extend" xsi:type="string">js/breeze/extend</item>
<item name="theme-breeze-custom" xsi:type="string">js/breeze/custom</item>
</item>
</item>
</argument>
</arguments>
</referenceBlock>
</body>
</page>
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
?>
<div class="footer-container">
<div class="site-footer">
<div class="footer-related">
<div class="footer-article w1100">
<dl class="contact clearfix">
<dt class="fl"></dt>
<dd class="fl" style="margin-top: 10%;margin-left: revert;">
<img src="http://joshine.me/media/logo/stores/1/joshine_logo_500.png" width="100px;">
</dd>
</dl>
<dl class="col-article">
<dt>电商产品</dt>
<dd><a href="#">云小店</a></dd>
<dd><a href="#">品牌商城</a></dd>
<dd><a href="#">商户商城</a></dd>
<dd><a href="#">批发商城</a></dd>
<dd><a href="#">招商加盟商城</a></dd>
<dd><a href="#">同城电商平台</a></dd>
</dl>
<dl class="col-article">
<dt>行业方案</dt><dd><a href="#">新零售</a></dd><dd><a href="#">O2O</a></dd><dd><a href="#">实体商超</a></dd><dd><a href="#">多供应商</a></dd><dd><a href="#">百货商场</a></dd><dd><a href="#">农村电商</a></dd>
</dl>
<dl class="col-article"><dt>帮助中心</dt><dd><a href="#">新手运营手册</a></dd><dd><a href="#">视频教程</a></dd><dd><a href="#">云商城</a></dd><dd><a href="#">云物流</a></dd><dd><a href="#">更新日志</a></dd><dd><a href="#">商学院</a></dd>
</dl>
<dl class="col-article">
<dt>关于我们</dt><dd><a href="#">公司简介</a></dd><dd><a href="#">服务市场</a></dd><dd><a href="#">客户案例</a></dd><dd><a href="#">代理合作</a></dd><dd><a href="#">投诉建议</a></dd><dd><a href="#">站点地图</a></dd>
</dl>
<dl class="wx">
</dl></div>
<div class="footer-links w1100"><div class="clearfix"><a href="#">站点列表</a><a href="#">云商城</a><a href="#">云产品库</a><a href="#">收银狗</a><a href="#">神码收银</a><a href="#">云物流</a><a href="#">云ERP</a><a href="#">生鲜电商</a><a href="#">农村电商</a><a href="#">母婴电商</a><a href="#">电商学院</a><a href="#">shop</a><a href="#">云电脑</a><a href="#">106短信平台</a><a href="#">网站收录</a><a href="#">分类目录</a><!-- 友情链接循环结束 --></div></div>
<div class="footer-info w1100"><div class="info-text w1100"><p class="copyright" style=" margin-right: 20px;font-size: 12px;color: #a8aaba;"><?= $block->escapeHtml($block->getCopyright()) ?></p></div></div></div></div>
</div>
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
/**
* @var \Magento\Theme\Block\Html\Header\Logo $block
*/
$storeName = $block->getThemeName() ? $block->getThemeName() : $block->getLogoAlt();
/**
* @var \Magento\Theme\ViewModel\Block\Html\Header\LogoSizeResolverInterface|null $logoSizeResolver
*/
$logoSizeResolver = $block->getLogoSizeResolver();
$logoWidth = $logoSizeResolver !== null && $logoSizeResolver->getWidth()
? $logoSizeResolver->getWidth()
: $block->getLogoWidth();
$logoHeight = $logoSizeResolver !== null && $logoSizeResolver->getHeight()
? $logoSizeResolver->getHeight()
: $block->getLogoHeight();
?>
<span data-action="toggle-nav" class="action nav-toggle"><span><?= $block->escapeHtml(__('Toggle Nav')) ?></span></span>
<a
class="logo"
href="<?= $block->escapeUrl($block->getUrl('')) ?>"
title="<?= $block->escapeHtmlAttr($storeName) ?>"
aria-label="store logo">
<img src="<?= $block->escapeUrl($block->getLogoSrc()) ?>"
title="<?= $block->escapeHtmlAttr($block->getLogoAlt()) ?>"
alt="<?= $block->escapeHtmlAttr($block->getLogoAlt()) ?>"
<?= $logoWidth ? 'width="' . $block->escapeHtmlAttr($logoWidth) . '"' : '' ?>
<?= $logoHeight ? 'height="' . $block->escapeHtmlAttr($logoHeight) . '"' : '' ?>
/>
</a>
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
/**
* @var $block \Magento\Theme\Block\Html\Notices
* @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer
*/
?>
<?php if ($block->displayNoscriptNotice()): ?>
<noscript>
<div class="message global noscript">
<div class="content">
<p>
<strong><?= $block->escapeHtml(__('JavaScript seems to be disabled in your browser.')) ?></strong>
<span>
<?= $block->escapeHtml(
__('For the best experience on our site, be sure to turn on Javascript in your browser.')
) ?>
</span>
</p>
</div>
</div>
</noscript>
<?php endif; ?>
<?php if ($block->displayNoLocalStorageNotice()): ?>
<div class="notice global site local_storage">
<div class="content">
<p>
<strong><?= $block->escapeHtml(__('Local Storage seems to be disabled in your browser.')) ?></strong>
<br />
<?= $block->escapeHtml(
__('For the best experience on our site, be sure to turn on Local Storage in your browser.')
) ?>
</p>
</div>
</div>
<?= /* @noEscape */ $secureRenderer->renderStyleAsTag('display: none;', 'div.notice.global.site.local_storage') ?>
<?php $scriptString = <<<script
require(['jquery'], function(jQuery){
// <![CDATA[
(function($) {
var test = 'test';
try {
localStorage.setItem(test, test);
localStorage.removeItem(test);
} catch(e) {
$(".notice.global.site.local_storage").show();
}
})(jQuery);
// ]]>
});
script;
?>
<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false) ?>
<?php endif; ?>
<?php if ($block->displayDemoNotice()): ?>
<div class="message global demo">
<div class="content">
<p><?= $block->escapeHtml(__('This is a demo store. No orders will be fulfilled.')) ?></p>
</div>
</div>
<?php endif; ?>
<div class="header_bar" >
</div>
<style>
.header_bar {
width: 100%;
height: 60px;
background: url(/media/wysiwyg/tonglan_2_.jpg) no-repeat center;
background-size: 100%;
}
@media(max-width:789px){
.header_bar {
width: 100%;
height: 40px;
background: url(/media/wysiwyg/tongtiao_M.jpg) no-repeat center;
background-size: 100%;
}
}
</style>
...@@ -338,54 +338,4 @@ ...@@ -338,54 +338,4 @@
<vars module="Js_Bundle"> <vars module="Js_Bundle">
<var name="bundle_size">512KB</var> <var name="bundle_size">512KB</var>
</vars> </vars>
<exclude>
<item type="file">Lib::chartjs/Chart.min.js</item>
<item type="file">Lib::jquery/jquery.min.js</item>
<item type="file">Lib::jquery/jquery-ui-1.9.2.js</item>
<item type="file">Lib::jquery/jquery.details.js</item>
<item type="file">Lib::jquery/jquery.hoverIntent.js</item>
<item type="file">Lib::jquery/colorpicker/js/colorpicker.js</item>
<item type="file">Lib::requirejs/require.js</item>
<item type="file">Lib::requirejs/text.js</item>
<item type="file">Lib::legacy-build.min.js</item>
<item type="file">Lib::moment.js</item>
<item type="file">Lib::moment-timezone-with-data.js</item>
<item type="file">Lib::mage/captcha.js</item>
<item type="file">Lib::mage/dropdown_old.js</item>
<item type="file">Lib::mage/list.js</item>
<item type="file">Lib::mage/loader_old.js</item>
<item type="file">Lib::mage/webapi.js</item>
<item type="file">Lib::mage/zoom.js</item>
<item type="file">Lib::mage/translate-inline-vde.js</item>
<item type="file">Lib::mage/requirejs/mixins.js</item>
<item type="file">Lib::mage/requirejs/static.js</item>
<item type="file">Magento_Customer::js/zxcvbn.js</item>
<item type="file">Magento_Catalog::js/zoom.js</item>
<item type="file">Magento_Ui::js/lib/step-wizard.js</item>
<item type="file">Magento_Ui::js/form/element/ui-select.js</item>
<item type="file">Magento_Ui::js/form/element/file-uploader.js</item>
<item type="file">Magento_Ui::js/form/components/insert.js</item>
<item type="file">Magento_Ui::js/form/components/insert-listing.js</item>
<item type="directory">Magento_Ui::js/timeline</item>
<item type="directory">Magento_Ui::js/grid</item>
<item type="directory">Magento_Ui::js/dynamic-rows</item>
<item type="directory">Magento_Ui::templates/timeline</item>
<item type="directory">Magento_Ui::templates/grid</item>
<item type="directory">Magento_Ui::templates/dynamic-rows</item>
<item type="directory">Magento_Swagger::swagger-ui</item>
<item type="directory">Lib::modernizr</item>
<item type="directory">Lib::tiny_mce</item>
<item type="directory">Lib::varien</item>
<item type="directory">Lib::jquery/editableMultiselect</item>
<item type="directory">Lib::jquery/jstree</item>
<item type="directory">Lib::jquery/fileUploader</item>
<item type="directory">Lib::css</item>
<item type="directory">Lib::lib</item>
<item type="directory">Lib::extjs</item>
<item type="directory">Lib::prototype</item>
<item type="directory">Lib::scriptaculous</item>
<item type="directory">Lib::less</item>
<item type="directory">Lib::mage/adminhtml</item>
<item type="directory">Lib::mage/backend</item>
</exclude>
</view> </view>
// DO NOT EDIT THIS FILE - IT SHOULD REMAIN EMPTY
...@@ -16,69 +16,3 @@ ...@@ -16,69 +16,3 @@
color: #999; color: #999;
font-size: 12px; font-size: 12px;
} }
.product-info-wrapper .page-title{
font-size: 14px;
text-transform: none;
font-weight: 400;
word-break: break-word;
font-family: Outfit;
}
.product-info-main .product-info-stock-sku .sku{
color: #767676;
font-size: 14px;
}
.product-info-main .product-info-stock-sku .sku .value{
font-size: 12px;
}
.product-info-main .price-wrapper .price{
color: #222;
font-size: 24px;
font-weight: 700;
vertical-align: middle;
font-family: Arial Black;
}
.product-info-main .special-price .price-wrapper .price{
color: #fa6338;
}
.product-info-wrapper .page-title-wrapper{
margin-bottom: 0;
}
.box-tocart .fieldset .actions{
width: 100%;
}
button, .action.primary{
border-radius: 2px;
text-transform: uppercase;
font-size: 14px;
border: 0;
padding: 15px 50px;
width: 100%;
font-family: 'Outfit', sans-serif;
background: #222;
}
.product-add-form{
border-top: 1px dashed #e5e5e5;
padding-top: 20px;
}
.product-info-price{
padding-bottom: 10px;
}
.box-tocart .fieldset{
gap: 0;
}
//cat
#shopping-cart-table dl.item-options{
display: flex;
}
#shopping-cart-table dl.item-options dd{
color: rgb(153, 153, 153);
}
// DO NOT EDIT THIS FILE - IT SHOULD REMAIN EMPTY
// DO NOT EDIT THIS FILE - IT SHOULD REMAIN EMPTY
// DO NOT EDIT THIS FILE - IT SHOULD REMAIN EMPTY
@charset utf-8;*{font-family:微软雅黑;margin:0;padding:0;}.clearfix:after{content:".";display:block;height:0;visibility:hidden;clear:both;}.w1100{width:1100px;margin:0 auto;}.fl{float:left;}a{text-decoration:none;}ul{list-style:none;}.site-footer{font-size:14px;line-height:1.8;color:#a8aaba;background:#0011;}.site-footer a{color:#a8aaba;}.site-footer a:hover{color:#fff!important;}.site-footer .footer-article{overflow:hidden;padding:30px 0 20px;}.site-footer .contact{float:left;width:280px;}.site-footer .contact dt{width:90px;}.site-footer .contact .iconfont{width:66px;height:66px;display:block;float:left;background:url(image/kefu.png) center center no-repeat;background-size:55px;}.site-footer .contact .text{font-size:14px;line-height:30px;color:#fff;}.site-footer .contact .tel{font-size:20px;color:#fff;padding:3px 0 15px;}.site-footer .contact a{display:block;width:90px;font-size:14px;line-height:30px;color:#9b9ea0;text-align:center;border:1px solid #9b9ea0;border-radius:4px;}.site-footer .contact a:hover{color:#fff!important;}.site-footer .col-article{float:left;width:171px;}.site-footer .col-article dd{margin-bottom:8px;overflow:hidden;}.site-footer .col-article dd a{font-size:12px;color:#9b9ea0;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;}.site-footer .wx{float:left;width:135px;margin-right:0;}.site-footer .wx dd{margin-bottom:15px;}.site-footer .wx dd img{display:block;width:110px;height:110px;border-radius:2px;margin:5px 0;}.site-footer .wx dd.other{margin-bottom:0;line-height:18px;}.site-footer .wx dd.other span{display:block;font-size:12px;}.site-footer .wx dd.other a{display:inline-block;margin-right:5px;font-size:12px;line-height:18px;vertical-align:top;}.footer-links{border-top:1px solid #41424c;border-bottom:1px solid #41424c;padding:10px 0;}.footer-links p{font-size:14px;color:#a8aaba;}.footer-links a{margin-right:20px;font-size:12px;color:#a8aaba;}.footer-info .info-text{font-size:12px;text-align:center;padding:20px 0;}.footer-info .info-text .nav-bottom{font-size:14px;color:#ccc;text-align:center;padding:20px 0 5px;}.footer-info .info-text .nav-bottom a{color:#9b9ea0;padding:0 8px;}.footer-info .info-text .copyright{padding-top:5px;}.footer-info .info-text em{padding:0 8px;}.site-footer .col-article dt,.site-footer .wx dt{margin-bottom:15px;font-size:16px;font-weight:400;color:#d7d8d9;}
\ No newline at end of file
...@@ -78,8 +78,7 @@ ...@@ -78,8 +78,7 @@
"phpseclib/mcrypt_compat": "1.0.8", "phpseclib/mcrypt_compat": "1.0.8",
"phpseclib/phpseclib": "2.0.*", "phpseclib/phpseclib": "2.0.*",
"ramsey/uuid": "~4.1.0", "ramsey/uuid": "~4.1.0",
"rltsquare/product-review-images": "1.0.6", "swissup/breeze-blank": "^1.2",
"swissup/breeze-blank": "1.2.0",
"symfony/console": "~4.4.0", "symfony/console": "~4.4.0",
"symfony/event-dispatcher": "~4.4.0", "symfony/event-dispatcher": "~4.4.0",
"symfony/process": "~4.4.0", "symfony/process": "~4.4.0",
...@@ -390,4 +389,4 @@ ...@@ -390,4 +389,4 @@
} }
}, },
"prefer-stable": true "prefer-stable": true
} }
\ No newline at end of file
...@@ -213,6 +213,10 @@ use Aws\AwsClient; ...@@ -213,6 +213,10 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise resumeContactRecordingAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise resumeContactRecordingAsync(array $args = [])
* @method \Aws\Result searchAvailablePhoneNumbers(array $args = []) * @method \Aws\Result searchAvailablePhoneNumbers(array $args = [])
* @method \GuzzleHttp\Promise\Promise searchAvailablePhoneNumbersAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise searchAvailablePhoneNumbersAsync(array $args = [])
* @method \Aws\Result searchQueues(array $args = [])
* @method \GuzzleHttp\Promise\Promise searchQueuesAsync(array $args = [])
* @method \Aws\Result searchRoutingProfiles(array $args = [])
* @method \GuzzleHttp\Promise\Promise searchRoutingProfilesAsync(array $args = [])
* @method \Aws\Result searchSecurityProfiles(array $args = []) * @method \Aws\Result searchSecurityProfiles(array $args = [])
* @method \GuzzleHttp\Promise\Promise searchSecurityProfilesAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise searchSecurityProfilesAsync(array $args = [])
* @method \Aws\Result searchUsers(array $args = []) * @method \Aws\Result searchUsers(array $args = [])
......
<?php
namespace Aws\ControlTower;
use Aws\AwsClient;
/**
* This client is used to interact with the **AWS Control Tower** service.
* @method \Aws\Result disableControl(array $args = [])
* @method \GuzzleHttp\Promise\Promise disableControlAsync(array $args = [])
* @method \Aws\Result enableControl(array $args = [])
* @method \GuzzleHttp\Promise\Promise enableControlAsync(array $args = [])
* @method \Aws\Result getControlOperation(array $args = [])
* @method \GuzzleHttp\Promise\Promise getControlOperationAsync(array $args = [])
* @method \Aws\Result listEnabledControls(array $args = [])
* @method \GuzzleHttp\Promise\Promise listEnabledControlsAsync(array $args = [])
*/
class ControlTowerClient extends AwsClient {}
<?php
namespace Aws\ControlTower\Exception;
use Aws\Exception\AwsException;
/**
* Represents an error interacting with the **AWS Control Tower** service.
*/
class ControlTowerException extends AwsException {}
...@@ -5,13 +5,43 @@ use Aws\AwsClient; ...@@ -5,13 +5,43 @@ use Aws\AwsClient;
/** /**
* This client is used to interact with the **AWS SSO Identity Store** service. * This client is used to interact with the **AWS SSO Identity Store** service.
* @method \Aws\Result createGroup(array $args = [])
* @method \GuzzleHttp\Promise\Promise createGroupAsync(array $args = [])
* @method \Aws\Result createGroupMembership(array $args = [])
* @method \GuzzleHttp\Promise\Promise createGroupMembershipAsync(array $args = [])
* @method \Aws\Result createUser(array $args = [])
* @method \GuzzleHttp\Promise\Promise createUserAsync(array $args = [])
* @method \Aws\Result deleteGroup(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteGroupAsync(array $args = [])
* @method \Aws\Result deleteGroupMembership(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteGroupMembershipAsync(array $args = [])
* @method \Aws\Result deleteUser(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteUserAsync(array $args = [])
* @method \Aws\Result describeGroup(array $args = []) * @method \Aws\Result describeGroup(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeGroupAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise describeGroupAsync(array $args = [])
* @method \Aws\Result describeGroupMembership(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeGroupMembershipAsync(array $args = [])
* @method \Aws\Result describeUser(array $args = []) * @method \Aws\Result describeUser(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeUserAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise describeUserAsync(array $args = [])
* @method \Aws\Result getGroupId(array $args = [])
* @method \GuzzleHttp\Promise\Promise getGroupIdAsync(array $args = [])
* @method \Aws\Result getGroupMembershipId(array $args = [])
* @method \GuzzleHttp\Promise\Promise getGroupMembershipIdAsync(array $args = [])
* @method \Aws\Result getUserId(array $args = [])
* @method \GuzzleHttp\Promise\Promise getUserIdAsync(array $args = [])
* @method \Aws\Result isMemberInGroups(array $args = [])
* @method \GuzzleHttp\Promise\Promise isMemberInGroupsAsync(array $args = [])
* @method \Aws\Result listGroupMemberships(array $args = [])
* @method \GuzzleHttp\Promise\Promise listGroupMembershipsAsync(array $args = [])
* @method \Aws\Result listGroupMembershipsForMember(array $args = [])
* @method \GuzzleHttp\Promise\Promise listGroupMembershipsForMemberAsync(array $args = [])
* @method \Aws\Result listGroups(array $args = []) * @method \Aws\Result listGroups(array $args = [])
* @method \GuzzleHttp\Promise\Promise listGroupsAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listGroupsAsync(array $args = [])
* @method \Aws\Result listUsers(array $args = []) * @method \Aws\Result listUsers(array $args = [])
* @method \GuzzleHttp\Promise\Promise listUsersAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listUsersAsync(array $args = [])
* @method \Aws\Result updateGroup(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateGroupAsync(array $args = [])
* @method \Aws\Result updateUser(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateUserAsync(array $args = [])
*/ */
class IdentityStoreClient extends AwsClient {} class IdentityStoreClient extends AwsClient {}
...@@ -9,12 +9,20 @@ use Aws\AwsClient; ...@@ -9,12 +9,20 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise createDatasetAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise createDatasetAsync(array $args = [])
* @method \Aws\Result createInferenceScheduler(array $args = []) * @method \Aws\Result createInferenceScheduler(array $args = [])
* @method \GuzzleHttp\Promise\Promise createInferenceSchedulerAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise createInferenceSchedulerAsync(array $args = [])
* @method \Aws\Result createLabel(array $args = [])
* @method \GuzzleHttp\Promise\Promise createLabelAsync(array $args = [])
* @method \Aws\Result createLabelGroup(array $args = [])
* @method \GuzzleHttp\Promise\Promise createLabelGroupAsync(array $args = [])
* @method \Aws\Result createModel(array $args = []) * @method \Aws\Result createModel(array $args = [])
* @method \GuzzleHttp\Promise\Promise createModelAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise createModelAsync(array $args = [])
* @method \Aws\Result deleteDataset(array $args = []) * @method \Aws\Result deleteDataset(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteDatasetAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise deleteDatasetAsync(array $args = [])
* @method \Aws\Result deleteInferenceScheduler(array $args = []) * @method \Aws\Result deleteInferenceScheduler(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteInferenceSchedulerAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise deleteInferenceSchedulerAsync(array $args = [])
* @method \Aws\Result deleteLabel(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteLabelAsync(array $args = [])
* @method \Aws\Result deleteLabelGroup(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteLabelGroupAsync(array $args = [])
* @method \Aws\Result deleteModel(array $args = []) * @method \Aws\Result deleteModel(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteModelAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise deleteModelAsync(array $args = [])
* @method \Aws\Result describeDataIngestionJob(array $args = []) * @method \Aws\Result describeDataIngestionJob(array $args = [])
...@@ -23,6 +31,10 @@ use Aws\AwsClient; ...@@ -23,6 +31,10 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise describeDatasetAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise describeDatasetAsync(array $args = [])
* @method \Aws\Result describeInferenceScheduler(array $args = []) * @method \Aws\Result describeInferenceScheduler(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeInferenceSchedulerAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise describeInferenceSchedulerAsync(array $args = [])
* @method \Aws\Result describeLabel(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeLabelAsync(array $args = [])
* @method \Aws\Result describeLabelGroup(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeLabelGroupAsync(array $args = [])
* @method \Aws\Result describeModel(array $args = []) * @method \Aws\Result describeModel(array $args = [])
* @method \GuzzleHttp\Promise\Promise describeModelAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise describeModelAsync(array $args = [])
* @method \Aws\Result listDataIngestionJobs(array $args = []) * @method \Aws\Result listDataIngestionJobs(array $args = [])
...@@ -35,6 +47,10 @@ use Aws\AwsClient; ...@@ -35,6 +47,10 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise listInferenceExecutionsAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listInferenceExecutionsAsync(array $args = [])
* @method \Aws\Result listInferenceSchedulers(array $args = []) * @method \Aws\Result listInferenceSchedulers(array $args = [])
* @method \GuzzleHttp\Promise\Promise listInferenceSchedulersAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listInferenceSchedulersAsync(array $args = [])
* @method \Aws\Result listLabelGroups(array $args = [])
* @method \GuzzleHttp\Promise\Promise listLabelGroupsAsync(array $args = [])
* @method \Aws\Result listLabels(array $args = [])
* @method \GuzzleHttp\Promise\Promise listLabelsAsync(array $args = [])
* @method \Aws\Result listModels(array $args = []) * @method \Aws\Result listModels(array $args = [])
* @method \GuzzleHttp\Promise\Promise listModelsAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listModelsAsync(array $args = [])
* @method \Aws\Result listSensorStatistics(array $args = []) * @method \Aws\Result listSensorStatistics(array $args = [])
...@@ -53,5 +69,7 @@ use Aws\AwsClient; ...@@ -53,5 +69,7 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = [])
* @method \Aws\Result updateInferenceScheduler(array $args = []) * @method \Aws\Result updateInferenceScheduler(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateInferenceSchedulerAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise updateInferenceSchedulerAsync(array $args = [])
* @method \Aws\Result updateLabelGroup(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateLabelGroupAsync(array $args = [])
*/ */
class LookoutEquipmentClient extends AwsClient {} class LookoutEquipmentClient extends AwsClient {}
...@@ -9,6 +9,8 @@ use Aws\AwsClient; ...@@ -9,6 +9,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise acceptInvitationAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise acceptInvitationAsync(array $args = [])
* @method \Aws\Result batchGetCustomDataIdentifiers(array $args = []) * @method \Aws\Result batchGetCustomDataIdentifiers(array $args = [])
* @method \GuzzleHttp\Promise\Promise batchGetCustomDataIdentifiersAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise batchGetCustomDataIdentifiersAsync(array $args = [])
* @method \Aws\Result createAllowList(array $args = [])
* @method \GuzzleHttp\Promise\Promise createAllowListAsync(array $args = [])
* @method \Aws\Result createClassificationJob(array $args = []) * @method \Aws\Result createClassificationJob(array $args = [])
* @method \GuzzleHttp\Promise\Promise createClassificationJobAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise createClassificationJobAsync(array $args = [])
* @method \Aws\Result createCustomDataIdentifier(array $args = []) * @method \Aws\Result createCustomDataIdentifier(array $args = [])
...@@ -23,6 +25,8 @@ use Aws\AwsClient; ...@@ -23,6 +25,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise createSampleFindingsAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise createSampleFindingsAsync(array $args = [])
* @method \Aws\Result declineInvitations(array $args = []) * @method \Aws\Result declineInvitations(array $args = [])
* @method \GuzzleHttp\Promise\Promise declineInvitationsAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise declineInvitationsAsync(array $args = [])
* @method \Aws\Result deleteAllowList(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteAllowListAsync(array $args = [])
* @method \Aws\Result deleteCustomDataIdentifier(array $args = []) * @method \Aws\Result deleteCustomDataIdentifier(array $args = [])
* @method \GuzzleHttp\Promise\Promise deleteCustomDataIdentifierAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise deleteCustomDataIdentifierAsync(array $args = [])
* @method \Aws\Result deleteFindingsFilter(array $args = []) * @method \Aws\Result deleteFindingsFilter(array $args = [])
...@@ -53,6 +57,8 @@ use Aws\AwsClient; ...@@ -53,6 +57,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise enableOrganizationAdminAccountAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise enableOrganizationAdminAccountAsync(array $args = [])
* @method \Aws\Result getAdministratorAccount(array $args = []) * @method \Aws\Result getAdministratorAccount(array $args = [])
* @method \GuzzleHttp\Promise\Promise getAdministratorAccountAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise getAdministratorAccountAsync(array $args = [])
* @method \Aws\Result getAllowList(array $args = [])
* @method \GuzzleHttp\Promise\Promise getAllowListAsync(array $args = [])
* @method \Aws\Result getBucketStatistics(array $args = []) * @method \Aws\Result getBucketStatistics(array $args = [])
* @method \GuzzleHttp\Promise\Promise getBucketStatisticsAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise getBucketStatisticsAsync(array $args = [])
* @method \Aws\Result getClassificationExportConfiguration(array $args = []) * @method \Aws\Result getClassificationExportConfiguration(array $args = [])
...@@ -85,6 +91,8 @@ use Aws\AwsClient; ...@@ -85,6 +91,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise getUsageStatisticsAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise getUsageStatisticsAsync(array $args = [])
* @method \Aws\Result getUsageTotals(array $args = []) * @method \Aws\Result getUsageTotals(array $args = [])
* @method \GuzzleHttp\Promise\Promise getUsageTotalsAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise getUsageTotalsAsync(array $args = [])
* @method \Aws\Result listAllowLists(array $args = [])
* @method \GuzzleHttp\Promise\Promise listAllowListsAsync(array $args = [])
* @method \Aws\Result listClassificationJobs(array $args = []) * @method \Aws\Result listClassificationJobs(array $args = [])
* @method \GuzzleHttp\Promise\Promise listClassificationJobsAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise listClassificationJobsAsync(array $args = [])
* @method \Aws\Result listCustomDataIdentifiers(array $args = []) * @method \Aws\Result listCustomDataIdentifiers(array $args = [])
...@@ -115,6 +123,8 @@ use Aws\AwsClient; ...@@ -115,6 +123,8 @@ use Aws\AwsClient;
* @method \GuzzleHttp\Promise\Promise testCustomDataIdentifierAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise testCustomDataIdentifierAsync(array $args = [])
* @method \Aws\Result untagResource(array $args = []) * @method \Aws\Result untagResource(array $args = [])
* @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = [])
* @method \Aws\Result updateAllowList(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateAllowListAsync(array $args = [])
* @method \Aws\Result updateClassificationJob(array $args = []) * @method \Aws\Result updateClassificationJob(array $args = [])
* @method \GuzzleHttp\Promise\Promise updateClassificationJobAsync(array $args = []) * @method \GuzzleHttp\Promise\Promise updateClassificationJobAsync(array $args = [])
* @method \Aws\Result updateFindingsFilter(array $args = []) * @method \Aws\Result updateFindingsFilter(array $args = [])
......
...@@ -160,6 +160,8 @@ namespace Aws; ...@@ -160,6 +160,8 @@ namespace Aws;
* @method \Aws\MultiRegionClient createMultiRegionConnectParticipant(array $args = []) * @method \Aws\MultiRegionClient createMultiRegionConnectParticipant(array $args = [])
* @method \Aws\ConnectWisdomService\ConnectWisdomServiceClient createConnectWisdomService(array $args = []) * @method \Aws\ConnectWisdomService\ConnectWisdomServiceClient createConnectWisdomService(array $args = [])
* @method \Aws\MultiRegionClient createMultiRegionConnectWisdomService(array $args = []) * @method \Aws\MultiRegionClient createMultiRegionConnectWisdomService(array $args = [])
* @method \Aws\ControlTower\ControlTowerClient createControlTower(array $args = [])
* @method \Aws\MultiRegionClient createMultiRegionControlTower(array $args = [])
* @method \Aws\CostExplorer\CostExplorerClient createCostExplorer(array $args = []) * @method \Aws\CostExplorer\CostExplorerClient createCostExplorer(array $args = [])
* @method \Aws\MultiRegionClient createMultiRegionCostExplorer(array $args = []) * @method \Aws\MultiRegionClient createMultiRegionCostExplorer(array $args = [])
* @method \Aws\CostandUsageReportService\CostandUsageReportServiceClient createCostandUsageReportService(array $args = []) * @method \Aws\CostandUsageReportService\CostandUsageReportServiceClient createCostandUsageReportService(array $args = [])
...@@ -633,7 +635,7 @@ namespace Aws; ...@@ -633,7 +635,7 @@ namespace Aws;
*/ */
class Sdk class Sdk
{ {
const VERSION = '3.234.2'; const VERSION = '3.235.1';
/** @var array Arguments for creating clients */ /** @var array Arguments for creating clients */
private $args; private $args;
......
...@@ -44,7 +44,7 @@ class SignatureV4 implements SignatureInterface ...@@ -44,7 +44,7 @@ class SignatureV4 implements SignatureInterface
* *
* @return array * @return array
*/ */
private function getHeaderBlacklist() protected function getHeaderBlacklist()
{ {
return [ return [
'cache-control' => true, 'cache-control' => true,
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
<?php
// This file was auto-generated from sdk-root/src/data/controltower/2018-05-10/api-2.json
return [ 'version' => '2.0', 'metadata' => [ 'apiVersion' => '2018-05-10', 'endpointPrefix' => 'controltower', 'jsonVersion' => '1.1', 'protocol' => 'rest-json', 'serviceFullName' => 'AWS Control Tower', 'serviceId' => 'ControlTower', 'signatureVersion' => 'v4', 'signingName' => 'controltower', 'uid' => 'controltower-2018-05-10', ], 'operations' => [ 'DisableControl' => [ 'name' => 'DisableControl', 'http' => [ 'method' => 'POST', 'requestUri' => '/disable-control', 'responseCode' => 200, ], 'input' => [ 'shape' => 'DisableControlInput', ], 'output' => [ 'shape' => 'DisableControlOutput', ], 'errors' => [ [ 'shape' => 'ValidationException', ], [ 'shape' => 'ConflictException', ], [ 'shape' => 'ServiceQuotaExceededException', ], [ 'shape' => 'InternalServerException', ], [ 'shape' => 'AccessDeniedException', ], [ 'shape' => 'ThrottlingException', ], [ 'shape' => 'ResourceNotFoundException', ], ], ], 'EnableControl' => [ 'name' => 'EnableControl', 'http' => [ 'method' => 'POST', 'requestUri' => '/enable-control', 'responseCode' => 200, ], 'input' => [ 'shape' => 'EnableControlInput', ], 'output' => [ 'shape' => 'EnableControlOutput', ], 'errors' => [ [ 'shape' => 'ValidationException', ], [ 'shape' => 'ConflictException', ], [ 'shape' => 'ServiceQuotaExceededException', ], [ 'shape' => 'InternalServerException', ], [ 'shape' => 'AccessDeniedException', ], [ 'shape' => 'ThrottlingException', ], [ 'shape' => 'ResourceNotFoundException', ], ], ], 'GetControlOperation' => [ 'name' => 'GetControlOperation', 'http' => [ 'method' => 'POST', 'requestUri' => '/get-control-operation', 'responseCode' => 200, ], 'input' => [ 'shape' => 'GetControlOperationInput', ], 'output' => [ 'shape' => 'GetControlOperationOutput', ], 'errors' => [ [ 'shape' => 'ValidationException', ], [ 'shape' => 'InternalServerException', ], [ 'shape' => 'AccessDeniedException', ], [ 'shape' => 'ThrottlingException', ], [ 'shape' => 'ResourceNotFoundException', ], ], ], 'ListEnabledControls' => [ 'name' => 'ListEnabledControls', 'http' => [ 'method' => 'POST', 'requestUri' => '/list-enabled-controls', 'responseCode' => 200, ], 'input' => [ 'shape' => 'ListEnabledControlsInput', ], 'output' => [ 'shape' => 'ListEnabledControlsOutput', ], 'errors' => [ [ 'shape' => 'ValidationException', ], [ 'shape' => 'InternalServerException', ], [ 'shape' => 'AccessDeniedException', ], [ 'shape' => 'ThrottlingException', ], [ 'shape' => 'ResourceNotFoundException', ], ], ], ], 'shapes' => [ 'AccessDeniedException' => [ 'type' => 'structure', 'required' => [ 'message', ], 'members' => [ 'message' => [ 'shape' => 'String', ], ], 'error' => [ 'httpStatusCode' => 403, 'senderFault' => true, ], 'exception' => true, ], 'ConflictException' => [ 'type' => 'structure', 'required' => [ 'message', ], 'members' => [ 'message' => [ 'shape' => 'String', ], ], 'error' => [ 'httpStatusCode' => 409, 'senderFault' => true, ], 'exception' => true, ], 'ControlIdentifier' => [ 'type' => 'string', 'max' => 2048, 'min' => 20, 'pattern' => '^arn:aws[0-9a-zA-Z_\\-:\\/]+$', ], 'ControlOperation' => [ 'type' => 'structure', 'members' => [ 'endTime' => [ 'shape' => 'SyntheticTimestamp_date_time', ], 'operationType' => [ 'shape' => 'ControlOperationType', ], 'startTime' => [ 'shape' => 'SyntheticTimestamp_date_time', ], 'status' => [ 'shape' => 'ControlOperationStatus', ], 'statusMessage' => [ 'shape' => 'String', ], ], ], 'ControlOperationStatus' => [ 'type' => 'string', 'enum' => [ 'SUCCEEDED', 'FAILED', 'IN_PROGRESS', ], ], 'ControlOperationType' => [ 'type' => 'string', 'enum' => [ 'ENABLE_CONTROL', 'DISABLE_CONTROL', ], ], 'DisableControlInput' => [ 'type' => 'structure', 'required' => [ 'controlIdentifier', 'targetIdentifier', ], 'members' => [ 'controlIdentifier' => [ 'shape' => 'ControlIdentifier', ], 'targetIdentifier' => [ 'shape' => 'TargetIdentifier', ], ], ], 'DisableControlOutput' => [ 'type' => 'structure', 'required' => [ 'operationIdentifier', ], 'members' => [ 'operationIdentifier' => [ 'shape' => 'OperationIdentifier', ], ], ], 'EnableControlInput' => [ 'type' => 'structure', 'required' => [ 'controlIdentifier', 'targetIdentifier', ], 'members' => [ 'controlIdentifier' => [ 'shape' => 'ControlIdentifier', ], 'targetIdentifier' => [ 'shape' => 'TargetIdentifier', ], ], ], 'EnableControlOutput' => [ 'type' => 'structure', 'required' => [ 'operationIdentifier', ], 'members' => [ 'operationIdentifier' => [ 'shape' => 'OperationIdentifier', ], ], ], 'EnabledControlSummary' => [ 'type' => 'structure', 'members' => [ 'controlIdentifier' => [ 'shape' => 'ControlIdentifier', ], ], ], 'EnabledControls' => [ 'type' => 'list', 'member' => [ 'shape' => 'EnabledControlSummary', ], ], 'GetControlOperationInput' => [ 'type' => 'structure', 'required' => [ 'operationIdentifier', ], 'members' => [ 'operationIdentifier' => [ 'shape' => 'OperationIdentifier', ], ], ], 'GetControlOperationOutput' => [ 'type' => 'structure', 'required' => [ 'controlOperation', ], 'members' => [ 'controlOperation' => [ 'shape' => 'ControlOperation', ], ], ], 'Integer' => [ 'type' => 'integer', 'box' => true, ], 'InternalServerException' => [ 'type' => 'structure', 'required' => [ 'message', ], 'members' => [ 'message' => [ 'shape' => 'String', ], ], 'error' => [ 'httpStatusCode' => 500, ], 'exception' => true, 'fault' => true, 'retryable' => [ 'throttling' => false, ], ], 'ListEnabledControlsInput' => [ 'type' => 'structure', 'required' => [ 'targetIdentifier', ], 'members' => [ 'maxResults' => [ 'shape' => 'MaxResults', ], 'nextToken' => [ 'shape' => 'String', ], 'targetIdentifier' => [ 'shape' => 'TargetIdentifier', ], ], ], 'ListEnabledControlsOutput' => [ 'type' => 'structure', 'required' => [ 'enabledControls', ], 'members' => [ 'enabledControls' => [ 'shape' => 'EnabledControls', ], 'nextToken' => [ 'shape' => 'String', ], ], ], 'MaxResults' => [ 'type' => 'integer', 'box' => true, 'max' => 100, 'min' => 1, ], 'OperationIdentifier' => [ 'type' => 'string', 'max' => 36, 'min' => 36, 'pattern' => '^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$', ], 'ResourceNotFoundException' => [ 'type' => 'structure', 'required' => [ 'message', ], 'members' => [ 'message' => [ 'shape' => 'String', ], ], 'error' => [ 'httpStatusCode' => 404, 'senderFault' => true, ], 'exception' => true, ], 'ServiceQuotaExceededException' => [ 'type' => 'structure', 'required' => [ 'message', ], 'members' => [ 'message' => [ 'shape' => 'String', ], ], 'error' => [ 'httpStatusCode' => 402, 'senderFault' => true, ], 'exception' => true, ], 'String' => [ 'type' => 'string', ], 'SyntheticTimestamp_date_time' => [ 'type' => 'timestamp', 'timestampFormat' => 'iso8601', ], 'TargetIdentifier' => [ 'type' => 'string', 'max' => 2048, 'min' => 20, 'pattern' => '^arn:aws[0-9a-zA-Z_\\-:\\/]+$', ], 'ThrottlingException' => [ 'type' => 'structure', 'required' => [ 'message', ], 'members' => [ 'message' => [ 'shape' => 'String', ], 'quotaCode' => [ 'shape' => 'String', ], 'retryAfterSeconds' => [ 'shape' => 'Integer', 'location' => 'header', 'locationName' => 'Retry-After', ], 'serviceCode' => [ 'shape' => 'String', ], ], 'error' => [ 'httpStatusCode' => 429, 'senderFault' => true, ], 'exception' => true, 'retryable' => [ 'throttling' => true, ], ], 'ValidationException' => [ 'type' => 'structure', 'required' => [ 'message', ], 'members' => [ 'message' => [ 'shape' => 'String', ], ], 'error' => [ 'httpStatusCode' => 400, 'senderFault' => true, ], 'exception' => true, ], ],];
<?php
// This file was auto-generated from sdk-root/src/data/controltower/2018-05-10/paginators-1.json
return [ 'pagination' => [ 'ListEnabledControls' => [ 'input_token' => 'nextToken', 'output_token' => 'nextToken', 'limit_key' => 'maxResults', 'result_key' => 'enabledControls', ], ],];
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
<?php <?php
// This file was auto-generated from sdk-root/src/data/identitystore/2020-06-15/paginators-1.json // This file was auto-generated from sdk-root/src/data/identitystore/2020-06-15/paginators-1.json
return [ 'pagination' => [ 'ListGroups' => [ 'input_token' => 'NextToken', 'output_token' => 'NextToken', 'limit_key' => 'MaxResults', ], 'ListUsers' => [ 'input_token' => 'NextToken', 'output_token' => 'NextToken', 'limit_key' => 'MaxResults', ], ],]; return [ 'pagination' => [ 'ListGroupMemberships' => [ 'input_token' => 'NextToken', 'output_token' => 'NextToken', 'limit_key' => 'MaxResults', 'result_key' => 'GroupMemberships', ], 'ListGroupMembershipsForMember' => [ 'input_token' => 'NextToken', 'output_token' => 'NextToken', 'limit_key' => 'MaxResults', 'result_key' => 'GroupMemberships', ], 'ListGroups' => [ 'input_token' => 'NextToken', 'output_token' => 'NextToken', 'limit_key' => 'MaxResults', 'result_key' => 'Groups', ], 'ListUsers' => [ 'input_token' => 'NextToken', 'output_token' => 'NextToken', 'limit_key' => 'MaxResults', 'result_key' => 'Users', ], ],];
This source diff could not be displayed because it is too large. You can view the blob instead.
<?php <?php
// This file was auto-generated from sdk-root/src/data/lookoutequipment/2020-12-15/paginators-1.json // This file was auto-generated from sdk-root/src/data/lookoutequipment/2020-12-15/paginators-1.json
return [ 'pagination' => [ 'ListDataIngestionJobs' => [ 'input_token' => 'NextToken', 'output_token' => 'NextToken', 'limit_key' => 'MaxResults', ], 'ListDatasets' => [ 'input_token' => 'NextToken', 'output_token' => 'NextToken', 'limit_key' => 'MaxResults', ], 'ListInferenceEvents' => [ 'input_token' => 'NextToken', 'output_token' => 'NextToken', 'limit_key' => 'MaxResults', ], 'ListInferenceExecutions' => [ 'input_token' => 'NextToken', 'output_token' => 'NextToken', 'limit_key' => 'MaxResults', ], 'ListInferenceSchedulers' => [ 'input_token' => 'NextToken', 'output_token' => 'NextToken', 'limit_key' => 'MaxResults', ], 'ListModels' => [ 'input_token' => 'NextToken', 'output_token' => 'NextToken', 'limit_key' => 'MaxResults', ], 'ListSensorStatistics' => [ 'input_token' => 'NextToken', 'output_token' => 'NextToken', 'limit_key' => 'MaxResults', ], ],]; return [ 'pagination' => [ 'ListDataIngestionJobs' => [ 'input_token' => 'NextToken', 'output_token' => 'NextToken', 'limit_key' => 'MaxResults', ], 'ListDatasets' => [ 'input_token' => 'NextToken', 'output_token' => 'NextToken', 'limit_key' => 'MaxResults', ], 'ListInferenceEvents' => [ 'input_token' => 'NextToken', 'output_token' => 'NextToken', 'limit_key' => 'MaxResults', ], 'ListInferenceExecutions' => [ 'input_token' => 'NextToken', 'output_token' => 'NextToken', 'limit_key' => 'MaxResults', ], 'ListInferenceSchedulers' => [ 'input_token' => 'NextToken', 'output_token' => 'NextToken', 'limit_key' => 'MaxResults', ], 'ListLabelGroups' => [ 'input_token' => 'NextToken', 'output_token' => 'NextToken', 'limit_key' => 'MaxResults', ], 'ListLabels' => [ 'input_token' => 'NextToken', 'output_token' => 'NextToken', 'limit_key' => 'MaxResults', ], 'ListModels' => [ 'input_token' => 'NextToken', 'output_token' => 'NextToken', 'limit_key' => 'MaxResults', ], 'ListSensorStatistics' => [ 'input_token' => 'NextToken', 'output_token' => 'NextToken', 'limit_key' => 'MaxResults', ], ],];
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
# Changelog
## [0.3.7](https://github.com/brick/varexporter/releases/tag/0.3.7) - 2022-06-30
**New feature**
- New option: `VarExporter::INLINE_ARRAY`
🗑️ **Deprecated**
- The `VarExporter::INLINE_NUMERIC_SCALAR_ARRAY` is deprecated, please use `INLINE_SCALAR_LIST` instead
## [0.3.6](https://github.com/brick/varexporter/releases/tag/0.3.6) - 2022-06-15
**New feature**
Support for PHP 8.1 enums (#23).
Thanks @Jacobs63!
## [0.3.5](https://github.com/brick/varexporter/releases/tag/0.3.5) - 2021-02-10
**New feature**
Support for controlling the base indentation level (#17).
Thanks @ADmad!
## [0.3.4](https://github.com/brick/varexporter/releases/tag/0.3.4) - 2021-02-07
**New feature**
Support for trailing comma in non-inline arrays, with the `TRAILING_COMMA_IN_ARRAY` flag (#16).
Thanks @ADmad!
## [0.3.3](https://github.com/brick/varexporter/releases/tag/0.3.3) - 2020-12-24
🐛 **Bug fix**
- Exporting an object with numeric dynamic properties would lead to a `TypeError`
## [0.3.2](https://github.com/brick/varexporter/releases/tag/0.3.2) - 2020-03-13
**New feature**
Support for exporting internal classes implementing `__set_state()`:
- `DateTime`
- `DateTimeImmutable`
- `DateTimeZone`
- `DateInterval`
- `DatePeriod`
Thanks @GameplayJDK!
## [0.3.1](https://github.com/brick/varexporter/releases/tag/0.3.1) - 2020-01-23
**New features**
- Support for closures with `use()` using the `CLOSURE_SNAPSHOT_USE` option (#7)
- Support for arrow functions in PHP 7.4 (#8)
Thanks to @jasny for his awesome work!
## [0.3.0](https://github.com/brick/varexporter/releases/tag/0.3.0) - 2019-12-24
Minimum PHP version is now `7.2`. No breaking changes.
## [0.2.1](https://github.com/brick/varexporter/releases/tag/0.2.1) - 2019-04-16
**New option**: `VarExporter::INLINE_NUMERIC_SCALAR_ARRAY` (#3)
Formats numeric arrays containing only scalar values on a single line.
## [0.2.0](https://github.com/brick/varexporter/releases/tag/0.2.0) - 2019-04-09
**New feature**
- Experimental support for closures 🎉
💥 **Minor BC break**
- `export()` does not throw an exception anymore when encountering a `Closure`.
To get the old behaviour back, use the `NO_CLOSURES` option.
## [0.1.2](https://github.com/brick/varexporter/releases/tag/0.1.2) - 2019-04-08
🐛 **Bug fixes**
- Static properties in custom classes were wrongly included—`unset()`—in the output
**Improvements**
- Circular references are now detected, and throw an `ExportException` instead of erroring.
## [0.1.1](https://github.com/brick/varexporter/releases/tag/0.1.1) - 2019-04-08
🐛 **Bug fixes**
- Single-letter properties were wrongly exported using `->{'x'}` notation.
**Improvements**
- Exception messages now contain the path (array keys / object properties) to the failure:
> `[foo][bar][0]` Type "resource" is not supported.
## [0.1.0](https://github.com/brick/varexporter/releases/tag/0.1.0) - 2019-04-07
First release.
...@@ -51,14 +51,7 @@ final class GenericExporter ...@@ -51,14 +51,7 @@ final class GenericExporter
* *
* @var bool * @var bool
*/ */
public $inlineArray; public $inlineNumericScalarArray;
/**
* @psalm-readonly
*
* @var bool
*/
public $inlineScalarList;
/** /**
* @psalm-readonly * @psalm-readonly
...@@ -81,6 +74,10 @@ final class GenericExporter ...@@ -81,6 +74,10 @@ final class GenericExporter
*/ */
public $indentLevel; public $indentLevel;
/**
* @param int $options
* @param int Indentation level
*/
public function __construct(int $options, int $indentLevel = 0) public function __construct(int $options, int $indentLevel = 0)
{ {
$this->objectExporters[] = new ObjectExporter\StdClassExporter($this); $this->objectExporters[] = new ObjectExporter\StdClassExporter($this);
...@@ -109,8 +106,7 @@ final class GenericExporter ...@@ -109,8 +106,7 @@ final class GenericExporter
$this->addTypeHints = (bool) ($options & VarExporter::ADD_TYPE_HINTS); $this->addTypeHints = (bool) ($options & VarExporter::ADD_TYPE_HINTS);
$this->skipDynamicProperties = (bool) ($options & VarExporter::SKIP_DYNAMIC_PROPERTIES); $this->skipDynamicProperties = (bool) ($options & VarExporter::SKIP_DYNAMIC_PROPERTIES);
$this->inlineArray = (bool) ($options & VarExporter::INLINE_ARRAY); $this->inlineNumericScalarArray = (bool) ($options & VarExporter::INLINE_NUMERIC_SCALAR_ARRAY);
$this->inlineScalarList = (bool) ($options & VarExporter::INLINE_SCALAR_LIST);
$this->closureSnapshotUses = (bool) ($options & VarExporter::CLOSURE_SNAPSHOT_USES); $this->closureSnapshotUses = (bool) ($options & VarExporter::CLOSURE_SNAPSHOT_USES);
$this->trailingCommaInArray = (bool) ($options & VarExporter::TRAILING_COMMA_IN_ARRAY); $this->trailingCommaInArray = (bool) ($options & VarExporter::TRAILING_COMMA_IN_ARRAY);
...@@ -173,11 +169,11 @@ final class GenericExporter ...@@ -173,11 +169,11 @@ final class GenericExporter
$result = []; $result = [];
$count = count($array); $count = count($array);
$isList = array_keys($array) === range(0, $count - 1); $isNumeric = array_keys($array) === range(0, $count - 1);
$current = 0; $current = 0;
$inline = $this->inlineArray || ($this->inlineScalarList && $isList && $this->isScalarList($array)); $inline = ($this->inlineNumericScalarArray && $isNumeric && $this->isScalarArray($array));
foreach ($array as $key => $value) { foreach ($array as $key => $value) {
$isLast = (++$current === $count); $isLast = (++$current === $count);
...@@ -188,16 +184,12 @@ final class GenericExporter ...@@ -188,16 +184,12 @@ final class GenericExporter
$exported = $this->export($value, $newPath, $parentIds); $exported = $this->export($value, $newPath, $parentIds);
if ($inline) { if ($inline) {
if ($isList) { $result[] = $exported[0];
$result[] = $exported[0];
} else {
$result[] = var_export($key, true) . ' => ' . $exported[0];
}
} else { } else {
$prepend = ''; $prepend = '';
$append = ''; $append = '';
if (! $isList) { if (! $isNumeric) {
$prepend = var_export($key, true) . ' => '; $prepend = var_export($key, true) . ' => ';
} }
...@@ -232,7 +224,7 @@ final class GenericExporter ...@@ -232,7 +224,7 @@ final class GenericExporter
* *
* @return bool * @return bool
*/ */
private function isScalarList(array $array) : bool private function isScalarArray(array $array) : bool
{ {
foreach ($array as $value) { foreach ($array as $value) {
if ($value !== null && ! is_scalar($value)) { if ($value !== null && ! is_scalar($value)) {
......
...@@ -48,16 +48,10 @@ final class VarExporter ...@@ -48,16 +48,10 @@ final class VarExporter
public const NO_CLOSURES = 1 << 6; public const NO_CLOSURES = 1 << 6;
/** /**
* Formats lists (0-based numeric arrays) containing only scalar values on a single line. * Formats numeric arrays containing only scalar values on a single line.
* Types considered scalar here are int, bool, float, string and null. * Types considered scalar here are int, bool, float, string and null.
* This option is a subset of INLINE_ARRAY, and has no effect when INLINE_ARRAY is used.
*/ */
public const INLINE_SCALAR_LIST = 1 << 7; public const INLINE_NUMERIC_SCALAR_ARRAY = 1 << 7;
/**
* @deprecated Please use INLINE_SCALAR_LIST instead.
*/
public const INLINE_NUMERIC_SCALAR_ARRAY = self::INLINE_SCALAR_LIST;
/** /**
* Export static vars defined via `use` as variables. * Export static vars defined via `use` as variables.
...@@ -75,11 +69,6 @@ final class VarExporter ...@@ -75,11 +69,6 @@ final class VarExporter
public const NO_ENUMS = 1 << 10; public const NO_ENUMS = 1 << 10;
/** /**
* Formats all arrays on a single line.
*/
public const INLINE_ARRAY = 1 << 11;
/**
* @param mixed $var The variable to export. * @param mixed $var The variable to export.
* @param int $options A bitmask of options. Possible values are `VarExporter::*` constants. * @param int $options A bitmask of options. Possible values are `VarExporter::*` constants.
* Combine multiple options with a bitwise OR `|` operator. * Combine multiple options with a bitwise OR `|` operator.
......
...@@ -297,7 +297,7 @@ class Handler implements \SessionHandlerInterface ...@@ -297,7 +297,7 @@ class Handler implements \SessionHandlerInterface
// Connect and authenticate // Connect and authenticate
if ($sentinelServers && $sentinelMaster) { if ($sentinelServers && $sentinelMaster) {
$servers = preg_split('/\s*,\s*/', trim($sentinelServers), -1, PREG_SPLIT_NO_EMPTY); $servers = preg_split('/\s*,\s*/', trim($sentinelServers), NULL, PREG_SPLIT_NO_EMPTY);
$sentinel = NULL; $sentinel = NULL;
$exception = NULL; $exception = NULL;
for ($i = 0; $i <= $sentinelConnectRetries; $i++) // Try to connect to sentinels in round-robin fashion for ($i = 0; $i <= $sentinelConnectRetries; $i++) // Try to connect to sentinels in round-robin fashion
...@@ -310,11 +310,8 @@ class Handler implements \SessionHandlerInterface ...@@ -310,11 +310,8 @@ class Handler implements \SessionHandlerInterface
try { try {
$sentinelClient->auth($pass); $sentinelClient->auth($pass);
} catch (\CredisException $e) { } catch (\CredisException $e) {
// Prevent throwing exception if Sentinel has no password set (error messages are different between redis 5 and redis 6) // Prevent throwing exception if Sentinel has no password set
if ($e->getCode() !== 0 || ( if($e->getCode() !== 0 || strpos($e->getMessage(),'ERR Client sent AUTH, but no password is set') === false) {
strpos($e->getMessage(), 'ERR Client sent AUTH, but no password is set') === false &&
strpos($e->getMessage(), 'ERR AUTH <password> called without any password configured for the default user. Are you sure your configuration is correct?') === false)
) {
throw $e; throw $e;
} }
} }
...@@ -336,7 +333,7 @@ class Handler implements \SessionHandlerInterface ...@@ -336,7 +333,7 @@ class Handler implements \SessionHandlerInterface
if ($pass) $redisMaster->auth($pass); if ($pass) $redisMaster->auth($pass);
$roleData = $redisMaster->role(); $roleData = $redisMaster->role();
if ( ! $roleData || $roleData[0] != 'master') { if ( ! $roleData || $roleData[0] != 'master') {
throw new \Exception('Unable to determine master redis server.'); throw new Exception('Unable to determine master redis server.');
} }
} }
} }
...@@ -344,7 +341,7 @@ class Handler implements \SessionHandlerInterface ...@@ -344,7 +341,7 @@ class Handler implements \SessionHandlerInterface
$this->_redis = $redisMaster; $this->_redis = $redisMaster;
break 2; break 2;
} catch (\Exception $e) { } catch (Exception $e) {
unset($sentinelClient); unset($sentinelClient);
$exception = $e; $exception = $e;
} }
...@@ -352,7 +349,7 @@ class Handler implements \SessionHandlerInterface ...@@ -352,7 +349,7 @@ class Handler implements \SessionHandlerInterface
unset($sentinel); unset($sentinel);
if ( ! $this->_redis) { if ( ! $this->_redis) {
throw new ConnectionFailedException('Unable to connect to a Redis: '.$exception->getMessage(), 0, $exception); throw new ConnectionFailedException('Unable to connect to a Redis: '.$exception->getMessage(), $exception);
} }
} }
else { else {
......
# CHANGELOG # CHANGELOG
## 1.5.2 - 2022-08-07
### Changed
- Officially support PHP 8.2
## 1.5.1 - 2021-10-22 ## 1.5.1 - 2021-10-22
### Fixed ### Fixed
...@@ -12,10 +18,11 @@ ...@@ -12,10 +18,11 @@
### Changed ### Changed
- Call handler when waiting on fulfilled/rejected Promise - Call handler when waiting on fulfilled/rejected Promise
- Officially support PHP 8.1
### Fixed ### Fixed
- Fix manually settle promises generated with Utils::task - Fix manually settle promises generated with `Utils::task`
## 1.4.1 - 2021-02-18 ## 1.4.1 - 2021-02-18
......
all: clean test
test:
vendor/bin/phpunit
coverage:
vendor/bin/phpunit --coverage-html=artifacts/coverage
view-coverage:
open artifacts/coverage/index.html
clean:
rm -rf artifacts/*
...@@ -17,7 +17,7 @@ for a general introduction to promises. ...@@ -17,7 +17,7 @@ for a general introduction to promises.
- [Implementation notes](#implementation-notes) - [Implementation notes](#implementation-notes)
# Features ## Features
- [Promises/A+](https://promisesaplus.com/) implementation. - [Promises/A+](https://promisesaplus.com/) implementation.
- Promise resolution and chaining is handled iteratively, allowing for - Promise resolution and chaining is handled iteratively, allowing for
...@@ -29,15 +29,14 @@ for a general introduction to promises. ...@@ -29,15 +29,14 @@ for a general introduction to promises.
`GuzzleHttp\Promise\Coroutine::of()`. `GuzzleHttp\Promise\Coroutine::of()`.
# Quick start ## Quick Start
A *promise* represents the eventual result of an asynchronous operation. The A *promise* represents the eventual result of an asynchronous operation. The
primary way of interacting with a promise is through its `then` method, which primary way of interacting with a promise is through its `then` method, which
registers callbacks to receive either a promise's eventual value or the reason registers callbacks to receive either a promise's eventual value or the reason
why the promise cannot be fulfilled. why the promise cannot be fulfilled.
### Callbacks
## Callbacks
Callbacks are registered with the `then` method by providing an optional Callbacks are registered with the `then` method by providing an optional
`$onFulfilled` followed by an optional `$onRejected` function. `$onFulfilled` followed by an optional `$onRejected` function.
...@@ -60,12 +59,11 @@ $promise->then( ...@@ -60,12 +59,11 @@ $promise->then(
``` ```
*Resolving* a promise means that you either fulfill a promise with a *value* or *Resolving* a promise means that you either fulfill a promise with a *value* or
reject a promise with a *reason*. Resolving a promises triggers callbacks reject a promise with a *reason*. Resolving a promise triggers callbacks
registered with the promises's `then` method. These callbacks are triggered registered with the promise's `then` method. These callbacks are triggered
only once and in the order in which they were added. only once and in the order in which they were added.
### Resolving a Promise
## Resolving a promise
Promises are fulfilled using the `resolve($value)` method. Resolving a promise Promises are fulfilled using the `resolve($value)` method. Resolving a promise
with any value other than a `GuzzleHttp\Promise\RejectedPromise` will trigger with any value other than a `GuzzleHttp\Promise\RejectedPromise` will trigger
...@@ -92,8 +90,7 @@ $promise ...@@ -92,8 +90,7 @@ $promise
$promise->resolve('reader.'); $promise->resolve('reader.');
``` ```
### Promise Forwarding
## Promise forwarding
Promises can be chained one after the other. Each then in the chain is a new Promises can be chained one after the other. Each then in the chain is a new
promise. The return value of a promise is what's forwarded to the next promise. The return value of a promise is what's forwarded to the next
...@@ -123,7 +120,7 @@ $promise->resolve('A'); ...@@ -123,7 +120,7 @@ $promise->resolve('A');
$nextPromise->resolve('B'); $nextPromise->resolve('B');
``` ```
## Promise rejection ### Promise Rejection
When a promise is rejected, the `$onRejected` callbacks are invoked with the When a promise is rejected, the `$onRejected` callbacks are invoked with the
rejection reason. rejection reason.
...@@ -140,7 +137,7 @@ $promise->reject('Error!'); ...@@ -140,7 +137,7 @@ $promise->reject('Error!');
// Outputs "Error!" // Outputs "Error!"
``` ```
## Rejection forwarding ### Rejection Forwarding
If an exception is thrown in an `$onRejected` callback, subsequent If an exception is thrown in an `$onRejected` callback, subsequent
`$onRejected` callbacks are invoked with the thrown exception as the reason. `$onRejected` callbacks are invoked with the thrown exception as the reason.
...@@ -195,7 +192,8 @@ $promise ...@@ -195,7 +192,8 @@ $promise
$promise->reject('Error!'); $promise->reject('Error!');
``` ```
# Synchronous wait
## Synchronous Wait
You can synchronously force promises to complete using a promise's `wait` You can synchronously force promises to complete using a promise's `wait`
method. When creating a promise, you can provide a wait function that is used method. When creating a promise, you can provide a wait function that is used
...@@ -247,8 +245,7 @@ $promise->wait(); ...@@ -247,8 +245,7 @@ $promise->wait();
> PHP Fatal error: Uncaught exception 'GuzzleHttp\Promise\RejectionException' with message 'The promise was rejected with value: foo' > PHP Fatal error: Uncaught exception 'GuzzleHttp\Promise\RejectionException' with message 'The promise was rejected with value: foo'
### Unwrapping a Promise
## Unwrapping a promise
When synchronously waiting on a promise, you are joining the state of the When synchronously waiting on a promise, you are joining the state of the
promise into the current state of execution (i.e., return the value of the promise into the current state of execution (i.e., return the value of the
...@@ -275,7 +272,7 @@ wait function will be the value delivered to promise B. ...@@ -275,7 +272,7 @@ wait function will be the value delivered to promise B.
**Note**: when you do not unwrap the promise, no value is returned. **Note**: when you do not unwrap the promise, no value is returned.
# Cancellation ## Cancellation
You can cancel a promise that has not yet been fulfilled using the `cancel()` You can cancel a promise that has not yet been fulfilled using the `cancel()`
method of a promise. When creating a promise you can provide an optional method of a promise. When creating a promise you can provide an optional
...@@ -283,10 +280,9 @@ cancel function that when invoked cancels the action of computing a resolution ...@@ -283,10 +280,9 @@ cancel function that when invoked cancels the action of computing a resolution
of the promise. of the promise.
# API ## API
### Promise
## Promise
When creating a promise object, you can provide an optional `$waitFn` and When creating a promise object, you can provide an optional `$waitFn` and
`$cancelFn`. `$waitFn` is a function that is invoked with no arguments and is `$cancelFn`. `$waitFn` is a function that is invoked with no arguments and is
...@@ -349,7 +345,7 @@ A promise has the following methods: ...@@ -349,7 +345,7 @@ A promise has the following methods:
Rejects the promise with the given `$reason`. Rejects the promise with the given `$reason`.
## FulfilledPromise ### FulfilledPromise
A fulfilled promise can be created to represent a promise that has been A fulfilled promise can be created to represent a promise that has been
fulfilled. fulfilled.
...@@ -366,7 +362,7 @@ $promise->then(function ($value) { ...@@ -366,7 +362,7 @@ $promise->then(function ($value) {
``` ```
## RejectedPromise ### RejectedPromise
A rejected promise can be created to represent a promise that has been A rejected promise can be created to represent a promise that has been
rejected. rejected.
...@@ -383,7 +379,7 @@ $promise->then(null, function ($reason) { ...@@ -383,7 +379,7 @@ $promise->then(null, function ($reason) {
``` ```
# Promise interop ## Promise Interoperability
This library works with foreign promises that have a `then` method. This means This library works with foreign promises that have a `then` method. This means
you can use Guzzle promises with [React promises](https://github.com/reactphp/promise) you can use Guzzle promises with [React promises](https://github.com/reactphp/promise)
...@@ -409,7 +405,7 @@ a foreign promise. You will need to wrap a third-party promise with a Guzzle ...@@ -409,7 +405,7 @@ a foreign promise. You will need to wrap a third-party promise with a Guzzle
promise in order to utilize wait and cancel functions with foreign promises. promise in order to utilize wait and cancel functions with foreign promises.
## Event Loop Integration ### Event Loop Integration
In order to keep the stack size constant, Guzzle promises are resolved In order to keep the stack size constant, Guzzle promises are resolved
asynchronously using a task queue. When waiting on promises synchronously, the asynchronously using a task queue. When waiting on promises synchronously, the
...@@ -437,10 +433,9 @@ $loop->addPeriodicTimer(0, [$queue, 'run']); ...@@ -437,10 +433,9 @@ $loop->addPeriodicTimer(0, [$queue, 'run']);
*TODO*: Perhaps adding a `futureTick()` on each tick would be faster? *TODO*: Perhaps adding a `futureTick()` on each tick would be faster?
# Implementation notes ## Implementation Notes
## Promise resolution and chaining is handled iteratively ### Promise Resolution and Chaining is Handled Iteratively
By shuffling pending handlers from one owner to another, promises are By shuffling pending handlers from one owner to another, promises are
resolved iteratively, allowing for "infinite" then chaining. resolved iteratively, allowing for "infinite" then chaining.
...@@ -476,8 +471,7 @@ all of its pending handlers to the new promise. When the new promise is ...@@ -476,8 +471,7 @@ all of its pending handlers to the new promise. When the new promise is
eventually resolved, all of the pending handlers are delivered the forwarded eventually resolved, all of the pending handlers are delivered the forwarded
value. value.
### A Promise is the Deferred
## A promise is the deferred.
Some promise libraries implement promises using a deferred object to represent Some promise libraries implement promises using a deferred object to represent
a computation and a promise object to represent the delivery of the result of a computation and a promise object to represent the delivery of the result of
...@@ -505,7 +499,10 @@ $promise->resolve('foo'); ...@@ -505,7 +499,10 @@ $promise->resolve('foo');
## Upgrading from Function API ## Upgrading from Function API
A static API was first introduced in 1.4.0, in order to mitigate problems with functions conflicting between global and local copies of the package. The function API will be removed in 2.0.0. A migration table has been provided here for your convenience: A static API was first introduced in 1.4.0, in order to mitigate problems with
functions conflicting between global and local copies of the package. The
function API will be removed in 2.0.0. A migration table has been provided here
for your convenience:
| Original Function | Replacement Method | | Original Function | Replacement Method |
|----------------|----------------| |----------------|----------------|
...@@ -536,10 +533,12 @@ A static API was first introduced in 1.4.0, in order to mitigate problems with f ...@@ -536,10 +533,12 @@ A static API was first introduced in 1.4.0, in order to mitigate problems with f
If you discover a security vulnerability within this package, please send an email to security@tidelift.com. All security vulnerabilities will be promptly addressed. Please do not disclose security-related issues publicly until a fix has been announced. Please see [Security Policy](https://github.com/guzzle/promises/security/policy) for more information. If you discover a security vulnerability within this package, please send an email to security@tidelift.com. All security vulnerabilities will be promptly addressed. Please do not disclose security-related issues publicly until a fix has been announced. Please see [Security Policy](https://github.com/guzzle/promises/security/policy) for more information.
## License ## License
Guzzle is made available under the MIT License (MIT). Please see [License File](LICENSE) for more information. Guzzle is made available under the MIT License (MIT). Please see [License File](LICENSE) for more information.
## For Enterprise ## For Enterprise
Available as part of the Tidelift Subscription Available as part of the Tidelift Subscription
......
...@@ -81,16 +81,8 @@ class EachPromise implements PromisorInterface ...@@ -81,16 +81,8 @@ class EachPromise implements PromisorInterface
$this->iterable->rewind(); $this->iterable->rewind();
$this->refillPending(); $this->refillPending();
} catch (\Throwable $e) { } catch (\Throwable $e) {
/**
* @psalm-suppress NullReference
* @phpstan-ignore-next-line
*/
$this->aggregate->reject($e); $this->aggregate->reject($e);
} catch (\Exception $e) { } catch (\Exception $e) {
/**
* @psalm-suppress NullReference
* @phpstan-ignore-next-line
*/
$this->aggregate->reject($e); $this->aggregate->reject($e);
} }
......
{
"ignore_php_platform_requirements": {
"8.1": true
}
}
# laminas-mime # laminas-mime
> ## 🇷🇺 Русским гражданам
>
> Мы, участники Laminas, родились и живем в разных странах. У многих из нас есть друзья, родственники и коллеги как в России, так и в Украине. Некоторые из нас родились в России. Некоторые из нас живут в России. У некоторых бабушки и дедушки сражались с фашистами во Второй мировой войне. Здесь никто не поддерживает фашизм.
>
> У одного из нас есть украинская родственница, которая спаслась из дома вместе с сыном. Поезд задержался из-за бомбежки на дороге впереди. У нас есть друзья, которые прячутся в бомбоубежищах. Мы с тревогой ждем весточки от них после воздушных налетов, которые беспорядочно наносят удары и попадают по больницам, школам, детским садам и домам. Мы не берем это из каких-либо СМИ. Мы наблюдаем это напрямую.
>
> Вы доверяете нам достаточно, чтоб использовать наши программы, и мы просим вас довериться нам вновь. Мы нуждаемся в помощи. Выходите и протестуйте против этой бесполезной войны. Остановите кровопролитие. Скажите "Нет войне!"
>
> ## 🇺🇸 To Citizens of Russia
>
> We at Laminas come from all over the world. Many of us have friends, family and colleagues in both Russia and Ukraine. Some of us were born in Russia. Some of us currently live in Russia. Some have grandparents who fought Nazis in World War II. Nobody here supports fascism.
>
> One team member has a Ukrainian relative who fled her home with her son. The train was delayed due to bombing on the road ahead. We have friends who are hiding in bomb shelters. We anxiously follow up on them after the air raids, which indiscriminately fire at hospitals, schools, kindergartens and houses. We're not taking this from any media. These are our actual experiences.
>
> You trust us enough to use our software. We ask that you trust us to say the truth on this. We need your help. Go out and protest this unnecessary war. Stop the bloodshed. Say "stop the war!"
> This package is considered feature-complete, and is now in **security-only** maintenance mode, following a [decision by the Technical Steering Committee](https://github.com/laminas/technical-steering-committee/blob/2b55453e172a1b8c9c4c212be7cf7e7a58b9352c/meetings/minutes/2020-08-03-TSC-Minutes.md#vote-on-components-to-mark-as-security-only). > This package is considered feature-complete, and is now in **security-only** maintenance mode, following a [decision by the Technical Steering Committee](https://github.com/laminas/technical-steering-committee/blob/2b55453e172a1b8c9c4c212be7cf7e7a58b9352c/meetings/minutes/2020-08-03-TSC-Minutes.md#vote-on-components-to-mark-as-security-only).
> If you have a security issue, please [follow our security reporting guidelines](https://getlaminas.org/security/). > If you have a security issue, please [follow our security reporting guidelines](https://getlaminas.org/security/).
> If you wish to take on the role of maintainer, please [nominate yourself](https://github.com/laminas/technical-steering-committee/issues/new?assignees=&labels=Nomination&template=Maintainer_Nomination.md&title=%5BNOMINATION%5D%5BMAINTAINER%5D%3A+%7Bname+of+person+being+nominated%7D) > If you wish to take on the role of maintainer, please [nominate yourself](https://github.com/laminas/technical-steering-committee/issues/new?assignees=&labels=Nomination&template=Maintainer_Nomination.md&title=%5BNOMINATION%5D%5BMAINTAINER%5D%3A+%7Bname+of+person+being+nominated%7D)
......
...@@ -16,7 +16,10 @@ ...@@ -16,7 +16,10 @@
"forum": "https://discourse.laminas.dev" "forum": "https://discourse.laminas.dev"
}, },
"config": { "config": {
"sort-packages": true "sort-packages": true,
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
}, },
"require": { "require": {
"php": "^7.3 || ~8.0.0 || ~8.1.0", "php": "^7.3 || ~8.0.0 || ~8.1.0",
...@@ -25,7 +28,7 @@ ...@@ -25,7 +28,7 @@
"require-dev": { "require-dev": {
"laminas/laminas-coding-standard": "~2.2.1", "laminas/laminas-coding-standard": "~2.2.1",
"laminas/laminas-mail": "^2.12", "laminas/laminas-mail": "^2.12",
"phpunit/phpunit": "^9.3" "phpunit/phpunit": "^9.5"
}, },
"suggest": { "suggest": {
"laminas/laminas-mail": "Laminas\\Mail component" "laminas/laminas-mail": "Laminas\\Mail component"
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "77a8daa5c98d4a651b4fab53280b68e4", "content-hash": "f199db5a33cf17d0bd8e4cc787daac3f",
"packages": [ "packages": [
{ {
"name": "laminas/laminas-stdlib", "name": "laminas/laminas-stdlib",
...@@ -1467,11 +1467,11 @@ ...@@ -1467,11 +1467,11 @@
} }
}, },
"autoload": { "autoload": {
"classmap": [
"src/"
],
"files": [ "files": [
"src/Framework/Assert/Functions.php" "src/Framework/Assert/Functions.php"
],
"classmap": [
"src/"
] ]
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "https://packagist.org/downloads/",
...@@ -3019,5 +3019,5 @@ ...@@ -3019,5 +3019,5 @@
"php": "^7.3 || ~8.0.0 || ~8.1.0" "php": "^7.3 || ~8.0.0 || ~8.1.0"
}, },
"platform-dev": [], "platform-dev": [],
"plugin-api-version": "2.0.0" "plugin-api-version": "2.3.0"
} }
<?xml version="1.0"?>
<ruleset
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="./vendor/squizlabs/php_codesniffer/phpcs.xsd">
<arg name="basepath" value="."/>
<arg name="cache" value=".phpcs-cache"/>
<arg name="colors"/>
<arg name="extensions" value="php"/>
<arg name="parallel" value="80"/>
<!-- Show progress -->
<arg value="p"/>
<!-- Paths to check -->
<file>src</file>
<file>test</file>
<!-- Include all rules from Laminas Coding Standard -->
<rule ref="LaminasCodingStandard"/>
</ruleset>
...@@ -491,17 +491,22 @@ class Mime ...@@ -491,17 +491,22 @@ class Mime
* Mail headers depend on an extended quoted printable algorithm otherwise * Mail headers depend on an extended quoted printable algorithm otherwise
* a range of bugs can occur. * a range of bugs can occur.
* *
* @param string $str * @param string $str
* @param string $charset * @param string $charset
* @param int $lineLength Defaults to {@link LINELENGTH} * @param int $lineLength Defaults to {@link LINELENGTH}
* @param string $lineEnd Defaults to {@link LINEEND} * @param string $lineEnd Defaults to {@link LINEEND}
* @param positive-int|0 $headerNameSize When folding a line, it is necessary to calculate
* the length of the entire line (together with the header name).
* Therefore, you can specify the header name and colon length
* in this argument to fold the string properly.
* @return string * @return string
*/ */
public static function encodeQuotedPrintableHeader( public static function encodeQuotedPrintableHeader(
$str, $str,
$charset, $charset,
$lineLength = self::LINELENGTH, $lineLength = self::LINELENGTH,
$lineEnd = self::LINEEND $lineEnd = self::LINEEND,
$headerNameSize = 0
) { ) {
// Reduce line-length by the length of the required delimiter, charsets and encoding // Reduce line-length by the length of the required delimiter, charsets and encoding
$prefix = sprintf('=?%s?Q?', $charset); $prefix = sprintf('=?%s?Q?', $charset);
...@@ -527,7 +532,14 @@ class Mime ...@@ -527,7 +532,14 @@ class Mime
if ($token === '=20') { if ($token === '=20') {
// only if we have a single char token or space, we can append the // only if we have a single char token or space, we can append the
// tempstring it to the current line or start a new line if necessary. // tempstring it to the current line or start a new line if necessary.
$lineLimitReached = strlen($lines[$currentLine] . $tmp) > $lineLength; if ($currentLine === 0) {
// The size of the first line should be calculated with the header name.
$currentLineLength = strlen($lines[$currentLine] . $tmp) + $headerNameSize;
} else {
$currentLineLength = strlen($lines[$currentLine] . $tmp);
}
$lineLimitReached = $currentLineLength > $lineLength;
$noCurrentLine = $lines[$currentLine] === ''; $noCurrentLine = $lines[$currentLine] === '';
if ($noCurrentLine && $lineLimitReached) { if ($noCurrentLine && $lineLimitReached) {
$lines[$currentLine] = $tmp; $lines[$currentLine] = $tmp;
......
...@@ -23,8 +23,10 @@ class Between extends AbstractValidator ...@@ -23,8 +23,10 @@ class Between extends AbstractValidator
/** /**
* Retain if min and max are numeric values. Allow to not compare string and numeric types * Retain if min and max are numeric values. Allow to not compare string and numeric types
*
* @var boolean
*/ */
private ?bool $numeric = null; private $numeric;
/** /**
* Validation failure message template definitions * Validation failure message template definitions
......
...@@ -381,7 +381,7 @@ class CreditCard extends AbstractValidator ...@@ -381,7 +381,7 @@ class CreditCard extends AbstractValidator
$foundl = false; $foundl = false;
foreach ($types as $type) { foreach ($types as $type) {
foreach ($this->cardType[$type] as $prefix) { foreach ($this->cardType[$type] as $prefix) {
if (0 === strpos($value, (string) $prefix)) { if (0 === strpos($value, $prefix)) {
$foundp = true; $foundp = true;
if (in_array($length, $this->cardLength[$type])) { if (in_array($length, $this->cardLength[$type])) {
$foundl = true; $foundl = true;
......
...@@ -25,6 +25,7 @@ use function in_array; ...@@ -25,6 +25,7 @@ use function in_array;
use function is_array; use function is_array;
use function max; use function max;
use function min; use function min;
use function pow;
use function preg_match; use function preg_match;
use function sprintf; use function sprintf;
use function strpos; use function strpos;
...@@ -462,7 +463,7 @@ class DateStep extends Date ...@@ -462,7 +463,7 @@ class DateStep extends Date
// If we use PHP_INT_MAX DateInterval::__construct falls over with a bad format error // If we use PHP_INT_MAX DateInterval::__construct falls over with a bad format error
// before we reach the max on 64 bit machines // before we reach the max on 64 bit machines
$maxInteger = min(2 ** 31, PHP_INT_MAX); $maxInteger = min(pow(2, 31), PHP_INT_MAX);
// check for integer overflow and split $minimum interval if needed // check for integer overflow and split $minimum interval if needed
$maximumInterval = max($intervalParts); $maximumInterval = max($intervalParts);
$requiredStepIterations = 1; $requiredStepIterations = 1;
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
namespace Laminas\Validator\File; namespace Laminas\Validator\File;
use Countable;
use Laminas\Validator\AbstractValidator; use Laminas\Validator\AbstractValidator;
use Laminas\Validator\Exception; use Laminas\Validator\Exception;
use Psr\Http\Message\UploadedFileInterface; use Psr\Http\Message\UploadedFileInterface;
...@@ -11,7 +12,6 @@ use function array_key_exists; ...@@ -11,7 +12,6 @@ use function array_key_exists;
use function array_merge; use function array_merge;
use function count; use function count;
use function is_array; use function is_array;
use function is_countable;
use function is_string; use function is_string;
use function is_uploaded_file; use function is_uploaded_file;
...@@ -117,7 +117,7 @@ class Upload extends AbstractValidator ...@@ -117,7 +117,7 @@ class Upload extends AbstractValidator
{ {
if ( if (
null === $files null === $files
|| ((is_countable($files)) || ((is_array($files) || $files instanceof Countable)
&& count($files) === 0) && count($files) === 0)
) { ) {
$this->options['files'] = $_FILES; $this->options['files'] = $_FILES;
......
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
namespace Laminas\Validator; namespace Laminas\Validator;
use Countable;
use Traversable; use Traversable;
use function count; use function count;
use function is_array; use function is_array;
use function is_countable;
use function is_numeric; use function is_numeric;
use function sprintf; use function sprintf;
use function ucfirst; use function ucfirst;
...@@ -94,7 +94,7 @@ class IsCountable extends AbstractValidator ...@@ -94,7 +94,7 @@ class IsCountable extends AbstractValidator
*/ */
public function isValid($value) public function isValid($value)
{ {
if (! is_countable($value)) { if (! (is_array($value) || $value instanceof Countable)) {
$this->error(self::NOT_COUNTABLE); $this->error(self::NOT_COUNTABLE);
return false; return false;
} }
......
...@@ -39,9 +39,13 @@ final class UndisclosedPassword extends AbstractValidator ...@@ -39,9 +39,13 @@ final class UndisclosedPassword extends AbstractValidator
self::NOT_A_STRING => 'The provided password is not a string, please provide a correct password', self::NOT_A_STRING => 'The provided password is not a string, please provide a correct password',
]; ];
private ClientInterface $httpClient; // phpcs:enable
/** @var ClientInterface */
private $httpClient;
private RequestFactoryInterface $makeHttpRequest; /** @var RequestFactoryInterface */
private $makeHttpRequest;
public function __construct(ClientInterface $httpClient, RequestFactoryInterface $makeHttpRequest) public function __construct(ClientInterface $httpClient, RequestFactoryInterface $makeHttpRequest)
{ {
......
...@@ -4,3 +4,4 @@ phpseclib Developers: monnerat (Patrick Monnerat) ...@@ -4,3 +4,4 @@ phpseclib Developers: monnerat (Patrick Monnerat)
bantu (Andreas Fischer) bantu (Andreas Fischer)
petrich (Hans-Jürgen Petrich) petrich (Hans-Jürgen Petrich)
GrahamCampbell (Graham Campbell) GrahamCampbell (Graham Campbell)
hc-jworman
\ No newline at end of file
...@@ -10,4 +10,5 @@ phpseclib ongoing development is made possible by [Tidelift](https://tidelift.co ...@@ -10,4 +10,5 @@ phpseclib ongoing development is made possible by [Tidelift](https://tidelift.co
- Zane Hooper - Zane Hooper
- [Setasign](https://www.setasign.com/) - [Setasign](https://www.setasign.com/)
- [Charles Severance](https://github.com/csev) - [Charles Severance](https://github.com/csev)
- [Rachel Fish](https://github.com/itsrachelfish) - [Rachel Fish](https://github.com/itsrachelfish)
\ No newline at end of file - Tharyrok
\ No newline at end of file
...@@ -62,7 +62,8 @@ ...@@ -62,7 +62,8 @@
"ext-libsodium": "SSH2/SFTP can make use of some algorithms provided by the libsodium-php extension.", "ext-libsodium": "SSH2/SFTP can make use of some algorithms provided by the libsodium-php extension.",
"ext-openssl": "Install the OpenSSL extension in order to speed up a wide variety of cryptographic operations.", "ext-openssl": "Install the OpenSSL extension in order to speed up a wide variety of cryptographic operations.",
"ext-mcrypt": "Install the Mcrypt extension in order to speed up a few other cryptographic operations.", "ext-mcrypt": "Install the Mcrypt extension in order to speed up a few other cryptographic operations.",
"ext-gmp": "Install the GMP (GNU Multiple Precision) extension in order to speed up arbitrary precision integer arithmetic operations." "ext-gmp": "Install the GMP (GNU Multiple Precision) extension in order to speed up arbitrary precision integer arithmetic operations.",
"ext-xml": "Install the XML extension to load XML formatted public keys."
}, },
"autoload": { "autoload": {
"files": [ "files": [
......
...@@ -500,6 +500,44 @@ abstract class Base ...@@ -500,6 +500,44 @@ abstract class Base
} }
$this->_setEngine(); $this->_setEngine();
// Determining whether inline crypting can be used by the cipher
if ($this->use_inline_crypt !== false) {
$this->use_inline_crypt = version_compare(PHP_VERSION, '5.3.0') >= 0 || function_exists('create_function');
}
if (!defined('PHP_INT_SIZE')) {
define('PHP_INT_SIZE', 4);
}
if (!defined('CRYPT_BASE_USE_REG_INTVAL')) {
switch (true) {
// PHP_OS & "\xDF\xDF\xDF" == strtoupper(substr(PHP_OS, 0, 3)), but a lot faster
case (PHP_OS & "\xDF\xDF\xDF") === 'WIN':
case (php_uname('m') & "\xDF\xDF\xDF") != 'ARM':
case PHP_INT_SIZE == 8:
define('CRYPT_BASE_USE_REG_INTVAL', true);
break;
case (php_uname('m') & "\xDF\xDF\xDF") == 'ARM':
switch (true) {
/* PHP 7.0.0 introduced a bug that affected 32-bit ARM processors:
https://github.com/php/php-src/commit/716da71446ebbd40fa6cf2cea8a4b70f504cc3cd
altho the changelogs make no mention of it, this bug was fixed with this commit:
https://github.com/php/php-src/commit/c1729272b17a1fe893d1a54e423d3b71470f3ee8
affected versions of PHP are: 7.0.x, 7.1.0 - 7.1.23 and 7.2.0 - 7.2.11 */
case PHP_VERSION_ID >= 70000 && PHP_VERSION_ID <= 70123:
case PHP_VERSION_ID >= 70200 && PHP_VERSION_ID <= 70211:
define('CRYPT_BASE_USE_REG_INTVAL', false);
break;
default:
define('CRYPT_BASE_USE_REG_INTVAL', true);
}
}
}
} }
/** /**
...@@ -593,6 +631,10 @@ abstract class Base ...@@ -593,6 +631,10 @@ abstract class Base
* $hash, $salt, $count, $dkLen * $hash, $salt, $count, $dkLen
* *
* Where $hash (default = sha1) currently supports the following hashes: see: Crypt/Hash.php * Where $hash (default = sha1) currently supports the following hashes: see: Crypt/Hash.php
* {@link https://en.wikipedia.org/wiki/Bcrypt bcypt}:
* $salt, $rounds, $keylen
*
* This is a modified version of bcrypt used by OpenSSH.
* *
* @see Crypt/Hash.php * @see Crypt/Hash.php
* @param string $password * @param string $password
...@@ -606,6 +648,28 @@ abstract class Base ...@@ -606,6 +648,28 @@ abstract class Base
$key = ''; $key = '';
switch ($method) { switch ($method) {
case 'bcrypt':
$func_args = func_get_args();
if (!isset($func_args[2])) {
return false;
}
$salt = $func_args[2];
$rounds = isset($func_args[3]) ? $func_args[3] : 16;
$keylen = isset($func_args[4]) ? $func_args[4] : $this->key_length;
$bf = new Blowfish();
$key = $bf->bcrypt_pbkdf($password, $salt, $keylen + $this->block_size, $rounds);
if (!$key) {
return false;
}
$this->setKey(substr($key, 0, $keylen));
$this->setIV(substr($key, $keylen));
return true;
default: // 'pbkdf2' or 'pbkdf1' default: // 'pbkdf2' or 'pbkdf1'
$func_args = func_get_args(); $func_args = func_get_args();
...@@ -1105,7 +1169,7 @@ abstract class Base ...@@ -1105,7 +1169,7 @@ abstract class Base
$plaintext = ''; $plaintext = '';
if ($this->continuousBuffer) { if ($this->continuousBuffer) {
$iv = &$this->decryptIV; $iv = &$this->decryptIV;
$pos = &$this->buffer['pos']; $pos = &$this->debuffer['pos'];
} else { } else {
$iv = $this->decryptIV; $iv = $this->decryptIV;
$pos = 0; $pos = 0;
...@@ -2798,11 +2862,8 @@ abstract class Base ...@@ -2798,11 +2862,8 @@ abstract class Base
*/ */
function safe_intval($x) function safe_intval($x)
{ {
switch (true) { if (is_int($x)) {
case is_int($x): return $x;
// PHP 5.3, per http://php.net/releases/5_3_0.php, introduced "more consistent float rounding"
case (php_uname('m') & "\xDF\xDF\xDF") != 'ARM':
return $x;
} }
return (fmod($x, 0x80000000) & 0x7FFFFFFF) | return (fmod($x, 0x80000000) & 0x7FFFFFFF) |
((fmod(floor($x / 0x80000000), 2) & 1) << 31); ((fmod(floor($x / 0x80000000), 2) & 1) << 31);
...@@ -2816,15 +2877,12 @@ abstract class Base ...@@ -2816,15 +2877,12 @@ abstract class Base
*/ */
function safe_intval_inline() function safe_intval_inline()
{ {
switch (true) { if (CRYPT_BASE_USE_REG_INTVAL) {
case defined('PHP_INT_SIZE') && PHP_INT_SIZE == 8: return PHP_INT_SIZE == 4 ? 'intval(%s)' : '%s';
case (php_uname('m') & "\xDF\xDF\xDF") != 'ARM':
return '%s';
break;
default:
$safeint = '(is_int($temp = %s) ? $temp : (fmod($temp, 0x80000000) & 0x7FFFFFFF) | ';
return $safeint . '((fmod(floor($temp / 0x80000000), 2) & 1) << 31))';
} }
$safeint = '(is_int($temp = %s) ? $temp : (fmod($temp, 0x80000000) & 0x7FFFFFFF) | ';
return $safeint . '((fmod(floor($temp / 0x80000000), 2) & 1) << 31))';
} }
/** /**
......
...@@ -1246,9 +1246,9 @@ class DES extends Base ...@@ -1246,9 +1246,9 @@ class DES extends Base
$pc2mapd3[($d >> 8) & 0xFF] | $pc2mapd4[ $d & 0xFF]; $pc2mapd3[($d >> 8) & 0xFF] | $pc2mapd4[ $d & 0xFF];
// Reorder: odd bytes/even bytes. Push the result in key schedule. // Reorder: odd bytes/even bytes. Push the result in key schedule.
$val1 = ( $cp & 0xFF000000) | (($cp << 8) & 0x00FF0000) | $val1 = ( $cp & intval(0xFF000000)) | (($cp << 8) & 0x00FF0000) |
(($dp >> 16) & 0x0000FF00) | (($dp >> 8) & 0x000000FF); (($dp >> 16) & 0x0000FF00) | (($dp >> 8) & 0x000000FF);
$val2 = (($cp << 8) & 0xFF000000) | (($cp << 16) & 0x00FF0000) | $val2 = (($cp << 8) & intval(0xFF000000)) | (($cp << 16) & 0x00FF0000) |
(($dp >> 8) & 0x0000FF00) | ( $dp & 0x000000FF); (($dp >> 8) & 0x0000FF00) | ( $dp & 0x000000FF);
$keys[$des_round][self::ENCRYPT][ ] = $val1; $keys[$des_round][self::ENCRYPT][ ] = $val1;
$keys[$des_round][self::DECRYPT][$ki - 1] = $val1; $keys[$des_round][self::DECRYPT][$ki - 1] = $val1;
......
...@@ -72,7 +72,7 @@ class RC2 extends Base ...@@ -72,7 +72,7 @@ class RC2 extends Base
* @var string * @var string
* @access private * @access private
*/ */
var $orig_key; var $orig_key = '';
/** /**
* Don't truncate / null pad key * Don't truncate / null pad key
......
...@@ -1388,6 +1388,10 @@ class RSA ...@@ -1388,6 +1388,10 @@ class RSA
// http://en.wikipedia.org/wiki/XML_Signature // http://en.wikipedia.org/wiki/XML_Signature
case self::PRIVATE_FORMAT_XML: case self::PRIVATE_FORMAT_XML:
case self::PUBLIC_FORMAT_XML: case self::PUBLIC_FORMAT_XML:
if (!extension_loaded('xml')) {
return false;
}
$this->components = array(); $this->components = array();
$xml = xml_parser_create('UTF-8'); $xml = xml_parser_create('UTF-8');
...@@ -1522,14 +1526,44 @@ class RSA ...@@ -1522,14 +1526,44 @@ class RSA
if ($magic !== "openssh-key-v1\0") { if ($magic !== "openssh-key-v1\0") {
return false; return false;
} }
$options = $this->_string_shift($decoded, 24); extract(unpack('Nlength', $this->_string_shift($decoded, 4)));
// \0\0\0\4none = ciphername if (strlen($decoded) < $length) {
// \0\0\0\4none = kdfname return false;
// \0\0\0\0 = kdfoptions }
// \0\0\0\1 = numkeys $ciphername = $this->_string_shift($decoded, $length);
if ($options != "\0\0\0\4none\0\0\0\4none\0\0\0\0\0\0\0\1") { extract(unpack('Nlength', $this->_string_shift($decoded, 4)));
if (strlen($decoded) < $length) {
return false; return false;
} }
$kdfname = $this->_string_shift($decoded, $length);
extract(unpack('Nlength', $this->_string_shift($decoded, 4)));
if (strlen($decoded) < $length) {
return false;
}
$kdfoptions = $this->_string_shift($decoded, $length);
extract(unpack('Nnumkeys', $this->_string_shift($decoded, 4)));
if ($numkeys != 1 || ($ciphername != 'none' && $kdfname != 'bcrypt')) {
return false;
}
switch ($ciphername) {
case 'none':
break;
case 'aes256-ctr':
extract(unpack('Nlength', $this->_string_shift($kdfoptions, 4)));
if (strlen($kdfoptions) < $length) {
return false;
}
$salt = $this->_string_shift($kdfoptions, $length);
extract(unpack('Nrounds', $this->_string_shift($kdfoptions, 4)));
$crypto = new AES(AES::MODE_CTR);
$crypto->disablePadding();
if (!$crypto->setPassword($this->password, 'bcrypt', $salt, $rounds, 32)) {
return false;
}
break;
default:
return false;
}
extract(unpack('Nlength', $this->_string_shift($decoded, 4))); extract(unpack('Nlength', $this->_string_shift($decoded, 4)));
if (strlen($decoded) < $length) { if (strlen($decoded) < $length) {
return false; return false;
...@@ -1539,12 +1573,16 @@ class RSA ...@@ -1539,12 +1573,16 @@ class RSA
if (strlen($decoded) < $length) { if (strlen($decoded) < $length) {
return false; return false;
} }
$paddedKey = $this->_string_shift($decoded, $length);
if ($this->_string_shift($publicKey, 11) !== "\0\0\0\7ssh-rsa") { if ($this->_string_shift($publicKey, 11) !== "\0\0\0\7ssh-rsa") {
return false; return false;
} }
$paddedKey = $this->_string_shift($decoded, $length);
if (isset($crypto)) {
$paddedKey = $crypto->decrypt($paddedKey);
}
$checkint1 = $this->_string_shift($paddedKey, 4); $checkint1 = $this->_string_shift($paddedKey, 4);
$checkint2 = $this->_string_shift($paddedKey, 4); $checkint2 = $this->_string_shift($paddedKey, 4);
if (strlen($checkint1) != 4 || $checkint1 !== $checkint2) { if (strlen($checkint1) != 4 || $checkint1 !== $checkint2) {
......
...@@ -340,7 +340,7 @@ class Rijndael extends Base ...@@ -340,7 +340,7 @@ class Rijndael extends Base
$k = $c[2]; $k = $c[2];
$l = $c[3]; $l = $c[3];
while ($i < $Nb) { while ($i < $Nb) {
$temp[$i] = ($state[$i] & 0xFF000000) ^ $temp[$i] = ($state[$i] & intval(0xFF000000)) ^
($state[$j] & 0x00FF0000) ^ ($state[$j] & 0x00FF0000) ^
($state[$k] & 0x0000FF00) ^ ($state[$k] & 0x0000FF00) ^
($state[$l] & 0x000000FF) ^ ($state[$l] & 0x000000FF) ^
...@@ -426,7 +426,7 @@ class Rijndael extends Base ...@@ -426,7 +426,7 @@ class Rijndael extends Base
$l = $Nb - $c[3]; $l = $Nb - $c[3];
while ($i < $Nb) { while ($i < $Nb) {
$word = ($state[$i] & 0xFF000000) | $word = ($state[$i] & intval(0xFF000000)) |
($state[$j] & 0x00FF0000) | ($state[$j] & 0x00FF0000) |
($state[$k] & 0x0000FF00) | ($state[$k] & 0x0000FF00) |
($state[$l] & 0x000000FF); ($state[$l] & 0x000000FF);
...@@ -465,14 +465,19 @@ class Rijndael extends Base ...@@ -465,14 +465,19 @@ class Rijndael extends Base
{ {
// Each number in $rcon is equal to the previous number multiplied by two in Rijndael's finite field. // Each number in $rcon is equal to the previous number multiplied by two in Rijndael's finite field.
// See http://en.wikipedia.org/wiki/Finite_field_arithmetic#Multiplicative_inverse // See http://en.wikipedia.org/wiki/Finite_field_arithmetic#Multiplicative_inverse
static $rcon = array(0, static $rcon;
0x01000000, 0x02000000, 0x04000000, 0x08000000, 0x10000000,
0x20000000, 0x40000000, 0x80000000, 0x1B000000, 0x36000000, if (!isset($rcon)) {
0x6C000000, 0xD8000000, 0xAB000000, 0x4D000000, 0x9A000000, $rcon = array(0,
0x2F000000, 0x5E000000, 0xBC000000, 0x63000000, 0xC6000000, 0x01000000, 0x02000000, 0x04000000, 0x08000000, 0x10000000,
0x97000000, 0x35000000, 0x6A000000, 0xD4000000, 0xB3000000, 0x20000000, 0x40000000, 0x80000000, 0x1B000000, 0x36000000,
0x7D000000, 0xFA000000, 0xEF000000, 0xC5000000, 0x91000000 0x6C000000, 0xD8000000, 0xAB000000, 0x4D000000, 0x9A000000,
); 0x2F000000, 0x5E000000, 0xBC000000, 0x63000000, 0xC6000000,
0x97000000, 0x35000000, 0x6A000000, 0xD4000000, 0xB3000000,
0x7D000000, 0xFA000000, 0xEF000000, 0xC5000000, 0x91000000
);
$rcon = array_map('intval', $rcon);
}
if (isset($this->kl['key']) && $this->key === $this->kl['key'] && $this->key_length === $this->kl['key_length'] && $this->block_size === $this->kl['block_size']) { if (isset($this->kl['key']) && $this->key === $this->kl['key'] && $this->key_length === $this->kl['key_length'] && $this->block_size === $this->kl['block_size']) {
// already expanded // already expanded
...@@ -511,7 +516,7 @@ class Rijndael extends Base ...@@ -511,7 +516,7 @@ class Rijndael extends Base
// on a 32-bit machine, it's 32-bits, and on a 64-bit machine, it's 64-bits. on a 32-bit machine, // on a 32-bit machine, it's 32-bits, and on a 64-bit machine, it's 64-bits. on a 32-bit machine,
// 0xFFFFFFFF << 8 == 0xFFFFFF00, but on a 64-bit machine, it equals 0xFFFFFFFF00. as such, doing 'and' // 0xFFFFFFFF << 8 == 0xFFFFFF00, but on a 64-bit machine, it equals 0xFFFFFFFF00. as such, doing 'and'
// with 0xFFFFFFFF (or 0xFFFFFF00) on a 32-bit machine is unnecessary, but on a 64-bit machine, it is. // with 0xFFFFFFFF (or 0xFFFFFF00) on a 32-bit machine is unnecessary, but on a 64-bit machine, it is.
$temp = (($temp << 8) & 0xFFFFFF00) | (($temp >> 24) & 0x000000FF); // rotWord $temp = (($temp << 8) & intval(0xFFFFFF00)) | (($temp >> 24) & 0x000000FF); // rotWord
$temp = $this->_subWord($temp) ^ $rcon[$i / $this->Nk]; $temp = $this->_subWord($temp) ^ $rcon[$i / $this->Nk];
} elseif ($this->Nk > 6 && $i % $this->Nk == 4) { } elseif ($this->Nk > 6 && $i % $this->Nk == 4) {
$temp = $this->_subWord($temp); $temp = $this->_subWord($temp);
...@@ -641,9 +646,9 @@ class Rijndael extends Base ...@@ -641,9 +646,9 @@ class Rijndael extends Base
)); ));
foreach ($t3 as $t3i) { foreach ($t3 as $t3i) {
$t0[] = (($t3i << 24) & 0xFF000000) | (($t3i >> 8) & 0x00FFFFFF); $t0[] = (($t3i << 24) & intval(0xFF000000)) | (($t3i >> 8) & 0x00FFFFFF);
$t1[] = (($t3i << 16) & 0xFFFF0000) | (($t3i >> 16) & 0x0000FFFF); $t1[] = (($t3i << 16) & intval(0xFFFF0000)) | (($t3i >> 16) & 0x0000FFFF);
$t2[] = (($t3i << 8) & 0xFFFFFF00) | (($t3i >> 24) & 0x000000FF); $t2[] = (($t3i << 8) & intval(0xFFFFFF00)) | (($t3i >> 24) & 0x000000FF);
} }
$tables = array( $tables = array(
...@@ -725,9 +730,9 @@ class Rijndael extends Base ...@@ -725,9 +730,9 @@ class Rijndael extends Base
)); ));
foreach ($dt3 as $dt3i) { foreach ($dt3 as $dt3i) {
$dt0[] = (($dt3i << 24) & 0xFF000000) | (($dt3i >> 8) & 0x00FFFFFF); $dt0[] = (($dt3i << 24) & intval(0xFF000000)) | (($dt3i >> 8) & 0x00FFFFFF);
$dt1[] = (($dt3i << 16) & 0xFFFF0000) | (($dt3i >> 16) & 0x0000FFFF); $dt1[] = (($dt3i << 16) & intval(0xFFFF0000)) | (($dt3i >> 16) & 0x0000FFFF);
$dt2[] = (($dt3i << 8) & 0xFFFFFF00) | (($dt3i >> 24) & 0x000000FF); $dt2[] = (($dt3i << 8) & intval(0xFFFFFF00)) | (($dt3i >> 24) & 0x000000FF);
}; };
$tables = array( $tables = array(
......
...@@ -369,6 +369,42 @@ class Twofish extends Base ...@@ -369,6 +369,42 @@ class Twofish extends Base
var $key_length = 16; var $key_length = 16;
/** /**
* Default Constructor.
*
* Determines whether or not the mcrypt extension should be used.
*
* $mode could be:
*
* - CRYPT_MODE_ECB
*
* - CRYPT_MODE_CBC
*
* - CRYPT_MODE_CTR
*
* - CRYPT_MODE_CFB
*
* - CRYPT_MODE_OFB
*
* (or the alias constants of the chosen cipher, for example for AES: CRYPT_AES_MODE_ECB or CRYPT_AES_MODE_CBC ...)
*
* If not explicitly set, CRYPT_MODE_CBC will be used.
*
* @param int $mode
* @access public
*/
function __construct($mode = self::MODE_CBC)
{
parent::__construct($mode);
$this->m0 = array_map('intval', $this->m0);
$this->m1 = array_map('intval', $this->m1);
$this->m2 = array_map('intval', $this->m2);
$this->m3 = array_map('intval', $this->m3);
$this->q0 = array_map('intval', $this->q0);
$this->q1 = array_map('intval', $this->q1);
}
/**
* Sets the key length. * Sets the key length.
* *
* Valid key lengths are 128, 192 or 256 bits * Valid key lengths are 128, 192 or 256 bits
......
...@@ -145,6 +145,7 @@ class X509 ...@@ -145,6 +145,7 @@ class X509
var $AuthorityKeyIdentifier; var $AuthorityKeyIdentifier;
var $CertificatePolicies; var $CertificatePolicies;
var $AuthorityInfoAccessSyntax; var $AuthorityInfoAccessSyntax;
var $SubjectInfoAccessSyntax;
var $SubjectAltName; var $SubjectAltName;
var $SubjectDirectoryAttributes; var $SubjectDirectoryAttributes;
var $PrivateKeyUsagePeriod; var $PrivateKeyUsagePeriod;
...@@ -2163,7 +2164,11 @@ class X509 ...@@ -2163,7 +2164,11 @@ class X509
if (!$fsock) { if (!$fsock) {
return false; return false;
} }
fputs($fsock, "GET $parts[path] HTTP/1.0\r\n"); $path = $parts['path'];
if (isset($parts['query'])) {
$path.= '?' . $parts['query'];
}
fputs($fsock, "GET $path HTTP/1.0\r\n");
fputs($fsock, "Host: $parts[host]\r\n\r\n"); fputs($fsock, "Host: $parts[host]\r\n\r\n");
$line = fgets($fsock, 1024); $line = fgets($fsock, 1024);
if (strlen($line) < 3) { if (strlen($line) < 3) {
......
...@@ -263,12 +263,12 @@ class BigInteger ...@@ -263,12 +263,12 @@ class BigInteger
} }
} }
if (function_exists('phpinfo') && extension_loaded('openssl') && !defined('MATH_BIGINTEGER_OPENSSL_DISABLE') && !defined('MATH_BIGINTEGER_OPENSSL_ENABLED')) { if (extension_loaded('openssl') && !defined('MATH_BIGINTEGER_OPENSSL_DISABLE') && !defined('MATH_BIGINTEGER_OPENSSL_ENABLED')) {
// some versions of XAMPP have mismatched versions of OpenSSL which causes it not to work // some versions of XAMPP have mismatched versions of OpenSSL which causes it not to work
$versions = array(); $versions = array();
// avoid generating errors (even with suppression) when phpinfo() is disabled (common in production systems) // avoid generating errors (even with suppression) when phpinfo() is disabled (common in production systems)
if (strpos(ini_get('disable_functions'), 'phpinfo') === false) { if (function_exists('phpinfo')) {
ob_start(); ob_start();
@phpinfo(); @phpinfo();
$content = ob_get_contents(); $content = ob_get_contents();
......
...@@ -718,7 +718,16 @@ class SFTP extends SSH2 ...@@ -718,7 +718,16 @@ class SFTP extends SSH2
return false; return false;
} }
$this->pwd = true;
$this->pwd = $this->_realpath('.'); $this->pwd = $this->_realpath('.');
if ($this->pwd === false) {
if (!$this->canonicalize_paths) {
user_error('Unable to canonicalize current working directory');
return false;
}
$this->canonicalize_paths = false;
$this->_reset_connection(NET_SSH2_DISCONNECT_CONNECTION_LOST);
}
$this->_update_stat_cache($this->pwd, array()); $this->_update_stat_cache($this->pwd, array());
...@@ -766,7 +775,9 @@ class SFTP extends SSH2 ...@@ -766,7 +775,9 @@ class SFTP extends SSH2
} }
/** /**
* Enable path canonicalization * Disable path canonicalization
*
* If this is enabled then $sftp->pwd() will not return the canonicalized absolute path
* *
* @access public * @access public
*/ */
...@@ -872,10 +883,37 @@ class SFTP extends SSH2 ...@@ -872,10 +883,37 @@ class SFTP extends SSH2
function _realpath($path) function _realpath($path)
{ {
if (!$this->canonicalize_paths) { if (!$this->canonicalize_paths) {
return $path; if ($this->pwd === true) {
return '.';
}
if (!strlen($path) || $path[0] != '/') {
$path = $this->pwd . '/' . $path;
}
$parts = explode('/', $path);
$afterPWD = $beforePWD = [];
foreach ($parts as $part) {
switch ($part) {
//case '': // some SFTP servers /require/ double /'s. see https://github.com/phpseclib/phpseclib/pull/1137
case '.':
break;
case '..':
if (!empty($afterPWD)) {
array_pop($afterPWD);
} else {
$beforePWD[] = '..';
}
break;
default:
$afterPWD[] = $part;
}
}
$beforePWD = count($beforePWD) ? implode('/', $beforePWD) : '.';
return $beforePWD . '/' . implode('/', $afterPWD);
} }
if ($this->pwd === false) { if ($this->pwd === true) {
// http://tools.ietf.org/html/draft-ietf-secsh-filexfer-13#section-8.9 // http://tools.ietf.org/html/draft-ietf-secsh-filexfer-13#section-8.9
if (!$this->_send_sftp_packet(NET_SFTP_REALPATH, pack('Na*', strlen($path), $path))) { if (!$this->_send_sftp_packet(NET_SFTP_REALPATH, pack('Na*', strlen($path), $path))) {
return false; return false;
...@@ -897,7 +935,6 @@ class SFTP extends SSH2 ...@@ -897,7 +935,6 @@ class SFTP extends SSH2
$this->_logError($response); $this->_logError($response);
return false; return false;
default: default:
user_error('Expected SSH_FXP_NAME or SSH_FXP_STATUS');
return false; return false;
} }
} }
...@@ -2273,7 +2310,7 @@ class SFTP extends SSH2 ...@@ -2273,7 +2310,7 @@ class SFTP extends SSH2
case is_resource($data): case is_resource($data):
$mode = $mode & ~self::SOURCE_LOCAL_FILE; $mode = $mode & ~self::SOURCE_LOCAL_FILE;
$info = stream_get_meta_data($data); $info = stream_get_meta_data($data);
if ($info['wrapper_type'] == 'PHP' && $info['stream_type'] == 'Input') { if (isset($info['wrapper_type']) && $info['wrapper_type'] == 'PHP' && $info['stream_type'] == 'Input') {
$fp = fopen('php://memory', 'w+'); $fp = fopen('php://memory', 'w+');
stream_copy_to_stream($data, $fp); stream_copy_to_stream($data, $fp);
rewind($fp); rewind($fp);
...@@ -2709,7 +2746,7 @@ class SFTP extends SSH2 ...@@ -2709,7 +2746,7 @@ class SFTP extends SSH2
// normally $entries would have at least . and .. but it might not if the directories // normally $entries would have at least . and .. but it might not if the directories
// permissions didn't allow reading // permissions didn't allow reading
if (empty($entries)) { if (empty($entries)) {
return false; $entries = array();
} }
unset($entries['.'], $entries['..']); unset($entries['.'], $entries['..']);
...@@ -3618,6 +3655,9 @@ class SFTP extends SSH2 ...@@ -3618,6 +3655,9 @@ class SFTP extends SSH2
while ($tempLength > 0) { while ($tempLength > 0) {
$temp = $this->_get_channel_packet(self::CHANNEL, true); $temp = $this->_get_channel_packet(self::CHANNEL, true);
if (is_bool($temp)) { if (is_bool($temp)) {
if ($temp && $this->channel_status[self::CHANNEL] === NET_SSH2_MSG_CHANNEL_CLOSE) {
$this->channel_close = true;
}
$this->packet_type = false; $this->packet_type = false;
$this->packet_buffer = ''; $this->packet_buffer = '';
return false; return false;
......
...@@ -3519,7 +3519,11 @@ class SSH2 ...@@ -3519,7 +3519,11 @@ class SSH2
if (!is_resource($this->fsock) || feof($this->fsock)) { if (!is_resource($this->fsock) || feof($this->fsock)) {
$this->bitmap = 0; $this->bitmap = 0;
user_error('Connection closed (by server) prematurely ' . $elapsed . 's'); $str = 'Connection closed (by server) prematurely';
if (isset($elapsed)) {
$str.= ' ' . $elapsed . 's';
}
user_error($str);
return false; return false;
} }
......
<?php declare(strict_types = 1);
namespace PHPStan\PhpDocParser\Ast\PhpDoc;
use PHPStan\PhpDocParser\Ast\NodeAttributes;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use function trim;
class AssertTagMethodValueNode implements PhpDocTagValueNode
{
use NodeAttributes;
/** @var TypeNode */
public $type;
/** @var string */
public $parameter;
/** @var string */
public $method;
/** @var bool */
public $isNegated;
/** @var string (may be empty) */
public $description;
public function __construct(TypeNode $type, string $parameter, string $method, bool $isNegated, string $description)
{
$this->type = $type;
$this->parameter = $parameter;
$this->method = $method;
$this->isNegated = $isNegated;
$this->description = $description;
}
public function __toString(): string
{
$isNegated = $this->isNegated ? '!' : '';
return trim("{$this->type} {$isNegated}{$this->parameter}->{$this->method}() {$this->description}");
}
}
<?php declare(strict_types = 1);
namespace PHPStan\PhpDocParser\Ast\PhpDoc;
use PHPStan\PhpDocParser\Ast\NodeAttributes;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use function trim;
class AssertTagPropertyValueNode implements PhpDocTagValueNode
{
use NodeAttributes;
/** @var TypeNode */
public $type;
/** @var string */
public $parameter;
/** @var string */
public $property;
/** @var bool */
public $isNegated;
/** @var string (may be empty) */
public $description;
public function __construct(TypeNode $type, string $parameter, string $property, bool $isNegated, string $description)
{
$this->type = $type;
$this->parameter = $parameter;
$this->property = $property;
$this->isNegated = $isNegated;
$this->description = $description;
}
public function __toString(): string
{
$isNegated = $this->isNegated ? '!' : '';
return trim("{$this->type} {$isNegated}{$this->parameter}->{$this->property} {$this->description}");
}
}
...@@ -300,34 +300,6 @@ class PhpDocNode implements Node ...@@ -300,34 +300,6 @@ class PhpDocNode implements Node
} }
/**
* @return AssertTagPropertyValueNode[]
*/
public function getAssertPropertyTagValues(string $tagName = '@phpstan-assert'): array
{
return array_filter(
array_column($this->getTagsByName($tagName), 'value'),
static function (PhpDocTagValueNode $value): bool {
return $value instanceof AssertTagPropertyValueNode;
}
);
}
/**
* @return AssertTagMethodValueNode[]
*/
public function getAssertMethodTagValues(string $tagName = '@phpstan-assert'): array
{
return array_filter(
array_column($this->getTagsByName($tagName), 'value'),
static function (PhpDocTagValueNode $value): bool {
return $value instanceof AssertTagMethodValueNode;
}
);
}
public function __toString(): string public function __toString(): string
{ {
$children = array_map( $children = array_map(
......
...@@ -46,7 +46,6 @@ class Lexer ...@@ -46,7 +46,6 @@ class Lexer
public const TOKEN_OPEN_CURLY_BRACKET = 31; public const TOKEN_OPEN_CURLY_BRACKET = 31;
public const TOKEN_CLOSE_CURLY_BRACKET = 32; public const TOKEN_CLOSE_CURLY_BRACKET = 32;
public const TOKEN_NEGATED = 33; public const TOKEN_NEGATED = 33;
public const TOKEN_ARROW = 34;
public const TOKEN_LABELS = [ public const TOKEN_LABELS = [
self::TOKEN_REFERENCE => '\'&\'', self::TOKEN_REFERENCE => '\'&\'',
...@@ -67,7 +66,6 @@ class Lexer ...@@ -67,7 +66,6 @@ class Lexer
self::TOKEN_VARIADIC => '\'...\'', self::TOKEN_VARIADIC => '\'...\'',
self::TOKEN_DOUBLE_COLON => '\'::\'', self::TOKEN_DOUBLE_COLON => '\'::\'',
self::TOKEN_DOUBLE_ARROW => '\'=>\'', self::TOKEN_DOUBLE_ARROW => '\'=>\'',
self::TOKEN_ARROW => '\'->\'',
self::TOKEN_EQUAL => '\'=\'', self::TOKEN_EQUAL => '\'=\'',
self::TOKEN_OPEN_PHPDOC => '\'/**\'', self::TOKEN_OPEN_PHPDOC => '\'/**\'',
self::TOKEN_CLOSE_PHPDOC => '\'*/\'', self::TOKEN_CLOSE_PHPDOC => '\'*/\'',
...@@ -140,7 +138,6 @@ class Lexer ...@@ -140,7 +138,6 @@ class Lexer
self::TOKEN_VARIADIC => '\\.\\.\\.', self::TOKEN_VARIADIC => '\\.\\.\\.',
self::TOKEN_DOUBLE_COLON => '::', self::TOKEN_DOUBLE_COLON => '::',
self::TOKEN_DOUBLE_ARROW => '=>', self::TOKEN_DOUBLE_ARROW => '=>',
self::TOKEN_ARROW => '->',
self::TOKEN_EQUAL => '=', self::TOKEN_EQUAL => '=',
self::TOKEN_COLON => ':', self::TOKEN_COLON => ':',
......
...@@ -6,7 +6,6 @@ use PHPStan\PhpDocParser\Ast; ...@@ -6,7 +6,6 @@ use PHPStan\PhpDocParser\Ast;
use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode; use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode;
use PHPStan\PhpDocParser\Lexer\Lexer; use PHPStan\PhpDocParser\Lexer\Lexer;
use PHPStan\ShouldNotHappenException; use PHPStan\ShouldNotHappenException;
use function array_key_exists;
use function array_values; use function array_values;
use function count; use function count;
use function trim; use function trim;
...@@ -447,56 +446,13 @@ class PhpDocParser ...@@ -447,56 +446,13 @@ class PhpDocParser
return new Ast\PhpDoc\TypeAliasImportTagValueNode($importedAlias, new IdentifierTypeNode($importedFrom), $importedAs); return new Ast\PhpDoc\TypeAliasImportTagValueNode($importedAlias, new IdentifierTypeNode($importedFrom), $importedAs);
} }
/** private function parseAssertTagValue(TokenIterator $tokens): Ast\PhpDoc\AssertTagValueNode
* @return Ast\PhpDoc\AssertTagValueNode|Ast\PhpDoc\AssertTagPropertyValueNode|Ast\PhpDoc\AssertTagMethodValueNode
*/
private function parseAssertTagValue(TokenIterator $tokens): Ast\PhpDoc\PhpDocTagValueNode
{ {
$isNegated = $tokens->tryConsumeTokenType(Lexer::TOKEN_NEGATED); $isNegated = $tokens->tryConsumeTokenType(Lexer::TOKEN_NEGATED);
$type = $this->typeParser->parse($tokens); $type = $this->typeParser->parse($tokens);
$parameter = $this->parseAssertParameter($tokens); $parameter = $this->parseRequiredVariableName($tokens);
$description = $this->parseOptionalDescription($tokens); $description = $this->parseOptionalDescription($tokens);
return new Ast\PhpDoc\AssertTagValueNode($type, $parameter, $isNegated, $description);
if (array_key_exists('method', $parameter)) {
return new Ast\PhpDoc\AssertTagMethodValueNode($type, $parameter['parameter'], $parameter['method'], $isNegated, $description);
} elseif (array_key_exists('property', $parameter)) {
return new Ast\PhpDoc\AssertTagPropertyValueNode($type, $parameter['parameter'], $parameter['property'], $isNegated, $description);
}
return new Ast\PhpDoc\AssertTagValueNode($type, $parameter['parameter'], $isNegated, $description);
}
/**
* @return array{parameter: string}|array{parameter: string, property: string}|array{parameter: string, method: string}
*/
private function parseAssertParameter(TokenIterator $tokens): array
{
if ($tokens->isCurrentTokenType(Lexer::TOKEN_THIS_VARIABLE)) {
$parameter = '$this';
$requirePropertyOrMethod = true;
$tokens->next();
} else {
$parameter = $tokens->currentTokenValue();
$requirePropertyOrMethod = false;
$tokens->consumeTokenType(Lexer::TOKEN_VARIABLE);
}
if ($requirePropertyOrMethod || $tokens->isCurrentTokenType(Lexer::TOKEN_ARROW)) {
$tokens->consumeTokenType(Lexer::TOKEN_ARROW);
$propertyOrMethod = $tokens->currentTokenValue();
$tokens->consumeTokenType(Lexer::TOKEN_IDENTIFIER);
if ($tokens->tryConsumeTokenType(Lexer::TOKEN_OPEN_PARENTHESES)) {
$tokens->consumeTokenType(Lexer::TOKEN_CLOSE_PARENTHESES);
return ['parameter' => $parameter, 'method' => $propertyOrMethod];
}
return ['parameter' => $parameter, 'property' => $propertyOrMethod];
}
return ['parameter' => $parameter];
} }
private function parseOptionalVariableName(TokenIterator $tokens): string private function parseOptionalVariableName(TokenIterator $tokens): string
......
...@@ -73,7 +73,11 @@ class Timestamps ...@@ -73,7 +73,11 @@ class Timestamps
$pos += 4; $pos += 4;
// update timestamp to a fixed value // update timestamp to a fixed value
$this->contents = substr_replace($this->contents, pack('L', $timestamp), $pos, 4); $timeStampBytes = pack('L', $timestamp);
$this->contents[$pos + 0] = $timeStampBytes[0];
$this->contents[$pos + 1] = $timeStampBytes[1];
$this->contents[$pos + 2] = $timeStampBytes[2];
$this->contents[$pos + 3] = $timeStampBytes[3];
// skip timestamp, compressed file size, crc32 checksum and file flags // skip timestamp, compressed file size, crc32 checksum and file flags
$pos += 4*4; $pos += 4*4;
......
...@@ -14,6 +14,7 @@ bin/magento setup:upgrade --safe-mode=1 ...@@ -14,6 +14,7 @@ bin/magento setup:upgrade --safe-mode=1
### Amasty ### Amasty
- Amasty_Xnotif (Amasty Out of Stock Notification) - Amasty_Xnotif (Amasty Out of Stock Notification)
- Amasty_Mostviewed
### Mirasvit ### Mirasvit
......
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
"name": "swissup/module-breeze-integrations", "name": "swissup/module-breeze-integrations",
"description": "Third-party modules integrations with Breeze Frontend", "description": "Third-party modules integrations with Breeze Frontend",
"type": "magento2-module", "type": "magento2-module",
"version": "1.2.4", "version": "1.2.5",
"license": "OSL-3.0", "license": "OSL-3.0",
"require": { "require": {
"swissup/module-breeze": "^1.13.8" "swissup/module-breeze": "^1.13.9"
}, },
"autoload": { "autoload": {
"files": [ "files": [
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"name": "swissup/theme-frontend-breeze-blank", "name": "swissup/theme-frontend-breeze-blank",
"description": "Clean, lightning-fast breeze-powered theme.", "description": "Clean, lightning-fast breeze-powered theme.",
"type": "magento2-theme", "type": "magento2-theme",
"version": "1.2.0", "version": "1.2.1",
"license": "OSL-3.0", "license": "OSL-3.0",
"autoload": { "autoload": {
"files": [ "files": [
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
] ]
}, },
"require": { "require": {
"swissup/module-breeze": "^1.13.8", "swissup/module-breeze": "^1.13.9",
"swissup/module-rtl": "*" "swissup/module-rtl": "*"
} }
} }
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
.breeze-block-sidebar-title { .breeze-block-sidebar-title {
& when (@critical) { & when (@critical) {
.lib-css(line-height, @block-title__line-height); .lib-css(line-height, @block-title__line-height);
.lib-css(font-family, @block-title__font-family);
.lib-css(font-size, @block-title__font-size); .lib-css(font-size, @block-title__font-size);
.lib-css(font-weight, @block-title__font-weight); .lib-css(font-weight, @block-title__font-weight);
.lib-css(text-transform, @block-title__text-transform); .lib-css(text-transform, @block-title__text-transform);
...@@ -49,6 +50,7 @@ ...@@ -49,6 +50,7 @@
.breeze-block-content-title { .breeze-block-content-title {
& when (@critical) { & when (@critical) {
.lib-css(line-height, @content-block-title__line-height); .lib-css(line-height, @content-block-title__line-height);
.lib-css(font-family, @content-block-title__font-family);
.lib-css(font-size, @content-block-title__font-size); .lib-css(font-size, @content-block-title__font-size);
.lib-css(font-weight, @content-block-title__font-weight); .lib-css(font-weight, @content-block-title__font-weight);
.lib-css(text-transform, @content-block-title__text-transform); .lib-css(text-transform, @content-block-title__text-transform);
...@@ -85,6 +87,7 @@ ...@@ -85,6 +87,7 @@
.breeze-block-hero-title { .breeze-block-hero-title {
& when (@critical) { & when (@critical) {
.lib-css(line-height, @hero-block-title__line-height); .lib-css(line-height, @hero-block-title__line-height);
.lib-css(font-family, @hero-block-title__font-family);
.lib-css(font-size, @hero-block-title__font-size); .lib-css(font-size, @hero-block-title__font-size);
.lib-css(font-weight, @hero-block-title__font-weight); .lib-css(font-weight, @hero-block-title__font-weight);
.lib-css(margin, @hero-block-title__margin); .lib-css(margin, @hero-block-title__margin);
...@@ -137,6 +140,7 @@ ...@@ -137,6 +140,7 @@
.breeze-block-hero-cms-title { .breeze-block-hero-cms-title {
& when (@critical) { & when (@critical) {
.lib-css(line-height, @hero-block-cms-title__line-height); .lib-css(line-height, @hero-block-cms-title__line-height);
.lib-css(font-family, @hero-block-cms-title__font-family);
.lib-css(font-size, @hero-block-cms-title__font-size); .lib-css(font-size, @hero-block-cms-title__font-size);
.lib-css(font-weight, @hero-block-cms-title__font-weight); .lib-css(font-weight, @hero-block-cms-title__font-weight);
.lib-css(margin, @hero-block-cms-title__margin); .lib-css(margin, @hero-block-cms-title__margin);
...@@ -174,6 +178,7 @@ ...@@ -174,6 +178,7 @@
} }
} }
.breeze-block-boxed-title { .breeze-block-boxed-title {
.lib-css(font-family, @boxed-block-title__font-family);
.lib-css(font-size, @boxed-block-title__font-size); .lib-css(font-size, @boxed-block-title__font-size);
.lib-css(text-align, @boxed-block-title__text-align); .lib-css(text-align, @boxed-block-title__text-align);
.lib-css(font-weight, @boxed-block-title__font-weight); .lib-css(font-weight, @boxed-block-title__font-weight);
......
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
align-items: center; align-items: center;
gap: @1; gap: @1;
.lib-css(font-family, @button__font-family);
.lib-css(font-weight, @button__font-weight); .lib-css(font-weight, @button__font-weight);
.lib-css(font-size, @button__font-size); .lib-css(font-size, @button__font-size);
.lib-css(text-transform, @button__text-transform); .lib-css(text-transform, @button__text-transform);
......
@block__indent: @6; @block__indent: @6;
@block-title__line-height: @7; @block-title__line-height: @7;
@block-title__font-family: false;
@block-title__font-size: @4-5; @block-title__font-size: @4-5;
@block-title__font-weight: 500; @block-title__font-weight: 500;
@block-title__text-transform: false; @block-title__text-transform: false;
...@@ -15,6 +16,7 @@ ...@@ -15,6 +16,7 @@
@block-content__border-width: false; @block-content__border-width: false;
@content-block-title__line-height: false; @content-block-title__line-height: false;
@content-block-title__font-family: false;
@content-block-title__font-size: false; @content-block-title__font-size: false;
@content-block-title__font-weight: false; @content-block-title__font-weight: false;
@content-block-title__text-transform: false; @content-block-title__text-transform: false;
...@@ -29,6 +31,7 @@ ...@@ -29,6 +31,7 @@
@content-block-content__border-width: false; @content-block-content__border-width: false;
@account-block-title__line-height: @7; @account-block-title__line-height: @7;
@account-block-title__font-family: false;
@account-block-title__font-size: @4-5; @account-block-title__font-size: @4-5;
@account-block-title__font-weight: 500; @account-block-title__font-weight: 500;
@account-block-title__text-transform: none; @account-block-title__text-transform: none;
...@@ -44,6 +47,7 @@ ...@@ -44,6 +47,7 @@
@hero-block-title__text-align: false; @hero-block-title__text-align: false;
@hero-block-title__line-height: false; @hero-block-title__line-height: false;
@hero-block-title__font-family: false;
@hero-block-title__font-size: false; @hero-block-title__font-size: false;
@hero-block-title__font-weight: false; @hero-block-title__font-weight: false;
@hero-block-title__text-transform: false; @hero-block-title__text-transform: false;
...@@ -65,6 +69,7 @@ ...@@ -65,6 +69,7 @@
@hero-block-cms-title__text-align: false; @hero-block-cms-title__text-align: false;
@hero-block-cms-title__line-height: false; @hero-block-cms-title__line-height: false;
@hero-block-cms-title__font-family: false;
@hero-block-cms-title__font-size: false; @hero-block-cms-title__font-size: false;
@hero-block-cms-title__font-weight: false; @hero-block-cms-title__font-weight: false;
@hero-block-cms-title__text-transform: false; @hero-block-cms-title__text-transform: false;
...@@ -87,6 +92,7 @@ ...@@ -87,6 +92,7 @@
@boxed-block__border: 1px solid @divider__color; @boxed-block__border: 1px solid @divider__color;
@boxed-block__border-width: false; @boxed-block__border-width: false;
@boxed-block__border-radius: @button__border-radius; @boxed-block__border-radius: @button__border-radius;
@boxed-block-title__font-family: false;
@boxed-block-title__font-size: false; @boxed-block-title__font-size: false;
@boxed-block-title__font-weight: false; @boxed-block-title__font-weight: false;
@boxed-block-title__text-transform: false; @boxed-block-title__text-transform: false;
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
@checkbox__focus__shadow: ~"0 0 0 2px rgb(var(--base-bg)), 0 0 0 4px rgb(var(--input-focus-border-color))"; @checkbox__focus__shadow: ~"0 0 0 2px rgb(var(--base-bg)), 0 0 0 4px rgb(var(--input-focus-border-color))";
@button__font-weight: 400; @button__font-weight: 400;
@button__font-family: false;
@button__font-size: false; @button__font-size: false;
@button__color: ~"rgb(var(--button-color))"; @button__color: ~"rgb(var(--button-color))";
@button__background: ~"rgba(var(--button-bg), var(--button-bg-alpha))"; @button__background: ~"rgba(var(--button-bg), var(--button-bg-alpha))";
......
...@@ -18,6 +18,10 @@ ...@@ -18,6 +18,10 @@
@line-height__4xl: @10; @line-height__4xl: @10;
@line-height__5xl: 1; @line-height__5xl: 1;
@base__font-family: @font-sans;
@base__font-size: @font-size__base;
@base__line-height: @line-height__base;
@h1__font-size: @font-size__4xl; @h1__font-size: @font-size__4xl;
@h1__font-weight: bold; @h1__font-weight: bold;
@h1__line-height: @line-height__4xl; @h1__line-height: @line-height__4xl;
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
html { html {
color: @base__color; color: @base__color;
background: @base__background; background: @base__background;
font-family: var(--font-family); font-family: @base__font-family;
font-size: var(--font-size); font-size: @base__font-size;
line-height: var(--line-height); line-height: @base__line-height;
} }
::selection { ::selection {
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
} }
code, kbd, pre, samp { code, kbd, pre, samp {
font-family: var(--font-family-mono); font-family: @font-mono;
} }
h1, .h1, h1, .h1,
......
...@@ -59,11 +59,6 @@ ...@@ -59,11 +59,6 @@
--button-secondary-bg: @rgb-button-secondary-bg; --button-secondary-bg: @rgb-button-secondary-bg;
--button-secondary-border-color: @rgb-button-secondary-border; --button-secondary-border-color: @rgb-button-secondary-border;
--font-family: @font-sans;
--font-size: @4;
--font-family-mono: @font-mono;
--line-height: @6;
--transition-duration: 200ms; --transition-duration: 200ms;
--spinner-size: @6; --spinner-size: @6;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment