Giter Club home page Giter Club logo

Comments (13)

matthiasnoback avatar matthiasnoback commented on August 15, 2024 1

@OskarStark Alas, if we require it directly, it will install the library as a project dependency.

from symfonydependencyinjectiontest.

xabbuh avatar xabbuh commented on August 15, 2024

One solution that could work might be to check for a class that was not present before PHPUnit 6 inside the setUp() method of the base test case class and skip the test otherwise.

from symfonydependencyinjectiontest.

OskarStark avatar OskarStark commented on August 15, 2024

@xabbuh that sounds good, but why not require it directly and IF someone like to use a .phar or a global installed version, it should work too, shouldn't it?

from symfonydependencyinjectiontest.

matthiasnoback avatar matthiasnoback commented on August 15, 2024

@xabbuh I'll see if there is something like a Version class, etc.

from symfonydependencyinjectiontest.

lucasvanlierop avatar lucasvanlierop commented on August 15, 2024

I guess this this error has to do with this?

PHPUnit 5.7.12 by Sebastian Bergmann and contributors.

PHP Fatal error:  Class 'PHPUnit\Framework\Constraint\Constraint' not found in /var/www/html/vendor/matthiasnoback/symfony-dependency-injection-test/PhpUnit/ContainerHasParameterConstraint.php on line 9

from symfonydependencyinjectiontest.

matthiasnoback avatar matthiasnoback commented on August 15, 2024

@lucasvanlierop It most likely does ;)

from symfonydependencyinjectiontest.

lucasvanlierop avatar lucasvanlierop commented on August 15, 2024

:-) Which version do you recommend?

from symfonydependencyinjectiontest.

matthiasnoback avatar matthiasnoback commented on August 15, 2024

@lucasvanlierop You could either use PHPUnit ^6.0 or switch to a previous major version of this library, e.g. 1.1.0.

from symfonydependencyinjectiontest.

lucasvanlierop avatar lucasvanlierop commented on August 15, 2024

Just did the latter thanks for confirming! Btw thanks for still maintaining this package! Used it a lot at Ibuildings and now I'm using it again for my new project ;-)

from symfonydependencyinjectiontest.

matthiasnoback avatar matthiasnoback commented on August 15, 2024

Cool, happy to hear that!

from symfonydependencyinjectiontest.

matthiasnoback avatar matthiasnoback commented on August 15, 2024

I've been thinking about this, but I can't come up with a good point to verify that the PHPUnit version used to run tests is the right one. The problem here is: I'd love to add this check to a setUp() method of some sorts, but the test runner crashes before it reaches this method, since it can't find the TestCase and related classes.
Anybody got another suggestion for this?

from symfonydependencyinjectiontest.

lucasvanlierop avatar lucasvanlierop commented on August 15, 2024

It would be nice if composer could check if a class is present (autoloadable) on install the same way it can check the presence of a php extension

from symfonydependencyinjectiontest.

matthiasnoback avatar matthiasnoback commented on August 15, 2024

Closing this as I don't think there will be a solution. I'm sure with this item in the issue archive people will quickly figure out what's wrong when they encounter this situation :)

from symfonydependencyinjectiontest.

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.