Skip to content

AbstractResource must be compatible with ResourceInterface::populateFromResponse #181

Closed

Description

@jjsaunier

Hello,

Since migration to php 7.2 I got this error, with the latest tagged version :

Compile Error: Declaration of OpenStack\Common\Resource\AbstractResource::populateFromResponse(Psr\Http\Message\ResponseInterface $response): OpenStack\Common\Resource\AbstractResource must be compatible with OpenStack\Common\Resource\ResourceInterface::populateFromResponse(Psr\Http\Message\ResponseInterface $response): OpenStack\Common\Resource\ResourceInterface

  at vendor/php-opencloud/openstack/src/Common/Resource/AbstractResource.php:16

Activity

  1. haphan commented on Dec 6, 2017

    @haphan
    Collaborator

    SDK has not been tested with 7.2 since it is relatively new.

    I will add php 7.2 to travis.

  2. jjsaunier commented on Dec 7, 2017

    @jjsaunier
    Author

    Ok, nice to Know, thanks you, I'll sens PR if I have free Time to fixe that

  3. haphan commented on Dec 7, 2017

    @haphan
    Collaborator

    @Prophet777 I just ran tests with php 7.2 and unfortunately, the SDK may require a bit of refactoring as well as breaking backward compatibility.

    Fatal error: Cannot use OpenStack\ObjectStore\v1\Models\Object as Object because 'Object' is a special class name in /work/tests/unit/ObjectStore/v1/Models/ContainerTest.php on line 11
    
  4. phansys commented on Jan 11, 2018

    @phansys

    This bug has nothing to do with PHP 7.2, since the same result occurs with PHP 7.0 or 7.1: https://3v4l.org/dkLdi.

  5. haphan commented on Feb 5, 2018

    @haphan
    Collaborator

    Fix issue should be fixed in the latest 3.x and 2.x version. Let me know if it is not the case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions