Is there an easy way to incorporate changes to the main Laravel app, when there are framework updates, other than manually incorporating the changes described in the documentation (http://laravel.com/docs/5.1/upgrade)?
I'm thinking some kind of composer command that patches the main app and not only the vendor dir. Does such a thing exist?
Thanks in advance.
Apparently, Shift is exactly what you're looking for, although it's still in its alpha. You can contact its creator if you want to help him test the tool.
Reference: http://jason.pureconcepts.net/2015/11/laravel-automated-upgrade-tool-shift/
Related
This is probably a pointless question but figured theres no harm in asking.
I have inherited a website which from what I can gather is using some Zend libraries and Doctrine... I think, excuse my ignorance as I'm not very clued up on the Zend framework.
In anycase I have been asked to update the numerous instances of depreacated code in among it. Which I thought would just have been within the application code so I could just update functions here and there etc etc.
It turns out most of the code needing updated is within the library folder which from what I can gather is all libraries which I would have thought would have been set up using composer but theres no mention of a composer.json file within the codebase.
So im now at a loss as I have a bunch of libraries that I have no idea how to update. Which brings me to my question, what would be the best way to attack this problem?
I was thinking if there was someway to reverse engineer a composer.json file based on the contents of the aforemetnioned library folder, that would be a good start as I could then use that as the basis for replacing the library folder with the updated libraries pulled in by composer but I have a feeling im probably clutching at straws.
To give some idea, this is the top level folder structure of the library folder:
Given the amount of subfolders within those listed and all the dependencies no doubt involved I would imagine manually updating them would be a nonstarter.
Would be interested to get thoughts on the best course of action here.
If I were in your spot I would create a composer.json and add try to add the libraries from the folder one by one and check if the app still works and fix dependencies one by one, I also see there is a vendor folder in there, that may have been the result of a composer.json which could be easily added in a new composer.json, but you will have to take the libraries one by one.
So I’ve just finished developing my Laravel 5.2 web application that uses AdminLTE. It is an Asset Management System with some budget and invoice functionality, which will assist me in making my full-time job as a Systems Manager easier.
It’s not the most complicated app, but I’m proud of it, so I want to share it on GitHub, so others might be able to make use of it, as well as having my code available for future when I start applying for development jobs.
Now I’ve tried my best Google skills, but I just cannot figure out how to go about sharing my code on GitHub. I've used Bitbucket during my development phases, as I wanted to keep it private.
If anyone can please direct in the right direction about what steps I should be taking now to actually share my app out there. Should I be looking at something like Packagist instead, as I’m sure I’m not supposed share Laravel along with my web app. Any help will be greatly appreciated.
This question is not about how to upload my project to GitHub, but specifically about what the correct procedure is for Laravel projects and how to share them for others to easily use.
You just need to create a project repo and upload all your project code there.
If you didn't modify any core file in vendor directory, then upload the all code except vendor directory.
once uploaded, add up some readme.md file to tell some guideline/instruction for installation the project.
make your repo public so other can access it
I have a question, I am still getting to grips with Laravel (came over from CI)
I'm looking to implement modules into my application in a similar style to say, wordpress plugins. I took a look at some of the HMVC libraries available but they all seem to require you to explicitly declare each service in the app/config/app.php
I'm wondering if there's a more plug and play approach I can take, where I am able to drop in a folder and it works off the bat, is there an appropriate way to implement this?
Thanks
I don't think there's a "drop in folder and it just works" solution for Laravel, but Packages is probably the closest to what you are describing:
http://laravel.com/docs/packages
Usually after you install a package, you run an artisan command to publish configurations and potentially run some database migrations, and then you're good to go.
I would start there if you want to create some additional self-contained functionality without wading into the existing site..
I've written a Laravel 5 package that manages modules. You can "drop in folder and it just works".
There is also a artisan module generator.
l5-modular have fun, save some time ;)
I have been making a CMS as a project for a little while now, and am currently working on the plugin management section. Instead of building my own repository & update manager, I've been toying with the idea to use composer instead. The issue is I want the admins on the site to be able to add/remove plugins at will.
So I was thinking, how bad of an idea would it be to build a front-end which runs composer? Composer is just PHP after all, it's meant to be run on production environments (granted with a composer.lock file though), and it'd resolve all of my repository, update, and dependency needs.
I knocked out a quick test script, I built and passed in a custom configuration file (instead of composer.json, the installed plugins list is stored in the database), and everything seems to be working fine. But I can't shake the feeling of this being a bad idea.
Does anyone have experience with this, and whether or not it is a good or bad idea?
Using Composer as an embedded dependency manager with a front end is actually a very valid use case for it. Here are some links with information, as well as a project meant specifically to help with embedding composer into an application.
https://github.com/dflydev/dflydev-embedded-composer
https://sculpin.io/documentation/embedded-composer
http://srcmvn.com/blog/2013/05/23/symfony-live-2013-portland-embedded-composer
I have directory structure which looks like that
Framework folder is from https://github.com/yiisoft/yii
For now, I'm updating framework folder like that.
Created another folder for Yii framework. Pulling every update and then duplicating framework directory into framework folder.
I want to automate this routine work. Is there anyway to update this framework folder from https://github.com/yiisoft/yii with commands like
cd framework
git pull
It might be wrong of course, but I'm newbie to git.
Any suggestions?
Thanks in advance
I think you should use Git Submodules:
It often happens that while working on one project, you need to use another project from within it. Perhaps it’s a library that a third party developed or that you’re developing separately and using in multiple parent projects. A common issue arises in these scenarios: you want to be able to treat the two projects as separate yet still be able to use one from within the other.
...
Git addresses this issue using submodules.
Here's a wiki explaining how to manage it in Yii