Skip to content
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

change: Deprecate Gherkin::VERSION constant and change file cache namespacing #279

Merged
merged 3 commits into from
Dec 24, 2024

Conversation

acoulton
Copy link
Contributor

No description provided.

The test `tearDown` was only attempting to remove `*.feature.cache`
in the configured path, however the FileCache actually writes
files in a directory below that path. Therefore nothing was being
deleted and the files from one test were still present for the
next (and at the end of the run).

Generate a unique directory for every test and use
`symfony/filesystem` to ensure that the entire directory tree is
properly cleaned up.
The previous test required internal knowledge of the directory
and filenaming pattern used by the FileCache. Refactor to
instead identify the file at runtime so that the test is not
coupled to the implementation of the cache.
…amespaced

The `Gherkin::VERSION` constant has not been updated for recent releases,
and will not be part of our release process in the future.

This constant was only being used internally to ensure that any pre-existing
file caches are invalidated when a different version of the parser is
installed. I have switched this to get a version from the composer runtime
API, which should be at least as reliable as the previous hardcoded
constant for this purpose.
Copy link
Contributor

@carlos-granados carlos-granados left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks @acoulton

@carlos-granados carlos-granados merged commit 70cf6bf into Behat:master Dec 24, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants