Code Monkey home page Code Monkey logo

Comments (6)

dg avatar dg commented on June 12, 2024

I never understood the point of it. Can you give a specific example of what problem it solves?

from tester.

xificurk avatar xificurk commented on June 12, 2024

Are you asking about tracking the usage of deprecated code? As a user/consumer of the 3rd party package, I would like my CI with Nette Tester to fail, if I use some deprecated API.

from tester.

dg avatar dg commented on June 12, 2024

I am asking about @trigger_error().

from tester.

xificurk avatar xificurk commented on June 12, 2024

The main pro-argument I've seen is what I've mentioned - it's side-effect free by default, i.e. the deprecation tracking is opt-in.

But that's not really a problem I want to discuss here... The bottom line is that this strategy is used by various 3rd party packages and it is quite popular. As a user/consumer of those packages and user of Nette Tester, I would like to have way how to detect those deprecations.

from tester.

dg avatar dg commented on June 12, 2024

And what do you mean by „detect those deprecations“? Something like a $scream from your second pull-request?

from tester.

xificurk avatar xificurk commented on June 12, 2024

Yes, something like that. What exactly "detect" means is one of the things I wanted to discuss.

Catching these deprecation warnings requires a custom error handler, what happens next is an open question. Should the error be simply unmuted and bubble up? Should it be only logged and reported as a soft error at the end of tester run? Should this be configurable? Should there be some kind of support for ignoring specific deprecations? Does it make sense to have various categories for deprecations from direct / indirect calls along the lines of phpunit symfony bridge?

Currently, it's not even very feasible to implement this reliably outside of Nette Tester, because Assert::error() registers own error handler, which does not pass the not handled errors up to the previously registered error handler.

from tester.

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.