Comments (13)
@OskarStark Alas, if we require it directly, it will install the library as a project dependency.
from symfonydependencyinjectiontest.
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.
@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.
@xabbuh I'll see if there is something like a Version
class, etc.
from symfonydependencyinjectiontest.
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.
@lucasvanlierop It most likely does ;)
from symfonydependencyinjectiontest.
:-) Which version do you recommend?
from symfonydependencyinjectiontest.
@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.
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.
Cool, happy to hear that!
from symfonydependencyinjectiontest.
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.
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.
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)
- failed to load vendor/autoload.php HOT 1
- LoaderFactory supporting .yaml extension
- Incompatibility with phpunit 8 HOT 2
- $container->getExtensionConfig() does not return minimal configuration
- Support for Symfony 5 HOT 3
- Assert container does not have a method call
- Lots of composer deprecation warnings about PSR-4 compliance HOT 2
- PHP8 Support HOT 1
- New release HOT 1
- False positive with assertContainerBuilderHasServiceDefinitionWithArgument
- Remove supported for Symfony 2.3 HOT 5
- Allow test DI-extenions that depends on another extensions and config
- it_lower_cases_aliased_service_ids fails HOT 2
- Next release HOT 1
- Add support for Symfony 4
- Investigate in build failure HOT 2
- Support tests for "Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface" HOT 1
- Add phpunit as a non-dev depedency. HOT 2
- 1.2.0 is not BC with 1.1.* HOT 3
- Declaration of Matthias\SymfonyDependencyInjectionTest\PhpUnit\DefinitionHasMethodCallConstraint::toString() must be compatible with PHPUnit\Framework\SelfDescribing::toString(): string
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from symfonydependencyinjectiontest.