Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

composer: update php version in config #1753

Merged

Conversation

yookoala
Copy link
Member

Description

  • Update php version config in composer to 7.4. We have used 7.4 as the lowest supported version for a while now. We just haven't updated composer.json accordingly.

  • Update libraries to their latest version possible according to the new PHP version requirement.

  • Added new "php-http/discovery" composer extension as a dependency to the latest "omnipay/common" version (v3.2.1).

Motivation and Context

  • Working on Refactor: Deprecate msort #1752 involves rewriting old code with Arrow Functions syntax, which was introduced in PHP 7.4.
  • phpstan reports an error that doesn't make sense:
    Error: Function getResourcesTagCloud not found.
    ------ --------------------------------------------------------------------- 
    Line   UI/Components/Sidebar.php                                            
    ------ --------------------------------------------------------------------- 
    615    Function getResourcesTagCloud not found.                             
            💡 Learn more at https://phpstan.org/user-guide/discovering-symbols  
    ------ --------------------------------------------------------------------- 
    
  • Investigation reveals that by updating the PHP version in composer config, composer will update phpstan to a more appropriate version for PHP 7.4 support. Then the arrow function wouldn't cause an issue anymore.

How Has This Been Tested?

  • Locally.
  • CI Platform.

Screenshots

Before
image

After
image

* Update php version config in composer to 7.4. We have used 7.4 as
  the lowest supported version for a while now. We just haven't updated
  composer.json accordingly.

* Update libraries to their latest version possible according to the
  new PHP version requirement.

* Added new "php-http/discovery" composer extension as a dependency to
  the latest "omnipay/common" version (v3.2.1).
Copy link
Member

@SKuipers SKuipers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks good. I've updated the v26 minimum requirement to PHP 7.4 in version.php as well.

@SKuipers SKuipers merged commit c12d73e into GibbonEdu:v26.0.00 Oct 20, 2023
4 checks passed
@yookoala yookoala deleted the fix/composer-php-version-config branch October 20, 2023 02:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants