Skip to content
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

Adding D11 support for nextjs. #778

Merged
merged 12 commits into from
Oct 4, 2024
Merged

Conversation

apathak18
Copy link
Contributor

@apathak18 apathak18 commented Jun 16, 2024

This pull request is for: (mark with an "x")

  • examples/*
  • modules/next
  • packages/next-drupal
  • starters/basic-starter
  • starters/graphql-starter
  • starters/pages-starter
  • Other

GitHub Issue: #
Please add a link to the GitHub issue: #777
where this problem is discussed.

Getting ready for this

  • I need help adding tests. (mark with an "x")
    Code changes need test coverage. If you don't know
    how to make tests, check this box to ask for help.

Describe your changes

A clear and concise description of what the request is.

If applicable, add screenshots to help explain your issue.

Copy link

vercel bot commented Jun 16, 2024

@apathak18 is attempting to deploy a commit to the Chapter Three Team on Vercel.

A member of the Team first needs to authorize it.

@apathak18
Copy link
Contributor Author

@shadcn I'm not able to add the reviewer and other pipelines are blocked without reviewer.
Could you please review the PR and check if any changes required to support D11.

@apathak18
Copy link
Contributor Author

apathak18 commented Jul 15, 2024

@shadcn could you please review this PR and check if its looks for D11 compatible release?

Copy link
Collaborator

@JohnAlbin JohnAlbin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After a quick review, this is the only thing I see as an issue.

modules/next/composer.json Outdated Show resolved Hide resolved
@apathak18
Copy link
Contributor Author

@JohnAlbin,
Validated with these changes and it is running the site without any error!!
Content syncing and image rendering ~~ attaching the screenshots for the same
Screenshot 2024-08-03 at 6 45 01 PM
Screenshot 2024-08-03 at 6 44 52 PM

modules/next/composer.json Outdated Show resolved Hide resolved
modules/next/modules/next_graphql/next_graphql.info.yml Outdated Show resolved Hide resolved
modules/next/tests/modules/next_tests/next_tests.info.yml Outdated Show resolved Hide resolved
@apathak18
Copy link
Contributor Author

I've refractor the tests to move delete action log after revalidate as I've noticed it is logging after revalidating (Reason delete event fire on hook_entity_predelete)
Screenshot 2024-08-06 at 2 12 00 PM

Tests output for D11
Screenshot 2024-08-06 at 2 29 08 PM

@apathak18
Copy link
Contributor Author

@JohnAlbin Please review this PR and let me know if any other changes required.

Comment on lines +32 to +35
- drupal: "11.0.x"
php: "8.1"
- drupal: "11.0.x"
php: "8.2"
Copy link
Contributor

@yobottehg yobottehg Aug 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

11.0 requires PHP 8.3

Copy link
Contributor Author

@apathak18 apathak18 Aug 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yobottehg Correct!!
Pipeline is running on 8.3
see: Screenshot 2024-08-06 at 3 02 27 PM

this configuration is to exclude running with 8.1, 8.2 versions of php for Drupal 11

modules/next/tests/modules/next_tests/next_tests.info.yml Outdated Show resolved Hide resolved
'@action' => $action,
];

$this->assertNotEmpty(Database::getConnection()->select('watchdog', 'w')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@apathak18 I'm not sure on this, but we can use it like below instead of using Database class:

Suggested change
$this->assertNotEmpty(Database::getConnection()->select('watchdog', 'w')
$this->assertNotEmpty($this->container->get('database')->select('watchdog', 'w')

Copy link
Contributor

@backlineint backlineint left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally things look good here. Thanks to all who contributed on this one.

In general, I'd encourage the scope of an upgrade issue like this to be kept just to things necessary for the upgrade - core version requirement in module info files, any deprecated code. There were some things along the way outside of that, and I still think some of the changes to the NextSettingsForm are not related to D11 compatibility. Don't doubt that these could be worthwhile changes, but keeping them in a separate PR will hopefully make it easier for us to get important things Drupal version compatibility through more quickly.

I confirmed that the module tests are passing locally, and also did some manual e2e testing.

There are still sone deprecation warnings thrown by the module tests, but I'll create a follow up PR for that so we can merge this.

@backlineint backlineint dismissed JohnAlbin’s stale review October 4, 2024 20:03

This feedback has been resolved.

@backlineint backlineint merged commit 1405a09 into chapter-three:main Oct 4, 2024
1 of 4 checks passed
@backlineint
Copy link
Contributor

This has been released as 2.0.0-beta1: https://www.drupal.org/project/next/releases/2.0.0-beta1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants