Skip to content
This repository has been archived by the owner on Apr 12, 2018. It is now read-only.

Note that strict is deprecated in 4.5 #282

Closed
danez opened this issue Feb 7, 2015 · 8 comments
Closed

Note that strict is deprecated in 4.5 #282

danez opened this issue Feb 7, 2015 · 8 comments

Comments

@danez
Copy link

danez commented Feb 7, 2015

Please add a note for that.

@evert
Copy link

evert commented Feb 9, 2015

Is there a replacement for the strict setting?

@whatthejeff
Copy link
Collaborator

@evert It was replaced by more granular options:

--report-useless-tests    Be strict about tests that do not test anything.
--strict-coverage         Be strict about unintentionally covered code.
--disallow-test-output    Be strict about output during tests.
--enforce-time-limit      Enforce time limit based on test size.

See: sebastianbergmann/phpunit#914.

@sebastianbergmann
Copy link
Owner

I hope to get to this and other things missing from the ChangeLog today.

@GrahamCampbell
Copy link

It was replaced by more granular options:

We should document the keys to go into phpunit.xml files too.

@qrazi
Copy link

qrazi commented Feb 13, 2015

Not sure if this is the right issue to report, and not sure if some cluster/caching issue, but searching through Google pointed me to: [https://phpunit.de/manual/current/en/strict-mode.html], which still mentions possibility of strict="true".

And going through the source I found an undocumented setting (as far as I could find, for current version 4.5): beStrictAboutTodoAnnotatedTests. Using that gave me my risky test back in the result... :)

@Potherca
Copy link

@hashar
Copy link

hashar commented May 31, 2017

In PHPUnit 4.8 setting struct=true internally does:

        $result['reportUselessTests']          = $flag;
        $result['strictCoverage']              = $flag;
        $result['disallowTestOutput']          = $flag;
        $result['enforceTimeLimit']            = $flag;
        $result['disallowTodoAnnotatedTests']  = $flag;
        $result['deprecatedStrictModeSetting'] = true;

Which correspond in phpunit.xml to:

<phpunit
    beStrictAboutOutputDuringTests="true"
    beStrictAboutTestSize="true"
    beStrictAboutTestsThatDoNotTestAnything="true"
    checkForUnintentionallyCoveredCode="true"
    disallowTodoAnnotatedTests="true"
/>

@sebastianbergmann
Copy link
Owner

Dear contributor,

thanks to the hard work by @belanur, @starikovm, @trueromio, and others, the changes outlined in #471 (comment) have been implemented.

This repository, https://github.com/sebastianbergmann/phpunit-documentation, is now archived and read-only. The documentation for PHPUnit version prior to PHPUnit 7.0 will no longer be changed or updated. It is still hosted at

  • Multiple HTML files: https://phpunit.de/manual/6.5/en/index.html
  • Multiple HTML files (in a .tar.bz2 archive): https://phpunit.de/manual/current/en/download.tar.bz2
  • Single HTML file: https://phpunit.de/manual/current/en/phpunit-book.html
  • PDF: https://phpunit.de/manual/current/en/phpunit-book.pdf
  • ePub: https://phpunit.de/manual/current/en/phpunit-book.epub

Simply replace 6.5 with the version number you are looking for. Simply replace en with fr, pt_br, ja, or zh_cn to access the French, Brazilian Portuguese, Japanese, or Simplified Chinese translation, respectively.

Starting with the documentation for PHPUnit 7.0, the PHPUnit documentation is hosted at https://phpunit.readthedocs.io/.

I am sorry that I have to close this issue here as GitHub does not support moving issues from one project to another. Please open a new ticket for this issue in one of the new issue trackers (see above).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants