This repository was archived by the owner on Feb 7, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +16
-31
lines changed Expand file tree Collapse file tree 4 files changed +16
-31
lines changed Original file line number Diff line number Diff line change 6060* improve DX - add [ Rector] ( https://github.com/rectorphp/rector ) for improve code quality and speed up releases cycle
6161
6262### Changed
63+ * ❗️ migrate from ` ramsey/uuid ` to ` symfony/uid `
6364* ❗️ update scope ` telephony ` , scope fully rewritten
6465 * ` ExternalCall ` – work with external call:
6566 * ` getCallRecordUploadUrl ` – get url for upload call record file
115116 * add ` CrmEntityType ` – crm entity type enum
116117 * add ` PbxType ` – pbx type enum
117118 * add ` SipRegistrationStatus ` – pbx sip line registration status
118- * change signature ` Bitrix24\SDK\Core\Credentials\AccessToken::getRefreshToken()?string; ` - add nullable option for event tokens
119+ * change signature ` Bitrix24\SDK\Core\Credentials\AccessToken::getRefreshToken()?string; ` - add nullable option for event tokens
120+ * change signature ` Bitrix24\SDK\Core\Commands\Command::getName():?string ` renamed to ` getId():string `
121+
119122
120123### Deleted
121124* remove class ` Bitrix24\SDK\Application\Requests\Events\OnApplicationInstall\Auth `
Original file line number Diff line number Diff line change 2727 "ext-intl" : " *" ,
2828 "psr/log" : " ^2 || ^3" ,
2929 "fig/http-message-util" : " 1.1.*" ,
30- "ramsey/uuid" : " ^3 ||^4" ,
3130 "nesbot/carbon" : " 3.3.*" ,
3231 "moneyphp/money" : " ^3 || ^4" ,
3332 "symfony/http-client" : " ^6 || ^7" ,
Original file line number Diff line number Diff line change @@ -737,7 +737,7 @@ protected function getTraversable(bool $isHaltOnError): Generator
737737 [
738738 'batchItemNumber ' => $ batchItem ,
739739 'batchApiCommand ' => $ traversableBatchResult ->getApiCommand ()->getApiMethod (),
740- 'batchApiCommandUuid ' => $ traversableBatchResult ->getApiCommand ()->getUuid ()-> toString (),
740+ 'batchApiCommandId ' => $ traversableBatchResult ->getApiCommand ()->getId (),
741741 ]
742742 );
743743 // todo try to multiplex requests
@@ -831,7 +831,7 @@ private function convertToApiCommands(): array
831831 {
832832 $ apiCommands = [];
833833 foreach ($ this ->commands as $ command ) {
834- $ apiCommands [$ command ->getName () ?? $ command -> getUuid ()-> toString ()] = sprintf (
834+ $ apiCommands [$ command ->getId ()] = sprintf (
835835 '%s?%s ' ,
836836 $ command ->getApiMethod (),
837837 http_build_query ($ command ->getParameters ())
Original file line number Diff line number Diff line change 44
55namespace Bitrix24 \SDK \Core \Commands ;
66
7- use Ramsey \Uuid \Uuid ;
8- use Ramsey \Uuid \UuidInterface ;
7+ use Symfony \Component \Uid \Uuid ;
98
10- /**
11- * Class Command
12- *
13- * @package Bitrix24\SDK\Core\Commands
14- */
159class Command
1610{
17- private readonly string $ name ;
18-
19- private readonly \Ramsey \Uuid \UuidInterface $ uuid ;
20-
21- /**
22- * BatchCommand constructor.
23- *
24- *
25- * @throws \Exception
26- */
27- public function __construct (private readonly string $ apiMethod , private readonly array $ parameters , ?string $ name = null )
28- {
29- $ this ->uuid = Uuid::uuid4 ();
30- $ this ->name = $ name ?? $ this ->uuid ->toString ();
31- }
32-
33- public function getUuid (): UuidInterface
11+ public function __construct (
12+ private readonly string $ apiMethod ,
13+ private readonly array $ parameters ,
14+ private ?string $ id = null )
3415 {
35- return $ this ->uuid ;
16+ if ($ id === null ) {
17+ $ this ->id = (Uuid::v7 ())->toRfc4122 ();
18+ }
3619 }
3720
3821 public function getApiMethod (): string
@@ -45,8 +28,8 @@ public function getParameters(): array
4528 return $ this ->parameters ;
4629 }
4730
48- public function getName (): ? string
31+ public function getId (): string
4932 {
50- return $ this ->name ;
33+ return $ this ->id ;
5134 }
5235}
You can’t perform that action at this time.
0 commit comments