Skip to content

Commit

Permalink
Merge pull request #449 from wischerdson/master
Browse files Browse the repository at this point in the history
Remove illuminate/support package
  • Loading branch information
bessudnov authored May 18, 2022
2 parents e0fb801 + 7883009 commit 18cd35c
Show file tree
Hide file tree
Showing 32 changed files with 153 additions and 32 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ composer.phar
composer.lock
.idea
examples/.env
.phpunit.result.cache
/.DS_Store
9 changes: 5 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,18 @@
"amocrm"
],
"require": {
"php": ">=7.1",
"php": ">=7.1 || >=8.0",
"ext-json": "*",
"amocrm/oauth2-amocrm": "^2.0",
"guzzlehttp/guzzle": "6.* || 7.*",
"illuminate/support": "5.* || 6.* || 7.* || 8.* || 9.*",
"symfony/dotenv": "3.* || 4.* || 5.* || 6.*",
"fig/http-message-util": "1.*",
"ramsey/uuid": "^3 || ^4",
"lcobucci/jwt": "^3.4.6 || ^4.0.4",
"nesbot/carbon": "^2.52"
},
"require-dev": {
"phpunit/phpunit": "7.*.* || 9.*.*",
"phpunit/phpunit": "7.* || 8.* || 9.*",
"squizlabs/php_codesniffer": "3.5.*"
},
"autoload": {
Expand All @@ -45,7 +44,9 @@
"AmoCRM\\Models\\": "src/AmoCRM/Models",
"AmoCRM\\Collections\\": "src/AmoCRM/Collections",
"AmoCRM\\Filters\\": "src/AmoCRM/Filters",
"AmoCRM\\Helpers\\": "src/AmoCRM/Helpers"
"AmoCRM\\Helpers\\": "src/AmoCRM/Helpers",
"AmoCRM\\Contracts\\": "src/AmoCRM/Contracts",
"AmoCRM\\Support\\": "src/AmoCRM/Support"
}
},
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/AmoCRM/Collections/BaseApiCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use AmoCRM\Models\BaseApiModel;
use ArrayAccess;
use ArrayIterator;
use Illuminate\Support\Str;
use AmoCRM\Support\Str;
use InvalidArgumentException;
use IteratorAggregate;
use JsonSerializable;
Expand Down
13 changes: 13 additions & 0 deletions src/AmoCRM/Contracts/Support/Arrayable.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

namespace AmoCRM\Contracts\Support;

interface Arrayable
{
/**
* Get the instance as an array.
*
* @return array
*/
public function toArray();
}
2 changes: 1 addition & 1 deletion src/AmoCRM/Models/AccountSettings/AmojoRights.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace AmoCRM\Models\AccountSettings;

use Illuminate\Contracts\Support\Arrayable;
use AmoCRM\Contracts\Support\Arrayable;

class AmojoRights implements Arrayable
{
Expand Down
2 changes: 1 addition & 1 deletion src/AmoCRM/Models/AccountSettings/DateTimeSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace AmoCRM\Models\AccountSettings;

use Illuminate\Contracts\Support\Arrayable;
use AmoCRM\Contracts\Support\Arrayable;

class DateTimeSettings implements Arrayable
{
Expand Down
2 changes: 1 addition & 1 deletion src/AmoCRM/Models/AccountSettings/InvoicesSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace AmoCRM\Models\AccountSettings;

use Illuminate\Contracts\Support\Arrayable;
use AmoCRM\Contracts\Support\Arrayable;

class InvoicesSettings implements Arrayable
{
Expand Down
2 changes: 1 addition & 1 deletion src/AmoCRM/Models/AccountSettings/TaskType.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace AmoCRM\Models\AccountSettings;

use AmoCRM\Models\BaseApiModel;
use Illuminate\Contracts\Support\Arrayable;
use AmoCRM\Contracts\Support\Arrayable;

class TaskType extends BaseApiModel implements Arrayable
{
Expand Down
2 changes: 1 addition & 1 deletion src/AmoCRM/Models/AccountSettings/UsersGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace AmoCRM\Models\AccountSettings;

use AmoCRM\Models\BaseApiModel;
use Illuminate\Contracts\Support\Arrayable;
use AmoCRM\Contracts\Support\Arrayable;

class UsersGroup extends BaseApiModel implements Arrayable
{
Expand Down
2 changes: 1 addition & 1 deletion src/AmoCRM/Models/BaseApiModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace AmoCRM\Models;

use Illuminate\Support\Str;
use AmoCRM\Support\Str;

use function is_callable;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use AmoCRM\Enum\Chats\Templates\Buttons\ButtonsEnums;
use AmoCRM\Exceptions\InvalidArgumentException;
use AmoCRM\Models\BaseApiModel;
use Illuminate\Contracts\Support\Arrayable;
use AmoCRM\Contracts\Support\Arrayable;

/**
* Class AbstractButtonModel
Expand Down
2 changes: 1 addition & 1 deletion src/AmoCRM/Models/CustomFields/EnumModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace AmoCRM\Models\CustomFields;

use AmoCRM\Models\BaseApiModel;
use Illuminate\Contracts\Support\Arrayable;
use AmoCRM\Contracts\Support\Arrayable;

/**
* Class EnumModel
Expand Down
2 changes: 1 addition & 1 deletion src/AmoCRM/Models/CustomFields/NestedModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use AmoCRM\Exceptions\InvalidArgumentException;
use AmoCRM\Models\BaseApiModel;
use Illuminate\Contracts\Support\Arrayable;
use AmoCRM\Contracts\Support\Arrayable;

use function is_null;
use function preg_match;
Expand Down
2 changes: 1 addition & 1 deletion src/AmoCRM/Models/CustomFields/RequiredStatusModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace AmoCRM\Models\CustomFields;

use AmoCRM\Models\BaseApiModel;
use Illuminate\Contracts\Support\Arrayable;
use AmoCRM\Contracts\Support\Arrayable;

/**
* Class RequiredStatusModel
Expand Down
2 changes: 1 addition & 1 deletion src/AmoCRM/Models/Customers/Statuses/StatusModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use AmoCRM\Models\BaseApiModel;
use AmoCRM\Models\Interfaces\HasIdInterface;
use AmoCRM\Models\Traits\RequestIdTrait;
use Illuminate\Contracts\Support\Arrayable;
use AmoCRM\Contracts\Support\Arrayable;

class StatusModel extends BaseApiModel implements Arrayable, HasIdInterface
{
Expand Down
2 changes: 1 addition & 1 deletion src/AmoCRM/Models/Leads/Pipelines/PipelineModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
use AmoCRM\Models\Interfaces\HasIdInterface;
use AmoCRM\Models\Leads\Pipelines\Statuses\StatusModel;
use AmoCRM\Models\Traits\RequestIdTrait;
use Illuminate\Contracts\Support\Arrayable;
use AmoCRM\Contracts\Support\Arrayable;

class PipelineModel extends BaseApiModel implements Arrayable, HasIdInterface
{
Expand Down
2 changes: 1 addition & 1 deletion src/AmoCRM/Models/Leads/Pipelines/Statuses/StatusModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use AmoCRM\Models\BaseApiModel;
use AmoCRM\Models\Interfaces\HasIdInterface;
use AmoCRM\Models\Traits\RequestIdTrait;
use Illuminate\Contracts\Support\Arrayable;
use AmoCRM\Contracts\Support\Arrayable;

class StatusModel extends BaseApiModel implements Arrayable, HasIdInterface
{
Expand Down
2 changes: 1 addition & 1 deletion src/AmoCRM/Models/NoteModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use AmoCRM\Models\Factories\NoteFactory;
use AmoCRM\Models\Interfaces\HasIdInterface;
use AmoCRM\Models\Traits\RequestIdTrait;
use Illuminate\Contracts\Support\Arrayable;
use AmoCRM\Contracts\Support\Arrayable;

/**
* Class NoteModel
Expand Down
2 changes: 1 addition & 1 deletion src/AmoCRM/Models/SourceModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use AmoCRM\Collections\Sources\SourceServicesCollection;
use AmoCRM\Models\Interfaces\HasIdInterface;
use AmoCRM\Models\Traits\RequestIdTrait;
use Illuminate\Contracts\Support\Arrayable;
use AmoCRM\Contracts\Support\Arrayable;

class SourceModel extends BaseApiModel implements Arrayable, HasIdInterface
{
Expand Down
2 changes: 1 addition & 1 deletion src/AmoCRM/Models/Sources/SourceServiceModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use AmoCRM\Collections\Sources\SourceServicesPagesCollection;
use AmoCRM\Models\BaseApiModel;
use Illuminate\Contracts\Support\Arrayable;
use AmoCRM\Contracts\Support\Arrayable;

class SourceServiceModel extends BaseApiModel implements Arrayable
{
Expand Down
2 changes: 1 addition & 1 deletion src/AmoCRM/Models/Sources/SourceServicePageModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace AmoCRM\Models\Sources;

use AmoCRM\Models\BaseApiModel;
use Illuminate\Contracts\Support\Arrayable;
use AmoCRM\Contracts\Support\Arrayable;

class SourceServicePageModel extends BaseApiModel implements Arrayable
{
Expand Down
2 changes: 1 addition & 1 deletion src/AmoCRM/Models/TagModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
use AmoCRM\Models\Interfaces\EntityApiInterface;
use AmoCRM\Models\Interfaces\HasIdInterface;
use AmoCRM\Models\Traits\RequestIdTrait;
use Illuminate\Contracts\Support\Arrayable;
use AmoCRM\Contracts\Support\Arrayable;

use function in_array;

Expand Down
2 changes: 1 addition & 1 deletion src/AmoCRM/Models/Unsorted/AcceptUnsortedModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use AmoCRM\Collections\CompaniesCollection;
use AmoCRM\Collections\ContactsCollection;
use AmoCRM\Collections\Leads\LeadsCollection;
use Illuminate\Contracts\Support\Arrayable;
use AmoCRM\Contracts\Support\Arrayable;

/**
* Class AcceptUnsortedModel
Expand Down
2 changes: 1 addition & 1 deletion src/AmoCRM/Models/Unsorted/ChatsMetadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use AmoCRM\Models\Unsorted\Interfaces\UnsortedMetadataInterface;
use AmoCRM\Models\BaseApiModel;
use Illuminate\Contracts\Support\Arrayable;
use AmoCRM\Contracts\Support\Arrayable;

class ChatsMetadata extends BaseApiModel implements Arrayable, UnsortedMetadataInterface
{
Expand Down
2 changes: 1 addition & 1 deletion src/AmoCRM/Models/Unsorted/DeclineUnsortedModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use AmoCRM\Collections\CompaniesCollection;
use AmoCRM\Collections\ContactsCollection;
use AmoCRM\Collections\Leads\LeadsCollection;
use Illuminate\Contracts\Support\Arrayable;
use AmoCRM\Contracts\Support\Arrayable;

class DeclineUnsortedModel implements Arrayable
{
Expand Down
2 changes: 1 addition & 1 deletion src/AmoCRM/Models/Unsorted/FormsMetadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use AmoCRM\Models\BaseApiModel;
use AmoCRM\Models\Unsorted\Interfaces\UnsortedMetadataInterface;
use Illuminate\Contracts\Support\Arrayable;
use AmoCRM\Contracts\Support\Arrayable;

use function array_key_exists;
use function is_null;
Expand Down
2 changes: 1 addition & 1 deletion src/AmoCRM/Models/Unsorted/LinkUnsortedModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use AmoCRM\Collections\CompaniesCollection;
use AmoCRM\Collections\ContactsCollection;
use AmoCRM\Collections\Leads\LeadsCollection;
use Illuminate\Contracts\Support\Arrayable;
use AmoCRM\Contracts\Support\Arrayable;

class LinkUnsortedModel implements Arrayable
{
Expand Down
2 changes: 1 addition & 1 deletion src/AmoCRM/Models/Unsorted/MailMetadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use AmoCRM\Models\Unsorted\Interfaces\UnsortedMetadataInterface;
use AmoCRM\Models\BaseApiModel;
use Illuminate\Contracts\Support\Arrayable;
use AmoCRM\Contracts\Support\Arrayable;

class MailMetadata extends BaseApiModel implements Arrayable, UnsortedMetadataInterface
{
Expand Down
2 changes: 1 addition & 1 deletion src/AmoCRM/Models/Unsorted/SipMetadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use AmoCRM\Models\Unsorted\Interfaces\UnsortedMetadataInterface;
use AmoCRM\Models\BaseApiModel;
use Illuminate\Contracts\Support\Arrayable;
use AmoCRM\Contracts\Support\Arrayable;

use function is_scalar;

Expand Down
2 changes: 1 addition & 1 deletion src/AmoCRM/Models/Unsorted/UnsortedSummaryModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace AmoCRM\Models\Unsorted;

use Illuminate\Contracts\Support\Arrayable;
use AmoCRM\Contracts\Support\Arrayable;

class UnsortedSummaryModel implements Arrayable
{
Expand Down
2 changes: 1 addition & 1 deletion src/AmoCRM/Models/Widgets/SettingTemplateModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace AmoCRM\Models\Widgets;

use AmoCRM\Models\BaseApiModel;
use Illuminate\Contracts\Support\Arrayable;
use AmoCRM\Contracts\Support\Arrayable;

class SettingTemplateModel extends BaseApiModel implements Arrayable
{
Expand Down
Loading

0 comments on commit 18cd35c

Please sign in to comment.