diff --git a/UPGRADING.md b/UPGRADING.md new file mode 100644 index 000000000..4ec2912c2 --- /dev/null +++ b/UPGRADING.md @@ -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\*`. diff --git a/composer.json b/composer.json index 63a25e287..b88ca5be9 100644 --- a/composer.json +++ b/composer.json @@ -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", @@ -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", diff --git a/src/Api/Extensions/ContentExtension.php b/src/Api/Extensions/ContentExtension.php index 386c31000..2785d4e02 100644 --- a/src/Api/Extensions/ContentExtension.php +++ b/src/Api/Extensions/ContentExtension.php @@ -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 { diff --git a/src/Cache/FilesIndexCacher.php b/src/Cache/FilesIndexCacher.php index 699726ff0..b038f9929 100644 --- a/src/Cache/FilesIndexCacher.php +++ b/src/Cache/FilesIndexCacher.php @@ -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 { diff --git a/src/Collection/DeepCollection.php b/src/Collection/DeepCollection.php index 887905d0f..82bf48432 100644 --- a/src/Collection/DeepCollection.php +++ b/src/Collection/DeepCollection.php @@ -4,7 +4,7 @@ namespace Bolt\Collection; -use Tightenco\Collect\Support\Collection; +use Illuminate\Support\Collection; class DeepCollection extends Collection { diff --git a/src/Configuration/Config.php b/src/Configuration/Config.php index 1ae73d161..0cc99985b 100644 --- a/src/Configuration/Config.php +++ b/src/Configuration/Config.php @@ -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 diff --git a/src/Configuration/Content/ContentType.php b/src/Configuration/Content/ContentType.php index 7102b2bbd..65f1a74af 100644 --- a/src/Configuration/Content/ContentType.php +++ b/src/Configuration/Content/ContentType.php @@ -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 { diff --git a/src/Configuration/Content/FieldType.php b/src/Configuration/Content/FieldType.php index baeac29be..b4e5fcccc 100644 --- a/src/Configuration/Content/FieldType.php +++ b/src/Configuration/Content/FieldType.php @@ -4,7 +4,7 @@ namespace Bolt\Configuration\Content; -use Tightenco\Collect\Support\Collection; +use Illuminate\Support\Collection; class FieldType extends Collection { diff --git a/src/Configuration/Content/TaxonomyType.php b/src/Configuration/Content/TaxonomyType.php index ba64984f5..f4d4447c0 100644 --- a/src/Configuration/Content/TaxonomyType.php +++ b/src/Configuration/Content/TaxonomyType.php @@ -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 { diff --git a/src/Configuration/Parser/BaseParser.php b/src/Configuration/Parser/BaseParser.php index 5e30c697f..6ee9dafc3 100644 --- a/src/Configuration/Parser/BaseParser.php +++ b/src/Configuration/Parser/BaseParser.php @@ -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 { diff --git a/src/Configuration/Parser/ContentTypesParser.php b/src/Configuration/Parser/ContentTypesParser.php index 7659ec9f1..e2ec42351 100644 --- a/src/Configuration/Parser/ContentTypesParser.php +++ b/src/Configuration/Parser/ContentTypesParser.php @@ -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 { diff --git a/src/Configuration/Parser/GeneralParser.php b/src/Configuration/Parser/GeneralParser.php index b891dc535..551b20481 100644 --- a/src/Configuration/Parser/GeneralParser.php +++ b/src/Configuration/Parser/GeneralParser.php @@ -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 { diff --git a/src/Configuration/Parser/MenuParser.php b/src/Configuration/Parser/MenuParser.php index 00c31328f..6bcbbfa71 100644 --- a/src/Configuration/Parser/MenuParser.php +++ b/src/Configuration/Parser/MenuParser.php @@ -4,7 +4,7 @@ namespace Bolt\Configuration\Parser; -use Tightenco\Collect\Support\Collection; +use Illuminate\Support\Collection; class MenuParser extends BaseParser { diff --git a/src/Configuration/Parser/PermissionsParser.php b/src/Configuration/Parser/PermissionsParser.php index ed89b4534..1ef650cb5 100644 --- a/src/Configuration/Parser/PermissionsParser.php +++ b/src/Configuration/Parser/PermissionsParser.php @@ -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 { diff --git a/src/Configuration/Parser/TaxonomyParser.php b/src/Configuration/Parser/TaxonomyParser.php index 802ed58dc..ec766170d 100644 --- a/src/Configuration/Parser/TaxonomyParser.php +++ b/src/Configuration/Parser/TaxonomyParser.php @@ -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 { diff --git a/src/Configuration/Parser/ThemeParser.php b/src/Configuration/Parser/ThemeParser.php index e68ed57e2..5ef6eec4d 100644 --- a/src/Configuration/Parser/ThemeParser.php +++ b/src/Configuration/Parser/ThemeParser.php @@ -4,7 +4,7 @@ namespace Bolt\Configuration\Parser; -use Tightenco\Collect\Support\Collection; +use Illuminate\Support\Collection; class ThemeParser extends BaseParser { diff --git a/src/Configuration/PathResolver.php b/src/Configuration/PathResolver.php index 8580a03de..3a39e775e 100644 --- a/src/Configuration/PathResolver.php +++ b/src/Configuration/PathResolver.php @@ -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. diff --git a/src/Controller/Backend/Async/SelectOptionsController.php b/src/Controller/Backend/Async/SelectOptionsController.php index 65309b167..5ceaaee33 100644 --- a/src/Controller/Backend/Async/SelectOptionsController.php +++ b/src/Controller/Backend/Async/SelectOptionsController.php @@ -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')") diff --git a/src/Controller/Backend/ContentEditController.php b/src/Controller/Backend/ContentEditController.php index b5efac584..c3c242067 100644 --- a/src/Controller/Backend/ContentEditController.php +++ b/src/Controller/Backend/ContentEditController.php @@ -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; @@ -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 diff --git a/src/Controller/TwigAwareController.php b/src/Controller/TwigAwareController.php index e8a8e3434..fb35dfc6d 100644 --- a/src/Controller/TwigAwareController.php +++ b/src/Controller/TwigAwareController.php @@ -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; @@ -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; diff --git a/src/DataFixtures/BaseFixture.php b/src/DataFixtures/BaseFixture.php index 170671e72..e00507bac 100644 --- a/src/DataFixtures/BaseFixture.php +++ b/src/DataFixtures/BaseFixture.php @@ -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 { diff --git a/src/DataFixtures/ContentFixtures.php b/src/DataFixtures/ContentFixtures.php index 859b8a86f..d8ebd6238 100644 --- a/src/DataFixtures/ContentFixtures.php +++ b/src/DataFixtures/ContentFixtures.php @@ -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 { diff --git a/src/Entity/Content.php b/src/Entity/Content.php index 24ae8e3f0..ac02e77c2 100644 --- a/src/Entity/Content.php +++ b/src/Entity/Content.php @@ -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( diff --git a/src/Entity/ContentLocalizeTrait.php b/src/Entity/ContentLocalizeTrait.php index 98ff94574..942bf72af 100644 --- a/src/Entity/ContentLocalizeTrait.php +++ b/src/Entity/ContentLocalizeTrait.php @@ -4,7 +4,7 @@ namespace Bolt\Entity; -use Tightenco\Collect\Support\Collection; +use Illuminate\Support\Collection; /** * @see \Bolt\Entity\Content diff --git a/src/Entity/Field.php b/src/Entity/Field.php index d6f99797a..f0ac13f66 100644 --- a/src/Entity/Field.php +++ b/src/Entity/Field.php @@ -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; diff --git a/src/Entity/Field/SelectField.php b/src/Entity/Field/SelectField.php index ccded5f76..dd9947932 100644 --- a/src/Entity/Field/SelectField.php +++ b/src/Entity/Field/SelectField.php @@ -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 diff --git a/src/Entity/Field/SetField.php b/src/Entity/Field/SetField.php index 770a030b3..78f8dc957 100644 --- a/src/Entity/Field/SetField.php +++ b/src/Entity/Field/SetField.php @@ -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 diff --git a/src/Entity/FieldParentTrait.php b/src/Entity/FieldParentTrait.php index 392863905..0e834176b 100644 --- a/src/Entity/FieldParentTrait.php +++ b/src/Entity/FieldParentTrait.php @@ -4,7 +4,7 @@ namespace Bolt\Entity; -use Tightenco\Collect\Support\Collection; +use Illuminate\Support\Collection; /** * Implements the methods of the FieldParentInterface. diff --git a/src/Entity/Taxonomy.php b/src/Entity/Taxonomy.php index 8c0408f40..e2ce6f58f 100644 --- a/src/Entity/Taxonomy.php +++ b/src/Entity/Taxonomy.php @@ -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") diff --git a/src/Enum/Statuses.php b/src/Enum/Statuses.php index 5da59d126..2b9100a16 100644 --- a/src/Enum/Statuses.php +++ b/src/Enum/Statuses.php @@ -4,7 +4,7 @@ namespace Bolt\Enum; -use Tightenco\Collect\Support\Collection; +use Illuminate\Support\Collection; class Statuses { diff --git a/src/Enum/UserStatus.php b/src/Enum/UserStatus.php index e39c483d6..b013f5e24 100644 --- a/src/Enum/UserStatus.php +++ b/src/Enum/UserStatus.php @@ -4,7 +4,7 @@ namespace Bolt\Enum; -use Tightenco\Collect\Support\Collection; +use Illuminate\Support\Collection; class UserStatus { diff --git a/src/Event/UserEvent.php b/src/Event/UserEvent.php index 803ec2e1d..c4cd81bb3 100644 --- a/src/Event/UserEvent.php +++ b/src/Event/UserEvent.php @@ -5,7 +5,7 @@ namespace Bolt\Event; use Bolt\Entity\User; -use Tightenco\Collect\Support\Collection; +use Illuminate\Support\Collection; class UserEvent { diff --git a/src/Extension/ConfigTrait.php b/src/Extension/ConfigTrait.php index c2aad7f6e..01e5e2464 100644 --- a/src/Extension/ConfigTrait.php +++ b/src/Extension/ConfigTrait.php @@ -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 { diff --git a/src/Extension/ServicesTrait.php b/src/Extension/ServicesTrait.php index e05ce18a2..819f0ef31 100644 --- a/src/Extension/ServicesTrait.php +++ b/src/Extension/ServicesTrait.php @@ -8,6 +8,7 @@ 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; @@ -15,7 +16,6 @@ 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 diff --git a/src/Factory/MediaFactory.php b/src/Factory/MediaFactory.php index ba1f186c3..c99650c84 100644 --- a/src/Factory/MediaFactory.php +++ b/src/Factory/MediaFactory.php @@ -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 { diff --git a/src/Factory/RelationFactory.php b/src/Factory/RelationFactory.php index 595f92145..7479724ea 100644 --- a/src/Factory/RelationFactory.php +++ b/src/Factory/RelationFactory.php @@ -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 { diff --git a/src/Kernel.php b/src/Kernel.php index 8defe5c86..dbdcfa2a8 100644 --- a/src/Kernel.php +++ b/src/Kernel.php @@ -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; @@ -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 { diff --git a/src/Menu/BackendMenuBuilder.php b/src/Menu/BackendMenuBuilder.php index 0d1bbab12..5a979ec94 100644 --- a/src/Menu/BackendMenuBuilder.php +++ b/src/Menu/BackendMenuBuilder.php @@ -13,13 +13,13 @@ use Bolt\Utils\ListFormatHelper; use Bolt\Version; use Cocur\Slugify\Slugify; +use Illuminate\Support\Collection; use Knp\Menu\FactoryInterface; use Knp\Menu\ItemInterface; use Knp\Menu\MenuItem; use Symfony\Component\Routing\Generator\UrlGeneratorInterface; use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface; use Symfony\Contracts\Translation\TranslatorInterface; -use Tightenco\Collect\Support\Collection; /** * Class BackendMenuBuilder diff --git a/src/Repository/ContentRepository.php b/src/Repository/ContentRepository.php index 92408b7a2..c49ddf9fc 100644 --- a/src/Repository/ContentRepository.php +++ b/src/Repository/ContentRepository.php @@ -13,9 +13,9 @@ use Doctrine\ORM\Query; use Doctrine\ORM\QueryBuilder; use Doctrine\Persistence\ManagerRegistry; +use Illuminate\Support\Collection; use Pagerfanta\Doctrine\ORM\QueryAdapter; use Pagerfanta\Pagerfanta; -use Tightenco\Collect\Support\Collection; /** * @method Content|null find($id, $lockMode = null, $lockVersion = null) diff --git a/src/Repository/FieldRepository.php b/src/Repository/FieldRepository.php index 67534a75b..67eb7b5a1 100644 --- a/src/Repository/FieldRepository.php +++ b/src/Repository/FieldRepository.php @@ -12,7 +12,7 @@ use Doctrine\ORM\Mapping\ClassMetadata; use Doctrine\ORM\QueryBuilder; use Doctrine\Persistence\ManagerRegistry; -use Tightenco\Collect\Support\Collection; +use Illuminate\Support\Collection; /** * @method Field|null find($id, $lockMode = null, $lockVersion = null) diff --git a/src/Security/ContentVoter.php b/src/Security/ContentVoter.php index 4608861b8..94b4e3354 100644 --- a/src/Security/ContentVoter.php +++ b/src/Security/ContentVoter.php @@ -7,11 +7,11 @@ use Bolt\Configuration\Config; use Bolt\Configuration\Content\ContentType; use Bolt\Entity\Content; +use Illuminate\Support\Collection; use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; use Symfony\Component\Security\Core\Authorization\Voter\Voter; use Symfony\Component\Security\Core\Security; use Symfony\Component\Security\Core\User\UserInterface; -use Tightenco\Collect\Support\Collection; class ContentVoter extends Voter { diff --git a/src/Security/GlobalVoter.php b/src/Security/GlobalVoter.php index ceb3f0187..5dfa9fe11 100644 --- a/src/Security/GlobalVoter.php +++ b/src/Security/GlobalVoter.php @@ -7,11 +7,11 @@ use Bolt\Configuration\Config; use Bolt\Entity\User; use Bolt\Enum\UserStatus; +use Illuminate\Support\Collection; use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; use Symfony\Component\Security\Core\Authorization\Voter\Voter; use Symfony\Component\Security\Core\Security; use Symfony\Component\Security\Core\User\UserInterface; -use Tightenco\Collect\Support\Collection; class GlobalVoter extends Voter { diff --git a/src/Storage/Directive/DirectiveHandler.php b/src/Storage/Directive/DirectiveHandler.php index ee2379848..82cdf3e97 100644 --- a/src/Storage/Directive/DirectiveHandler.php +++ b/src/Storage/Directive/DirectiveHandler.php @@ -4,8 +4,8 @@ namespace Bolt\Storage\Directive; +use Illuminate\Support\Collection; use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException; -use Tightenco\Collect\Support\Collection; /** * Handles directives on behalf of diff --git a/src/TemplateChooser.php b/src/TemplateChooser.php index fbab7557f..ad00bf939 100644 --- a/src/TemplateChooser.php +++ b/src/TemplateChooser.php @@ -8,7 +8,7 @@ use Bolt\Configuration\Content\ContentType; use Bolt\Entity\Content; use Bolt\Twig\ContentExtension; -use Tightenco\Collect\Support\Collection; +use Illuminate\Support\Collection; class TemplateChooser { diff --git a/src/Twig/CommonExtension.php b/src/Twig/CommonExtension.php index 5ad493889..087bf9ad1 100644 --- a/src/Twig/CommonExtension.php +++ b/src/Twig/CommonExtension.php @@ -5,7 +5,7 @@ namespace Bolt\Twig; use Bolt\Entity\Content; -use Tightenco\Collect\Support\Collection; +use Illuminate\Support\Collection; use Twig\Environment; use Twig\Extension\AbstractExtension; use Twig\TwigFilter; @@ -56,7 +56,7 @@ public function isCurrent(Environment $env, $item): bool if ($item instanceof Content) { return $this->contentExtension->isCurrent($env, $item); } - + if (is_iterable($item) && array_key_exists('uri', $item)) { return $this->frontendMenuExtension->isCurrent($item); } diff --git a/src/Twig/ContentExtension.php b/src/Twig/ContentExtension.php index 80181fa51..af4c310df 100644 --- a/src/Twig/ContentExtension.php +++ b/src/Twig/ContentExtension.php @@ -24,6 +24,7 @@ use Bolt\Utils\Excerpt; use Bolt\Utils\Html; use Bolt\Utils\Sanitiser; +use Illuminate\Support\Collection; use Pagerfanta\Pagerfanta; use Symfony\Component\HttpFoundation\RequestStack; use Symfony\Component\Routing\Exception\InvalidParameterException; @@ -31,7 +32,6 @@ use Symfony\Component\Security\Core\Security; use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface; use Symfony\Contracts\Translation\TranslatorInterface; -use Tightenco\Collect\Support\Collection; use Twig\Environment; use Twig\Extension\AbstractExtension; use Twig\Markup; diff --git a/src/Twig/ExtensionExtension.php b/src/Twig/ExtensionExtension.php index c3d65eaee..ff4f8c5f3 100644 --- a/src/Twig/ExtensionExtension.php +++ b/src/Twig/ExtensionExtension.php @@ -5,7 +5,7 @@ namespace Bolt\Twig; use Bolt\Extension\ExtensionRegistry; -use Tightenco\Collect\Support\Collection; +use Illuminate\Support\Collection; use Twig\Extension\AbstractExtension; use Twig\TwigFunction; use Twig\TwigTest; diff --git a/src/Twig/FieldExtension.php b/src/Twig/FieldExtension.php index 0ec4b4ca2..512eb376f 100644 --- a/src/Twig/FieldExtension.php +++ b/src/Twig/FieldExtension.php @@ -15,10 +15,10 @@ use Bolt\Storage\Query; use Bolt\Utils\ContentHelper; use Bolt\Utils\ListFormatHelper; +use Illuminate\Support\Collection; use Symfony\Component\Finder\Finder; use Symfony\Component\Finder\SplFileInfo; use Symfony\Component\Routing\Generator\UrlGeneratorInterface; -use Tightenco\Collect\Support\Collection; use Twig\Environment; use Twig\Extension\AbstractExtension; use Twig\TwigFilter; diff --git a/src/Twig/LocaleExtension.php b/src/Twig/LocaleExtension.php index 13c82f9d5..79a62e9cf 100644 --- a/src/Twig/LocaleExtension.php +++ b/src/Twig/LocaleExtension.php @@ -8,8 +8,8 @@ use Bolt\Utils\LocaleHelper; use Carbon\Carbon; use Carbon\CarbonTimeZone; +use Illuminate\Support\Collection; use Symfony\Contracts\Translation\TranslatorInterface; -use Tightenco\Collect\Support\Collection; use Twig\Environment; use Twig\Extension\AbstractExtension; use Twig\TwigFilter; diff --git a/src/Twig/RelatedExtension.php b/src/Twig/RelatedExtension.php index f055c225e..e502e5622 100644 --- a/src/Twig/RelatedExtension.php +++ b/src/Twig/RelatedExtension.php @@ -12,7 +12,7 @@ use Bolt\Repository\RelationRepository; use Bolt\Utils\ListFormatHelper; use Bolt\Utils\RelatedOptionsUtility; -use Tightenco\Collect\Support\Collection; +use Illuminate\Support\Collection; use Twig\Extension\AbstractExtension; use Twig\TwigFilter; use Twig\TwigFunction; diff --git a/src/Utils/FilesIndex.php b/src/Utils/FilesIndex.php index a2a9a1b07..71e914a41 100644 --- a/src/Utils/FilesIndex.php +++ b/src/Utils/FilesIndex.php @@ -3,9 +3,9 @@ namespace Bolt\Utils; use Bolt\Configuration\Config; +use Illuminate\Support\Collection; use Symfony\Component\Filesystem\Path; use Symfony\Component\Finder\Finder; -use Tightenco\Collect\Support\Collection; class FilesIndex { diff --git a/src/Utils/ListFormatHelper.php b/src/Utils/ListFormatHelper.php index 2c55075d0..3677a0d63 100644 --- a/src/Utils/ListFormatHelper.php +++ b/src/Utils/ListFormatHelper.php @@ -7,7 +7,7 @@ use Bolt\Repository\ContentRepository; use Doctrine\DBAL\Connection; use Doctrine\ORM\EntityManagerInterface; -use Tightenco\Collect\Support\Collection; +use Illuminate\Support\Collection; class ListFormatHelper { diff --git a/src/Utils/LocaleHelper.php b/src/Utils/LocaleHelper.php index 857ad5460..838409156 100644 --- a/src/Utils/LocaleHelper.php +++ b/src/Utils/LocaleHelper.php @@ -6,11 +6,11 @@ use Bolt\Configuration\Config; use Bolt\Repository\ContentRepository; +use Illuminate\Support\Collection; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Intl\Exception\RuntimeException; use Symfony\Component\Intl\Locales; use Symfony\Component\Routing\Generator\UrlGeneratorInterface; -use Tightenco\Collect\Support\Collection; use Twig\Environment; class LocaleHelper diff --git a/src/Widget/Injector/QueueProcessor.php b/src/Widget/Injector/QueueProcessor.php index 1150e9dbe..05cb9910b 100644 --- a/src/Widget/Injector/QueueProcessor.php +++ b/src/Widget/Injector/QueueProcessor.php @@ -8,10 +8,10 @@ use Bolt\Widget\RequestAwareInterface; use Bolt\Widget\ResponseAwareInterface; use Bolt\Widget\WidgetInterface; +use Illuminate\Support\Collection; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Contracts\Cache\CacheInterface; -use Tightenco\Collect\Support\Collection; class QueueProcessor { diff --git a/src/Widgets.php b/src/Widgets.php index a8482abcb..d71c95293 100644 --- a/src/Widgets.php +++ b/src/Widgets.php @@ -11,12 +11,12 @@ use Bolt\Widget\StopwatchAwareInterface; use Bolt\Widget\TwigAwareInterface; use Bolt\Widget\WidgetInterface; +use Illuminate\Support\Collection; use Symfony\Component\HttpFoundation\RequestStack; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\StreamedResponse; use Symfony\Component\Stopwatch\Stopwatch; use Symfony\Contracts\Cache\CacheInterface; -use Tightenco\Collect\Support\Collection; use Twig\Environment; /** diff --git a/symfony.lock b/symfony.lock index bfc10e868..8d21e2ce7 100644 --- a/symfony.lock +++ b/symfony.lock @@ -894,9 +894,6 @@ "theseer/tokenizer": { "version": "1.1.3" }, - "tightenco/collect": { - "version": "v6.16.0" - }, "twig/extra-bundle": { "version": "v3.3.1" }, diff --git a/tests/php/Configuration/ConfigTest.php b/tests/php/Configuration/ConfigTest.php index d9cd38d37..f0a6c0d3e 100644 --- a/tests/php/Configuration/ConfigTest.php +++ b/tests/php/Configuration/ConfigTest.php @@ -11,7 +11,7 @@ use Symfony\Component\Cache\Adapter\FilesystemAdapter; use Symfony\Component\Cache\Adapter\TraceableAdapter; use Symfony\Component\Stopwatch\Stopwatch; -use Tightenco\Collect\Support\Collection; +use Illuminate\Support\Collection; class ConfigTest extends TestCase { diff --git a/tests/php/Configuration/Parser/ContentTypesParserTest.php b/tests/php/Configuration/Parser/ContentTypesParserTest.php index df7e6d863..1333bdd91 100644 --- a/tests/php/Configuration/Parser/ContentTypesParserTest.php +++ b/tests/php/Configuration/Parser/ContentTypesParserTest.php @@ -9,7 +9,7 @@ use Bolt\Exception\ConfigurationException; use Symfony\Component\Config\Exception\FileLocatorFileNotFoundException; use Symfony\Component\Yaml\Exception\ParseException; -use Tightenco\Collect\Support\Collection; +use Illuminate\Support\Collection; class ContentTypesParserTest extends ParserTestBase { diff --git a/tests/php/Configuration/Parser/GeneralParserTest.php b/tests/php/Configuration/Parser/GeneralParserTest.php index 7815e57b1..8d470023d 100644 --- a/tests/php/Configuration/Parser/GeneralParserTest.php +++ b/tests/php/Configuration/Parser/GeneralParserTest.php @@ -7,7 +7,7 @@ use Bolt\Configuration\Parser\GeneralParser; use Symfony\Component\Config\Exception\FileLocatorFileNotFoundException; use Symfony\Component\Yaml\Exception\ParseException; -use Tightenco\Collect\Support\Collection; +use Illuminate\Support\Collection; class GeneralParserTest extends ParserTestBase { diff --git a/tests/php/Configuration/Parser/MenuParserTest.php b/tests/php/Configuration/Parser/MenuParserTest.php index ca9c074c8..acb6b2e42 100644 --- a/tests/php/Configuration/Parser/MenuParserTest.php +++ b/tests/php/Configuration/Parser/MenuParserTest.php @@ -7,7 +7,7 @@ use Bolt\Configuration\Parser\MenuParser; use Symfony\Component\Config\Exception\FileLocatorFileNotFoundException; use Symfony\Component\Yaml\Exception\ParseException; -use Tightenco\Collect\Support\Collection; +use Illuminate\Support\Collection; class MenuParserTest extends ParserTestBase { diff --git a/tests/php/Configuration/Parser/TaxonomyParserTest.php b/tests/php/Configuration/Parser/TaxonomyParserTest.php index 78a95da29..d08ef41f5 100644 --- a/tests/php/Configuration/Parser/TaxonomyParserTest.php +++ b/tests/php/Configuration/Parser/TaxonomyParserTest.php @@ -7,7 +7,7 @@ use Bolt\Configuration\Parser\TaxonomyParser; use Symfony\Component\Config\Exception\FileLocatorFileNotFoundException; use Symfony\Component\Yaml\Exception\ParseException; -use Tightenco\Collect\Support\Collection; +use Illuminate\Support\Collection; class TaxonomyParserTest extends ParserTestBase { diff --git a/tests/php/Configuration/Parser/ThemeParserTest.php b/tests/php/Configuration/Parser/ThemeParserTest.php index 323718468..b3aced4f9 100644 --- a/tests/php/Configuration/Parser/ThemeParserTest.php +++ b/tests/php/Configuration/Parser/ThemeParserTest.php @@ -5,7 +5,7 @@ namespace Bolt\Tests\Configuration\Parser; use Bolt\Configuration\Parser\ThemeParser; -use Tightenco\Collect\Support\Collection; +use Illuminate\Support\Collection; class ThemeParserTest extends ParserTestBase { diff --git a/tests/php/Controller/Backend/ContentEditControllerTest.bak b/tests/php/Controller/Backend/ContentEditControllerTest.bak index b7f0d64b8..32d80ebf3 100644 --- a/tests/php/Controller/Backend/ContentEditControllerTest.bak +++ b/tests/php/Controller/Backend/ContentEditControllerTest.bak @@ -9,7 +9,7 @@ use Bolt\Entity\User; use Bolt\Repository\ContentRepository; use Bolt\Tests\DbAwareTestCase; use Bolt\Twig\FieldExtension; -use Tightenco\Collect\Support\Collection; +use Illuminate\Support\Collection; class ContentEditControllerTest extends DbAwareTestCase { diff --git a/tests/php/Widget/Injector/HtmlInjectorTest.php b/tests/php/Widget/Injector/HtmlInjectorTest.php index 9076981d1..7b5f032ed 100644 --- a/tests/php/Widget/Injector/HtmlInjectorTest.php +++ b/tests/php/Widget/Injector/HtmlInjectorTest.php @@ -9,7 +9,7 @@ use Bolt\Widget\Injector\Target; use Bolt\Widget\SnippetWidget; use Symfony\Component\HttpFoundation\Response; -use Tightenco\Collect\Support\Collection; +use Illuminate\Support\Collection; class HtmlInjectorTest extends StringTestCase { diff --git a/tests/php/Widget/Injector/RequestZoneTest.php b/tests/php/Widget/Injector/RequestZoneTest.php index 4135a27b2..806867aab 100644 --- a/tests/php/Widget/Injector/RequestZoneTest.php +++ b/tests/php/Widget/Injector/RequestZoneTest.php @@ -7,7 +7,7 @@ use Bolt\Widget\Injector\RequestZone; use PHPUnit\Framework\TestCase; use Symfony\Component\HttpFoundation\Request; -use Tightenco\Collect\Support\Collection; +use Illuminate\Support\Collection; class RequestZoneTest extends TestCase {