Skip to content

Commit

Permalink
Merge pull request #29 from snowio/upgrade/PHP-8-1-compat
Browse files Browse the repository at this point in the history
Php 8.1 support
  • Loading branch information
peekarboo authored Jun 17, 2022
2 parents 8c14e60 + 562ce25 commit 344b75c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 20 deletions.
31 changes: 13 additions & 18 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,29 @@
language: php
php:
- 7.3
- 7.4
dist: xenial
- 8.1
git:
depth: false

dist: xenial
env:
matrix:
- TEST_GROUP=magento_latest
- TEST_GROUP=magento_23
matrix:
allow_failures:
- env: TEST_GROUP=magento_23 # Backwards breaking changes prevent 2.3 suite from working
- TEST_GROUP=magento_latest
- TEST_GROUP=magento_23
jobs:
exclude:
- php: 7.4
env: TEST_GROUP=magento_23
- php: 7.3
env: TEST_GROUP=magento_latest
- php: 8.1
env: TEST_GROUP=magento_23
- php: 7.4
env: TEST_GROUP=magento_latest

before_install:
- if [ ! "$TRAVIS_PULL_REQUEST" = "false" ]; then git branch; git branch -D "$TRAVIS_BRANCH" || true; git checkout -b "$TRAVIS_BRANCH"; fi
- phpenv config-rm xdebug.ini || true
- composer self-update 1.10.16
- composer self-update --2

install:
- composer install --no-interaction
# Install magento
- if [[ $TEST_GROUP = magento_23 ]]; then NAME=snowmodule FULL_INSTALL=0 VERSION=2.3.6 . ./vendor/bin/travis-install-magento.sh; fi
- if [[ $TEST_GROUP = magento_23 ]]; then NAME=snowmodule FULL_INSTALL=0 VERSION=2.3.7 . ./vendor/bin/travis-install-magento.sh; fi
- if [[ $TEST_GROUP = magento_latest ]]; then NAME=snowmodule FULL_INSTALL=0 . ./vendor/bin/travis-install-magento.sh; fi
# Install this module
- cd vendor/ampersand/travis-vanilla-magento/instances/snowmodule
Expand All @@ -36,7 +33,7 @@ install:
# Configure for integration tests
- mysql -uroot -e 'SET @@global.sql_mode = NO_ENGINE_SUBSTITUTION; DROP DATABASE IF EXISTS magento_integration_tests; CREATE DATABASE magento_integration_tests;'
- cp dev/tests/integration/etc/install-config-mysql.travis-no-rabbitmq.php.dist dev/tests/integration/etc/install-config-mysql.php
- php $TRAVIS_BUILD_DIR/travis/prepare_phpunit_config.php $TRAVIS_BUILD_DIR/vendor/ampersand/travis-vanilla-magento/instances/snowepr
- php $TRAVIS_BUILD_DIR/travis/prepare_phpunit_config.php $TRAVIS_BUILD_DIR/vendor/ampersand/travis-vanilla-magento/instances/snowmodule

script:
- vendor/bin/phpunit -c $(pwd)/dev/tests/integration/phpunit.xml.dist --testsuite Integration
Expand All @@ -47,10 +44,8 @@ addons:
- postfix
- apache2
- libapache2-mod-fastcgi

services:
- mysql

cache:
apt: true
directories:
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
}
],
"require": {
"php": "^7.4",
"magento/framework": "^103",
"php": "^7.4||^8.1",
"magento/framework": "^102||^103||^104",
"magento/module-eav": "^102"
},
"require-dev": {
Expand Down

0 comments on commit 344b75c

Please sign in to comment.