Git Product home page Git Product logo

Comments (7)

designermonkey avatar designermonkey commented on July 22, 2024 1

I know it's been quite a while, sorry I didn't get to this earlier.

I've just done an overhaul of our tests:

  • Run on a system using the polyfill: Everything is ok.
  • Run on a system using the extension: Same result as above.

To save on work, I've changed the code to not use references as described above. I thought you would want to know that there is still a references issue lurking in there somewhere.

from polyfill.

rtheunissen avatar rtheunissen commented on July 22, 2024

So strange. 🤔

I'll take a look asap. Thanks for the report. :)

from polyfill.

rtheunissen avatar rtheunissen commented on July 22, 2024

I have a feeling it's because we're not dereferencing consistently. I don't think it's add vs constructor, but the fact that you're using references in the first case.

What's your code for hash and equals?

from polyfill.

 avatar commented on July 22, 2024

It will definitely be because of the references.

    public function equals($obj): bool
    {
        return get_class($this) === get_class($obj)
            && $this->hash() === $obj->hash();
    }

    public function hash()
    {
        return (string) $this;
    }

    public function __toString(): string
    {
        return (string) $this->identity;
    }

Just a simple set of functions as it's a uuid.

from polyfill.

rtheunissen avatar rtheunissen commented on July 22, 2024

I think this has now been fixed in the extension?

from polyfill.

 avatar commented on July 22, 2024

Great if it has! I will try to reproduce this (the code has moved on since I logged it).

from polyfill.

rtheunissen avatar rtheunissen commented on July 22, 2024

Thanks @designermonkey, I'll try to add a failing test for this.

from polyfill.

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.