Back

Creating package for L5


beaverusiv posted 4 years ago

So afaict Workbench doesn't work with L5 yet. Is there still a way to do package development with L5? Or should I start a barebones package with L4 and then composer require it into L5? Or can I manually go through some steps to get a packagae started?

I really want to start on my project and I believe it best to start with L5 but I need to be able to develop the packages necessary for it.

Garbee replied 4 years ago

Currently there are no plans for a Workbench for L5. It really doesn't need one. Just build a package to do what you need and build what helpers you need for getting it to work in Laravel (like a Facade and Service Provider.) You shouldn't develop laravel-only packages in mind, build things agnostic so you can switch platforms when Taylor messes up. :P

pilot911 replied 4 years ago

terribile news ;(

Garbee replied 4 years ago

It is hardly terrible news. It is making a good opening for someone to build a really good package that can help build packages globally for PHP.

andrewmclagan replied 4 years ago

agreed>Garbee said:

It is hardly terrible news. It is making a good opening for someone to build a really good package that can help build packages globally for PHP.

I agree.

Although with Service Providers, Commands, Migrations and an Active Record ORM its pretty hard to write a framework agnostic package...

beaverusiv replied 4 years ago

I'm with Andrew here, my package makes use of Eloquent, it's not going to be agnostic any time soon.

Garbee replied 4 years ago

Service Providers are hardly a problem. They just setup your packages instance to be put into the IoC container for calling around your application.

Commands... Yea, with L5 this is a problem but it can be mitigated with some decent design.

Migrations, never an issue in the first place. Provide a SQL file with the default table structure and have a place where other frameworks/packages/whatever migration-type stuff can be placed.

Using the ORM, yea this one can bite pretty bad. Since in order to make it agnostic you need to have a native model set that doesn't rely on any active record stuff then build models for each ORM that is supported.

Generally, most packages can be built in an agnostic fashion but the developers just don't think about it (especially when it causes more work to be done.)

illuminate3 replied 4 years ago

Hmmm, I use eloquent pretty much besides a few things.

Would this be where repositories make the most sense? Being able to swap out eloquent for doctrine for example ...

mreschke replied 4 years ago

Looks like someone is already making a really good workbench/module replacement http://codex.caffeinated.ninja/modules/master

stevebauman replied 4 years ago

In my opinion this is terrible news. Laravel 4 has a great workbench system. Why is having dependencies on a specific framework an issue? To be completely agnostic from any framework would take some serious work depending on the package. The point in using a framework is to use it's tools, not re-invent the wheel every time you want to create a new package.

There's a lot of frameworks that have their own bundle/package system, such as symfony and ruby. I really don't see the reasons for a removal of the workbench system. Due to this, I'll be staying on Laravel 4 or migrate to symfony until something gets worked out.

franzliedke replied 4 years ago

@stevebauman: Check out https://github.com/franzliedke/studio. I made this to replace Workbench.


Sign in to participate in this thread!



We'd like to thank these amazing companies for supporting us