Problem/Motivation

Supported Versions

Currently Supported Versions

https://www.php.net/supported-versions.php

PHP Currently Supported Versions

Please, list any PHP 8.0 or PHP 8.1 issues in this issue
Test building and installing Varbase 9.0.x-dev and 9.1.0.x under PHP 8.0 / PHP 8.1 and MySQL 8

composer create-project vardot/varbase-project:9.0.x-dev PROJECT_DIR_NAME --stability dev --no-interaction

or

composer create-project vardot/varbase-project:9.1.x-dev PROJECT_DIR_NAME --stability dev --no-interaction

Proposed resolution

Have support for PHP 8.0 and PHP 8.1
Have support for MySQL 8
Add rule for PHP 8 promotion constructor in PSR-12

Remaining tasks

  • ✅ File an issue about this project
  • ✅ Addition/Change/Update/Fix to this project
  • ✅ Testing to ensure no regression
  • ✅ Automated unit/functional testing coverage

    Varbase 9.1.x CircleCI Build Passing

    Varbase 9.1.x


    Varbase 9.0.x CircleCI Build Passing

    Varbase 9.0.x


  • ✅ Developer Documentation support on feature change/addition
    Changed
    Requirements

    PHP 7.4 or higher. PHP 8.0 is recommended.

  • ➖ User Guide Documentation support on feature change/addition
  • ✅ Update Release Notes and Update Helper on new feature change/addition
  • ✅ Code review from 1 Varbase core team member
  • ✅ Full testing and approval
  • ✅ Credit contributors
  • ✅ Review with the product owner
  • ✅ Release varbase-9.0.6

Varbase update type:

  • ✅ No Update
  • ➖ Optional Update
  • ➖ Forced Update
  • ➖ Forced Update if Unchanged

User interface changes

  • N/A

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

  • Issue #3217859: Support PHP8.1 and MySQL 8 for Varbase ~9.0 and all used components with automated testing

Comments

RajabNatshah created an issue. See original summary.

rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

rajab natshah’s picture

rajab natshah’s picture

At this point of time

On running the following composer command under PHP 8.0

composer create-project vardot/varbase-project:9.0.x-dev PROJECT_DIR_NAME --stability dev --no-interaction

Facing the following problem on Resolving dependencies with PHP 8.0

Resolving dependencies through SAT

Dependency resolution completed in 0.446 seconds
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - abraham/twitteroauth[1.2.0, v1.x-dev] require php ^7.2 || ^7.3 || ^7.4 -> your php version (8.0.7) does not satisfy that requirement.
    - abraham/twitteroauth[1.0.0, 1.0.1] require php ^5.6 || ^7.0 || ^7.1 || ^7.2 -> your php version (8.0.7) does not satisfy that requirement.
    - abraham/twitteroauth 1.1.0 requires php ^7.2 || ^7.3 -> your php version (8.0.7) does not satisfy that requirement.
    - drupal/varbase_auth dev-9.0.x requires drupal/social_auth_twitter 2.x-dev -> satisfiable by drupal/social_auth_twitter[2.x-dev (alias of dev-2.x)].
    - drupal/varbase_auth 9.0.x-dev is an alias of drupal/varbase_auth dev-9.0.x and thus requires it to be installed too.
    - drupal/social_auth_twitter 2.x-dev is an alias of drupal/social_auth_twitter dev-2.x and thus requires it to be installed too.
    - vardot/varbase 9.0.x-dev requires drupal/varbase_auth 9.0.x-dev -> satisfiable by drupal/varbase_auth[9.0.x-dev (alias of dev-9.0.x)].
    - drupal/social_auth_twitter dev-2.x requires abraham/twitteroauth ^1.0 -> satisfiable by abraham/twitteroauth[1.0.0, 1.0.1, 1.1.0, 1.2.0, v1.x-dev].
    - Root composer.json requires vardot/varbase 9.0.x-dev -> satisfiable by vardot/varbase[9.0.x-dev].
rajab natshah’s picture

rajab natshah’s picture

Issue tags: +varbase-backlog
rajab natshah’s picture

Issue tags: -varbase-backlog
Related issues: +#3222209: Compatibility with PHP 8
mhawwari’s picture

PHP 7.4 is now under security support only
https://www.php.net/supported-versions.php

And the library abraham/twitteroauth now support PHP 8.1

rajab natshah’s picture

Thanks, Hawwari for following up

A full testing round for building and installing Varbase 9.0.x
composer create-project Vardot/varbase-project:9.0.x-dev PROJECT_DIR_NAME --no-dev --no-interaction
and Varbase 9.1.0.x
composer create-project Vardot/varbase-project:9.1.x-dev PROJECT_DIR_NAME --no-dev --no-interaction

Plus the automated functional testing

Changed that in my fork
https://github.com/Natshah/varbase/blob/9.0.x/.circleci/config.yml

With the automated testing running now .. on the 9.0.x branch
https://app.circleci.com/pipelines/github/Natshah/varbase/208/workflows/...

rajab natshah’s picture

