Skip to content

Commit 8fc938c

Browse files
committed
⬆️ Replace dependency tightenco/collect by illuminate/collection - issue #3551
1 parent 08074c8 commit 8fc938c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+55
-58
lines changed

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"erusev/parsedown": "^1.7",
2727
"erusev/parsedown-extra": "^0.8.1",
2828
"fakerphp/faker": "^1.16",
29+
"illuminate/collections": "^10.48",
2930
"jasny/twig-extensions": "^1.3",
3031
"knplabs/doctrine-behaviors": "^2.1",
3132
"knplabs/knp-menu-bundle": "^3.1",
@@ -76,7 +77,6 @@
7677
"symfony/webpack-encore-bundle": "^1.12",
7778
"symfony/yaml": "^5.4",
7879
"symfonycasts/reset-password-bundle": "^1.9",
79-
"tightenco/collect": "^v8.34",
8080
"twig/extra-bundle": "^3.3",
8181
"twig/html-extra": "^3.3",
8282
"twig/intl-extra": "^3.3",

src/Api/Extensions/ContentExtension.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
use Bolt\Enum\Statuses;
1414
use Doctrine\ORM\Query\Expr\Join;
1515
use Doctrine\ORM\QueryBuilder;
16-
use Tightenco\Collect\Support\Collection;
16+
use Illuminate\Support\Collection;
1717

1818
final class ContentExtension implements QueryCollectionExtensionInterface, QueryItemExtensionInterface
1919
{

src/Cache/FilesIndexCacher.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace Bolt\Cache;
44

55
use Bolt\Utils\FilesIndex;
6-
use Tightenco\Collect\Support\Collection;
6+
use Illuminate\Support\Collection;
77

88
class FilesIndexCacher extends FilesIndex implements CachingInterface
99
{

src/Collection/DeepCollection.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace Bolt\Collection;
66

7-
use Tightenco\Collect\Support\Collection;
7+
use Illuminate\Support\Collection;
88

99
class DeepCollection extends Collection
1010
{

src/Configuration/Config.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
use Symfony\Component\Yaml\Yaml;
2020
use Symfony\Contracts\Cache\CacheInterface;
2121
use Symfony\Contracts\Cache\ItemInterface;
22-
use Tightenco\Collect\Support\Collection;
22+
use Illuminate\Support\Collection;
2323
use Webimpress\SafeWriter\FileWriter;
2424

2525
class Config

src/Configuration/Content/ContentType.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
namespace Bolt\Configuration\Content;
66

77
use Bolt\Collection\DeepCollection;
8-
use Tightenco\Collect\Support\Collection;
8+
use Illuminate\Support\Collection;
99

1010
class ContentType extends DeepCollection
1111
{

src/Configuration/Content/FieldType.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace Bolt\Configuration\Content;
66

7-
use Tightenco\Collect\Support\Collection;
7+
use Illuminate\Support\Collection;
88

99
class FieldType extends Collection
1010
{

src/Configuration/Content/TaxonomyType.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
namespace Bolt\Configuration\Content;
66

77
use Bolt\Collection\DeepCollection;
8-
use Tightenco\Collect\Support\Collection;
8+
use Illuminate\Support\Collection;
99

1010
class TaxonomyType extends DeepCollection
1111
{

src/Configuration/Parser/BaseParser.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
use Symfony\Component\Config\Exception\FileLocatorFileNotFoundException;
99
use Symfony\Component\Config\FileLocator;
1010
use Symfony\Component\Yaml\Yaml;
11-
use Tightenco\Collect\Support\Collection;
11+
use Illuminate\Support\Collection;
1212

1313
abstract class BaseParser
1414
{

src/Configuration/Parser/ContentTypesParser.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
use Bolt\Configuration\Content\FieldType;
1111
use Bolt\Enum\Statuses;
1212
use Bolt\Exception\ConfigurationException;
13-
use Tightenco\Collect\Support\Collection;
13+
use Illuminate\Support\Collection;
1414

1515
class ContentTypesParser extends BaseParser
1616
{

src/Configuration/Parser/GeneralParser.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
namespace Bolt\Configuration\Parser;
66

77
use Bolt\Common\Arr;
8-
use Tightenco\Collect\Support\Collection;
8+
use Illuminate\Support\Collection;
99

1010
class GeneralParser extends BaseParser
1111
{

src/Configuration/Parser/MenuParser.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace Bolt\Configuration\Parser;
66

7-
use Tightenco\Collect\Support\Collection;
7+
use Illuminate\Support\Collection;
88

99
class MenuParser extends BaseParser
1010
{

src/Configuration/Parser/PermissionsParser.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
namespace Bolt\Configuration\Parser;
66

77
use Bolt\Common\Arr;
8-
use Tightenco\Collect\Support\Collection;
8+
use Illuminate\Support\Collection;
99

1010
class PermissionsParser extends BaseParser
1111
{

src/Configuration/Parser/TaxonomyParser.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
namespace Bolt\Configuration\Parser;
66

77
use Bolt\Common\Str;
8-
use Tightenco\Collect\Support\Collection;
8+
use Illuminate\Support\Collection;
99

1010
class TaxonomyParser extends BaseParser
1111
{

src/Configuration/Parser/ThemeParser.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace Bolt\Configuration\Parser;
66

7-
use Tightenco\Collect\Support\Collection;
7+
use Illuminate\Support\Collection;
88

99
class ThemeParser extends BaseParser
1010
{

src/Configuration/PathResolver.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
use Bolt\Exception\ConfigurationException;
88
use Symfony\Component\Filesystem\Path;
9-
use Tightenco\Collect\Support\Collection;
9+
use Illuminate\Support\Collection;
1010

1111
/**
1212
* A class to resolve and manage paths. Paths defined here are allowed to have variables within them.

src/Controller/Backend/Async/SelectOptionsController.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
use Symfony\Component\HttpFoundation\JsonResponse;
1212
use Symfony\Component\HttpFoundation\Request;
1313
use Symfony\Component\Routing\Annotation\Route;
14-
use Tightenco\Collect\Support\Collection;
14+
use Illuminate\Support\Collection;
1515

1616
/**
1717
* @Security("is_granted('upload')")

src/Controller/Backend/ContentEditController.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
4141
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
4242
use Symfony\Contracts\Translation\TranslatorInterface;
43-
use Tightenco\Collect\Support\Collection;
43+
use Illuminate\Support\Collection;
4444

4545
/**
4646
* CRUD + status, duplicate, for content - note that listing is handled by ListingController.php

src/Controller/TwigAwareController.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
use Symfony\Component\HttpFoundation\RequestStack;
2323
use Symfony\Component\HttpFoundation\Response;
2424
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
25-
use Tightenco\Collect\Support\Collection;
25+
use Illuminate\Support\Collection;
2626
use Twig\Environment;
2727
use Twig\Loader\ChainLoader;
2828
use Twig\Loader\FilesystemLoader;

src/DataFixtures/BaseFixture.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use Doctrine\Bundle\FixturesBundle\Fixture;
88
use Symfony\Component\Filesystem\Path;
99
use Symfony\Component\Finder\Finder;
10-
use Tightenco\Collect\Support\Collection;
10+
use Illuminate\Support\Collection;
1111

1212
abstract class BaseFixture extends Fixture
1313
{

src/DataFixtures/ContentFixtures.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
use Faker\Factory;
2222
use Faker\Generator;
2323
use Symfony\Contracts\Cache\TagAwareCacheInterface;
24-
use Tightenco\Collect\Support\Collection;
24+
use Illuminate\Support\Collection;
2525

2626
class ContentFixtures extends BaseFixture implements DependentFixtureInterface, FixtureGroupInterface
2727
{

src/Entity/Content.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
use Doctrine\ORM\Mapping as ORM;
2424
use Symfony\Component\Serializer\Annotation\Groups;
2525
use Symfony\Component\Serializer\Annotation\MaxDepth;
26-
use Tightenco\Collect\Support\Collection as LaravelCollection;
26+
use Illuminate\Support\Collection as LaravelCollection;
2727

2828
/**
2929
* @ApiResource(

src/Entity/ContentLocalizeTrait.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace Bolt\Entity;
66

7-
use Tightenco\Collect\Support\Collection;
7+
use Illuminate\Support\Collection;
88

99
/**
1010
* @see \Bolt\Entity\Content

src/Entity/Field.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
use Knp\DoctrineBehaviors\Model\Translatable\TranslatableTrait;
1717
use Symfony\Component\Serializer\Annotation\Groups;
1818
use Symfony\Component\Serializer\Annotation\SerializedName;
19-
use Tightenco\Collect\Support\Collection;
19+
use Illuminate\Support\Collection;
2020
use Twig\Environment;
2121
use Twig\Error\LoaderError;
2222
use Twig\Error\SyntaxError;

src/Entity/Field/SelectField.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
use Bolt\Entity\IterableFieldTrait;
1010
use Doctrine\ORM\Mapping as ORM;
1111
use Symfony\Component\DependencyInjection\ContainerInterface;
12-
use Tightenco\Collect\Support\Collection;
12+
use Illuminate\Support\Collection;
1313

1414
/**
1515
* @ORM\Entity

src/Entity/Field/SetField.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
use Bolt\Entity\ListFieldInterface;
1414
use Bolt\Repository\FieldRepository;
1515
use Doctrine\ORM\Mapping as ORM;
16-
use Tightenco\Collect\Support\Collection;
16+
use Illuminate\Support\Collection;
1717

1818
/**
1919
* @ORM\Entity

src/Entity/FieldParentTrait.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace Bolt\Entity;
66

7-
use Tightenco\Collect\Support\Collection;
7+
use Illuminate\Support\Collection;
88

99
/**
1010
* Implements the methods of the FieldParentInterface.

src/Entity/Taxonomy.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
use Doctrine\Common\Collections\Collection;
1111
use Doctrine\ORM\Mapping as ORM;
1212
use Symfony\Component\Serializer\Annotation\Groups;
13-
use Tightenco\Collect\Support\Collection as LaravelCollection;
13+
use Illuminate\Support\Collection as LaravelCollection;
1414

1515
/**
1616
* @ORM\Entity(repositoryClass="Bolt\Repository\TaxonomyRepository")

src/Enum/Statuses.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace Bolt\Enum;
66

7-
use Tightenco\Collect\Support\Collection;
7+
use Illuminate\Support\Collection;
88

99
class Statuses
1010
{

src/Enum/UserStatus.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace Bolt\Enum;
66

7-
use Tightenco\Collect\Support\Collection;
7+
use Illuminate\Support\Collection;
88

99
class UserStatus
1010
{

src/Event/UserEvent.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
namespace Bolt\Event;
66

77
use Bolt\Entity\User;
8-
use Tightenco\Collect\Support\Collection;
8+
use Illuminate\Support\Collection;
99

1010
class UserEvent
1111
{

src/Extension/ConfigTrait.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use Cocur\Slugify\Slugify;
88
use Symfony\Component\Filesystem\Filesystem;
99
use Symfony\Component\Yaml\Parser;
10-
use Tightenco\Collect\Support\Collection;
10+
use Illuminate\Support\Collection;
1111

1212
trait ConfigTrait
1313
{

src/Extension/ServicesTrait.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
use Symfony\Component\HttpFoundation\Session\Session;
1616
use Symfony\Component\Stopwatch\Stopwatch;
1717
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
18-
use Tightenco\Collect\Support\Collection;
18+
use Illuminate\Support\Collection;
1919
use Twig\Environment;
2020

2121
trait ServicesTrait

src/Factory/MediaFactory.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
use Symfony\Component\Finder\SplFileInfo;
1717
use Symfony\Component\HttpKernel\Exception\UnsupportedMediaTypeHttpException;
1818
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
19-
use Tightenco\Collect\Support\Collection;
19+
use Illuminate\Support\Collection;
2020

2121
class MediaFactory
2222
{

src/Factory/RelationFactory.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
use Bolt\Entity\Relation;
99
use Bolt\Repository\RelationRepository;
1010
use Doctrine\ORM\EntityManagerInterface;
11-
use Tightenco\Collect\Support\Collection;
11+
use Illuminate\Support\Collection;
1212

1313
class RelationFactory
1414
{

src/Kernel.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
use Symfony\Component\HttpKernel\Kernel as BaseKernel;
1818
use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;
1919
use Symfony\Component\Yaml\Yaml;
20-
use Tightenco\Collect\Support\Collection;
20+
use Illuminate\Support\Collection;
2121

2222
class Kernel extends BaseKernel
2323
{

src/Menu/BackendMenuBuilder.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
2020
use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface;
2121
use Symfony\Contracts\Translation\TranslatorInterface;
22-
use Tightenco\Collect\Support\Collection;
22+
use Illuminate\Support\Collection;
2323

2424
/**
2525
* Class BackendMenuBuilder

src/Repository/ContentRepository.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
use Doctrine\Persistence\ManagerRegistry;
1616
use Pagerfanta\Adapter\DoctrineORMAdapter;
1717
use Pagerfanta\Pagerfanta;
18-
use Tightenco\Collect\Support\Collection;
18+
use Illuminate\Support\Collection;
1919

2020
/**
2121
* @method Content|null find($id, $lockMode = null, $lockVersion = null)

src/Repository/FieldRepository.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
use Doctrine\ORM\Mapping\ClassMetadata;
1313
use Doctrine\ORM\QueryBuilder;
1414
use Doctrine\Persistence\ManagerRegistry;
15-
use Tightenco\Collect\Support\Collection;
15+
use Illuminate\Support\Collection;
1616

1717
/**
1818
* @method Field|null find($id, $lockMode = null, $lockVersion = null)

src/Security/ContentVoter.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
use Symfony\Component\Security\Core\Authorization\Voter\Voter;
1212
use Symfony\Component\Security\Core\Security;
1313
use Symfony\Component\Security\Core\User\UserInterface;
14-
use Tightenco\Collect\Support\Collection;
14+
use Illuminate\Support\Collection;
1515

1616
class ContentVoter extends Voter
1717
{

src/Security/GlobalVoter.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
use Symfony\Component\Security\Core\Authorization\Voter\Voter;
1212
use Symfony\Component\Security\Core\Security;
1313
use Symfony\Component\Security\Core\User\UserInterface;
14-
use Tightenco\Collect\Support\Collection;
14+
use Illuminate\Support\Collection;
1515

1616
class GlobalVoter extends Voter
1717
{

src/Storage/Directive/DirectiveHandler.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
namespace Bolt\Storage\Directive;
66

77
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
8-
use Tightenco\Collect\Support\Collection;
8+
use Illuminate\Support\Collection;
99

1010
/**
1111
* Handles directives on behalf of

src/TemplateChooser.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
use Bolt\Configuration\Content\ContentType;
99
use Bolt\Entity\Content;
1010
use Bolt\Twig\ContentExtension;
11-
use Tightenco\Collect\Support\Collection;
11+
use Illuminate\Support\Collection;
1212

1313
class TemplateChooser
1414
{

0 commit comments

Comments
 (0)