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

allow .atoum.yml file to be absent #1

Merged
merged 1 commit into from
Oct 11, 2016

Conversation

agallou
Copy link
Member

@agallou agallou commented Jun 5, 2016

In order to load the extension and still leave the user to choice to load
the .atoum.php or the .atoum.yml file, we need to avoid having an exception
when the file is not present.

So when catch the exception if the file has not been found in the folders.

$loader->load('.atoum.yml');

try {
$loader->load('.atoum.yml');
Copy link
Member

Choose a reason for hiding this comment

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

I'd rather do a file_exists here and use the try...catch to catch Yaml parser errors.

Copy link
Member Author

Choose a reason for hiding this comment

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

ok. I will ll change that.
but I will also try to remove the filelocator for the .atoum.yml, just to be certain that the check and the loaded file are on the same path (for now the .atoum.yml could also be in the resources folder).

In order to load the extension and still leave the user to choice to load
the .atoum.php or the .atoum.yml file, we need to avoid having an exception
when the file is not present.

So when catch the exception if the file has not been found in the folders.
@agallou agallou force-pushed the allow_file_absent branch from f2c9184 to c54e3d4 Compare June 6, 2016 17:31
@agallou
Copy link
Member Author

agallou commented Jun 6, 2016

@jubianchi PR updated to check if the file is present

@agallou agallou mentioned this pull request Oct 8, 2016
22 tasks
@agallou agallou merged commit 5124637 into atoum:master Oct 11, 2016
@agallou agallou deleted the allow_file_absent branch October 11, 2016 18:06
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