i'have a project on hold only because the package module is not working yet ,we just need to keep on waiting a little bit longer ,
No, it's changed. You have to literally (manually) copy the configuration over. Write your own command.
/**
* Register the service provider.
*
* @return void
*/
public function register()
{
$this->registerResources();
}
/**
* Register the package resources.
*
* @return void
*/
protected function registerResources()
{
$userConfigFile = app()->configPath().'/caffeinated/modules.php';
$packageConfigFile = __DIR__.'/../../config/config.php';
$config = $this->app['files']->getRequire($packageConfigFile);
if (file_exists($userConfigFile)) {
$userConfig = $this->app['files']->getRequire($userConfigFile);
$config = array_replace_recursive($config, $userConfig);
}
$this->app['config']->set('caffeinated::modules', $config);
}
Is what I use in my modules package for Laravel 5; works beautifully.
But as kirkbushell said, this is how packages will be handled in Laravel 5 - it'll be up to you, the developer, to handle and manage your package's resources as you see fit.
There are also a couple packages popping up that re-add the $this->package()
functionality, like this one that may be of interest.
I guess I have to wait on sentry to support laravel 5. from what I read, it isn't in their plans yet.
This is really disappointing. In my opinion, Laravel 4's package/workbench system was absolutely fantastic. Now, it's removing that simplicity and making it more complicated for the developer to get it working correctly.
I understand the benefits of registering configuration yourself, but now since there's no concrete way of registering and publishing config files, there's going to be spaghetti configuration everywhere since developers will find their own 'best way' of handling it.
Just look at the difference of documentation for package development:
Laravel 4's package system gets my vote. It has a defined structure to guide the developer into good practices. Isn't that the point in laravel?
I definitely agree with you @stevebauman. The loss of the workbench functionality in laravel 5 is a big disappointment. (Well, not totally gone because you could still implement it..... on your own) With that, this is what keeps me hindered from upgrading 4.2 to 5. I really hope they would bring back the workbench functionality as having it removed and re-writing it on your own in version 5 will make the development process longer.
Also, I agree on what you said: "It has a defined structure to guide the developer into good practices"
Since a lot of developers are using the workbench functionality, they will now find ways or create their own way of making the workbench functionality work resulting to different kinds implementation that now makes laravel coding out of standards.
I love how Laravel structure works compared to other frameworks such as Zend and Codeigniter. But with Laravel making things more complicated now, I might switch back to the good-old Codeigniter as they will be releasing the version 3 of it anytime soon.
I miss the simple workbench creation too.
In L5 I'm currently using, https://github.com/caffeinated/modules for one of my projects and for some something more toward creating separate composer libraries, https://github.com/franzliedke/studio
@terrePorter I've stumbled upon caffeinated too! I think it is more on the modular setup? Haven't tried it yet though but it looks promising. I'm currently using the workbench functionality (package as what it is called in L5) for my libraries such as ReST. If I were to create my own MVC structure in L5 (without using caffeinated), i'll just simply create folders to separate my controllers under app/http/controllers like:
app/http/controllers/admin
app/http/controllers/core
app/http/controllers/guest
Then for models:
app/http/models/admin
app/http/models/core
app/http/models/guest
It may not be the best structure out there but at least it works for me. But going back to the topic about packages, hope they bring it back :(
Solution:
Copy vendor/cartalyst/sentry/src/config/config.php to config/cartalyst/sentry.php
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community