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

Call to undefined method [package] in L5 #437

Closed
cawa87 opened this issue Jan 3, 2015 · 15 comments
Closed

Call to undefined method [package] in L5 #437

cawa87 opened this issue Jan 3, 2015 · 15 comments

Comments

@cawa87
Copy link

cawa87 commented Jan 3, 2015

I've try to comment $this->package('way/generators') in boot method

     * Booting
     */
    public function boot()
    {
     //   $this->package('way/generators');
    }

But then you have new errors, like:

php artisan generate:controller   TestController
exception 'Way\Generators\Filesystem\FileNotFound' in /home/cawa/www/l5-app/vendor/way/generators/src/Way/Generators/Filesystem/Filesystem.php:45
@avlastenok
Copy link

I am receiving the same error here.
Just now that I cant get it to work I really realize how much I use it.

Same error on all functions

@jonathanpmartins
Copy link

You can see on this commit: laravel/framework@3a0afc2
It is not a plugin problem. The L5 package system is being re-developed.

@avlastenok
Copy link

@jonathanpmartins thank you for pointing it out usefull information must have missed that commit.

@cawa87
Copy link
Author

cawa87 commented Jan 7, 2015

@jonathanpmartins I know that, they are moving workbench in a standalone package.
But now you can use packages too, with some modifications.

@jonathanpmartins
Copy link

Yeah, I like to learn that better!

@RyanThompson
Copy link

Configuration is loaded manually now for packages.

@abishekrsrikaanth
Copy link

Is there a way to fix this? Or should we wait till the framework is fixed?

@cawa87
Copy link
Author

cawa87 commented Jan 14, 2015

@abishekrsrikaanth better wait till release

@jcorry
Copy link

jcorry commented Jan 14, 2015

@RyanThompson how do you 'manually' load configuration for a package then? I'm unclear if there are steps involved for how to use this package (or others) in L5 that I don't know about...or if there are changes coming to L5 that will restore the L4 method (adding the package service provider to app/config/app.php providers array?)
@JeffreyWay can you weigh in on this? I have a L5 project that is SEVERELY crippled by my not knowing how to incorporate all of the packages I am accustomed to. Maybe you've covered it in a Laracast or somewhere else and I haven't seen it, but I need to figure this out ASAP.

@RyanThompson
Copy link

@jcorry Here are a couple examples of how I do it in our software:

https://github.com/anomalylabs/streams-platform/blob/master/src/Addon/AddonConfiguration.php

Could be as easy as this though: https://github.com/anomalylabs/streams-platform/blob/master/src/Addon/AddonConfiguration.php (or use files->getRequire there too)

His response indicated no, it's all on us now. But I've heard him suggest otherwise but only as a "maybe". My guess it 5.1 or something might reintroduce a more convenient method.

@jcorry
Copy link

jcorry commented Jan 15, 2015

Thanks, that helps...but what does the round trip from composer install [package] to calling the package methods through its Facade look like? I'm not 100% clear on this and haven't found any resources that make it clear.

@RyanThompson
Copy link

Not sure what you mean regarding the round trip - but you can register facades in your service provider manually if that's what you are asking: http://laravel.com/docs/4.2/facades#creating-facades

Hope this helps!

@jcorry
Copy link

jcorry commented Jan 15, 2015

Thanks @RyanThompson. I'm not sure where I am falling down, but am unclear how to use a package (like Way Generators) anymore. If I add the package's serviceprovider class to the 'providers' array in my app config, it fails. If I comment out the line calling package() in the package's service provider, it still fails. I'm unclear whether there is a new method for registering/incorporating package service providers in L5. What do you do, after installing a package with composer, to make it available in your L5 app?

@thomasvanlankveld
Copy link

Anyone have a copy-pastable solution for this package yet?

@morrislaptop
Copy link

I've got a package which can fix this - https://github.com/morrislaptop/LaravelFivePackageBridges

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

No branches or pull requests

9 participants