Skip to content

Commit

Permalink
Merge pull request #21 from yoomoney/release/v2.1.0
Browse files Browse the repository at this point in the history
Release/2.1.0
  • Loading branch information
tonchik-tm authored Oct 13, 2021
2 parents b9c82ad + 712f8c0 commit bd8cfc6
Show file tree
Hide file tree
Showing 210 changed files with 3,821 additions and 1,185 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### v2.1.0 от 13.10.2021
* Замена Сбербанк Онлайн на SberPay
* Обновлен SDK до версии 2.1.7

### v2.0.3 от 27.01.2021
* Обновлен SDK до версии 2.0.5
* Нормализация чека с учетом скидок
Expand Down
4 changes: 2 additions & 2 deletions payment/YooMoneyApi/YooMoneyApi.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?php
/**
* Version: 2.0.3
* Version: 2.1.0
* License: Любое использование Вами программы означает полное и безоговорочное принятие Вами условий лицензионного договора, размещенного по адресу https://yoomoney.ru/doc.xml?id=527132 (далее – «Лицензионный договор»). Если Вы не принимаете условия Лицензионного договора в полном объёме, Вы не имеете права использовать программу в каких-либо целях.
*/

require_once 'api/Simpla.php';
require_once 'autoload.php';
define('YOOMONEY_MODULE_VERSION', '2.0.3');
define('YOOMONEY_MODULE_VERSION', '2.1.0');

use YooKassa\Client;
use YooKassa\Model\Payment;
Expand Down
4 changes: 2 additions & 2 deletions payment/YooMoneyApi/settings.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<module>
<name>
ЮKassa (версия 2.0.3)
ЮKassa (версия 2.1.0)
</name>
<settings>
<variable>yoomoney_shopid</variable>
Expand Down Expand Up @@ -63,7 +63,7 @@
<value>alfabank</value>
</options>
<options>
<name>Сбербанк Онлайн</name>
<name>SberPay</name>
<value>sberbank</value>
</options>
<options>
Expand Down
40 changes: 37 additions & 3 deletions payment/YooMoneyApi/vendor/composer/ClassLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,13 @@
*
* @author Fabien Potencier <[email protected]>
* @author Jordi Boggiano <[email protected]>
* @see http://www.php-fig.org/psr/psr-0/
* @see http://www.php-fig.org/psr/psr-4/
* @see https://www.php-fig.org/psr/psr-0/
* @see https://www.php-fig.org/psr/psr-4/
*/
class ClassLoader
{
private $vendorDir;

// PSR-4
private $prefixLengthsPsr4 = array();
private $prefixDirsPsr4 = array();
Expand All @@ -57,10 +59,17 @@ class ClassLoader
private $missingClasses = array();
private $apcuPrefix;

private static $registeredLoaders = array();

public function __construct($vendorDir = null)
{
$this->vendorDir = $vendorDir;
}

public function getPrefixes()
{
if (!empty($this->prefixesPsr0)) {
return call_user_func_array('array_merge', $this->prefixesPsr0);
return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
}

return array();
Expand Down Expand Up @@ -300,6 +309,17 @@ public function getApcuPrefix()
public function register($prepend = false)
{
spl_autoload_register(array($this, 'loadClass'), true, $prepend);

if (null === $this->vendorDir) {
return;
}

if ($prepend) {
self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
} else {
unset(self::$registeredLoaders[$this->vendorDir]);
self::$registeredLoaders[$this->vendorDir] = $this;
}
}

/**
Expand All @@ -308,6 +328,10 @@ public function register($prepend = false)
public function unregister()
{
spl_autoload_unregister(array($this, 'loadClass'));

if (null !== $this->vendorDir) {
unset(self::$registeredLoaders[$this->vendorDir]);
}
}

/**
Expand Down Expand Up @@ -367,6 +391,16 @@ public function findFile($class)
return $file;
}

/**
* Returns the currently registered loaders indexed by their corresponding vendor directories.
*
* @return self[]
*/
public static function getRegisteredLoaders()
{
return self::$registeredLoaders;
}

private function findFileWithExtension($class, $ext)
{
// PSR-4 lookup
Expand Down
Loading

0 comments on commit bd8cfc6

Please sign in to comment.