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 dependencies #570

Merged

Conversation

jrfnl
Copy link
Contributor

@jrfnl jrfnl commented Oct 11, 2021

Follow up on #569, related to #562

Update all dependencies within the current version constraints, which could be safely updated.

I've done a cursory review of the changelogs of all updated packages and - aside from increased PHP 8.1 compatibility - could not see any significant changes which would impact the functioning of this package.

However, as the builds still managed to start failing, I've done a package by package update in the end to figure out which dependencies could really be updated safely.

The remaining updates are:

humbug/php-scoper         0.14.1             0.15.0             Prefixes all PHP namespaces in a file or directory.
jetbrains/phpstorm-stubs  dev-master fed4bb7 dev-master f4b22fc PHP runtime & extensions header files for PhpStorm
nikic/php-parser          v4.10.5            v4.13.0            A PHP parser written in PHP
phpunit/php-code-coverage 9.2.6              9.2.7              Library that provides collection, processing, and rendering functionality for PHP code coverage information.
phpunit/phpunit           9.5.9              9.5.10             The PHP Unit Testing framework.
psr/container             1.1.1              2.0.1              Common Container Interface (PHP FIG PSR-11)
symfony/console           v4.4.23            v5.3.7             Eases the creation of beautiful and testable command line interfaces
symfony/filesystem        v4.4.27            v5.3.4             Provides basic utilities for the filesystem
symfony/finder            v4.4.23            v5.3.7             Finds files and directories via an intuitive fluent interface
symfony/process           v5.2.7             v5.3.7             Executes commands in sub-processes
ulrichsg/getopt-php       v3.4.0             v4.0.0             Command line arguments parser for PHP 5.4 - 7.3

Out of these, I've seen problems with the updates of (everything else are dependencies of or are blocked due to one of these root dependencies not having been updated):

  • nikic/php-parser
  • symfony/console
  • symfony/finder
  • symfony/process

For the most part, I have a feeling that the problems I'm seeing are all related to PHP-Scoper.

These result in errors in the E2E tests along the lines of the below (on PHP 7.3):

Fatal error: Uncaught Error: Call to undefined function str_contains() in phar:///home/runner/work/box/box/bin/_box.phar/vendor/symfony/console/Formatter/OutputFormatter.php:103

PHP Fatal error:  Uncaught Error: Call to undefined function str_contains() in phar:///home/runner/work/box/box/bin/_box.phar/vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php:18

 PHP Fatal error:  Uncaught Error: Call to undefined function str_contains() in phar:///home/runner/work/box/box/bin/_box.phar/vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php:18

PHP Fatal error:  Uncaught Error: Undefined constant '_HumbugBoxeabacfbac6b7\T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG' in phar:///home/runner/work/box/box/bin/_box.phar/vendor/nikic/php-parser/lib/PhpParser/Lexer.php:314

The only semi-significant change is a change the default value for one of the PHPUnit configuration settings (convertDeprecationsToExceptions) in PHPUnit 9.5.10. In anticipation of that update, I have added that config setting to the PHPUnit config file now to ensure consistent test results.

Update all dependencies within the current version constraints, which could be safely updated.

I've done a cursory review of the changelogs of all updated packages and - aside from increased PHP 8.1 compatibility - could not see any significant changes which would impact the functioning of this package.

However, as the builds still managed to start failing, I've done a package by package update in the end to figure out which dependencies could _really_ be updated safely.

The remaining updates are:
```
humbug/php-scoper         0.14.1             0.15.0             Prefixes all PHP namespaces in a file or directory.
jetbrains/phpstorm-stubs  dev-master fed4bb7 dev-master f4b22fc PHP runtime & extensions header files for PhpStorm
nikic/php-parser          v4.10.5            v4.13.0            A PHP parser written in PHP
phpunit/php-code-coverage 9.2.6              9.2.7              Library that provides collection, processing, and rendering functionality for PHP code coverage information.
phpunit/phpunit           9.5.9              9.5.10             The PHP Unit Testing framework.
psr/container             1.1.1              2.0.1              Common Container Interface (PHP FIG PSR-11)
symfony/console           v4.4.23            v5.3.7             Eases the creation of beautiful and testable command line interfaces
symfony/filesystem        v4.4.27            v5.3.4             Provides basic utilities for the filesystem
symfony/finder            v4.4.23            v5.3.7             Finds files and directories via an intuitive fluent interface
symfony/process           v5.2.7             v5.3.7             Executes commands in sub-processes
ulrichsg/getopt-php       v3.4.0             v4.0.0             Command line arguments parser for PHP 5.4 - 7.3
```

Out of these, I've seen problems with the updates of (everything else are dependencies of or are blocked due to one of these root dependencies not having been updated):
* `nikic/php-parser`
* `symfony/console`
* `symfony/finder`
* `symfony/process`

For the most part, I have a feeling that the problems I'm seeing are all related to PHP-Scoper.
These result in errors in the E2E tests along the lines of:
```
Fatal error: Uncaught Error: Call to undefined function str_contains() in phar:///home/runner/work/box/box/bin/_box.phar/vendor/symfony/console/Formatter/OutputFormatter.php:103

PHP Fatal error:  Uncaught Error: Call to undefined function str_contains() in phar:///home/runner/work/box/box/bin/_box.phar/vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php:18

 PHP Fatal error:  Uncaught Error: Call to undefined function str_contains() in phar:///home/runner/work/box/box/bin/_box.phar/vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php:18

PHP Fatal error:  Uncaught Error: Undefined constant '_HumbugBoxeabacfbac6b7\T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG' in phar:///home/runner/work/box/box/bin/_box.phar/vendor/nikic/php-parser/lib/PhpParser/Lexer.php:314
```

The only semi-significant change is a change the default value for one of the PHPUnit configuration settings (`convertDeprecationsToExceptions`) in PHPUnit 9.5.10. In anticipation of that update, I have added that config setting to the PHPUnit config file now to ensure consistent test results.
@jrfnl jrfnl mentioned this pull request Oct 11, 2021
@theofidry theofidry merged commit a7bb92c into box-project:master Oct 18, 2021
@theofidry
Copy link
Member

Thanks a lot @jrfnl!

For the most part, I have a feeling that the problems I'm seeing are all related to PHP-Scoper.

I had a gut feeling that most issues would come from it, mostly because apart from requiring PHP 8.1 support it also requires some adjustments for scoping PHP 8.1 code and kinda in the mist of it I started bigger refactorings that I felt were necessary.

I'll commit more time to it shortly, but since OpenClassrooms gave a significant sponsor donation I feel responsible for finishing the PHP 8.1 support for the alice related packages first

@jrfnl
Copy link
Contributor Author

jrfnl commented Oct 18, 2021

and kinda in the mist of it I started bigger refactorings that I felt were necessary.

Ouch, I feel your pain, I have a couple of projects blocked because of such a combination (PHP cross-version updates vs large ongoing refactor which needs cross-version updates too). Not a good place to be in, though given enough time, it will work itself out.

@jrfnl jrfnl deleted the feature/composer-update-dependencies branch October 18, 2021 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants