Skip to content

Commit 8aeb05c

Browse files
committed
fix: switch from tightenco/collect to illuminate/collections
1 parent d132a4a commit 8aeb05c

25 files changed

+33
-31
lines changed

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"ext-json": "*",
1919
"ext-zip": "*",
2020
"guzzlehttp/guzzle": "^7.0",
21+
"illuminate/collections": "^8.0|^9.0",
2122
"league/flysystem": "^2.0|^3.0",
2223
"league/flysystem-ftp": "^2.0|^3.0",
2324
"league/flysystem-sftp": "^2.0|^3.0",
@@ -31,8 +32,7 @@
3132
"symfony/finder": "^5.4.3|^6.0.3",
3233
"symfony/polyfill-php80": "^1.24",
3334
"symfony/process": "^5.4|^6.0",
34-
"symfony/yaml": "^5.4|^6.0",
35-
"tightenco/collect": "^8.0"
35+
"symfony/yaml": "^5.4|^6.0"
3636
},
3737
"require-dev": {
3838
"fakerphp/faker": "^1.17",

phpstan.neon

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
parameters:
22
level: max
3+
checkGenericClassInNonGenericObjectType: false
34
checkMissingIterableValueType: false
45
ignoreErrors:
56
- '#Access to an undefined property Tightenco\\Collect\\Support\\HigherOrder#'
67
- '#Method [^\s]* has no return typehint specified.#'
78
- '#Method [^\s]* has parameter \$[^\s]* with no typehint specified.#'
89
- '#.*undefined.*ZipArchive.*#'
10+
- '#Unable to resolve the template type (TValue|TKey) in call to function collect#'

src/ApiClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
use GuzzleHttp\Exception\ClientException;
1818
use GuzzleHttp\Pool;
1919
use GuzzleHttp\Psr7\Request;
20+
use Illuminate\Support\Collection;
2021
use Psr\Http\Message\ResponseInterface;
2122
use Symfony\Component\Console\Exception\RuntimeException;
22-
use Tightenco\Collect\Support\Collection;
2323
use Ymir\Cli\Exception\ApiClientException;
2424
use Ymir\Cli\ProjectConfiguration\ProjectConfiguration;
2525

src/CliConfiguration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313

1414
namespace Ymir\Cli;
1515

16+
use Illuminate\Support\Collection;
1617
use Symfony\Component\Console\Exception\RuntimeException;
1718
use Symfony\Component\Filesystem\Filesystem;
18-
use Tightenco\Collect\Support\Collection;
1919
use Ymir\Cli\Command\Team\SelectTeamCommand;
2020

2121
class CliConfiguration

src/Command/Cache/CreateCacheCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313

1414
namespace Ymir\Cli\Command\Cache;
1515

16+
use Illuminate\Support\Collection;
1617
use Symfony\Component\Console\Exception\InvalidArgumentException;
1718
use Symfony\Component\Console\Exception\RuntimeException;
1819
use Symfony\Component\Console\Input\InputArgument;
1920
use Symfony\Component\Console\Input\InputInterface;
2021
use Symfony\Component\Console\Input\InputOption;
21-
use Tightenco\Collect\Support\Collection;
2222
use Ymir\Cli\Command\AbstractCommand;
2323
use Ymir\Cli\Console\OutputInterface;
2424
use Ymir\Cli\ProjectConfiguration\CacheConfigurationChange;

src/Command/Database/CreateDatabaseServerCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313

1414
namespace Ymir\Cli\Command\Database;
1515

16+
use Illuminate\Support\Collection;
1617
use Symfony\Component\Console\Exception\InvalidArgumentException;
1718
use Symfony\Component\Console\Exception\RuntimeException;
1819
use Symfony\Component\Console\Helper\TableSeparator;
1920
use Symfony\Component\Console\Input\InputArgument;
2021
use Symfony\Component\Console\Input\InputInterface;
2122
use Symfony\Component\Console\Input\InputOption;
22-
use Tightenco\Collect\Support\Collection;
2323
use Ymir\Cli\Command\AbstractCommand;
2424
use Ymir\Cli\Console\OutputInterface;
2525

@@ -127,7 +127,7 @@ private function determineType(Collection $network, InputInterface $input, Outpu
127127
$types = $this->apiClient->getDatabaseServerTypes((int) $network['provider']['id']);
128128

129129
if ($this->getBooleanOption($input, 'dev')) {
130-
return $types->keys()->first();
130+
return (string) $types->keys()->first();
131131
}
132132

133133
$type = $this->getStringOption($input, 'type');

src/Command/Project/AbstractProjectDeploymentCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313

1414
namespace Ymir\Cli\Command\Project;
1515

16+
use Illuminate\Support\Collection;
1617
use Symfony\Component\Console\Input\InputInterface;
17-
use Tightenco\Collect\Support\Collection;
1818
use Ymir\Cli\ApiClient;
1919
use Ymir\Cli\CliConfiguration;
2020
use Ymir\Cli\Command\AbstractProjectCommand;
@@ -80,7 +80,7 @@ protected function perform(InputInterface $input, OutputInterface $output)
8080

8181
$unmanagedDomains = $unmanagedDomains->filter(function (string $unmanagedDomain) use ($vanityDomainName) {
8282
try {
83-
return !collect(dns_get_record($unmanagedDomain, DNS_CNAME))->contains('target', $vanityDomainName);
83+
return !collect((array) dns_get_record($unmanagedDomain, DNS_CNAME))->contains('target', $vanityDomainName);
8484
} catch (\Throwable $exception) {
8585
return true;
8686
}

src/Command/Project/ConfigureProjectCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313

1414
namespace Ymir\Cli\Command\Project;
1515

16+
use Illuminate\Support\Collection;
1617
use Symfony\Component\Console\Exception\InvalidArgumentException;
1718
use Symfony\Component\Console\Exception\RuntimeException;
1819
use Symfony\Component\Console\Input\InputArgument;
1920
use Symfony\Component\Console\Input\InputInterface;
20-
use Tightenco\Collect\Support\Collection;
2121
use Ymir\Cli\ApiClient;
2222
use Ymir\Cli\CliConfiguration;
2323
use Ymir\Cli\Command\AbstractProjectCommand;

src/Command/Project/DeployProjectCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313

1414
namespace Ymir\Cli\Command\Project;
1515

16+
use Illuminate\Support\Collection;
1617
use Symfony\Component\Console\Exception\RuntimeException;
1718
use Symfony\Component\Console\Input\InputArgument;
1819
use Symfony\Component\Console\Input\InputInterface;
1920
use Symfony\Component\Console\Input\InputOption;
20-
use Tightenco\Collect\Support\Collection;
2121
use Ymir\Cli\ApiClient;
2222
use Ymir\Cli\CliConfiguration;
2323
use Ymir\Cli\Command\Uploads\ImportUploadsCommand;

src/Command/Project/InitializeProjectCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313

1414
namespace Ymir\Cli\Command\Project;
1515

16+
use Illuminate\Support\Collection;
1617
use Symfony\Component\Console\Input\InputInterface;
1718
use Symfony\Component\Console\Output\NullOutput;
1819
use Symfony\Component\Filesystem\Filesystem;
19-
use Tightenco\Collect\Support\Collection;
2020
use Ymir\Cli\ApiClient;
2121
use Ymir\Cli\CliConfiguration;
2222
use Ymir\Cli\Command\AbstractCommand;

0 commit comments

Comments
 (0)