justified in being irritated by composer install for CI4? |
As a concept i like the idea of composer and approach to dependencies but there are bits that irritate me.
Packagist usually was my first port of call since its a repo of available stuff that you can get via composer. If you go to packagist [/url] its quoting Quote: i've set up my system using Code: mv composer.phar /usr/local/bin/composer are various ways to use composer. I guess you could have the necessary entries with appropriate code to download. and options at packagist. is it fair to say that if your not quoting the composer code there is there any point in having it listed on packagist? So let me answer myself and say, well if you g oto the docs you will see this : Code: composer create-project codeigniter4/appstarter -s rc --no-dev ok thats fair i now how to use that , so i did. But have a look and see what i got (see attached image) On the left side of the image is a nice structure i want to see and its at path Code: /home/andrew/Desktop/CI4/app/ but hand on looking inside at path Code: /home/andrew/Desktop/CI4/vendor/codeigniter4/framework/app/ i have whats in the image on the right section. It looks to me duplication. Whats going on? in image CI4_manual_setup you will see what i have in /var/www/htdocs/CI this im fairly happy with. I have bootstrap setup and fontawesome with gulpfile.js so that i end up with a custom css still giving me all the benefits of bootstrap4. But lets get back to composer. its not a structure that i really want to work with. Is it something i'm doing wrong ? gulpfile.js and scss so that I can use sass (12-11-2019, 09:55 AM)captain-sensible Wrote: As a concept i like the idea of composer and approach to dependencies but there are bits that irritate me. its quoting Code: composer create-project codeigniter4/framework i've set up my system using Code: mv composer.phar /usr/local/bin/composer are various ways to use composer. I guess you could have the necessary entries with appropriate code to download. and options at packagist. is it fair to say that if your not quoting the composer code there is there any point in having it listed on packagist? So let me answer myself and say, well if you g oto the docs you will see this : Code: composer create-project codeigniter4/appstarter -s rc --no-dev ok thats fair i now how to use that , so i did. But have a look and see what i got (see attached image) On the left side of the image is a nice structure i want to see and its at path Code: /home/andrew/Desktop/CI4/app/ but hand on looking inside at path Code: /home/andrew/Desktop/CI4/vendor/codeigniter4/framework/app/ i have whats in the image on the right section. It looks to me duplication. Whats going on? in image CI4_manual_setup you will see what i have in /var/www/htdocs/CI this im fairly happy with. I have bootstrap setup and fontawesome with gulpfile.js so that i end up with a custom css still giving me all the benefits of bootstrap4. But lets get back to composer. its not a structure that i really want to work with. Is it something i'm doing wrong ? gulpfile.js and scss so that I can use sass[attachment=1666][attachment=1666][attachment=1666][attachment=1666][attachment=1666][attachment=1666][attachment=1666]
Not sure I understand what issue you have with this. This seems correct to me. Your "project" psr-4 autoloads the CI4 system libs which are located in vendor/coneigniter4/framework/system. You can ignore the "app" in vendor/codeigniter4/framework.
Generally, I pretty much just ignore everything in 'vendor' as everything I need should get autoloaded from there anyway. So it's something I do not even really think about. See attached screenshot. https://ibb.co/bBLNkht
Well, I would not say it's -not needed-, just you don't really need to concern yourself with it. Composer uses the app directory in vendor as a skeleton to create your project with the "create-project" command. The composer vendor directory is a per-project library directory. Whatever an author chooses to include with their package is what gets pulled in via composer.
vendor/codeigniter4/framework/app is there in case there have been changes in the app folder that you need to incorporate into your app folder. These are pointed out in the release notes for a version. This approach doesn't clobber anything of yours, and provides a reference for an "unadulterated" app folder. I would not say this is not useful.
(12-11-2019, 12:04 PM)ciadmin Wrote: vendor/codeigniter4/framework/app is there in case there have been changes in the app folder that you need to incorporate into your app folder. These are pointed out in the release notes for a version. This approach doesn't clobber anything of yours, and provides a reference for an "unadulterated" app folder. I would not say this is not useful.if there is a reason, thats fair enough . So to summarize 1) i don't need to add something like Code: require_once('vendor/autoload.php'); 2) I can basically ignore app in vendor ; if it confuses me ( i do like to poke around code) I could take out app and put it on my desktop as a reference just had a look at up in /var/www/htdocs/CI , all my other additional stuff like bootstrap4, gulp dependencies like Code: "gulp-concat": "^2.6.1", etc is listed and taken care of via package,json |
Welcome Guest, Not a member yet? Register Sign In |