codeigniter4 / CodeIgniter4

Open Source PHP Framework (originally from EllisLab)
https://codeigniter.com/
MIT License
5.3k stars 1.89k forks source link

Bug: v4.2.9 version number is not updated #6797

Closed prbt2016 closed 1 year ago

prbt2016 commented 1 year ago

PHP Version

7.4

CodeIgniter4 Version

4.2.9

CodeIgniter4 Installation Method

Composer (using codeigniter4/appstarter)

Which operating systems have you tested for this bug?

Linux

Which server did you use?

apache

Database

MySQL 5.5

What happened?

Hello,

Was in the process of installation of Codeigniter 4.2.9 using composer on Centos 7 with Apache 2.2, PHP 7.4/8.0 i.e :

https://codeigniter.com/user_guide/installation/installing_composer.html#

However after running composer create-project codeigniter4/appstarter /{{PATH}}/{{TO}}/{{CODEIGNITER-DIR}}/ following is shown i.e :

Installing codeigniter4/appstarter (v4.2.9)

However after visiting the URL i.e :

http://{{DOMAIN.COM}}/{{CODEIGNITER-DIR}}/public/

The version shown is 4.2.8 and not 4.2.9 as shown in the screenshot below :

image

Seems that the version constant isn't updated in /{{PATH}}/{{TO}}/{{CODEIGNITER-DIR}}/vendor/codeigniter4/framework/system/CodeIgniter.php

public const CI_VERSION = '4.2.8';

It's 4.2.8 and not 4.2.9 . Could you please update the same?.

Also while installing on PHP 7.4 dependencies fail to install , i.e after running composer create-project codeigniter4/appstarter /{{PATH}}/{{TO}}/{{CODEIGNITER-DIR}}/ on PHP 7.4 following error is thrown i.e :

Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - phpunit/phpunit 9.2.6 requires phpunit/php-code-coverage ^8.0.2 -> satisfiable by phpunit/php-code-coverage[8.0.2].
    - phpunit/phpunit[9.1.0, ..., 9.2.5] require phpunit/php-code-coverage ^8.0.1 -> satisfiable by phpunit/php-code-coverage[8.0.1, 8.0.2].
    - phpunit/phpunit[9.5.16, ..., 9.5.26] require phpunit/php-code-coverage ^9.2.13 -> satisfiable by phpunit/php-code-coverage[9.2.13, ..., 9.2.18].
    - phpunit/phpunit[9.5.10, ..., 9.5.14] require phpunit/php-code-coverage ^9.2.7 -> satisfiable by phpunit/php-code-coverage[9.2.7, ..., 9.2.18].
    - phpunit/phpunit[9.5.0, ..., 9.5.9] require phpunit/php-code-coverage ^9.2.3 -> satisfiable by phpunit/php-code-coverage[9.2.3, ..., 9.2.18].
    - phpunit/phpunit[9.4.0, ..., 9.4.4] require phpunit/php-code-coverage ^9.2 -> satisfiable by phpunit/php-code-coverage[9.2.0, ..., 9.2.18].
    - phpunit/phpunit 9.3.11 requires phpunit/php-code-coverage ^9.1.11 -> satisfiable by phpunit/php-code-coverage[9.1.11, ..., 9.2.18].
    - phpunit/phpunit[9.3.8, ..., 9.3.10] require phpunit/php-code-coverage ^9.1.5 -> satisfiable by phpunit/php-code-coverage[9.1.5, ..., 9.2.18].
    - phpunit/phpunit[9.3.4, ..., 9.3.7] require phpunit/php-code-coverage ^9.1.1 -> satisfiable by phpunit/php-code-coverage[9.1.1, ..., 9.2.18].
    - phpunit/phpunit[9.3.0, ..., 9.3.3] require phpunit/php-code-coverage ^9.0 -> satisfiable by phpunit/php-code-coverage[9.0.0, ..., 9.2.18].
    - phpunit/php-code-coverage[8.0.1, ..., 8.0.2] require theseer/tokenizer ^1.1.3 -> satisfiable by theseer/tokenizer[1.1.3, 1.2.0, 1.2.1].
    - phpunit/php-code-coverage[9.2.16, ..., 9.2.18] require nikic/php-parser ^4.14 -> satisfiable by nikic/php-parser[v4.14.0, v4.15.0, v4.15.1].
    - phpunit/php-code-coverage[9.2.8, ..., 9.2.15] require nikic/php-parser ^4.13.0 -> satisfiable by nikic/php-parser[v4.13.0, ..., v4.15.1].
    - phpunit/php-code-coverage 9.2.7 requires nikic/php-parser ^4.12.0 -> satisfiable by nikic/php-parser[v4.12.0, ..., v4.15.1].
    - phpunit/php-code-coverage[9.2.3, ..., 9.2.6] require nikic/php-parser ^4.10.2 -> satisfiable by nikic/php-parser[v4.10.2, ..., v4.15.1].
    - phpunit/php-code-coverage[9.1.3, ..., 9.2.2] require nikic/php-parser ^4.8 -> satisfiable by nikic/php-parser[v4.8.0, ..., v4.15.1].
    - phpunit/php-code-coverage[9.0.0, ..., 9.1.2] require nikic/php-parser ^4.7 -> satisfiable by nikic/php-parser[v4.7.0, ..., v4.15.1].
    - theseer/tokenizer[1.1.3, ..., 1.2.1] require ext-tokenizer * -> it is missing from your system. Install or enable PHP's tokenizer extension.
    - nikic/php-parser[v4.6.0, ..., v4.15.1] require ext-tokenizer * -> it is missing from your system. Install or enable PHP's tokenizer extension.
    - Root composer.json requires phpunit/phpunit ^9.1 -> satisfiable by phpunit/phpunit[9.1.0, ..., 9.5.26].

But dependencies get installed properly when I checked with PHP 8.0 .

What's the cause of the issue ?. Has PHP requirements changed ?.

Official site shows 7.4 or above :

https://codeigniter.com/user_guide/intro/requirements.html

Please fix the above issues.

Steps to Reproduce

  1. Run composer create-project codeigniter4/appstarter project-root on PHP 7.4 (Dependencies fail to install with PHP 7.4)
  2. Run on PHP 8.0 the same command , CI gets installed
  3. Hit installation URL . version shown is incorrect , its 4.2.8 and not 4.2.9.

Expected Output

  1. Dependencies should have been installed on PHP 7.4.
  2. Version should have been 4.2.9.

Anything else?

No response

kenjis commented 1 year ago

Please enable ext-tokenizer in your PHP 7.4. https://www.php.net/manual/en/tokenizer.installation.php

bash-3.2$ php -v
PHP 7.4.32 (cli) (built: Sep 29 2022 11:03:56) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Xdebug v3.1.5, Copyright (c) 2002-2022, by Derick Rethans
    with Zend OPcache v7.4.32, Copyright (c), by Zend Technologies

bash-3.2$ composer create-project codeigniter4/appstarter project-root
Creating a "codeigniter4/appstarter" project at "./project-root"
Info from https://repo.packagist.org: #StandWithUkraine
Installing codeigniter4/appstarter (v4.2.9)
  - Installing codeigniter4/appstarter (v4.2.9): Extracting archive
Created project in /Users/kenji/work/codeigniter/tmp/project-root
Loading composer repositories with package information
Updating dependencies
Lock file operations: 36 installs, 0 updates, 0 removals
  - Locking codeigniter4/framework (v4.2.9)
  - Locking doctrine/instantiator (1.4.1)
  - Locking fakerphp/faker (v1.20.0)
  - Locking kint-php/kint (4.2.3)
  - Locking laminas/laminas-escaper (2.12.0)
  - Locking mikey179/vfsstream (v1.6.11)
  - Locking myclabs/deep-copy (1.11.0)
  - Locking nikic/php-parser (v4.15.1)
  - Locking phar-io/manifest (2.0.3)
  - Locking phar-io/version (3.2.1)
  - Locking phpunit/php-code-coverage (9.2.18)
  - 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.26)
  - 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.8)
  - Locking sebastian/complexity (2.0.2)
  - Locking sebastian/diff (4.0.4)
  - Locking sebastian/environment (5.1.4)
  - Locking sebastian/exporter (4.0.5)
  - 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.2.0)
  - Locking sebastian/version (3.0.2)
  - Locking symfony/deprecation-contracts (v2.5.2)
  - Locking theseer/tokenizer (1.2.1)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 36 installs, 0 updates, 0 removals
  - Installing psr/log (1.1.4): Extracting archive
  - Installing laminas/laminas-escaper (2.12.0): Extracting archive
  - Installing kint-php/kint (4.2.3): Extracting archive
  - Installing codeigniter4/framework (v4.2.9): Extracting archive
  - Installing symfony/deprecation-contracts (v2.5.2): Extracting archive
  - Installing psr/container (2.0.2): Extracting archive
  - Installing fakerphp/faker (v1.20.0): Extracting archive
  - Installing mikey179/vfsstream (v1.6.11): Extracting archive
  - Installing sebastian/version (3.0.2): Extracting archive
  - Installing sebastian/type (3.2.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.5): Extracting archive
  - Installing sebastian/environment (5.1.4): Extracting archive
  - Installing sebastian/diff (4.0.4): Extracting archive
  - Installing sebastian/comparator (4.0.8): 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.15.1): 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.18): 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 doctrine/instantiator (1.4.1): Extracting archive
  - Installing phpunit/phpunit (9.5.26): Extracting archive
11 package suggestions were added by new dependencies, use `composer suggest` to see details.
Generating autoload files
27 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
infection/extension-installer: No extensions found
No security vulnerability advisories found
kenjis commented 1 year ago

Version should have been 4.2.9.

Yes, it is a bug.

prbt2016 commented 1 year ago

Hello @kenjis ,

Please enable ext-tokenizer in your PHP 7.4.

Thanks . Dependencies do get installed after enabling tokenizer on PHP 7.4 .

Yes, it is a bug.

Thanks for acknowledging the same . Could you please update the version in the file and let me know.

Regards.

Terrorboy commented 1 year ago

https://github.com/codeigniter4/CodeIgniter4/pull/6795#issuecomment-1296579069

kenjis commented 1 year ago

Closed by v4.2.10 release.

prbt2016 commented 1 year ago

Hello @kenjis,

Thanks a lot for the version and version fix . Checked with 4.2.10 and it shows version correctly .

Regards.