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

Duplicate app creation code #111

Closed
ssnepenthe opened this issue Aug 4, 2019 · 1 comment
Closed

Duplicate app creation code #111

ssnepenthe opened this issue Aug 4, 2019 · 1 comment

Comments

@ssnepenthe
Copy link
Contributor

The code used to create the app instance is duplicated in public/index.php and tests/TestCase.php.

What would you think about moving this logic to a dedicated file (e.g. app/bootstrap.php) which would return the app instance?

Wherever the app is needed you can now just do:

$app = require __DIR__ . '/../app/bootstrap.php';
@l0gicgate
Copy link
Member

That's assuming that the app needs to be instantiated exactly the same as in the bootstrap.php file within the test case over its lifetime. Hence why the code is duplicated.

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

No branches or pull requests

2 participants