guzzle / guzzle-services

Provides an implementation of the Guzzle Command library that uses Guzzle service descriptions to describe web services, serialize requests, and parse responses into easy to use model structures.
MIT License
253 stars 78 forks source link

guzzlehttp/guzzle dosn't work after update php to php 8 #177

Closed doox911 closed 3 years ago

doox911 commented 3 years ago

PHP version:

PHP 8.0.0RC3 (cli) (built: Oct 31 2020 17:06:57) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.0-dev, Copyright (c) Zend Technologies
    with Zend OPcache v8.0.0RC3, Copyright (c), by Zend Technologies

Description I use the guzzlehttp/guzzle package in Laravel 8. After upgrading to PHP 8, I get:

Symfony\Component\ErrorHandler\Error\FatalError: Invalid opcode 117/2/0. in file ../vendor/defuse/php-encryption/src/Core.php on line 412

How to reproduce Use: composer.json:

    "require": {
        "php": "^8.0",
        "doctrine/dbal": "^2.12.1",
        "fideloper/proxy": "^4.4",
        "fruitcake/laravel-cors": "^2.0",
        "guzzlehttp/guzzle": "^7.2",
        "laravel/framework": "^8.12",
        "laravel/passport": "^10.0",
        "laravel/tinker": "^2.5",
      "ext-json": "*"
    },
    "require-dev": {
        "facade/ignition": "^2.5",
        "fakerphp/faker": "^1.9.1",
        "mockery/mockery": "^1.4.2",
        "nunomaduro/collision": "^5.0",
        "phpunit/phpunit": "^9.3.3"
    },

If I call opcache_reset (); before $this->client = new \GuzzleHttp\Client; $response = $this->client->post(...), it works.

doox911 commented 3 years ago

https://stackoverflow.com/questions/65033643/guzzlehttp-guzzle-dosnt-work-after-update-php-to-php-8/65044002#65044002

Konafets commented 3 years ago

This repository belongs to guzzle/guzzle-services and not Guzzle itself. If you have problems with Guzzle, please open up an issue there.