Skip to content

Commit ba775a0

Browse files
committed
[CHORE] Revert to Drupal\next
1 parent a3cc724 commit ba775a0

File tree

101 files changed

+359
-359
lines changed

Some content is hidden

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

101 files changed

+359
-359
lines changed

Diff for: modules/next_extras/next_extras.module

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use Drupal\Core\Field\BaseFieldDefinition;
1111
use Drupal\Core\Field\FieldStorageDefinitionInterface;
1212
use Drupal\Core\Form\FormStateInterface;
1313
use Drupal\Core\Messenger\MessengerInterface;
14-
use Today\next\Entity\NextEntityTypeConfigInterface;
14+
use Drupal\next\Entity\NextEntityTypeConfigInterface;
1515

1616
/**
1717
* Implements hook_entity_base_field_info().
@@ -33,7 +33,7 @@ function next_extras_entity_base_field_info(EntityTypeInterface $entity_type) {
3333
* Implements hook_form_alter().
3434
*/
3535
function next_extras_form_next_entity_type_config_edit_form_alter(&$form, FormStateInterface $form_state) {
36-
/** @var \Today\next\Entity\NextEntityTypeConfigInterface $entity */
36+
/** @var \Drupal\next\Entity\NextEntityTypeConfigInterface $entity */
3737
$entity = $form_state->getFormObject()->getEntity();
3838

3939
$form['experimental'] = [
@@ -93,7 +93,7 @@ function next_extras_form_next_entity_type_config_edit_form_builder($entity_type
9393
*/
9494
function _next_extras_invalidate_entity_cache(EntityInterface $entity, array $paths) {
9595
@trigger_error(__FUNCTION__ . '() is deprecated in next:1.4.0 and is removed from next:1.5.0. https://www.drupal.org/project/next/releases/1.4.0', E_USER_DEPRECATED);
96-
/** @var \Today\next_extras\NextCacheInvalidator $next_cache_invalidator */
96+
/** @var \Drupal\next_extras\NextCacheInvalidator $next_cache_invalidator */
9797
$next_cache_invalidator = \Drupal::service('next_extras.cache_invalidator');
9898

9999
$sites = $next_cache_invalidator->getSitesToInvalidate($entity);

Diff for: modules/next_extras/next_extras.services.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
services:
22
next_extras.cache_invalidator:
3-
class: Today\next_extras\NextCacheInvalidator
3+
class: Drupal\next_extras\NextCacheInvalidator
44
arguments: ['@next.entity_type.manager', '@http_client', '@logger.channel.next_extras']
55
logger.channel.next_extras:
66
parent: logger.channel_base

Diff for: modules/next_extras/src/NextCacheInvalidator.php

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<?php
22

3-
namespace Today\next_extras;
3+
namespace Drupal\next_extras;
44

55
use Drupal\Core\Entity\EntityInterface;
66
use Drupal\Core\Logger\LoggerChannelInterface;
77
use Drupal\Core\Url;
8-
use Today\next\Entity\NextSiteInterface;
9-
use Today\next\NextEntityTypeManagerInterface;
8+
use Drupal\next\Entity\NextSiteInterface;
9+
use Drupal\next\NextEntityTypeManagerInterface;
1010
use GuzzleHttp\Client;
1111
use GuzzleHttp\Exception\RequestException;
1212
use Symfony\Component\HttpFoundation\Response;
@@ -19,7 +19,7 @@ class NextCacheInvalidator {
1919
/**
2020
* Next entity type manager service.
2121
*
22-
* @var \Today\next\NextEntityTypeManagerInterface
22+
* @var \Drupal\next\NextEntityTypeManagerInterface
2323
*/
2424
protected NextEntityTypeManagerInterface $nextEntityTypeManager;
2525

@@ -40,7 +40,7 @@ class NextCacheInvalidator {
4040
/**
4141
* NextCacheInvalidator constructor.
4242
*
43-
* @param \Today\next\NextEntityTypeManagerInterface $nextEntityTypeManager
43+
* @param \Drupal\next\NextEntityTypeManagerInterface $nextEntityTypeManager
4444
* Next entity type manager service.
4545
* @param \GuzzleHttp\Client $httpClient
4646
* HTTP client service.
@@ -59,7 +59,7 @@ public function __construct(NextEntityTypeManagerInterface $nextEntityTypeManage
5959
* @param \Drupal\Core\Entity\EntityInterface $entity
6060
* The entity to retrieve sites for.
6161
*
62-
* @return \Today\next\Entity\NextSiteInterface[]
62+
* @return \Drupal\next\Entity\NextSiteInterface[]
6363
* An array of next sites.
6464
*/
6565
public function getSitesToInvalidate(EntityInterface $entity): array {
@@ -124,7 +124,7 @@ public function invalidateEntity(EntityInterface $entity): void {
124124
*
125125
* @param string $path
126126
* The path.
127-
* @param \Today\next\Entity\NextSiteInterface[] $sites
127+
* @param \Drupal\next\Entity\NextSiteInterface[] $sites
128128
* The site for which to revalidate.
129129
*/
130130
public function invalidatePath(string $path, array $sites): void {
@@ -151,7 +151,7 @@ public function invalidatePath(string $path, array $sites): void {
151151
/**
152152
* Builds the invalidation request URL.
153153
*
154-
* @param \Today\next\Entity\NextSiteInterface $site
154+
* @param \Drupal\next\Entity\NextSiteInterface $site
155155
* The Next site.
156156
* @param string $path
157157
* The path.

Diff for: modules/next_extras/src/Plugin/Field/FieldType/ContentTranslationsFieldItemList.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Today\next_extras\Plugin\Field\FieldType;
3+
namespace Drupal\next_extras\Plugin\Field\FieldType;
44

55
use Drupal\Core\Field\FieldItemList;
66
use Drupal\Core\TypedData\ComputedItemListTrait;

Diff for: modules/next_extras/src/Plugin/Field/FieldType/ContentTranslationsItem.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Today\next_extras\Plugin\Field\FieldType;
3+
namespace Drupal\next_extras\Plugin\Field\FieldType;
44

55
use Drupal\Core\Field\FieldItemBase;
66
use Drupal\Core\Field\FieldStorageDefinitionInterface;
@@ -14,7 +14,7 @@
1414
* label = @Translation("Content translations"),
1515
* description = @Translation("An entity field containing data about content translations."),
1616
* no_ui = TRUE,
17-
* list_class = "\Today\next_extras\Plugin\Field\FieldType\ContentTranslationsFieldItemList",
17+
* list_class = "\Drupal\next_extras\Plugin\Field\FieldType\ContentTranslationsFieldItemList",
1818
* cardinality = \Drupal\Core\Field\FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED
1919
* )
2020
*/

Diff for: modules/next_jsonapi/next_jsonapi.services.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ parameters:
33

44
services:
55
jsonapi.entity_resource:
6-
class: Today\next_jsonapi\Controller\EntityResource
6+
class: Drupal\next_jsonapi\Controller\EntityResource
77
arguments:
88
- "@entity_type.manager"
99
- "@entity_field.manager"

Diff for: modules/next_jsonapi/src/Controller/EntityResource.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Today\next_jsonapi\Controller;
3+
namespace Drupal\next_jsonapi\Controller;
44

55
use Drupal\Component\Datetime\TimeInterface;
66
use Drupal\Core\Entity\EntityFieldManagerInterface;

Diff for: modules/next_jsonapi/src/NextJsonapiServiceProvider.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Today\next_jsonapi;
3+
namespace Drupal\next_jsonapi;
44

55
use Drupal\Core\DependencyInjection\ContainerBuilder;
66
use Drupal\Core\DependencyInjection\ServiceProviderBase;
@@ -18,7 +18,7 @@ public function alter(ContainerBuilder $container) {
1818

1919
if ($container->hasDefinition('jsonapi.entity_resource')) {
2020
$definition = $container->getDefinition('jsonapi.entity_resource');
21-
$definition->setClass('Today\next_jsonapi\Controller\EntityResource');
21+
$definition->setClass('Drupal\next_jsonapi\Controller\EntityResource');
2222
}
2323
}
2424

Diff for: modules/next_jsonapi/tests/src/Kernel/Controller/EntityResourceTest.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
use Symfony\Component\HttpFoundation\Request;
1313

1414
/**
15-
* @coversDefaultClass \Today\next_jsonapi\Controller\EntityResource
15+
* @coversDefaultClass \Drupal\next_jsonapi\Controller\EntityResource
1616
*
1717
* @group next
1818
*/
@@ -71,7 +71,7 @@ public function register(ContainerBuilder $container) {
7171
$container->setParameter('next_jsonapi.size_max', 60);
7272
if ($container->hasDefinition('jsonapi.entity_resource')) {
7373
$definition = $container->getDefinition('jsonapi.entity_resource');
74-
$definition->setClass('Today\next_jsonapi\Controller\EntityResource')
74+
$definition->setClass('Drupal\next_jsonapi\Controller\EntityResource')
7575
->addArgument('%next_jsonapi.size_max%');
7676
}
7777
}
@@ -82,7 +82,7 @@ public function register(ContainerBuilder $container) {
8282
* @covers ::getJsonApiParams
8383
*/
8484
public function testPageLimit() {
85-
/** @var \Today\next_jsonapi\Controller\EntityResource $entity_resource */
85+
/** @var \Drupal\next_jsonapi\Controller\EntityResource $entity_resource */
8686
$entity_resource = $this->container->get('jsonapi.entity_resource');
8787
/** @var \Drupal\jsonapi\ResourceType\ResourceTypeRepositoryInterface $entity_type_repository */
8888
$entity_type_repository = $this->container->get('jsonapi.resource_type.repository');

Diff for: modules/next_jwt/next_jwt.services.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
services:
22
next_jwt.jwt_subscriber:
3-
class: Today\next_jwt\EventSubscriber\JwtEventSubscriber
3+
class: Drupal\next_jwt\EventSubscriber\JwtEventSubscriber
44
arguments: [ '@current_user', '@next.settings.manager' ]
55
tags:
66
- { name: event_subscriber }
77
next_jwt.route_subscriber:
8-
class: Today\next_jwt\Routing\RouteSubscriber
8+
class: Drupal\next_jwt\Routing\RouteSubscriber
99
tags:
1010
- { name: event_subscriber }

Diff for: modules/next_jwt/src/EventSubscriber/JwtEventSubscriber.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?php
22

3-
namespace Today\next_jwt\EventSubscriber;
3+
namespace Drupal\next_jwt\EventSubscriber;
44

55
use Drupal\Core\Session\AccountInterface;
66
use Drupal\jwt\Authentication\Event\JwtAuthEvents;
77
use Drupal\jwt\Authentication\Event\JwtAuthGenerateEvent;
8-
use Today\next\NextSettingsManagerInterface;
8+
use Drupal\next\NextSettingsManagerInterface;
99
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
1010

1111
/**
@@ -23,7 +23,7 @@ class JwtEventSubscriber implements EventSubscriberInterface {
2323
/**
2424
* The next settings manager.
2525
*
26-
* @var \Today\next\NextSettingsManagerInterface
26+
* @var \Drupal\next\NextSettingsManagerInterface
2727
*/
2828
protected NextSettingsManagerInterface $nextSettingsManager;
2929

@@ -32,7 +32,7 @@ class JwtEventSubscriber implements EventSubscriberInterface {
3232
*
3333
* @param \Drupal\Core\Session\AccountInterface $current_user
3434
* The current user.
35-
* @param \Today\next\NextSettingsManagerInterface $next_settings_manager
35+
* @param \Drupal\next\NextSettingsManagerInterface $next_settings_manager
3636
* The next settings manager.
3737
*/
3838
public function __construct(AccountInterface $current_user, NextSettingsManagerInterface $next_settings_manager) {

Diff for: modules/next_jwt/src/Plugin/Next/PreviewUrlGenerator/Jwt.php

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Today\next_jwt\Plugin\Next\PreviewUrlGenerator;
3+
namespace Drupal\next_jwt\Plugin\Next\PreviewUrlGenerator;
44

55
use Drupal\Component\Datetime\TimeInterface;
66
use Drupal\Component\Serialization\Json;
@@ -11,11 +11,11 @@
1111
use Drupal\Core\Session\AccountProxyInterface;
1212
use Drupal\Core\Url;
1313
use Drupal\jwt\Authentication\Provider\JwtAuth;
14-
use Today\next\Annotation\PreviewUrlGenerator;
15-
use Today\next\Entity\NextSiteInterface;
16-
use Today\next\Exception\InvalidPreviewUrlRequest;
17-
use Today\next\Plugin\ConfigurablePreviewUrlGeneratorBase;
18-
use Today\next\PreviewSecretGeneratorInterface;
14+
use Drupal\next\Annotation\PreviewUrlGenerator;
15+
use Drupal\next\Entity\NextSiteInterface;
16+
use Drupal\next\Exception\InvalidPreviewUrlRequest;
17+
use Drupal\next\Plugin\ConfigurablePreviewUrlGeneratorBase;
18+
use Drupal\next\PreviewSecretGeneratorInterface;
1919
use Symfony\Component\DependencyInjection\ContainerInterface;
2020
use Symfony\Component\HttpFoundation\Request;
2121

@@ -65,7 +65,7 @@ class Jwt extends ConfigurablePreviewUrlGeneratorBase {
6565
* The current user.
6666
* @param \Drupal\Component\Datetime\TimeInterface $time
6767
* The time service.
68-
* @param \Today\next\PreviewSecretGeneratorInterface $preview_secret_generator
68+
* @param \Drupal\next\PreviewSecretGeneratorInterface $preview_secret_generator
6969
* The preview secret generator.
7070
* @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
7171
* The entity type manager.

Diff for: modules/next_jwt/src/Routing/RouteSubscriber.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Today\next_jwt\Routing;
3+
namespace Drupal\next_jwt\Routing;
44

55
use Drupal\Core\Routing\RouteSubscriberBase;
66
use Symfony\Component\Routing\RouteCollection;

Diff for: next.api.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717
/**
18-
* Alter the result of \Today\next\Plugin\SitePreviewerInterface::render.
18+
* Alter the result of \Drupal\next\Plugin\SitePreviewerInterface::render.
1919
*
2020
* This hook is called after the preview has been assembled.
2121
*

Diff for: next.install

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ function next_update_9102() {
3939
* Sets a revalidate url and secret for all Next.js sites.
4040
*/
4141
function next_update_9103() {
42-
/** @var \Today\next\Entity\NextSiteInterface[] $sites */
42+
/** @var \Drupal\next\Entity\NextSiteInterface[] $sites */
4343
$sites = \Drupal::entityTypeManager()->getStorage('next_site')->loadMultiple();
4444
foreach ($sites as $site) {
4545
$base_url = $site->getBaseUrl();
@@ -74,7 +74,7 @@ function next_update_9104() {
7474
* Migrate revalidate settings from next_extras.
7575
*/
7676
function next_update_9105() {
77-
/** @var \Today\next\Entity\NextEntityTypeConfigInterface[] $next_entity_type_configs */
77+
/** @var \Drupal\next\Entity\NextEntityTypeConfigInterface[] $next_entity_type_configs */
7878
$next_entity_type_configs = \Drupal::entityTypeManager()->getStorage('next_entity_type_config')->loadMultiple();
7979

8080
foreach ($next_entity_type_configs as $next_entity_type_config) {

Diff for: next.module

+5-5
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77

88
use Drupal\content_moderation\EntityOperations;
99
use Drupal\Core\Entity\EntityInterface;
10-
use Today\next\Event\EntityActionEvent;
11-
use Today\next\Event\EntityActionEventInterface;
12-
use Today\next\Event\EntityEvents;
10+
use Drupal\next\Event\EntityActionEvent;
11+
use Drupal\next\Event\EntityActionEventInterface;
12+
use Drupal\next\Event\EntityEvents;
1313

1414
/**
1515
* Implements hook_decoupled_router_info_alter().
@@ -37,7 +37,7 @@ function next_next_site_preview_alter(array &$preview, array $context) {
3737
return;
3838
}
3939

40-
/** @var \Today\next\Plugin\SitePreviewerInterface $plugin */
40+
/** @var \Drupal\next\Plugin\SitePreviewerInterface $plugin */
4141
$plugin = $context['plugin'];
4242

4343
if ($plugin->getId() !== 'iframe') {
@@ -91,7 +91,7 @@ function next_entity_predelete(EntityInterface $entity) {
9191
/**
9292
* Helper to dispatch an entity action event.
9393
*
94-
* @param \Today\next\Event\EntityActionEventInterface $event
94+
* @param \Drupal\next\Event\EntityActionEventInterface $event
9595
* The entity action event.
9696
*/
9797
function _next_dispatch_entity_action_event(EntityActionEventInterface $event) {

Diff for: next.routing.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
next.settings:
22
path: "/admin/config/services/next/settings"
33
defaults:
4-
_form: '\Today\next\Form\NextSettingsForm'
4+
_form: '\Drupal\next\Form\NextSettingsForm'
55
_title: "Settings"
66
requirements:
77
_permission: "administer site configuration"
@@ -11,7 +11,7 @@ next.settings:
1111
next.validate_preview_url:
1212
path: "/next/preview-url"
1313
defaults:
14-
_controller: 'Today\next\Controller\NextPreviewUrlController::validate'
14+
_controller: 'Drupal\next\Controller\NextPreviewUrlController::validate'
1515
methods: [ POST ]
1616
requirements:
1717
_access: 'TRUE'

0 commit comments

Comments
 (0)