-
Notifications
You must be signed in to change notification settings - Fork 89
Dependency issue with test requirement #182
Comments
This is causing problems with Zend Validator too: https://travis-ci.org/zendframework/zend-validator |
i also start working to update all modules, which i found, to work with the latest phpunit version. |
Honestly, I think the approach by @kokspflanze is the best one for us to take. PHPUnit 5.7 is considered "legacy" currently (technically "old stable"), with version 6.0 the current stable release; the PHPUnit 4 series is no longer supported. As such, we need to start updating all components to pin them to newer versions. PHPUnit 5 is needed when testing against PHP 5.6, and PHPUnit 6 for versions 7 and up. We've done this across a number of components recently, most notably the Expressive components, and have approaches that work across each in terms of testing on Travis. The main "gotchas" we've observed when updating are:
I've found that most adaptations to components take less than an hour, and I see that @kokspflanze has already started submitting a number of these in the past week; if we can get these merged soon, and get others to help in the effort, we can get these cases sorted fairly quickly. While we could certainly split the test trait(s) into their own package, I hate to do this, as it adds yet another dependency during normal development, particularly when this is a transient problem. |
@weierophinney from my site i see the biggest problem to support PHPUnit 4, 5 and 6, some modules like zend-validator start with min php 5.5 so they want PHPUnit 4 but there is no maybe someone have a good solution for that. from my site i try 1 or 2 modules each week, some modules take bit longer some are less than 1hour done. |
Why? PHP 5.5 and PHPUnit 4.8 are no longer supported! |
can i realy remove php 5.5 in modules like zend-validator? |
@kokspflanze — We can issue new minor releases that bump the PHP requirement to |
okay thats cool=) didnt know it that we can easy set it to the latest version=) that save many time |
This repository has been closed and moved to laminas/laminas-servicemanager; a new issue has been opened at laminas/laminas-servicemanager#19. |
This component ships a trait used by other components in tests.
Now with 07d53d3 the tests have been upgraded to PHPUnit5 and tests of other components fails because they still using PHPUnit4.
E.g.: https://travis-ci.org/marc-mabe/zend-cache/jobs/203261654
The main problem is not to have a reusable trait for tests or the upgraded PHPUnit dependency but:
require-dev
- so only valid runningzend-servicemanager
in development environment but not verified by other componentsrequire
as then every production environment would load PHPUnit and it's dependenciesZend\ServiceManager\Test
but it should be inZendTest\*
To solve this I would do the following (like what I started to do with splitting
zend-cache
):zend-servicemanager-test
)autoload
(notautoload-dev
) to load the common test classes in namespaceZendTest\*
require
(notrequire-dev
) to depend onzend-servicemanager
and everything else required to use these test classesrequire-dev: zend-servicemanager-test
in this component and all components using this class-> Now the dependencies of such test classes are defined by composer and they are not part of any production environment
How this would look like as I started to do that with
zend-cache
:Ping @weierophinney @Ocramius
The text was updated successfully, but these errors were encountered: