Skip to content

⬆️ 💥 Replace dependency tightenco/collect by illuminate/collect… #3555

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions UPGRADING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# From Bolt 5.2

## Use `illuminate/collections` instead of `tightenco/collect`

The namespace has changed from `Tightenco\Collect\Support\*` to `Illuminate\Support\*`.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"erusev/parsedown": "^1.7",
"erusev/parsedown-extra": "^0.8.1",
"fakerphp/faker": "^1.16",
"illuminate/collections": "^10.48",
"jasny/twig-extensions": "^1.3",
"knplabs/doctrine-behaviors": "^2.1",
"knplabs/knp-menu-bundle": "^3.1",
Expand Down Expand Up @@ -77,7 +78,6 @@
"symfony/webpack-encore-bundle": "^2.2",
"symfony/yaml": "^5.4",
"symfonycasts/reset-password-bundle": "^1.9",
"tightenco/collect": "^v8.34",
"twig/extra-bundle": "^3.3",
"twig/html-extra": "^3.3",
"twig/intl-extra": "^3.3",
Expand Down
2 changes: 1 addition & 1 deletion src/Api/Extensions/ContentExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
use Bolt\Enum\Statuses;
use Doctrine\ORM\Query\Expr\Join;
use Doctrine\ORM\QueryBuilder;
use Tightenco\Collect\Support\Collection;
use Illuminate\Support\Collection;

final class ContentExtension implements QueryCollectionExtensionInterface, QueryItemExtensionInterface
{
Expand Down
2 changes: 1 addition & 1 deletion src/Cache/FilesIndexCacher.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace Bolt\Cache;

use Bolt\Utils\FilesIndex;
use Tightenco\Collect\Support\Collection;
use Illuminate\Support\Collection;

class FilesIndexCacher extends FilesIndex implements CachingInterface
{
Expand Down
2 changes: 1 addition & 1 deletion src/Collection/DeepCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Bolt\Collection;

use Tightenco\Collect\Support\Collection;
use Illuminate\Support\Collection;

class DeepCollection extends Collection
{
Expand Down
2 changes: 1 addition & 1 deletion src/Configuration/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
use Bolt\Configuration\Parser\TaxonomyParser;
use Bolt\Configuration\Parser\ThemeParser;
use Bolt\Controller\Backend\ClearCacheController;
use Illuminate\Support\Collection;
use Symfony\Component\HttpKernel\KernelInterface;
use Symfony\Component\Stopwatch\Stopwatch;
use Symfony\Component\Yaml\Yaml;
use Symfony\Contracts\Cache\CacheInterface;
use Symfony\Contracts\Cache\ItemInterface;
use Tightenco\Collect\Support\Collection;
use Webimpress\SafeWriter\FileWriter;

class Config
Expand Down
2 changes: 1 addition & 1 deletion src/Configuration/Content/ContentType.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Bolt\Configuration\Content;

use Bolt\Collection\DeepCollection;
use Tightenco\Collect\Support\Collection;
use Illuminate\Support\Collection;

class ContentType extends DeepCollection
{
Expand Down
2 changes: 1 addition & 1 deletion src/Configuration/Content/FieldType.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Bolt\Configuration\Content;

use Tightenco\Collect\Support\Collection;
use Illuminate\Support\Collection;

class FieldType extends Collection
{
Expand Down
2 changes: 1 addition & 1 deletion src/Configuration/Content/TaxonomyType.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Bolt\Configuration\Content;

use Bolt\Collection\DeepCollection;
use Tightenco\Collect\Support\Collection;
use Illuminate\Support\Collection;

class TaxonomyType extends DeepCollection
{
Expand Down
2 changes: 1 addition & 1 deletion src/Configuration/Parser/BaseParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
namespace Bolt\Configuration\Parser;

use Bolt\Configuration\PathResolver;
use Illuminate\Support\Collection;
use Symfony\Component\Config\Exception\FileLocatorFileNotFoundException;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\Yaml\Yaml;
use Tightenco\Collect\Support\Collection;

abstract class BaseParser
{
Expand Down
2 changes: 1 addition & 1 deletion src/Configuration/Parser/ContentTypesParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
use Bolt\Configuration\Content\FieldType;
use Bolt\Enum\Statuses;
use Bolt\Exception\ConfigurationException;
use Tightenco\Collect\Support\Collection;
use Illuminate\Support\Collection;

class ContentTypesParser extends BaseParser
{
Expand Down
2 changes: 1 addition & 1 deletion src/Configuration/Parser/GeneralParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Bolt\Configuration\Parser;

use Bolt\Common\Arr;
use Tightenco\Collect\Support\Collection;
use Illuminate\Support\Collection;

class GeneralParser extends BaseParser
{
Expand Down
2 changes: 1 addition & 1 deletion src/Configuration/Parser/MenuParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Bolt\Configuration\Parser;

use Tightenco\Collect\Support\Collection;
use Illuminate\Support\Collection;

class MenuParser extends BaseParser
{
Expand Down
2 changes: 1 addition & 1 deletion src/Configuration/Parser/PermissionsParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Bolt\Configuration\Parser;

use Bolt\Common\Arr;
use Tightenco\Collect\Support\Collection;
use Illuminate\Support\Collection;

class PermissionsParser extends BaseParser
{
Expand Down
2 changes: 1 addition & 1 deletion src/Configuration/Parser/TaxonomyParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Bolt\Configuration\Parser;

use Bolt\Common\Str;
use Tightenco\Collect\Support\Collection;
use Illuminate\Support\Collection;

class TaxonomyParser extends BaseParser
{
Expand Down
2 changes: 1 addition & 1 deletion src/Configuration/Parser/ThemeParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Bolt\Configuration\Parser;

use Tightenco\Collect\Support\Collection;
use Illuminate\Support\Collection;

class ThemeParser extends BaseParser
{
Expand Down
2 changes: 1 addition & 1 deletion src/Configuration/PathResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
namespace Bolt\Configuration;

use Bolt\Exception\ConfigurationException;
use Illuminate\Support\Collection;
use Symfony\Component\Filesystem\Path;
use Tightenco\Collect\Support\Collection;

/**
* A class to resolve and manage paths. Paths defined here are allowed to have variables within them.
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/Backend/Async/SelectOptionsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@

use Bolt\Configuration\Config;
use Bolt\Twig\FieldExtension;
use Illuminate\Support\Collection;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Annotation\Route;
use Tightenco\Collect\Support\Collection;

/**
* @Security("is_granted('upload')")
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/Backend/ContentEditController.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
use Carbon\Carbon;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\ORMInvalidArgumentException;
use Illuminate\Support\Collection;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Entity;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\RedirectResponse;
Expand All @@ -40,7 +41,6 @@
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Symfony\Contracts\Translation\TranslatorInterface;
use Tightenco\Collect\Support\Collection;

/**
* CRUD + status, duplicate, for content - note that listing is handled by ListingController.php
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/TwigAwareController.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
use Bolt\TemplateChooser;
use Bolt\Twig\CommonExtension;
use Bolt\Utils\Sanitiser;
use Illuminate\Support\Collection;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Asset\Packages;
use Symfony\Component\Asset\PathPackage;
Expand All @@ -22,7 +23,6 @@
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Tightenco\Collect\Support\Collection;
use Twig\Environment;
use Twig\Loader\ChainLoader;
use Twig\Loader\FilesystemLoader;
Expand Down
2 changes: 1 addition & 1 deletion src/DataFixtures/BaseFixture.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
namespace Bolt\DataFixtures;

use Doctrine\Bundle\FixturesBundle\Fixture;
use Illuminate\Support\Collection;
use Symfony\Component\Filesystem\Path;
use Symfony\Component\Finder\Finder;
use Tightenco\Collect\Support\Collection;

abstract class BaseFixture extends Fixture
{
Expand Down
2 changes: 1 addition & 1 deletion src/DataFixtures/ContentFixtures.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
use Doctrine\Persistence\ObjectManager;
use Faker\Factory;
use Faker\Generator;
use Illuminate\Support\Collection;
use Symfony\Contracts\Cache\TagAwareCacheInterface;
use Tightenco\Collect\Support\Collection;

class ContentFixtures extends BaseFixture implements DependentFixtureInterface, FixtureGroupInterface
{
Expand Down
2 changes: 1 addition & 1 deletion src/Entity/Content.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Illuminate\Support\Collection as LaravelCollection;
use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Serializer\Annotation\MaxDepth;
use Tightenco\Collect\Support\Collection as LaravelCollection;

/**
* @ApiResource(
Expand Down
2 changes: 1 addition & 1 deletion src/Entity/ContentLocalizeTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Bolt\Entity;

use Tightenco\Collect\Support\Collection;
use Illuminate\Support\Collection;

/**
* @see \Bolt\Entity\Content
Expand Down
2 changes: 1 addition & 1 deletion src/Entity/Field.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
use Bolt\Event\Listener\FieldFillListener;
use Bolt\Utils\Sanitiser;
use Doctrine\ORM\Mapping as ORM;
use Illuminate\Support\Collection;
use Knp\DoctrineBehaviors\Contract\Entity\TranslatableInterface;
use Knp\DoctrineBehaviors\Model\Translatable\TranslatableTrait;
use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Serializer\Annotation\SerializedName;
use Tightenco\Collect\Support\Collection;
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\SyntaxError;
Expand Down
2 changes: 1 addition & 1 deletion src/Entity/Field/SelectField.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
use Bolt\Entity\FieldInterface;
use Bolt\Entity\IterableFieldTrait;
use Doctrine\ORM\Mapping as ORM;
use Illuminate\Support\Collection;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Tightenco\Collect\Support\Collection;

/**
* @ORM\Entity
Expand Down
2 changes: 1 addition & 1 deletion src/Entity/Field/SetField.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
use Bolt\Entity\ListFieldInterface;
use Bolt\Repository\FieldRepository;
use Doctrine\ORM\Mapping as ORM;
use Tightenco\Collect\Support\Collection;
use Illuminate\Support\Collection;

/**
* @ORM\Entity
Expand Down
2 changes: 1 addition & 1 deletion src/Entity/FieldParentTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Bolt\Entity;

use Tightenco\Collect\Support\Collection;
use Illuminate\Support\Collection;

/**
* Implements the methods of the FieldParentInterface.
Expand Down
2 changes: 1 addition & 1 deletion src/Entity/Taxonomy.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Illuminate\Support\Collection as LaravelCollection;
use Symfony\Component\Serializer\Annotation\Groups;
use Tightenco\Collect\Support\Collection as LaravelCollection;

/**
* @ORM\Entity(repositoryClass="Bolt\Repository\TaxonomyRepository")
Expand Down
2 changes: 1 addition & 1 deletion src/Enum/Statuses.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Bolt\Enum;

use Tightenco\Collect\Support\Collection;
use Illuminate\Support\Collection;

class Statuses
{
Expand Down
2 changes: 1 addition & 1 deletion src/Enum/UserStatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Bolt\Enum;

use Tightenco\Collect\Support\Collection;
use Illuminate\Support\Collection;

class UserStatus
{
Expand Down
2 changes: 1 addition & 1 deletion src/Event/UserEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace Bolt\Event;

use Bolt\Entity\User;
use Tightenco\Collect\Support\Collection;
use Illuminate\Support\Collection;

class UserEvent
{
Expand Down
2 changes: 1 addition & 1 deletion src/Extension/ConfigTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
namespace Bolt\Extension;

use Cocur\Slugify\Slugify;
use Illuminate\Support\Collection;
use Symfony\Component\Filesystem\Filesystem;
use Symfony\Component\Yaml\Parser;
use Tightenco\Collect\Support\Collection;

trait ConfigTrait
{
Expand Down
2 changes: 1 addition & 1 deletion src/Extension/ServicesTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
use Bolt\Storage\Query;
use Bolt\Widgets;
use Doctrine\ORM\EntityManagerInterface;
use Illuminate\Support\Collection;
use Psr\Container\ContainerInterface;
use Psr\Log\LoggerInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\HttpFoundation\Session\Session;
use Symfony\Component\Stopwatch\Stopwatch;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
use Tightenco\Collect\Support\Collection;
use Twig\Environment;

trait ServicesTrait
Expand Down
2 changes: 1 addition & 1 deletion src/Factory/MediaFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
use Bolt\Entity\Media;
use Bolt\Repository\MediaRepository;
use Carbon\Carbon;
use Illuminate\Support\Collection;
use PHPExif\Exif;
use PHPExif\Reader\Reader;
use Symfony\Component\Filesystem\Path;
use Symfony\Component\Finder\SplFileInfo;
use Symfony\Component\HttpKernel\Exception\UnsupportedMediaTypeHttpException;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
use Tightenco\Collect\Support\Collection;

class MediaFactory
{
Expand Down
2 changes: 1 addition & 1 deletion src/Factory/RelationFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use Bolt\Entity\Relation;
use Bolt\Repository\RelationRepository;
use Doctrine\ORM\EntityManagerInterface;
use Tightenco\Collect\Support\Collection;
use Illuminate\Support\Collection;

class RelationFactory
{
Expand Down
2 changes: 1 addition & 1 deletion src/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use Bolt\Configuration\Parser\TaxonomyParser;
use Bolt\Extension\ExtensionCompilerPass;
use Bolt\Extension\ExtensionInterface;
use Illuminate\Support\Collection;
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
use Symfony\Component\Config\Exception\LoaderLoadException;
use Symfony\Component\Config\FileLocator;
Expand All @@ -17,7 +18,6 @@
use Symfony\Component\HttpKernel\Kernel as BaseKernel;
use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;
use Symfony\Component\Yaml\Yaml;
use Tightenco\Collect\Support\Collection;

class Kernel extends BaseKernel
{
Expand Down
Loading