Welcome Guest, Not a member yet? Register   Sign In
Poll: Do you use Composer?
You do not have permission to vote in this poll.
Yes, I use it all of the time
53.13%
17 53.13%
Yes, but not to start a new project
6.25%
2 6.25%
I don't currently use but am open to it
15.63%
5 15.63%
No, I don't use Composer at all
25.00%
8 25.00%
Total 32 vote(s) 100%
* You voted for this item. [Show Results]

Poll: Do you use Composer with CI4?
#1

We are trying to figure out how everyone uses CodeIgniter these days? I know at one time it was the standard to download a zip and go from there. Not that CI4 has been out a while, has that changed? Are you comfortable with Composer installs and usage in your projects now?

Either way, let us know your thoughts around the issue in the comments. We are doing some very preliminary planning for v5 roadmap and need to know the community's needs.
Reply
#2

(This post was last modified: 04-14-2022, 12:01 PM by firecode. Edit Reason: Spelling and grammer correction. )

I travel alot without a laptop, with just a phone. My dev setup is alittle unconventional.

I run virtualbox with linux on flash disk and boot up from any computer I find at my destination.

Most times, I just open up a test editor on any computer I get and code away without boot up my mobile virtualbox.
Reply
#3

(This post was last modified: 04-14-2022, 04:08 PM by John_Betong.)

@kilishan,
> it was the standard to download a zip

No mention of using the GitHub clone facility?

Select Command line directory:
Code:
git clone https://github.com/codeigniter4/CodeIgniter4.git

Perhaps users do not know just how easy and so much faster it is to to download instead of using Composer.

Interesting Topic and well worth a read:

https://www.sitepoint.com/community/t/co...ub/37447/2
Reply
#4

(04-14-2022, 03:51 PM)John_Betong Wrote: @kilishan,
>  it was the standard to download a zip

No mention of using the GitHub clone facility?

Select Command line directory:
Code:
git clone https://github.com/codeigniter4/CodeIgniter4.git

Perhaps users do not know just how easy and so much faster it is to to download instead of using Composer. 

Interesting Topic and well worth a read:

https://www.sitepoint.com/community/t/co...ub/37447/2
Composer has long been the industry standard for development.
The link you provided is not only from 2013, but also does not defend the point of view.

Your approach works as long as it's primitive.

Let's say your project needs a library that depends on other libraries. All dependencies of this library are described in composer.json (because no one uses git submodules). Now you have to manually find all the dependencies, install, register in the autoloader and control their versions.

You use git, someone else uses zip, and as a result, CI has to maintain its own classloader and store third-party libraries inside the kernel directory.

For example, it would be possible to use a third-party templating engine, libraries for working with email, queues, schedulers, through composer dependencies.
But you use git, and someone else uses zip...
Reply
#5

This might not be what John_Betong want to says.

Installing CodeIgniter with git took 1m 57s, and installing with Composer took 16s.

$ time git clone https://github.com/codeigniter4/CodeIgniter4.git
...
real 1m56.535s
user 0m16.447s
sys 0m10.845s

$ time composer create-project codeigniter4/appstarter project-root
...
real 0m16.110s
user 0m2.898s
sys 0m4.115s
Reply
#6

(This post was last modified: 04-15-2022, 01:25 AM by John_Betong.)

(04-14-2022, 11:54 PM)kenjis Wrote: This might not be what John_Betong want to says.

Installing CodeIgniter with git took 1m 57s, and installing with Composer took 16s.

$ time git clone https://github.com/codeigniter4/CodeIgniter4.git
...
real 1m56.535s
user 0m16.447s
sys 0m10.845s

$ time composer create-project codeigniter4/appstarter project-root
...
real 0m16.110s
user 0m2.898s
sys 0m4.115s

My GitHub clone - download times:
Quote:$ date && git clone https://github.com/codeigniter4/CodeIgniter4.git && date
Fri Apr 15 02:52:37 PM +07 2022
Cloning into 'CodeIgniter4'...
remote: Enumerating objects: 173834, done.
remote: Counting objects: 100% (6840/6840), done.
remote: Compressing objects: 100% (1170/1170), done.
remote: Total 173834 (delta 5721), reused 6742 (delta 5653), pack-reused 166994
Receiving objects: 100% (173834/173834), 84.69 MiB | 8.76 MiB/s, done.
Resolving deltas: 100% (139577/139577), done.
Fri Apr 15 02:53:01 PM +07 2022


My Symphony - download time:
Quote:date && composer create-project codeigniter4/appstarter CodeApp && date
Fri Apr 15 02:57:38 PM +07 2022
Creating a "codeigniter4/appstarter" project at "./CodeApp"
Info from https://repo.packagist.org: #StandWithUkraine
Installing codeigniter4/appstarter (v4.1.9)
  - Downloading codeigniter4/appstarter (v4.1.9)
  - Installing codeigniter4/appstarter (v4.1.9): Extracting archive
Created project in /var/www/CodeApp
Loading composer repositories with package information
Info from https://repo.packagist.org: #StandWithUkraine
Updating dependencies
Lock file operations: 42 installs, 0 updates, 0 removals
  - Locking codeigniter4/framework (v4.1.9)
  - Locking doctrine/instantiator (1.4.1)
  - Locking fakerphp/faker (v1.19.0)
  - Locking kint-php/kint (4.1.2)
  - Locking laminas/laminas-escaper (2.10.0)
  - Locking mikey179/vfsstream (v1.6.10)
  - Locking myclabs/deep-copy (1.11.0)
  - Locking nikic/php-parser (v4.13.2)
  - Locking phar-io/manifest (2.0.3)
  - Locking phar-io/version (3.2.1)
  - Locking phpdocumentor/reflection-common (2.2.0)
  - Locking phpdocumentor/reflection-docblock (5.3.0)
  - Locking phpdocumentor/type-resolver (1.6.1)
  - Locking phpspec/prophecy (v1.15.0)
  - Locking phpunit/php-code-coverage (9.2.15)
  - Locking phpunit/php-file-iterator (3.0.6)
  - Locking phpunit/php-invoker (3.1.1)
  - Locking phpunit/php-text-template (2.0.4)
  - Locking phpunit/php-timer (5.0.3)
  - Locking phpunit/phpunit (9.5.20)
  - Locking psr/container (2.0.2)
  - Locking psr/log (1.1.4)
  - Locking sebastian/cli-parser (1.0.1)
  - Locking sebastian/code-unit (1.0.8)
  - Locking sebastian/code-unit-reverse-lookup (2.0.3)
  - Locking sebastian/comparator (4.0.6)
  - Locking sebastian/complexity (2.0.2)
  - Locking sebastian/diff (4.0.4)
  - Locking sebastian/environment (5.1.4)
  - Locking sebastian/exporter (4.0.4)
  - Locking sebastian/global-state (5.0.5)
  - Locking sebastian/lines-of-code (1.0.3)
  - Locking sebastian/object-enumerator (4.0.4)
  - Locking sebastian/object-reflector (2.0.4)
  - Locking sebastian/recursion-context (4.0.4)
  - Locking sebastian/resource-operations (3.0.3)
  - Locking sebastian/type (3.0.0)
  - Locking sebastian/version (3.0.2)
  - Locking symfony/deprecation-contracts (v3.0.1)
  - Locking symfony/polyfill-ctype (v1.25.0)
  - Locking theseer/tokenizer (1.2.1)
  - Locking webmozart/assert (1.10.0)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 42 installs, 0 updates, 0 removals
  - Downloading symfony/polyfill-ctype (v1.25.0)
  - Downloading laminas/laminas-escaper (2.10.0)
  - Downloading kint-php/kint (4.1.2)
  - Downloading codeigniter4/framework (v4.1.9)
  - Downloading symfony/deprecation-contracts (v3.0.1)
  - Downloading fakerphp/faker (v1.19.0)
  - Downloading phpdocumentor/type-resolver (1.6.1)
  - Downloading sebastian/type (3.0.0)
  - Downloading sebastian/global-state (5.0.5)
  - Downloading sebastian/environment (5.1.4)
  - Downloading phpunit/php-file-iterator (3.0.6)
  - Downloading nikic/php-parser (v4.13.2)
  - Downloading phpunit/php-code-coverage (9.2.15)
  - Downloading doctrine/instantiator (1.4.1)
  - Downloading phpspec/prophecy (v1.15.0)
  - Downloading phar-io/version (3.2.1)
  - Downloading myclabs/deep-copy (1.11.0)
  - Downloading phpunit/phpunit (9.5.20)
  - Installing psr/log (1.1.4): Extracting archive
  - Installing symfony/polyfill-ctype (v1.25.0): Extracting archive
  - Installing laminas/laminas-escaper (2.10.0): Extracting archive
  - Installing kint-php/kint (4.1.2): Extracting archive
  - Installing codeigniter4/framework (v4.1.9): Extracting archive
  - Installing symfony/deprecation-contracts (v3.0.1): Extracting archive
  - Installing psr/container (2.0.2): Extracting archive
  - Installing fakerphp/faker (v1.19.0): Extracting archive
  - Installing mikey179/vfsstream (v1.6.10): Extracting archive
  - Installing webmozart/assert (1.10.0): Extracting archive
  - Installing phpdocumentor/reflection-common (2.2.0): Extracting archive
  - Installing phpdocumentor/type-resolver (1.6.1): Extracting archive
  - Installing phpdocumentor/reflection-docblock (5.3.0): Extracting archive
  - Installing sebastian/version (3.0.2): Extracting archive
  - Installing sebastian/type (3.0.0): Extracting archive
  - Installing sebastian/resource-operations (3.0.3): Extracting archive
  - Installing sebastian/recursion-context (4.0.4): Extracting archive
  - Installing sebastian/object-reflector (2.0.4): Extracting archive
  - Installing sebastian/object-enumerator (4.0.4): Extracting archive
  - Installing sebastian/global-state (5.0.5): Extracting archive
  - Installing sebastian/exporter (4.0.4): Extracting archive
  - Installing sebastian/environment (5.1.4): Extracting archive
  - Installing sebastian/diff (4.0.4): Extracting archive
  - Installing sebastian/comparator (4.0.6): Extracting archive
  - Installing sebastian/code-unit (1.0.8): Extracting archive
  - Installing sebastian/cli-parser (1.0.1): Extracting archive
  - Installing phpunit/php-timer (5.0.3): Extracting archive
  - Installing phpunit/php-text-template (2.0.4): Extracting archive
  - Installing phpunit/php-invoker (3.1.1): Extracting archive
  - Installing phpunit/php-file-iterator (3.0.6): Extracting archive
  - Installing theseer/tokenizer (1.2.1): Extracting archive
  - Installing nikic/php-parser (v4.13.2): Extracting archive
  - Installing sebastian/lines-of-code (1.0.3): Extracting archive
  - Installing sebastian/complexity (2.0.2): Extracting archive
  - Installing sebastian/code-unit-reverse-lookup (2.0.3): Extracting archive
  - Installing phpunit/php-code-coverage (9.2.15): Extracting archive
  - Installing doctrine/instantiator (1.4.1): Extracting archive
  - Installing phpspec/prophecy (v1.15.0): Extracting archive
  - Installing phar-io/version (3.2.1): Extracting archive
  - Installing phar-io/manifest (2.0.3): Extracting archive
  - Installing myclabs/deep-copy (1.11.0): Extracting archive
  - Installing phpunit/phpunit (9.5.20): Extracting archive
