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

Feature/laravel five #40

Merged
merged 3 commits into from
Feb 20, 2015
Merged

Conversation

jamisonvalenta
Copy link
Contributor

This PR addresses the changes needed to get this package to load happily in Laravel 5.0. I'm not making any claim that this work should be 'good enough' for a new stable rev, but as a stop-gap solution until a rewrite/re-integration of this package can be managed.

Notable changes include composer dependencies and how package service providers are loaded.

I've also done a very basic update to the broken aspects of way/generators to get it to function in 5.0. My work is based off of the 3.3 tagged commit, which was as far as Jeffrey Way pushed until he dropped L5 support. To the best of my testing this is sufficient for the needs of migrations-generator. I've updated the composer.json to point to my fork of way/generators. The only changes necessary for generators to work were config registration and dropping the $this->package() call in the Service Provider.

No changes to the readme.md are necessary. There may well be conflicts/bugs with anyone who needs to use way/generators for work outside of this package.

@jamisonvalenta jamisonvalenta mentioned this pull request Feb 17, 2015
@MurphysHub
Copy link

@jamisonvalenta
Hey, i tried your solution to get the generator up and running with Laravel 5, but i still get the following errors :

exception 'BadMethodCallException' with message 'Call to undefined method [package]' in /var/customers/webs/VServer/storage/framework/compiled.php:4351
Stack trace:
#0 //vendor/way/generators/src/Way/Generators/GeneratorsServiceProvider.php(28): Illuminate\Support\ServiceProvider->__call('package', Array)
#1 /**
**/vendor/way/generators/src/Way/Generators/GeneratorsServiceProvider.php(28): Way\Generators\GeneratorsServiceProvider->package('way/generators')
#2 [internal function]: Way\Generators\GeneratorsServiceProvider->boot()
#3 /
/storage/framework/compiled.php(922): call_user_func_array(Array, Array)
#4 /**
/storage/framework/compiled.php(1501): Illuminate\Container\Container->call(Array)
#5 /****_/storage/framework/compiled.php(1493): Illuminate\Foundation\Application->bootProvider(Object(Way\Generators\GeneratorsServiceProvider))
#6 [internal function]: Illuminate\Foundation\Application->Illuminate\Foundation{closure}(Object(Way\Generators\GeneratorsServiceProvider), 19)
#7 /
**/storage/framework/compiled.php(1494): array_walk(Array, Object(Closure))
#8 /****
/storage/framework/compiled.php(1768): Illuminate\Foundation\Application->boot()
#9 /_/storage/framework/compiled.php(1307): Illuminate\Foundation\Bootstrap\BootProviders->bootstrap(Object(Illuminate\Foundation\Application))
#10 /****/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(192): Illuminate\Foundation\Application->bootstrapWith(Array)
#11 /**
/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(89): Illuminate\Foundation\Console\Kernel->bootstrap()
#12 /
***/artisan(36): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#13 {main}

Do you maybe have an idea where could be the problem?

@jamisonvalenta
Copy link
Contributor Author

@moerfinator: to use the code from this PR before it is merged into xethron/migrations-generator:l5, make sure that your composer.json includes the pointer to my repository:

    "repositories": [
        {
            "type": "git",
            "url": "git@github.com:jamisonvalenta/migrations-generator.git"
        }
    ],

and in the require (or require-dev if you only want to work with it locally):

    "xethron/migrations-generator": "dev-feature/laravel-five"

Then run composer update xethron/migrations-generator to update that package. I that doesn't work, delete your vendor folder and try again. if that doesn't work, then delete your vendor folder and run composer update. (It's best to stay away from running composer update b/c it might pull in breaking changes if you haven't locked down your package versions well, you could introduce breaking changes from packages you aren't attempting to fix).

@MurphysHub
Copy link

@jamisonvalenta :
Thanks ! now it's working, great Job 👍

Xethron added a commit that referenced this pull request Feb 20, 2015
@Xethron Xethron merged commit c9bddac into Xethron:l5 Feb 20, 2015
@Xethron
Copy link
Owner

Xethron commented Feb 20, 2015

Great stuff. Thanks @jamisonvalenta for this.

@bryceadams
Copy link

Getting - xethron/migrations-generator dev-l5 requires way/generators dev-feature/laravel-five-stable -> no matching package found. - looks like requiring dev-master for generators would work?

@jamisonvalenta
Copy link
Contributor Author

@bryceadams: you may have to adjust your project's composer.json minimum-stability from stable to dev. If that's not the issue, follow the composer update instructions that I mentioned to moerfinator above. If those don't work, let me know and I'll think on it some more.

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.

4 participants