Hello everyone! Is there a roadmap to know when p...
# talk-hydra
h
Hello everyone! Is there a roadmap to know when php 8.1 compatible version will arive for: https://github.com/ory/hydra-client-php Seems that the openconnect has merged pull requests containing php 8.1 compatiblity. But the hydra php client is not yet updated it seems.
n
it already does support 8.1, we have been using it successfully with 8.1 for a little while now
h
Very weird because we needed to apply patches to have it working for 8.1? For example: https://github.com/ory/hydra-client-php/blob/master/lib/Model/AcceptOAuth2ConsentRequest.php
Copy code
/**
     * Sets value based on offset.
     *
     * @param int|null $offset Offset
     * @param mixed    $value  Value to be set
     *
     * @return void
     */
    public function offsetSet($offset, $value)
    {
        if (is_null($offset)) {
            $this->container[] = $value;
        } else {
            $this->container[$offset] = $value;
        }
    }
Should be:
Copy code
/**
     * Sets value based on offset.
     *
     * @param int|null $offset Offset
     * @param mixed    $value  Value to be set
     *
     * @return void
     */
    #[\ReturnTypeWillChange] //Or add return type to the method : void
    public function offsetSet($offset, $value)
    {
        if (is_null($offset)) {
            $this->container[] = $value;
        } else {
            $this->container[$offset] = $value;
        }
    }
So sadly maybe your php configuration is different to not fail on this types of errors. It also clearly says php 7.3 on the top. /** * AcceptOAuth2ConsentRequest * * PHP version 7.3
n
the comment can be ignored, it will simply show the lowest version supported i think (a behavior of openapi-generator)
but it looks like i am using an older version of the sdk, as i don’t have that model (we are not yet upgraded to hydra 2), so maybe the newer openapi spec for hydra 2 causes openapi-generator to create a php-8.1 incompatible class
this would probably be a bug to report to openapi-generator