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

Backward compatibility with Laravel 5.2 and Laravel 5.3 #32

Merged
merged 2 commits into from
Jun 2, 2020

Conversation

bogdanghervan
Copy link
Contributor

@bogdanghervan bogdanghervan commented May 17, 2020

  • Prefer make() to makeWith() for backward compatibility with Laravel 5.3 (makeWith() is an alias for make() anyway)
  • Implement abstract register() method in base service provider

@bogdanghervan
Copy link
Contributor Author

bogdanghervan commented May 17, 2020

I didn't break the tests, they were broken before.

*/
public function boot()
public function register()
Copy link
Contributor Author

@bogdanghervan bogdanghervan May 26, 2020

Choose a reason for hiding this comment

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

I'm declaring register() which is an abstract method in the base service provider in Laravel 5.2. Also, I deemed it safe to move the methods that bind stuff to the service container here.

publishConfig and registerCommands are still better located inside the boot() method according to the Laravel docs on packages.

@bogdanghervan bogdanghervan changed the title Prefer make() to makeWith() for backward compatibility. Backward compatibility with Laravel 5.2 and Laravel 5.3 May 26, 2020
@adrian-tilita adrian-tilita merged commit 84bb9a2 into needle-project:master Jun 2, 2020
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.

None yet

2 participants