From 554554f8853068a3dda26182ab31a52704dbb095 Mon Sep 17 00:00:00 2001 From: navneet0693 Date: Tue, 8 Feb 2022 17:10:51 +0530 Subject: [PATCH 1/5] Added PHP support. 1. Update Drupal core version to 9.3.5 which supports PHP 8.1 2. Updated travis configutation to install PHP 8.1 3. Updated rector.php file to check againt PHP 8.1 --- .travis.yml | 2 +- composer.json | 2 +- rector.php | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 50185504d..9554ee2ab 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,7 @@ addons: language: php php: - - 7.4 + - 8.1 services: - docker diff --git a/composer.json b/composer.json index 8e549f378..be1e3d54a 100644 --- a/composer.json +++ b/composer.json @@ -31,7 +31,7 @@ "dealerdirect/phpcodesniffer-composer-installer": "~0.7.1", "drupal/coder": "^8.3", "drupal/composer_deploy": "^1.6", - "drupal/core-dev": "~9.3.12", + "drupal/core-dev": "~9.3.15", "drupal/devel": "^4.1", "drupal/drupal-extension": "^4.1", "drupal/upgrade_status": "^3.11", diff --git a/rector.php b/rector.php index 602fc032d..255cdd2ea 100644 --- a/rector.php +++ b/rector.php @@ -24,7 +24,7 @@ // Should we try and load \Drupal::VERSION and check? $containerConfigurator->import(__DIR__ . '/vendor/palantirnet/drupal-rector/config/drupal-8/drupal-8-all-deprecations.php'); $containerConfigurator->import(__DIR__ . '/vendor/palantirnet/drupal-rector/config/drupal-9/drupal-9-all-deprecations.php'); - $containerConfigurator->import(SetList::PHP_74); + $containerConfigurator->import(SetList::PHP_81); $parameters = $containerConfigurator->parameters(); $drupalFinder = new DrupalFinder(); @@ -37,7 +37,7 @@ $drupalRoot . '/themes', ]); - $parameters->set(Option::PHP_VERSION_FEATURES, PhpVersion::PHP_74); + $parameters->set(Option::PHP_VERSION_FEATURES, PhpVersion::PHP_81); $parameters->set(Option::SKIP, ['*/upgrade_status/tests/modules/*']); $parameters->set(Option::FILE_EXTENSIONS, ['php', 'module', 'theme', 'install', 'profile', 'inc', 'engine']); $parameters->set(Option::AUTO_IMPORT_NAMES, TRUE); From 0b5a14fea00b16fb16aff528cd1f3da7b218dd04 Mon Sep 17 00:00:00 2001 From: navneet0693 Date: Wed, 9 Feb 2022 21:08:19 +0530 Subject: [PATCH 2/5] Changed Open Social docker image from dev to d9. --- docker-compose.blackfire.yml | 4 ++-- docker-compose.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docker-compose.blackfire.yml b/docker-compose.blackfire.yml index d460647ac..9137c5d80 100644 --- a/docker-compose.blackfire.yml +++ b/docker-compose.blackfire.yml @@ -2,7 +2,7 @@ version: "2" services: web: - image: goalgorilla/open_social_docker:dev + image: goalgorilla/open_social_docker:d9 volumes: - ./:/var/www:delegated links: @@ -58,7 +58,7 @@ services: container_name: social_selenium behat: - image: goalgorilla/open_social_docker:dev + image: goalgorilla/open_social_docker:d9 volumes: - ./:/var/www:delegated links: diff --git a/docker-compose.yml b/docker-compose.yml index 1bbea19c1..27d39a813 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,6 +1,6 @@ services: web: - image: goalgorilla/open_social_docker:dev + image: goalgorilla/open_social_docker:d9 volumes: - ./:/var/www:delegated depends_on: @@ -51,7 +51,7 @@ services: container_name: social_selenium behat: - image: goalgorilla/open_social_docker:dev + image: goalgorilla/open_social_docker:d9 volumes: - ./:/var/www:delegated depends_on: From 387fa1064d45ef8f7cfbb6891dce8145abf410a3 Mon Sep 17 00:00:00 2001 From: navneet0693 Date: Thu, 10 Feb 2022 13:48:30 +0530 Subject: [PATCH 3/5] Changed PHP version from 8.1 to 8.0 to match Open Social Docker image from https://github.com/goalgorilla/open_social_docker/pull/19. --- .travis.yml | 2 +- rector.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9554ee2ab..82d3d5593 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,7 @@ addons: language: php php: - - 8.1 + - 8.0 services: - docker diff --git a/rector.php b/rector.php index 255cdd2ea..2e9f4b7d2 100644 --- a/rector.php +++ b/rector.php @@ -24,7 +24,7 @@ // Should we try and load \Drupal::VERSION and check? $containerConfigurator->import(__DIR__ . '/vendor/palantirnet/drupal-rector/config/drupal-8/drupal-8-all-deprecations.php'); $containerConfigurator->import(__DIR__ . '/vendor/palantirnet/drupal-rector/config/drupal-9/drupal-9-all-deprecations.php'); - $containerConfigurator->import(SetList::PHP_81); + $containerConfigurator->import(SetList::PHP_80); $parameters = $containerConfigurator->parameters(); $drupalFinder = new DrupalFinder(); @@ -37,7 +37,7 @@ $drupalRoot . '/themes', ]); - $parameters->set(Option::PHP_VERSION_FEATURES, PhpVersion::PHP_81); + $parameters->set(Option::PHP_VERSION_FEATURES, PhpVersion::PHP_80); $parameters->set(Option::SKIP, ['*/upgrade_status/tests/modules/*']); $parameters->set(Option::FILE_EXTENSIONS, ['php', 'module', 'theme', 'install', 'profile', 'inc', 'engine']); $parameters->set(Option::AUTO_IMPORT_NAMES, TRUE); From 0e92471bd86def64238d14839f709d859e3628e9 Mon Sep 17 00:00:00 2001 From: navneet0693 Date: Mon, 6 Jun 2022 11:49:34 +0530 Subject: [PATCH 4/5] Updated docker ci compose file. 1. Used php 8.0.19 which is latest bug fix version of PHP available in travis. 2. Changed ci images to be temporarilty based on temporary D9 based images created for testing. --- .travis.yml | 10 ++++++++-- composer.json | 4 ++-- docker-compose-ci.yml | 10 ++++++---- docker-compose.blackfire.yml | 22 ++++++++++------------ docker-compose.yml | 6 ++++-- 5 files changed, 30 insertions(+), 22 deletions(-) diff --git a/.travis.yml b/.travis.yml index 82d3d5593..798c79c88 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -dist: trusty +dist: focal sudo: required cache: @@ -14,12 +14,18 @@ addons: language: php php: - - 8.0 + - 8.0.19 + +env: + global: + # Travis Token. + secure: "u6jLZiftQdb8Ozxngu5sgwmnXeUyvNF3/Y+5eX3+Xyb7Sm6K++cBLbYl/zNbuzp1rZE5dn3pVTQc4tstVXZw2B5KjCd64r9HE9gdwCEnS/AA/w3wGlaEBinTzKOrrN1EvqNNhnJUY2JmqEYVom+UYwLZWIIKM/5OoaeidNqHDvImZZLAeYfPMGnySsFC01yCzrOn6jv8Bwu00dQPVEOQylVEV5qgdGYz6CvGGslcvGxhvR0qdY/IXhrA0yxIk1yA6vu1mQpCSjGpPLy024JhcqRr3AzjH2N0QRKlL7vcNFxl/OC0qcK2bOl8lcQydeC5LRp92eeCLfMfvqHDqLJKvebCsvaZSmqlzCURlcHaJOM5bce7XPVyNLdwnfppgSacocGol38qxfEc09qV4AZnklwigYCfnk346oSaocKApy48KRW4cNXL45U7+z10IzVAENGwbyyuwdvKHhDtMCgMd8eeYfRF5EvENOKVSG02Kca8X2fLBhmJsXkFcBEW7pSRZKxixkIkuAwEYSQW/lvvM4LJmd2np7vZDEMh1dmf7TBRBygDVmM7vtdYRSzivR/T9nH+mXPP9FcjVvlPPeWAEaqtLPmmONmYRjDRcoHjJh3YnSMpvVs8wejDf7iS6A44cI6xZQRoEoCFA/WUu5EnzmoOCY7HvZ62xnZ0I9nNyL4=" services: - docker before_install: + - set -e # Composer Configurations. - export COMPOSER_MEMORY_LIMIT=-1 # Set php memory limit to -1 so composer update will not fail - export COMPOSER_EXIT_ON_PATCH_FAILURE=1 # To enforce throwing an error and stopping package installation/update immediately diff --git a/composer.json b/composer.json index be1e3d54a..0f0fa044d 100644 --- a/composer.json +++ b/composer.json @@ -24,8 +24,8 @@ "blackfire/php-sdk": "^v1.27.1", "drupal/redis": "^1.5", "drush/drush": "11.*@stable", - "goalgorilla/open_social": "dev-main", - "goalgorilla/open_social_scripts": "^3.0" + "goalgorilla/open_social": "dev-feature/3260861-php-8-support-updated-branch", + "goalgorilla/open_social_scripts": "^3.1" }, "require-dev": { "dealerdirect/phpcodesniffer-composer-installer": "~0.7.1", diff --git a/docker-compose-ci.yml b/docker-compose-ci.yml index 7ac4bb656..9d5d9aa4b 100644 --- a/docker-compose-ci.yml +++ b/docker-compose-ci.yml @@ -1,8 +1,10 @@ +# See: https://docs.docker.com/compose/compose-file/ +# See: https://github.com/compose-spec/compose-spec/blob/master/spec.md version: "2" services: web_scripts: - image: goalgorilla/open_social_docker:ci + image: goalgorilla/open_social_docker:cid9 volumes: - ./:/var/www:delegated depends_on: @@ -12,7 +14,7 @@ services: container_name: social_ci_web_scripts web: - image: goalgorilla/open_social_docker:ci + image: goalgorilla/open_social_docker:cid9 volumes: - ./:/var/www:delegated depends_on: @@ -34,7 +36,7 @@ services: volumes: - db_data:/var/lib/mysql ports: - - "3307:3306" + - "3306" container_name: social_ci_db command: mysqld --max_allowed_packet=16M @@ -62,7 +64,7 @@ services: container_name: social_ci_selenium behat: - image: goalgorilla/open_social_docker:ci + image: goalgorilla/open_social_docker:cid9 volumes: - ./:/var/www:delegated depends_on: diff --git a/docker-compose.blackfire.yml b/docker-compose.blackfire.yml index 9137c5d80..6717d14fd 100644 --- a/docker-compose.blackfire.yml +++ b/docker-compose.blackfire.yml @@ -1,11 +1,9 @@ -version: "2" - services: web: - image: goalgorilla/open_social_docker:d9 + image: goalgorilla/open_social_docker:devd9 volumes: - ./:/var/www:delegated - links: + depends_on: - db - mailcatcher - redis @@ -46,8 +44,8 @@ services: image: selenium/standalone-firefox-debug:2.48.2 volumes: - ./html/profiles/contrib/social/tests/behat/features/files/:/files:delegated - links: - - web:web + depends_on: + - web ports: - "4444" - "5900" @@ -58,13 +56,13 @@ services: container_name: social_selenium behat: - image: goalgorilla/open_social_docker:d9 + image: goalgorilla/open_social_docker:devd9 volumes: - ./:/var/www:delegated - links: - - web:web - - db:db - - selenium:selenium + depends_on: + - web + - db + - selenium environment: - DRUPAL_SETTINGS=development network_mode: "bridge" @@ -85,7 +83,7 @@ services: image: goalgorilla/open_social_docker:cron volumes: - ./:/var/www - links: + depends_on: - db - mailcatcher environment: diff --git a/docker-compose.yml b/docker-compose.yml index 27d39a813..ee13278b4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,6 +1,8 @@ +# See: https://docs.docker.com/compose/compose-file/ +# See: https://github.com/compose-spec/compose-spec/blob/master/spec.md services: web: - image: goalgorilla/open_social_docker:d9 + image: goalgorilla/open_social_docker:devd9 volumes: - ./:/var/www:delegated depends_on: @@ -51,7 +53,7 @@ services: container_name: social_selenium behat: - image: goalgorilla/open_social_docker:d9 + image: goalgorilla/open_social_docker:devd9 volumes: - ./:/var/www:delegated depends_on: From 9fa3021d07ca574768e6d44389325e3d050587a5 Mon Sep 17 00:00:00 2001 From: navneet0693 Date: Thu, 16 Jun 2022 16:28:29 +0530 Subject: [PATCH 5/5] Reverted open_social and docker images tags. --- .travis.yml | 2 +- composer.json | 2 +- docker-compose-ci.yml | 6 +++--- docker-compose.blackfire.yml | 4 ++-- docker-compose.yml | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 798c79c88..ed4f26183 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,7 @@ addons: language: php php: - - 8.0.19 + - 8.0 env: global: diff --git a/composer.json b/composer.json index 0f0fa044d..6f4c90992 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ "blackfire/php-sdk": "^v1.27.1", "drupal/redis": "^1.5", "drush/drush": "11.*@stable", - "goalgorilla/open_social": "dev-feature/3260861-php-8-support-updated-branch", + "goalgorilla/open_social": "dev-main", "goalgorilla/open_social_scripts": "^3.1" }, "require-dev": { diff --git a/docker-compose-ci.yml b/docker-compose-ci.yml index 9d5d9aa4b..016d95f34 100644 --- a/docker-compose-ci.yml +++ b/docker-compose-ci.yml @@ -4,7 +4,7 @@ version: "2" services: web_scripts: - image: goalgorilla/open_social_docker:cid9 + image: goalgorilla/open_social_docker:ci volumes: - ./:/var/www:delegated depends_on: @@ -14,7 +14,7 @@ services: container_name: social_ci_web_scripts web: - image: goalgorilla/open_social_docker:cid9 + image: goalgorilla/open_social_docker:ci volumes: - ./:/var/www:delegated depends_on: @@ -64,7 +64,7 @@ services: container_name: social_ci_selenium behat: - image: goalgorilla/open_social_docker:cid9 + image: goalgorilla/open_social_docker:ci volumes: - ./:/var/www:delegated depends_on: diff --git a/docker-compose.blackfire.yml b/docker-compose.blackfire.yml index 6717d14fd..76f114753 100644 --- a/docker-compose.blackfire.yml +++ b/docker-compose.blackfire.yml @@ -1,6 +1,6 @@ services: web: - image: goalgorilla/open_social_docker:devd9 + image: goalgorilla/open_social_docker:dev volumes: - ./:/var/www:delegated depends_on: @@ -56,7 +56,7 @@ services: container_name: social_selenium behat: - image: goalgorilla/open_social_docker:devd9 + image: goalgorilla/open_social_docker:dev volumes: - ./:/var/www:delegated depends_on: diff --git a/docker-compose.yml b/docker-compose.yml index ee13278b4..f471391ca 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,7 +2,7 @@ # See: https://github.com/compose-spec/compose-spec/blob/master/spec.md services: web: - image: goalgorilla/open_social_docker:devd9 + image: goalgorilla/open_social_docker:dev volumes: - ./:/var/www:delegated depends_on: @@ -53,7 +53,7 @@ services: container_name: social_selenium behat: - image: goalgorilla/open_social_docker:devd9 + image: goalgorilla/open_social_docker:dev volumes: - ./:/var/www:delegated depends_on: