From bc8dced11c535dd2a941da734a2047653ad9cda7 Mon Sep 17 00:00:00 2001 From: Pierre Tondereau Date: Fri, 11 Sep 2020 11:25:25 +0200 Subject: [PATCH] Laravel 8 (#23) --- .github/workflows/test.yml | 75 ++++++++++++++++++++++++++++ .travis.yml | 100 ------------------------------------- LICENSE | 2 +- README.md | 19 ++++--- composer.json | 11 ++-- 5 files changed, 91 insertions(+), 116 deletions(-) create mode 100644 .github/workflows/test.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..47fe0e9 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,75 @@ +name: Tests + +on: + push: + pull_request: + +jobs: + tests: + name: PHP ${{ matrix.php }}; Laravel ${{ matrix.laravel }} + runs-on: ubuntu-20.04 + + strategy: + matrix: + php: ['7.2', '7.3', '7.4', '8.0'] + laravel: ['6', '7', '8'] + exclude: + - php: '7.2' + laravel: '8' + + steps: + - name: Checkout Code + uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + tools: composer:v2 + coverage: none + + - name: Setup Problem Matchers + run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" + + - name: Select Laravel 6 + uses: nick-invision/retry@v1 + with: + timeout_minutes: 5 + max_attempts: 5 + command: composer require "laravel/framework:6.*" --no-update --no-interaction + if: "matrix.laravel == '6'" + + - name: Select Laravel 7 + uses: nick-invision/retry@v1 + with: + timeout_minutes: 5 + max_attempts: 5 + command: composer require "laravel/framework:7.*" --no-update --no-interaction + if: "matrix.laravel == '7'" + + - name: Select Laravel 8 + uses: nick-invision/retry@v1 + with: + timeout_minutes: 5 + max_attempts: 5 + command: composer require "laravel/framework:8.*" --no-update --no-interaction + if: "matrix.laravel == '8'" + + - name: Install PHP 7 Dependencies + uses: nick-invision/retry@v1 + with: + timeout_minutes: 5 + max_attempts: 5 + command: composer update --no-interaction --no-progress + if: "matrix.php < 8" + + - name: Install PHP 8 Dependencies + uses: nick-invision/retry@v1 + with: + timeout_minutes: 5 + max_attempts: 5 + command: composer update --no-interaction --no-progress --ignore-platform-req=php + if: "matrix.php >= 8" + + - name: Execute PHPUnit + run: vendor/bin/phpunit \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 5158ac8..0000000 --- a/.travis.yml +++ /dev/null @@ -1,100 +0,0 @@ -dist: xenial - -matrix: - include: - - env: - - PHP_VERSION=7.1 - - LARAVEL_VERSION=5.5.* - - SYMFONY_VERSION=^3.0 - - PHPUNIT_VERSION=^6.5 - - env: - - PHP_VERSION=7.1 - - LARAVEL_VERSION=5.6.* - - SYMFONY_VERSION=^4.0 - - PHPUNIT_VERSION=^7.5 - - env: - - PHP_VERSION=7.1 - - LARAVEL_VERSION=5.7.* - - SYMFONY_VERSION=^4.0 - - PHPUNIT_VERSION=^7.5 - - env: - - PHP_VERSION=7.1 - - LARAVEL_VERSION=5.8.* - - SYMFONY_VERSION=^4.0 - - PHPUNIT_VERSION=^7.5 - - env: - - PHP_VERSION=7.2 - - LARAVEL_VERSION=5.5.* - - SYMFONY_VERSION=^3.0 - - PHPUNIT_VERSION=^6.5 - - env: - - PHP_VERSION=7.2 - - LARAVEL_VERSION=5.6.* - - SYMFONY_VERSION=^4.0 - - PHPUNIT_VERSION=^7.5 - - env: - - PHP_VERSION=7.2 - - LARAVEL_VERSION=5.7.* - - SYMFONY_VERSION=^4.0 - - PHPUNIT_VERSION=^7.5 - - env: - - PHP_VERSION=7.2 - - LARAVEL_VERSION=5.8.* - - SYMFONY_VERSION=^4.0 - - PHPUNIT_VERSION=^8.0 - - env: - - PHP_VERSION=7.2 - - LARAVEL_VERSION=^6.0 - - SYMFONY_VERSION=^4.0 - - PHPUNIT_VERSION=^8.0 - - env: - - PHP_VERSION=7.2 - - LARAVEL_VERSION=^7.0 - - SYMFONY_VERSION=^4.0 - - PHPUNIT_VERSION=^8.0 - - env: - - PHP_VERSION=7.3 - - LARAVEL_VERSION=5.5.* - - SYMFONY_VERSION=^3.0 - - PHPUNIT_VERSION=^6.5 - - env: - - PHP_VERSION=7.3 - - LARAVEL_VERSION=5.6.* - - SYMFONY_VERSION=^4.0 - - PHPUNIT_VERSION=^7.5 - - env: - - PHP_VERSION=7.3 - - LARAVEL_VERSION=5.7.* - - SYMFONY_VERSION=^4.0 - - PHPUNIT_VERSION=^7.5 - - env: - - PHP_VERSION=7.3 - - LARAVEL_VERSION=5.8.* - - SYMFONY_VERSION=^4.0 - - PHPUNIT_VERSION=^8.0 - - env: - - PHP_VERSION=7.3 - - LARAVEL_VERSION=^6.0 - - SYMFONY_VERSION=^4.0 - - PHPUNIT_VERSION=^8.0 - - env: - - PHP_VERSION=7.3 - - LARAVEL_VERSION=^7.0 - - SYMFONY_VERSION=^4.0 - - PHPUNIT_VERSION=^8.0 - - -before_install: - - travis_retry docker pull registry.gitlab.com/grahamcampbell/php:$PHP_VERSION - - docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint composer registry.gitlab.com/grahamcampbell/php:$PHP_VERSION require "laravel/framework:${LARAVEL_VERSION}" --no-update -n - - docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint composer registry.gitlab.com/grahamcampbell/php:$PHP_VERSION require "symfony/lts:${SYMFONY_VERSION}" --no-update -n - - docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint composer registry.gitlab.com/grahamcampbell/php:$PHP_VERSION require "phpunit/phpunit:${PHPUNIT_VERSION}" --dev --no-update -n - -install: - - travis_retry docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint composer registry.gitlab.com/grahamcampbell/php:$PHP_VERSION install --no-suggest --prefer-dist -n -o - -script: - - docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/phpunit registry.gitlab.com/grahamcampbell/php:$PHP_VERSION --coverage-clover build/logs/clover.xml - -after_script: - - travis_retry docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint ocular registry.gitlab.com/grahamcampbell/php:$PHP_VERSION code-coverage:upload --format=php-clover build/logs/clover.xml diff --git a/LICENSE b/LICENSE index 082c61b..2918195 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2016 Pierre Tondereau +Copyright (c) 2020 Pierre Tondereau Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index bc5c338..65b95f4 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,15 @@ Laravel UPS Api ================= -## For Laravel 5.5,6 and 7 - -[![Build Status](https://travis-ci.org/ptondereau/Laravel-UPS-Api.svg?branch=master)](https://travis-ci.org/ptondereau/Laravel-UPS-Api) -[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/ptondereau/Laravel-UPS-Api/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/ptondereau/Laravel-UPS-Api/?branch=master) -[![Test Coverage](https://codeclimate.com/github/ptondereau/Laravel-UPS-Api/badges/coverage.svg)](https://codeclimate.com/github/ptondereau/Laravel-UPS-Api/coverage) -[![Code Climate](https://codeclimate.com/github/ptondereau/Laravel-UPS-Api/badges/gpa.svg)](https://codeclimate.com/github/ptondereau/Laravel-UPS-Api) -[![StyleCI](https://styleci.io/repos/54156171/shield)](https://styleci.io/repos/54156171) -[![Latest Stable Version](https://poser.pugx.org/ptondereau/laravel-ups-api/v/stable)](https://packagist.org/packages/Ptondereau/laravel-ups-api) -[![Latest Unstable Version](https://poser.pugx.org/ptondereau/laravel-ups-api/v/unstable)](https://packagist.org/packages/Ptondereau/laravel-ups-api) -[![License](https://poser.pugx.org/ptondereau/laravel-ups-api/license)](https://packagist.org/packages/Ptondereau/laravel-ups-api) +## For Laravel 6, 7 and 8 + +

+Build Status +StyleCI Status +Software License +Packagist Downloads +Latest Version +

Laravel UPS Api was created by, and is maintained by [Pierre Tondereau](https://github.com/ptondereau), and PHP UPS Api was created by, and is maintained by [Gabriel Bull](https://github.com/gabrielbull) at [PHP UPS API](https://github.com/gabrielbull/php-ups-api). diff --git a/composer.json b/composer.json index 3f33978..03850b7 100644 --- a/composer.json +++ b/composer.json @@ -3,14 +3,15 @@ "description": "A small Laravel's wrapper for the PHP UPS API library", "keywords": ["laravel", "framework", "UPS", "Laravel UPS Api", "Laravel-Ups-Api", "Pierre Tondereau", "Ptondereau"], "require": { - "php": "^7.1.3", - "illuminate/contracts": "^5.5|^6.0|^7.0", - "illuminate/support": "^5.5|^6.0|^7.0", + "php": "^7.2.5 || ^8.0", + "illuminate/contracts": "^6.0 || ^7.0 || ^8.0", + "illuminate/support": "^6.0 || ^7.0 || ^8.0", "gabrielbull/ups-api": "^0.8" }, "require-dev": { - "graham-campbell/analyzer": "^2.1", - "graham-campbell/testbench": "^5.2" + "graham-campbell/analyzer": "^3.0", + "graham-campbell/testbench": "^5.4", + "phpunit/phpunit": "^8.5.8 || ^9.3.7" }, "autoload": { "psr-4": {