Welcome Guest, Not a member yet? Register   Sign In
CodeIgniter project download from GitHub
#1

(This post was last modified: 04-23-2020, 12:57 PM by jreklund.)

I've cloned a project from GitHub, developed with CodeIgniter using Composer, which I want to extend.

To get this working on my own PC do I need to follow the instructions Adding CodeIgniter4 to an Existing Project? This talks about copying files and folders like app, public, tests etc from vendor/codeigniter4/framework to the project root. However there are files and folders of these names already in the project root downloaded from GitHub.

I’ve completed the CodeIgniter first app tutorial if that makes any difference.

Grateful for any help or advice. Thanks.
Reply
#2

If it's already an application made with CodeIgniter all you have to do is install the framework.

Code:
composer install

And it will download all dependencies (including CodeIgniter in vendor folder).

The first link should be used if you start from scratch. If your project don't already depend on CodeIgniter.

And the second link are how to actually make an application, will only help if you want to extend the project you have downloaded from Github.
Reply
#3

Thanks for your reply.


Quote:If it's already an application made with CodeIgniter all you have to do is install the framework.


So even though the application was built with CodeIgniter, the framework isn’t built into it & still needs to be installed?


Quote:And it will download all dependencies (including CodeIgniter in vendor folder).

OK, so the framework is considered to be a dependency and no dependencies will be included in the GitHub code. I think it says on the Composer Installation page that the vendor folder is usually gitignored so that ties in.  I'm new to frameworks & dependency managers so trying understand how it all works...


Quote:The first link should be used if you start from scratch. If your project don't already depend on CodeIgniter.

 I see, so the section Adding CodeIgniter4 to an Existing Project is for projects not built with CodeIgniter (please correct if not true).



Quote:And the second link are how to actually make an application, will only help if you want to extend the project you have downloaded from Github.

I do want to extend the project and have completed  the CodeIgniter first app tutorial. So that should help.



Many thanks again for your help!
Reply
#4

(This post was last modified: 04-23-2020, 02:13 PM by jreklund.)

So even though the application was built with CodeIgniter, the framework isn’t built into it & still needs to be installed?
- If it's done "correctly" you normally don't bundle Composer packages. You put a composer.json file in your Github project. To let Composer know what files it need to download for the application to work. That's how our "Appstarter" package work in the userguide as well. After you have made your application and publish it. People need to download CodeIgniter themself.

OK, so the framework is considered to be a dependency and no dependencies will be included in the GitHub code. I think it says on the Composer Installation page that the vendor folder is usually gitignored so that ties in. I'm new to frameworks & dependency managers so trying understand how it all works...
- That's correct, in the Appstarter application we have ignored the vendor folder. That's normal practice. Not everyone describe that you need to run composer install in their readme file to get the application working. The reason for it are that it will download the latest version, containing bug and security fixes. So that the owner of the project don't need to update it all the time themself.

I see, so the section Adding CodeIgniter4 to an Existing Project is for projects not built with CodeIgniter (please correct if not true).
- That's correct. You started making your application without the intent to use CodeIgniter and later chose to add it. So you need to manually do all the things Appstarter does for you.

I do want to extend the project and have completed the CodeIgniter first app tutorial. So that should help.
- Great, good luck on the development!
Reply
#5

Thank you very much for the further help!
Reply




Theme © iAndrew 2016 - Forum software by © MyBB