Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Console] fix warning on PHP 7.4 #32806

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

Merged
merged 1 commit into from
Jul 30, 2019
Merged

[Console] fix warning on PHP 7.4 #32806

merged 1 commit into from
Jul 30, 2019

Conversation

rez1dent3
Copy link
Contributor

@rez1dent3 rez1dent3 commented Jul 30, 2019

Q A
Branch? 4.3
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
License MIT

Fixes #32750

In php 7.4rc, accessing an array by key, sometimes causes an error.
Rarely this error occurs on php 7.2.

ErrorException: Trying to access array offset on value of type int

/app/vendor/symfony/console/Input/ArrayInput.php:135
/app/vendor/symfony/console/Input/Input.php:55
/app/vendor/symfony/console/Application.php:208
/app/vendor/symfony/console/Application.php:149
/app/vendor/laravel/framework/src/Illuminate/Console/Application.php:90
/app/vendor/laravel/framework/src/Illuminate/Console/Application.php:182
/app/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:275
/app/vendor/laravel/framework/src/Illuminate/Foundation/Testing/PendingCommand.php:136
/app/vendor/orchestra/testbench-core/src/Database/MigrateProcessor.php:73
/app/vendor/orchestra/testbench-core/src/Database/MigrateProcessor.php:44
/app/vendor/orchestra/testbench-core/src/Concerns/WithLoadMigrationsFrom.php:27

@nicolas-grekas nicolas-grekas added this to the 3.4 milestone Jul 30, 2019
@nicolas-grekas nicolas-grekas changed the title php7.4 fix [Console] fix warning on PHP 7.4 Jul 30, 2019
@nicolas-grekas nicolas-grekas changed the base branch from 4.3 to 3.4 July 30, 2019 17:22
@nicolas-grekas
Copy link
Member

Thank you @rez1dent3.

@nicolas-grekas nicolas-grekas merged commit 5f451e6 into symfony:3.4 Jul 30, 2019
nicolas-grekas added a commit that referenced this pull request Jul 30, 2019
This PR was submitted for the 4.3 branch but it was squashed and merged into the 3.4 branch instead (closes #32806).

Discussion
----------

[Console] fix warning on PHP 7.4

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT

In php 7.4rc, accessing an array by key, sometimes causes an error.
Rarely this error occurs on php 7.2.

```bash
ErrorException: Trying to access array offset on value of type int

/app/vendor/symfony/console/Input/ArrayInput.php:135
/app/vendor/symfony/console/Input/Input.php:55
/app/vendor/symfony/console/Application.php:208
/app/vendor/symfony/console/Application.php:149
/app/vendor/laravel/framework/src/Illuminate/Console/Application.php:90
/app/vendor/laravel/framework/src/Illuminate/Console/Application.php:182
/app/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:275
/app/vendor/laravel/framework/src/Illuminate/Foundation/Testing/PendingCommand.php:136
/app/vendor/orchestra/testbench-core/src/Database/MigrateProcessor.php:73
/app/vendor/orchestra/testbench-core/src/Database/MigrateProcessor.php:44
/app/vendor/orchestra/testbench-core/src/Concerns/WithLoadMigrationsFrom.php:27
```

Commits
-------

5f451e6 [Console] fix warning on PHP 7.4
This was referenced Aug 26, 2019
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.

3 participants