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

Create breaking API for version 2 #93

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

grantholle
Copy link
Contributor

Here is the beginning of the API change for v2.

I will wait to make any readme/documentation updates until all the details have been worked out. Something that I've added in there that isn't in my package is utilizing Carbon\FactoryImmutable (see references in this section) to generate dates that also includes a locale. I also added a trait that can be included on the user that retrieves its factory,now() and today().

$user->now();
// Same as doing
TImezone::now();
// or
local_now();

Instead of supporting all the different libraries for flashing a message, I just added an event that is dispatched. The dev can just listen for that event and do whatever they want at that time.

The main function names are the same as before. I've ported my own tests and added an action to run tests. I think some more could be cleaned up around code style, but this is a big start.

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.

1 participant