8 package suggestions were added by new dependencies, use `composer suggest` to see details.
Generating autoload files
28 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
Fri Apr 15 02:57:47 PM +07 2022


[b]Github - 24 seconds - 3,276 items, totalling 105.1 MB
[/b]
Quote:
Fri Apr 15 02:52:37 PM +07 2022
Fri Apr 15 02:53:01 PM +07 2022

[b]Symphony -  8 seconds - 3,288 items, totalling 21.8 MB
[/b]
Quote:
Fri Apr 15 02:57:38 PM +07 2022
Fri Apr 15 02:57:47 PM +07 2022

I think the difference is mostly due to the User Guide.
Reply
#7

I like to use composer, and it works fine if I only use CI. But if I want to install some other composer components  I allways get in trouble, because it don't work like the authors wrote in their guides (Maybe the addins are too old and something happen on core-CI).
However, manual installations are mostly very complicated and / or not sufficiently documented so that I usually have to resort to individual solutions.
Reply
#8

(This post was last modified: 04-15-2022, 02:47 PM by kenjis.)

@John_Betong Oh, your GitHub is amazingly fast!

The difference is, because git clone downloads all the historical source files,
from the beginning of the CI4's development.

The user guide source files are just 8.8MB.
Reply
#9

I am comfortable to work with composer, and it's okay to me.

And very happy to hear for planning v5 roadmap.
Reply
#10

absolutely composer
Codeigniter First, Codeigniter Then You!!
yekrinaDigitals

Reply




Theme © iAndrew 2016 - Forum software by © MyBB