Issue summary: View changes
StatusFileSize
new214.09 KB
rajab natshah’s picture

Issue summary: View changes
mhawwari’s picture

rajab natshah’s picture

rajab natshah’s picture

rajab natshah’s picture

rajab natshah’s picture

rajab natshah’s picture

rajab natshah’s picture

rajab natshah’s picture

rajab natshah’s picture

rajab natshah’s picture

Related issues:
rajab natshah’s picture

rajab natshah’s picture

rajab natshah’s picture

rajab natshah’s picture

rajab natshah’s picture

rajab natshah’s picture

Title: Support PHP8.0 for Varbase ~9.0 and all used components with automated testing » Support PHP8.0 and MySQL 8 for Varbase ~9.0 and all used components with automated testing
Issue summary: View changes
rajab natshah’s picture

Assigned: rajab natshah » Unassigned
rajab natshah’s picture

Issue tags: +PHP 8.0, +PHP 8.1, +MySQL 8
oliver huynh’s picture

Assigned: Unassigned » oliver huynh
rajab natshah’s picture

Assigned: oliver huynh » Unassigned
rajab natshah’s picture

rajab natshah’s picture

Related issues:
rajab natshah’s picture

rajab natshah’s picture

rajab natshah’s picture

TEMP fix for #3253991: Update abraham/twitteroauth to use ^3.0 to support PHP8.0 and later
Add the following in the root composer.json for projects:
"abraham/twitteroauth": "3.3.0 as 1.2.0",

To test building Varbase 9.0.x under PHP 8.0 or PHP 8.1

git clone https://github.com/Vardot/varbase-project.git myproject
cd myproject
sudo rm -rf .git/
composer require "abraham/twitteroauth:3.3.0 as 1.2.0" --ignore-platform-reqs --no-install --no-update --ignore-platform-reqs
composer install
rajab natshah’s picture

Social Aauth Twitter 8.x-2.0-alpha4 was released 22 Feb 2022 by: Abdullah Yassin

rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Now remove "abraham/twitteroauth": "3.3.0 as 1.2.0", from the root composer.json in projects under PHP 8.0
Then update Varbase Auth to 9.0.2

rajab natshah’s picture

Title: Support PHP8.0 and MySQL 8 for Varbase ~9.0 and all used components with automated testing » Support PHP8.1 and MySQL 8 for Varbase ~9.0 and all used components with automated testing

  • Rajab Natshah committed e00b7d2 on 9.1.x
    Issue #3217859: Support PHP8.1 and MySQL 8 for Varbase ~9.0 and all used...

  • Rajab Natshah committed 12ae133 on 9.0.x
    Issue #3217859: Support PHP8.1 and MySQL 8 for Varbase ~9.0 and all used...
rajab natshah’s picture

Assigned: Unassigned » mohammed j. razem
Issue summary: View changes
Status: Active » Needs review
Issue tags: +varbase-9.0.6

✅ Automated unit/functional testing coverage


Varbase 9.1.x CircleCI Build Passing

Varbase 9.1.x


Varbase 9.0.x CircleCI Build Passing

Varbase 9.0.x


A small number of warnings, after a full round of testing under PHP 8.0 and PHP 8.1
The Functional Automated Acceptance Testing is passing with Green builds.
Having one more round of testing, and fixes to ensure no warnings, notices, or fatal errors.

rajab natshah’s picture

Assigned: mohammed j. razem » Unassigned
rajab natshah’s picture

rajab natshah’s picture

rajab natshah’s picture

rajab natshah’s picture

Issue summary: View changes
Status: Needs review » Fixed

Closing this issue
Farther PHP 8.0 or PHP 8.1 issues could be reported to be fixed on used cases.

✅ Automated unit/functional testing coverage


Varbase 9.1.x CircleCI Build Passing

Varbase 9.1.x


Varbase 9.0.x CircleCI Build Passing

Varbase 9.0.x


A small number of warnings, after a full round of testing under PHP 8.0 and PHP 8.1
The Functional Automated Acceptance Testing is passing with Green builds.
Having one more round of testing, and fixes to ensure no warnings, notices, or fatal errors.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

rajab natshah’s picture

rajab natshah’s picture

✅ Released varbase-9.0.6

rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Issue summary: View changes

✅ Developer Documentation support on feature change/addition

Changed
Requirements

PHP 7.4 or higher. PHP 8.0 is recommended.

rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

✅ Developer Documentation support on feature change/addition

Changed
Requirements

PHP 7.4 or higher. PHP 8.0 is recommended.

paskainos’s picture

Fresh install of Varbase 9.0.6 on PHP 8.1.5 with Varbase Style guide selected to be installed throws Deprecated function: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in Drupal\styleguide\Theme\StyleguideThemeNegotiator->applies() (line 60 of ... ~/modules/contrib/styleguide/src/Theme/StyleguideThemeNegotiator.php) on 'welcome' (home) page, which is addressed in #3258816: Fix [PHP 8.1] Deprecated function: strpos(): Passing null to parameter #1.