Welcome Guest, Not a member yet? Register   Sign In
OK, here we go again: installing using composer?
#1

(This post was last modified: 09-03-2020, 03:02 AM by blaasvaer.)

I'm starting all over from scratch with CI4 to get my head around it – as it seems trying to do things the way you used to in CI3 is not going to cut it – in ANY way.



And we start off just fine by being kicked in the balls when just trying to install the bugger; using composer.



If I run:

Code:
$ composer create-project codeitniter4/appstarter CI4


I get this:



Code:
Could not open input file: /usr/local/bin/composer.phar


I then try to figure out what could possibly be wrong with composer by doing this:



Code:
$ composer --version


I then get:



Code:
-bash: /usr/local/bin/composer.phar: No such file or directory


I then try this:



Code:
$ which composer


and get this:



Code:
/usr/local/bin/composer


So, what did I miss in the process of just getting started? Oh boy, it's a long way to home.


So, it turned out that the composer symlink in '/usr/bin/local' didn't have the .phar extension which 'something' obviously asks for when running the '$ composer' command.



Adding it made SOME progress.



Now, I'm facing this issue:



Code:
$ composer create-project codeigniter4/appstarter CI4
Creating a "codeigniter4/appstarter" project at "./CI4"
Installing codeigniter4/appstarter (v4.0.4)
  - Installing codeigniter4/appstarter (v4.0.4): Downloading (100%)        
Created project in /usr/local/bin/CI4
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - codeigniter4/framework v4.0.4 requires ext-intl * -> the requested PHP extension intl is missing from your system.
    - codeigniter4/framework v4.0.3 requires ext-intl * -> the requested PHP extension intl is missing from your system.
    - codeigniter4/framework v4.0.2 requires ext-intl * -> the requested PHP extension intl is missing from your system.
    - codeigniter4/framework v4.0.1 requires ext-intl * -> the requested PHP extension intl is missing from your system.
    - codeigniter4/framework 4.0.0 requires ext-intl * -> the requested PHP extension intl is missing from your system.
    - Installation request for codeigniter4/framework ^4 -> satisfiable by codeigniter4/framework[4.0.0, v4.0.1, v4.0.2, v4.0.3, v4.0.4].


So, I guess I'm having some issue with what 'php' I'm actually using ... I've got MAMP installed, so I could potentially have some issue here.



Let's move on, shall we?

Running this:

Code:
$ php --version

return this:
Code:
PHP 7.3.11 (cli) (built: Jul  5 2020 03:23:39) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.11, Copyright (c) 1998-2018 Zend Technologies

And I can see in my MAMP settings, that the version allegedly running there is 7.4.2 ... so.

The task here is; to make composer, codeigniter 4 and all other crap that needs php to run point to the right version of php, I guess. OK, let's try to do that then, shall we?

So, after a nice session over at stackoverflow.com I ended up doing this, added the following to my .bash_profile (yes, I know I'm supposed to be running zsh, but there's only so much 'crap' one can take on a one time):

PHP Code:
export PATH="/Applications/MAMP/bin/php/php7.4.2/bin:${PATH}"

So, apart from getting another bone thrown to fetch:

Code:
Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested.

Thanks for letting me know, by the way, the installation ran smoothly(!).

Now, on to actually do something in CI4. Phew.

To be continued …
Reply


Messages In This Thread
OK, here we go again: installing using composer? - by blaasvaer - 09-03-2020, 02:07 AM



Theme © iAndrew 2016 - Forum software by © MyBB