GithubHelp home page GithubHelp logo

Comments (13)

ausi avatar ausi commented on May 27, 2024 1

I didn’t notice that adding the return types via PHPDoc (in contrast to real return types) also fixes the issue, so your PR is correct IMO. Thank you!

from imagine.

jokaorgua avatar jokaorgua commented on May 27, 2024 1

@ausi symfony thinks that [#\ReturnTypeWillChange] is not enough and phpdoc must be added

symfony/symfony#44929

from imagine.

mlocati avatar mlocati commented on May 27, 2024 1

We'd first fix these issues: https://github.com/php-imagine/Imagine/milestone/1

from imagine.

mlocati avatar mlocati commented on May 27, 2024 1

Fixed.

from imagine.

ausi avatar ausi commented on May 27, 2024

This problem should already be fixed by #768 because we added #[\ReturnTypeWillChange] attributes there.

@jokaorgua Can you please verify if these deprecation messages are gone in the current dev-develop version?

from imagine.

jokaorgua avatar jokaorgua commented on May 27, 2024

@ausi I've tried dev-develop version and deprecation messages still exist

ReturnTypeWillChange was introduced in 8.1 and I'm using 8.0.13. I think that is the problem.

from imagine.

ausi avatar ausi commented on May 27, 2024

This might be a bug in Symfony 5.4 then I think. The Symfony ErrorHandler Component should not report a deprecation for the return type if the attribute #[\ReturnTypeWillChange] is present (even in PHP 8.0).

from imagine.

jokaorgua avatar jokaorgua commented on May 27, 2024

@ausi I can not find a code in ErrorHandler component which should react to ReturnTypeWillChange

could you provide a link where it is said that Symfony 5.4 on PHP prior to 8.1 must not trigger a deprecation message?

from imagine.

ausi avatar ausi commented on May 27, 2024

could you provide a link where it is said that Symfony 5.4 on PHP prior to 8.1 must not trigger a deprecation message?

This is just my opinion, but I think Symfony might agree that a deprecation does not make sense in this case.

That code where the attributes schould be handled is somewhere aroud here I think: https://github.com/symfony/symfony/blob/dcf09d6c0a194f5f36ec963eb6fef92d573db576/src/Symfony/Component/ErrorHandler/DebugClassLoader.php#L563

from imagine.

ruudk avatar ruudk commented on May 27, 2024

I created a PR to add the missing types.

from imagine.

ausi avatar ausi commented on May 27, 2024

symfony thinks that [#\ReturnTypeWillChange] is not enough and phpdoc must be added

Makes sense! 👍

from imagine.

jokaorgua avatar jokaorgua commented on May 27, 2024

@ausi will this be merged into master and new release created?

from imagine.

ausi avatar ausi commented on May 27, 2024

@jokaorgua I assume so, see #814

Regarding release, see #768 (comment)

from imagine.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.