Skip to content
Discussion options

You must be logged in to vote

TBH, there are a lot of times where typehinting against a contract gives you an incomplete API because the reality is things in Laravel are designed against the concrete implementations. The one that always irritates me is how the container (and by extension, the application) contract doesn't implement ArrayAccess, yet it is not uncommon to see $this->app['whatever'] or $app['whatever'] in code interacting with the container or application (scan your vendor folder for Laravel service providers and see how often it comes up, both in Laravel itself and any packages you use). These types of hidden dependencies really make working solely with Laravel's interfaces annoying.

Just make the B/C b…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@mbabker
Comment options

Answer selected by albertocactus
@macropay-solutions
Comment options

@mbabker
Comment options

@macropay-solutions
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
3 participants