-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unify cache configuration #4599
Labels
feature/test-runner
CLI test runner
type/backward-compatibility
Something will be/is intentionally broken
Milestone
Comments
sebastianbergmann
added
type/backward-compatibility
Something will be/is intentionally broken
feature/test-runner
CLI test runner
labels
Feb 8, 2021
sebastianbergmann
added a commit
to sebastianbergmann/phpunit-documentation-english
that referenced
this issue
Nov 29, 2021
stronk7
added a commit
to stronk7/moodle
that referenced
this issue
Feb 15, 2024
This comes with a good number of changes: 1. The convertXXXXToExceptions are gone, with notices, warnings and others not being shown by default. To mimic the previous behaviour we are enabling all these: - failOnNotice - failOnWarning - displayDetailsOnTestsThatTriggerDeprecations - displayDetailsOnTestsThatTriggerErrors - displayDetailsOnTestsThatTriggerNotices - displayDetailsOnTestsThatTriggerWarnings With them the behaviour is 99% the same than the previous one. Still there are some defaults that should be considered, like failing on Incomplete, Risky, Deprecation... but they were not enabled previously, so I've left them apart (not failing and not showing details). They can be enabled with a simple -v. 2. backupStaticAttributes renamed to backupStaticProperties. 3. stopOnXXX removed, because all them default to false, so no needed. 4. Added cacheDirectory (.phpunit.cache) for anybody wanting to use it via command line --cache-result option (also @ .gitignore). Also ensure that the distributed phpunit.xml files are generated pointing to it. We remove the previous .phpunit.result.cache file, because it's deprecated by sebastianbergmann/phpunit#4599 5. Enabled beStrictAboutChangesToGlobalState , not sure about it but can help to detect cases where something is changed without noticing. 6. The <coverage> section is now only to configure how coverage should be generated and evaluated. The lists of directories and files have been moved to the new <source> section.
stronk7
added a commit
to stronk7/moodle
that referenced
this issue
May 3, 2024
This comes with a good number of changes: 1. The convertXXXXToExceptions are gone, with notices, warnings and others not being shown by default. To mimic the previous behaviour we are enabling all these: - failOnNotice - failOnWarning - displayDetailsOnTestsThatTriggerDeprecations - displayDetailsOnTestsThatTriggerErrors - displayDetailsOnTestsThatTriggerNotices - displayDetailsOnTestsThatTriggerWarnings With them the behaviour is 99% the same than the previous one. Still there are some defaults that should be considered, like failing on Incomplete, Risky, Deprecation... but they were not enabled previously, so I've left them apart (not failing and not showing details). They can be enabled with a simple -v. 2. backupStaticAttributes renamed to backupStaticProperties. 3. stopOnXXX removed, because all them default to false, so no needed. 4. Added cacheDirectory (.phpunit.cache) for anybody wanting to use it via command line --cache-result option (also @ .gitignore). Also ensure that the distributed phpunit.xml files are generated pointing to it. We remove the previous .phpunit.result.cache file, because it's deprecated by sebastianbergmann/phpunit#4599 5. Enabled beStrictAboutChangesToGlobalState , not sure about it but can help to detect cases where something is changed without noticing. 6. The <coverage> section is now only to configure how coverage should be generated and evaluated. The lists of directories and files have been moved to the new <source> section.
stronk7
added a commit
to stronk7/moodle
that referenced
this issue
May 10, 2024
This comes with a good number of changes: 1. The convertXXXXToExceptions are gone, with notices, warnings and others not being shown by default. To mimic the previous behaviour we are enabling all these: - failOnNotice - failOnWarning - displayDetailsOnTestsThatTriggerDeprecations - displayDetailsOnTestsThatTriggerErrors - displayDetailsOnTestsThatTriggerNotices - displayDetailsOnTestsThatTriggerWarnings With them the behaviour is 99% the same than the previous one. Still there are some defaults that should be considered, like failing on Incomplete, Risky, Deprecation... but they were not enabled previously, so I've left them apart (not failing and not showing details). They can be enabled with a simple -v. 2. backupStaticAttributes renamed to backupStaticProperties. 3. stopOnXXX removed, because all them default to false, so no needed. 4. Added cacheDirectory (.phpunit.cache) for anybody wanting to use it via command line --cache-result option (also @ .gitignore). Also ensure that the distributed phpunit.xml files are generated pointing to it. We remove the previous .phpunit.result.cache file, because it's deprecated by sebastianbergmann/phpunit#4599 5. Enabled beStrictAboutChangesToGlobalState , not sure about it but can help to detect cases where something is changed without noticing. 6. The <coverage> section is now only to configure how coverage should be generated and evaluated. The lists of directories and files have been moved to the new <source> section.
stronk7
added a commit
to stronk7/moodle
that referenced
this issue
May 17, 2024
This comes with a good number of changes: 1. The convertXXXXToExceptions are gone, with notices, warnings and others not being shown by default. To mimic the previous behaviour we are enabling all these: - failOnNotice - failOnWarning - displayDetailsOnTestsThatTriggerDeprecations - displayDetailsOnTestsThatTriggerErrors - displayDetailsOnTestsThatTriggerNotices - displayDetailsOnTestsThatTriggerWarnings With them the behaviour is 99% the same than the previous one. Still there are some defaults that should be considered, like failing on Incomplete, Risky, Deprecation... but they were not enabled previously, so I've left them apart (not failing and not showing details). They can be enabled with a simple -v. 2. backupStaticAttributes renamed to backupStaticProperties. 3. stopOnXXX removed, because all them default to false, so no needed. 4. Added cacheDirectory (.phpunit.cache) for anybody wanting to use it via command line --cache-result option (also @ .gitignore). Also ensure that the distributed phpunit.xml files are generated pointing to it. We remove the previous .phpunit.result.cache file, because it's deprecated by sebastianbergmann/phpunit#4599 5. Enabled beStrictAboutChangesToGlobalState , not sure about it but can help to detect cases where something is changed without noticing. 6. The <coverage> section is now only to configure how coverage should be generated and evaluated. The lists of directories and files have been moved to the new <source> section.
stronk7
added a commit
to stronk7/moodle
that referenced
this issue
May 25, 2024
This comes with a good number of changes: 1. The convertXXXXToExceptions are gone, with notices, warnings and others not being shown by default. To mimic the previous behaviour we are enabling all these: - failOnNotice - failOnWarning - displayDetailsOnTestsThatTriggerDeprecations - displayDetailsOnTestsThatTriggerErrors - displayDetailsOnTestsThatTriggerNotices - displayDetailsOnTestsThatTriggerWarnings With them the behaviour is 99% the same than the previous one. Still there are some defaults that should be considered, like failing on Incomplete, Risky, Deprecation... but they were not enabled previously, so I've left them apart (not failing and not showing details). They can be enabled with a simple -v. 2. backupStaticAttributes renamed to backupStaticProperties. 3. stopOnXXX removed, because all them default to false, so no needed. 4. Added cacheDirectory (.phpunit.cache) for anybody wanting to use it via command line --cache-result option (also @ .gitignore). Also ensure that the distributed phpunit.xml files are generated pointing to it. We remove the previous .phpunit.result.cache file, because it's deprecated by sebastianbergmann/phpunit#4599 5. Enabled beStrictAboutChangesToGlobalState , not sure about it but can help to detect cases where something is changed without noticing. 6. The <coverage> section is now only to configure how coverage should be generated and evaluated. The lists of directories and files have been moved to the new <source> section.
stronk7
added a commit
to stronk7/moodle
that referenced
this issue
May 31, 2024
This comes with a good number of changes: 1. The convertXXXXToExceptions are gone, with notices, warnings and others not being shown by default. To mimic the previous behaviour we are enabling all these: - failOnNotice - failOnWarning - displayDetailsOnTestsThatTriggerDeprecations - displayDetailsOnTestsThatTriggerErrors - displayDetailsOnTestsThatTriggerNotices - displayDetailsOnTestsThatTriggerWarnings With them the behaviour is 99% the same than the previous one. Still there are some defaults that should be considered, like failing on Incomplete, Risky, Deprecation... but they were not enabled previously, so I've left them apart (not failing and not showing details). They can be enabled with a simple -v. 2. backupStaticAttributes renamed to backupStaticProperties. 3. stopOnXXX removed, because all them default to false, so no needed. 4. Added cacheDirectory (.phpunit.cache) for anybody wanting to use it via command line --cache-result option (also @ .gitignore). Also ensure that the distributed phpunit.xml files are generated pointing to it. We remove the previous .phpunit.result.cache file, because it's deprecated by sebastianbergmann/phpunit#4599 5. Enabled beStrictAboutChangesToGlobalState , not sure about it but can help to detect cases where something is changed without noticing. 6. The <coverage> section is now only to configure how coverage should be generated and evaluated. The lists of directories and files have been moved to the new <source> section.
stronk7
added a commit
to stronk7/moodle
that referenced
this issue
Jun 8, 2024
This comes with a good number of changes: 1. The convertXXXXToExceptions are gone, with notices, warnings and others not being shown by default. To mimic the previous behaviour we are enabling all these: - failOnNotice - failOnWarning - displayDetailsOnTestsThatTriggerDeprecations - displayDetailsOnTestsThatTriggerErrors - displayDetailsOnTestsThatTriggerNotices - displayDetailsOnTestsThatTriggerWarnings With them the behaviour is 99% the same than the previous one. Still there are some defaults that should be considered, like failing on Incomplete, Risky, Deprecation... but they were not enabled previously, so I've left them apart (not failing and not showing details). They can be enabled with a simple -v. 2. backupStaticAttributes renamed to backupStaticProperties. 3. stopOnXXX removed, because all them default to false, so no needed. 4. Added cacheDirectory (.phpunit.cache) for anybody wanting to use it via command line --cache-result option (also @ .gitignore). Also ensure that the distributed phpunit.xml files are generated pointing to it. We remove the previous .phpunit.result.cache file, because it's deprecated by sebastianbergmann/phpunit#4599 5. Enabled beStrictAboutChangesToGlobalState , not sure about it but can help to detect cases where something is changed without noticing. 6. The <coverage> section is now only to configure how coverage should be generated and evaluated. The lists of directories and files have been moved to the new <source> section.
stronk7
added a commit
to stronk7/moodle
that referenced
this issue
Jun 14, 2024
This comes with a good number of changes: 1. The convertXXXXToExceptions are gone, with notices, warnings and others not being shown by default. To mimic the previous behaviour we are enabling all these: - failOnNotice - failOnWarning - displayDetailsOnTestsThatTriggerDeprecations - displayDetailsOnTestsThatTriggerErrors - displayDetailsOnTestsThatTriggerNotices - displayDetailsOnTestsThatTriggerWarnings With them the behaviour is 99% the same than the previous one. Still there are some defaults that should be considered, like failing on Incomplete, Risky, Deprecation... but they were not enabled previously, so I've left them apart (not failing and not showing details). They can be enabled with a simple -v. 2. backupStaticAttributes renamed to backupStaticProperties. 3. stopOnXXX removed, because all them default to false, so no needed. 4. Added cacheDirectory (.phpunit.cache) for anybody wanting to use it via command line --cache-result option (also @ .gitignore). Also ensure that the distributed phpunit.xml files are generated pointing to it. We remove the previous .phpunit.result.cache file, because it's deprecated by sebastianbergmann/phpunit#4599 5. Enabled beStrictAboutChangesToGlobalState , not sure about it but can help to detect cases where something is changed without noticing. 6. The <coverage> section is now only to configure how coverage should be generated and evaluated. The lists of directories and files have been moved to the new <source> section.
stronk7
added a commit
to stronk7/moodle
that referenced
this issue
Jun 24, 2024
This comes with a good number of changes: 1. The convertXXXXToExceptions are gone, with notices, warnings and others not being shown by default. To mimic the previous behaviour we are enabling all these: - failOnNotice - failOnWarning - displayDetailsOnTestsThatTriggerDeprecations - displayDetailsOnTestsThatTriggerErrors - displayDetailsOnTestsThatTriggerNotices - displayDetailsOnTestsThatTriggerWarnings With them the behaviour is 99% the same than the previous one. Still there are some defaults that should be considered, like failing on Incomplete, Risky, Deprecation... but they were not enabled previously, so I've left them apart (not failing and not showing details). They can be enabled with a simple -v. 2. backupStaticAttributes renamed to backupStaticProperties. 3. stopOnXXX removed, because all them default to false, so no needed. 4. Added cacheDirectory (.phpunit.cache) for anybody wanting to use it via command line --cache-result option (also @ .gitignore). Also ensure that the distributed phpunit.xml files are generated pointing to it. We remove the previous .phpunit.result.cache file, because it's deprecated by sebastianbergmann/phpunit#4599 5. Enabled beStrictAboutChangesToGlobalState , not sure about it but can help to detect cases where something is changed without noticing. 6. The <coverage> section is now only to configure how coverage should be generated and evaluated. The lists of directories and files have been moved to the new <source> section.
stronk7
added a commit
to stronk7/moodle
that referenced
this issue
Jun 27, 2024
This comes with a good number of changes: 1. The convertXXXXToExceptions are gone, with notices, warnings and others not being shown by default. To mimic the previous behaviour we are enabling all these: - failOnNotice - failOnWarning - displayDetailsOnTestsThatTriggerDeprecations - displayDetailsOnTestsThatTriggerErrors - displayDetailsOnTestsThatTriggerNotices - displayDetailsOnTestsThatTriggerWarnings With them the behaviour is 99% the same than the previous one. Still there are some defaults that should be considered, like failing on Incomplete, Risky, Deprecation... but they were not enabled previously, so I've left them apart (not failing and not showing details). They can be enabled with a simple -v. 2. backupStaticAttributes renamed to backupStaticProperties. 3. stopOnXXX removed, because all them default to false, so no needed. 4. Added cacheDirectory (.phpunit.cache) for anybody wanting to use it via command line --cache-result option (also @ .gitignore). Also ensure that the distributed phpunit.xml files are generated pointing to it. We remove the previous .phpunit.result.cache file, because it's deprecated by sebastianbergmann/phpunit#4599 5. Enabled beStrictAboutChangesToGlobalState , not sure about it but can help to detect cases where something is changed without noticing. 6. The <coverage> section is now only to configure how coverage should be generated and evaluated. The lists of directories and files have been moved to the new <source> section.
stronk7
added a commit
to stronk7/moodle
that referenced
this issue
Jul 5, 2024
This comes with a good number of changes: 1. The convertXXXXToExceptions are gone, with notices, warnings and others not being shown by default. To mimic the previous behaviour we are enabling all these: - failOnNotice - failOnWarning - displayDetailsOnTestsThatTriggerDeprecations - displayDetailsOnTestsThatTriggerErrors - displayDetailsOnTestsThatTriggerNotices - displayDetailsOnTestsThatTriggerWarnings With them the behaviour is 99% the same than the previous one. Still there are some defaults that should be considered, like failing on Incomplete, Risky, Deprecation... but they were not enabled previously, so I've left them apart (not failing and not showing details). They can be enabled with a simple -v. 2. backupStaticAttributes renamed to backupStaticProperties. 3. stopOnXXX removed, because all them default to false, so no needed. 4. Added cacheDirectory (.phpunit.cache) for anybody wanting to use it via command line --cache-result option (also @ .gitignore). Also ensure that the distributed phpunit.xml files are generated pointing to it. We remove the previous .phpunit.result.cache file, because it's deprecated by sebastianbergmann/phpunit#4599 5. Enabled beStrictAboutChangesToGlobalState , not sure about it but can help to detect cases where something is changed without noticing. 6. The <coverage> section is now only to configure how coverage should be generated and evaluated. The lists of directories and files have been moved to the new <source> section.
stronk7
added a commit
to stronk7/moodle
that referenced
this issue
Jul 22, 2024
This comes with a good number of changes: 1. The convertXXXXToExceptions are gone, with notices, warnings and others not being shown by default. To mimic the previous behaviour we are enabling all these: - failOnNotice - failOnWarning - displayDetailsOnTestsThatTriggerDeprecations - displayDetailsOnTestsThatTriggerErrors - displayDetailsOnTestsThatTriggerNotices - displayDetailsOnTestsThatTriggerWarnings With them the behaviour is 99% the same than the previous one. Still there are some defaults that should be considered, like failing on Incomplete, Risky, Deprecation... but they were not enabled previously, so I've left them apart (not failing and not showing details). They can be enabled with a simple -v. 2. backupStaticAttributes renamed to backupStaticProperties. 3. stopOnXXX removed, because all them default to false, so no needed. 4. Added cacheDirectory (.phpunit.cache) for anybody wanting to use it via command line --cache-result option (also @ .gitignore). Also ensure that the distributed phpunit.xml files are generated pointing to it. We remove the previous .phpunit.result.cache file, because it's deprecated by sebastianbergmann/phpunit#4599 5. Enabled beStrictAboutChangesToGlobalState , not sure about it but can help to detect cases where something is changed without noticing. 6. The <coverage> section is now only to configure how coverage should be generated and evaluated. The lists of directories and files have been moved to the new <source> section.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
feature/test-runner
CLI test runner
type/backward-compatibility
Something will be/is intentionally broken
A
phpunit.xml
configuration file that uses best practice defaults (as generated using--generate-configuration
) for PHPUnit 9.5 looks like this:The
cacheResultFile
attribute of the<phpunit>
root element (as well as the--cache-result-file <file>
CLI option) is used to configure the file where the PHPUnit test runner stores its test result cache.The
cacheDirectory
attribute of the<coverage>
element (as well as the--coverage-cache <dir>
CLI option) is used to configure the directory where static analysis results for code coverage are cached.In the future, there will be more "things" we would like to cache. I therefore propose the following:
cacheResultFile
attribute of the<phpunit>
root element (as well as the--cache-result-file <file>
CLI option) in PHPUnit 10 (and remove support for it in PHPUnit 11)cacheDirectory
attribute of the<coverage>
element (as well as the--coverage-cache <dir>
CLI option) in PHPUnit 10 (and remove support for it in PHPUnit 11)cacheDirectory
attribute on the<phpunit>
root element (as well as the--cache-directory <dir>
CLI option) for configuring a single root directory for cache directories and cache files used by the PHPUnit test runner in PHPUnit 10--generate-configuration
to generate the followingThe text was updated successfully, but these errors were encountered: