Skip to content
This repository was archived by the owner on Apr 19, 2025. It is now read-only.

Flexibility changes #3

Merged
merged 16 commits into from
Apr 19, 2019
Merged

Flexibility changes #3

merged 16 commits into from
Apr 19, 2019

Conversation

kim-dongit
Copy link
Contributor

Some changes to improve on flexibility. The documentation will need updating because of this, especially because the migrations are now copied by the publish command. This is a breaking change. On the other hand, it grants users the control they need to adjust to their application.

@kim-dongit
Copy link
Contributor Author

You are right. Made the necessary changes. Also added timestamps to the migration files that get published.

@michaeldzjap
Copy link
Owner

There's a couple of other things I'd like to see differently. Mostly style related, nothing major. Will comment on those now. But thanks for the PR. Useful additions.

@michaeldzjap
Copy link
Owner

Also, it would be good if you could add appropriate tests. There is a separate test project for this package.

With regards to the breaking changes due to the publishing of the migrations files; this needs to be documented in the README. One problem I foresee is when you already have ran migrations for this package for the main database (and hence, don't want to run them again), but want to run them every time for your test database. I guess wrapping the Schema::create() calls inside an if (environment('test')) {} check would mitigate this problem.

@michaeldzjap michaeldzjap merged commit 1288bb7 into michaeldzjap:master Apr 19, 2019
@michaeldzjap
Copy link
Owner

Just published v2.4.0 which includes your additions. Thanks again.

@kim-dongit
Copy link
Contributor Author

Thank you too. I am not able to look at tests now, but maybe later. What tests do you envision?

@michaeldzjap
Copy link
Owner

Some unit tests can be added that test the extended "enabled" options. At the moment only the "user" case is tested.

And similarly, some browser (Dusk) tests should really be added that check the extended "enabled" logic works as expected for the "always" and "never" cases.

I don't mind doing this myself, but I don't have much time either at the moment.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
2 participants