-
Notifications
You must be signed in to change notification settings - Fork 168
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
Issue #3341238: Upgrade Drupal version to Drupal 9.5 #3312
Conversation
Thanks for contributing towards Open Social! A maintainer from the @goalgorilla/maintainers group might not review all changes from all teams/contributors. Please don't be discouraged if it takes a while. In the meantime, we have some automated checks running and it might be that you will see our comments with some tips or requests to speed up the review process. 😊 |
1f2c78b
to
dd7c552
Compare
dd7c552
to
d81aeaf
Compare
Tugboat has finished building the preview for this pull request! Link: Dashboard: |
5 similar comments
Tugboat has finished building the preview for this pull request! Link: Dashboard: |
Tugboat has finished building the preview for this pull request! Link: Dashboard: |
Tugboat has finished building the preview for this pull request! Link: Dashboard: |
Tugboat has finished building the preview for this pull request! Link: Dashboard: |
Tugboat has finished building the preview for this pull request! Link: Dashboard: |
4b1aa44
to
854a53c
Compare
Currently, Open Social is using Drupal 9.4 ( https://github.com/goalgorilla/open_social/blob/11.7.1/composer.json#L127 ) Drupal 9.4's security support is going to end on June 21, 2023 as per documentation in https://www.drupal.org/about/core/policies/core-release-cycles/schedule#current The current minor version upgrade of Drupal is https://www.drupal.org/project/drupal/releases/9.5.3. So, we are upgrading Open Social to Drupal 9.5.3
Rector: vendor/bin/rector process html/profiles/contrib/social --dry-run 3285/3285 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100% 3 files with changes ==================== 1) html/profiles/contrib/social/modules/custom/entity_access_by_field/tests/src/Kernel/EntityAccessNodeAccessTestBase.php:15 ---------- begin diff ---------- @@ @@ * * @var array */ - public static $modules = ['group', 'options', 'entity', 'variationcache', 'node', 'gnode', 'social_group', 'flag', 'address', 'image', 'file', 'entity_access_by_field']; + protected static $modules = ['group', 'options', 'entity', 'variationcache', 'node', 'gnode', 'social_group', 'flag', 'address', 'image', 'file', 'entity_access_by_field']; /** * The entity type manager service. ----------- end diff ----------- Applied rules: * ProtectedStaticModulesPropertyRector (https://www.drupal.org/node/2909426) 2) html/profiles/contrib/social/modules/social_features/social_embed/tests/src/Kernel/SocialUserEmbedTest.php:84 ---------- begin diff ---------- @@ @@ // All requests should be ok except last one as it will be $retries + 1. $status_code = ($i === $retries) ? Response::HTTP_FORBIDDEN : Response::HTTP_OK; - $this->assertEqual($response->getStatusCode(), $status_code); + $this->assertEquals($response->getStatusCode(), $status_code); } } @@ @@ // All requests should be ok except last one as it will be $retries + 1. $status_code = ($i === $retries) ? Response::HTTP_FORBIDDEN : Response::HTTP_OK; - $this->assertEqual($response->getStatusCode(), $status_code); + $this->assertEquals($response->getStatusCode(), $status_code); } } ----------- end diff ----------- Applied rules: * AssertEqualRector * ProtectedStaticModulesPropertyRector (https://www.drupal.org/node/2909426) 3) html/profiles/contrib/social/tests/behat/features/bootstrap/FeatureContext.php:722 ---------- begin diff ---------- @@ @@ /** @var \Drupal\file\Entity\File $file */ $file = \Drupal::entityTypeManager()->getStorage('file')->load($fid); $url = $file->createFileUrl(); - $page = file_url_transform_relative($url); + $page = \Drupal::service('file_url_generator')->transformRelative($url); $this->visitPath($page); if ($expected_access == 0) { ----------- end diff ----------- Applied rules: * FileUrlTransformRelativeRector * ProtectedStaticModulesPropertyRector (https://www.drupal.org/node/2909426) [OK] 3 files would have changed (dry-run) by Rector --------------------------------------------------------------------------------------------- PHPStan: vendor/bin/phpstan analyse -c html/profiles/contrib/social/phpstan.neon --memory-limit=-1 html/profiles/contrib/social ! [NOTE] The Xdebug PHP extension is active, but "--xdebug" is not used. This may slow down performance and the process ! will not halt at breakpoints. 1063/1063 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100% ------ --------------------------------------------------------- Line modules/custom/activity_creator/activity_creator.module ------ --------------------------------------------------------- 404 Cannot access property $data on object|true. ------ --------------------------------------------------------- ------ ------------------------------------------------------ Line modules/custom/download_count/download_count.module ------ ------------------------------------------------------ 76 Cannot access offset 'type' on non-empty-array|true. 77 Cannot access offset 'id' on non-empty-array|true. ------ ------------------------------------------------------ ------ ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Line modules/social_features/social_embed/tests/src/Kernel/SocialUserEmbedTest.php ------ ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Ignored error pattern #^Call to deprecated method assertEqual\(\) of class Drupal\\KernelTests\\KernelTestBase\: in drupal\:8\.0\.0 and is removed from drupal\:10\.0\.0\. Use \$this\->assertEquals\(\) instead\.$# in path html/profiles/contrib/social/modules/social_features/social_embed/tests/src/Kernel/SocialUserEmbedTest.php was not matched in reported errors. ------ ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [ERROR] Found 4 errors
e24d35d
to
4eed9d2
Compare
Other dependent PRs are already merged, we can merge this as soon as we have all green checks! |
We reverted this PR and we are going to recreate it with the latest updated code from main |
Issue #3341238: Upgrade Drupal version to Drupal 9.5
Problem
Currently, Open Social is using Drupal 9.4 ( https://github.com/goalgorilla/open_social/blob/11.7.1/composer.json#L127 )
Drupal 9.4's security support is going to end on June 21, 2023 as per documentation in https://www.drupal.org/about/core/policies/core-release-cycles/schedule#current
The current minor version upgrade of Drupal is https://www.drupal.org/project/drupal/releases/9.5.3.
So, we are upgrading Open Social to Drupal 9.5.3
Release notes of Drupal 9.5: https://www.drupal.org/project/drupal/releases/9.5.0
Solution
Drupal 10 preparation
( taking notes for future Drupal 10 preparation )
Make sure that our PHP support is 8.1
Make sure drupal_social is adjusted for Rector, ECS, and dependencies to use Drupal 10 and PHP 8.1. GitHub - goalgorilla/drupal_social: Open Social Development repository.
Make sure the dev dependencies are updated in GitHub - goalgorilla/open_social_dev: require-dev dependencies for goalgorilla/open_social required to run tests and coding standard checks.
Adopt the change records from https://www.drupal.org/list-changes/drupal/published?keywords_description=&to_branch=10.0.x&version=&created_op=%3E%3D&created%5Bvalue%5D=&created%5Bmin%5D=&created%5Bmax%5D=
Make sure our PHPStan baseline is at a minimum.
Make sure the contributed modules and Open Social code are ready for Drupal 10.
Use Rector and ECS check tools to upgrade the code compatibility.
Make sure our PHPStan, PHPCS, and PHPUnit settings files are updated as well.
Make sure to take of following deprecations:
https://www.drupal.org/node/3223395
https://www.drupal.org/node/3276601
https://www.drupal.org/node/3306232
https://www.drupal.org/node/3272679
https://www.drupal.org/node/3276601
https://www.drupal.org/node/3304314
https://www.drupal.org/node/3259831
https://www.drupal.org/node/3304899
https://www.drupal.org/node/3304481
https://www.drupal.org/node/3310028
https://www.drupal.org/node/3310025
https://www.drupal.org/node/3313997
https://www.drupal.org/node/3319135
Double check https://www.drupal.org/project/drupal/releases/9.5.0 for removals, deprecations and contributed project information.
Use at least following versions:
https://www.drupal.org/project/bootstrap/releases/8.x-3.26
https://www.drupal.org/project/gin/releases/8.x-3.0-rc1
gin_toolbar 8.x-1.0-rc1
Review our Social Base and Social Blue for removal of libraries and core themes.
Issue tracker
https://www.drupal.org/project/social/issues/3341238
Theme issue tracker
N.A
How to test
Definition of done
Before merge
After merge
Screenshots
N.A
Release notes
As Drupal 9.4 was reaching end of security in June 21, 2023. We have upgraded Open Social to Drupal 9.5
Change Record
N.A
Translations
N.A