Skip to content

Added missing return types to fix deprecation warnings in PHP 8.1 #143

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

Closed
wants to merge 3 commits into from
Closed

Added missing return types to fix deprecation warnings in PHP 8.1 #143

wants to merge 3 commits into from

Conversation

acelaya
Copy link

@acelaya acelaya commented Dec 10, 2021

Closes #141

@simPod simPod mentioned this pull request Dec 26, 2021
Copy link
Contributor

@simPod simPod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will not pass CI e.g. on PHP 7.1

@acelaya
Copy link
Author

acelaya commented Jan 1, 2022

@simPod every change in this PR is compatible with PHP 7.1

@simPod
Copy link
Contributor

simPod commented Jan 1, 2022

Hm, I see, mb. Though these are BC breaks so should go into 1.6 I guess.

I'd propose to have these merged into 1.5:

  1. Temporarily skip broken test #145
  2. Temporarily skip broken test #145

and maybe also:
3. #123

Then this can be rebased with passing CI for v1.6 I'd say

@garethellis36
Copy link

Hello - is there any possibility of this being merged and 1.6 being released soon please? If there's anything still pending that a new PR can address, please let me know and I'm happy to help. Thanks! :)

@simPod
Copy link
Contributor

simPod commented Jan 31, 2022

#134 (comment)

Co-authored-by: Enrique Barbeito García <ebarbeito@gmail.com>
@cebe cebe added this to the 1.7.0 milestone Feb 9, 2022
@Sweetchuck
Copy link

Sweetchuck commented Feb 14, 2022

@acelaya The patch from this PR does not apply any more to the latest master (Commits on Feb 10, 2022 8bbbcf1)

The latest commit this PR works with is 41db38d Dec 21 2021

I don't want to send a PR to a PR (I really don't like this workflow on GitHub)
After I resolved the conflicts. here is the result:
.github/workflows/php.yml

name: CI

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  phpunit:
    name: Tests
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest]
        php:
          - "7.1"
          - "7.2"
          - "7.3"
          - "7.4"
          - "8.0"
          - "8.1"
        dependencies:
          - "lowest"
          - "highest"
        symfony-yaml: ['^3.4', '^4', '^5', '^6']
        include:
          - os: "windows-latest"
            php: "8.0"
            dependencies: "highest"
            symfony-yaml: '5.4.2'
          - os: "macos-latest"
            php: "8.0"
            dependencies: "highest"
            symfony-yaml: '^5'
        exclude:
          # symfony/yaml v5 does not run on PHP 7.1
          - php: '7.1'
            symfony-yaml: '^5'
          # symfony/yaml v6 does not run on PHP 7.*
          - php: '7.1'
            symfony-yaml: '^6'
          - php: '7.2'
            symfony-yaml: '^6'
          - php: '7.3'
            symfony-yaml: '^6'
          - php: '7.4'
            symfony-yaml: '^6'
          # symfony/yaml v3.4 is not compatible with PHP 8.0 but has no upper-bound, so it installs on it
          - php: '8.0'
            symfony-yaml: '^3.4'

    runs-on: ${{ matrix.os }}

    steps:
      - uses: actions/checkout@v2

      - name: Install PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: ${{ matrix.php }}
          coverage: pcov
          tools: composer:v2

      - name: Require specific symfony/yaml version
        run: "composer require symfony/yaml:'${{ matrix.symfony-yaml }}' --prefer-dist --no-interaction --ansi --no-install"

      - name: "Install dependencies with Composer"
        uses: "ramsey/composer-install@v2"
        with:
          dependency-versions: "${{ matrix.dependencies }}"

      - name: Validate test data
        run: make lint

      - name: PHPUnit tests
        run: make test

      - name: Code coverage
        run: make coverage

And thank you for the work you have done so far.

@acelaya acelaya closed this Feb 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PHP 8.1 deprecation warnings
6 participants