Skip to content

Commit aa95dc6

Browse files
mfnd3v2a
authored andcommitted
Removed support for Laravel 8 and therefore for PHP < 8.0 (barryvdh#1504)
* Removed support for Laravel 8 and therefore for PHP < 8.0 * Update php-cs-fixer to v3 * composer fix-style
1 parent b3ea5b3 commit aa95dc6

27 files changed

+63
-242
lines changed

.github/workflows/run-integration-tests.yml

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,25 +19,13 @@ jobs:
1919
strategy:
2020
fail-fast: false
2121
matrix:
22-
php: [8.3, 8.2, 8.1, 8.0, 7.4, 7.3]
23-
laravel: [10.*, 9.*, 8.*]
22+
php: [8.3, 8.2, 8.1, 8.0]
23+
laravel: [10.*, 9.*]
2424
exclude:
2525
- php: 8.0
2626
laravel: 10.*
27-
- php: 7.4
28-
laravel: 10.*
29-
- php: 7.3
30-
laravel: 10.*
3127
- php: 8.3
3228
laravel: 9.*
33-
- php: 7.4
34-
laravel: 9.*
35-
- php: 7.3
36-
laravel: 9.*
37-
- php: 8.3
38-
laravel: 8.*
39-
- php: 8.2
40-
laravel: 8.*
4129
name: P${{ matrix.php }} - Laravel${{ matrix.laravel }}
4230
steps:
4331
- name: Checkout code

.github/workflows/run-tests.yml

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,26 +20,14 @@ jobs:
2020
strategy:
2121
matrix:
2222
os: [ubuntu-20.04, windows-2019]
23-
php: [8.3, 8.2, 8.1, 8.0, 7.4, 7.3]
24-
laravel: [8.*, 9.*, 10.*]
23+
php: [8.3, 8.2, 8.1, 8.0]
24+
laravel: [9.*, 10.*]
2525
dependency-version: [prefer-lowest, prefer-stable]
2626
exclude:
2727
- php: 8.0
2828
laravel: 10.*
29-
- php: 7.4
30-
laravel: 10.*
31-
- php: 7.3
32-
laravel: 10.*
3329
- php: 8.0
3430
dependency-version: prefer-lowest
35-
- php: 7.4
36-
laravel: 9.*
37-
- php: 7.3
38-
laravel: 9.*
39-
- os: windows-2019
40-
php: 7.4
41-
- os: windows-2019
42-
php: 7.3
4331
steps:
4432
- name: Set git to use LF
4533
if: ${{ matrix.os == 'windows-2019' }}

.gitignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
.phpunit.result.cache
22

33
/.idea
4-
/.php_cs
5-
/.php_cs.cache
6-
/.php_cs.tests.cache
4+
/.php-cs-fixer.cache
5+
/.php-cs-fixer.php
6+
/.php-cs-fixer.tests.cache
77
/composer.lock
88
/vendor

.php_cs.common.php renamed to .php-cs-fixer.common.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
],
3131
'return_type_declaration' => true,
3232
'short_scalar_cast' => true,
33-
'single_blank_line_before_namespace' => true,
3433
'single_trait_insert_per_statement' => true,
3534
'ternary_operator_spaces' => true,
3635
'visibility_required' => [
@@ -56,7 +55,7 @@
5655
'no_unused_imports' => true,
5756
'single_quote' => true,
5857
'space_after_semicolon' => true,
59-
'trailing_comma_in_multiline_array' => true,
58+
'trailing_comma_in_multiline' => true,
6059
'trim_array_spaces' => true,
6160
'unary_operator_spaces' => true,
6261
'whitespace_after_comma_in_array' => true,

.php_cs.dist renamed to .php-cs-fixer.dist.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
->in(__DIR__)
66
->exclude('tests');
77

8-
$config = require __DIR__ . '/.php_cs.common.php';
8+
$config = require __DIR__ . '/.php-cs-fixer.common.php';
99

10-
return PhpCsFixer\Config::create()
10+
return (new PhpCsFixer\Config())
1111
->setFinder($finder)
1212
->setRules($config)
1313
->setRiskyAllowed(true)
14-
->setCacheFile(__DIR__ . '/.php_cs.cache');
14+
->setCacheFile(__DIR__ . '/.php-cs-fixer.cache');

.php_cs.tests.php renamed to .php-cs-fixer.tests.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
->in(__DIR__ . '/tests')
66
->exclude('__snapshots__');
77

8-
$config = require __DIR__ . '/.php_cs.common.php';
8+
$config = require __DIR__ . '/.php-cs-fixer.common.php';
99

1010
// Additional rules for tests
1111
$config = array_merge(
@@ -15,8 +15,8 @@
1515
]
1616
);
1717

18-
return PhpCsFixer\Config::create()
18+
return (new PhpCsFixer\Config())
1919
->setFinder($finder)
2020
->setRules($config)
2121
->setRiskyAllowed(true)
22-
->setCacheFile(__DIR__ . '/.php_cs.tests.cache');
22+
->setCacheFile(__DIR__ . '/.php-cs-fixer.tests.cache');

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ All notable changes to this project will be documented in this file.
55
[Next release](https://github.com/barryvdh/laravel-ide-helper/compare/v2.14.0...master)
66
--------------
77

8+
### Changed
9+
- Removed support for Laravel 8 and therefore for PHP < 8.0 [#1504 / mfn](https://github.com/barryvdh/laravel-ide-helper/pull/1504)
10+
811
2024-02-05, 2.14.0
912
------------------
1013

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
This package generates helper files that enable your IDE to provide accurate autocompletion.
1212
Generation is done based on the files in your project, so they are always up-to-date.
1313

14-
It supports Laravel 8+ and PHP 7.3+
14+
It supports Laravel 9+ and PHP 8.0+
1515

1616
- [Installation](#installation)
1717
- [Usage](#usage)

composer.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,24 @@
2020
}
2121
],
2222
"require": {
23-
"php": "^7.3 || ^8.0",
23+
"php": "^8.0",
2424
"ext-json": "*",
2525
"barryvdh/reflection-docblock": "^2.0.6",
2626
"composer/class-map-generator": "^1.0",
2727
"doctrine/dbal": "^2.6 || ^3",
28-
"illuminate/console": "^8 || ^9 || ^10",
29-
"illuminate/filesystem": "^8 || ^9 || ^10",
30-
"illuminate/support": "^8 || ^9 || ^10",
28+
"illuminate/console": "^9 || ^10",
29+
"illuminate/filesystem": "^9 || ^10",
30+
"illuminate/support": "^9 || ^10",
3131
"nikic/php-parser": "^4.18 || ^5",
3232
"phpdocumentor/type-resolver": "^1.1.0"
3333
},
3434
"require-dev": {
3535
"ext-pdo_sqlite": "*",
36-
"friendsofphp/php-cs-fixer": "^2",
37-
"illuminate/config": "^8 || ^9 || ^10",
38-
"illuminate/view": "^8 || ^9 || ^10",
36+
"friendsofphp/php-cs-fixer": "^3",
37+
"illuminate/config": "^9 || ^10",
38+
"illuminate/view": "^9 || ^10",
3939
"mockery/mockery": "^1.4",
40-
"orchestra/testbench": "^6 || ^7 || ^8",
40+
"orchestra/testbench": "^7 || ^8",
4141
"phpunit/phpunit": "^8.5 || ^9",
4242
"spatie/phpunit-snapshot-assertions": "^3 || ^4",
4343
"vimeo/psalm": "^5.4"
@@ -81,7 +81,7 @@
8181
],
8282
"fix-style": [
8383
"php-cs-fixer fix",
84-
"php-cs-fixer fix --config=.php_cs.tests.php"
84+
"php-cs-fixer fix --config=.php-cs-fixer.tests.php"
8585
],
8686
"psalm-set-baseline": "psalm --set-baseline=psalm-baseline.xml",
8787
"test": "phpunit",

src/Alias.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ protected function addMagicMethods()
329329
continue;
330330
}
331331
$method = new \ReflectionMethod($className, $name);
332-
$class = new \ReflectionClass($className);
332+
$class = new ReflectionClass($className);
333333

334334
if (!in_array($magic, $this->usedMethods)) {
335335
if ($class !== $this->root) {
@@ -348,7 +348,7 @@ protected function addMagicMethods()
348348
protected function detectMethods()
349349
{
350350
foreach ($this->classes as $class) {
351-
$reflection = new \ReflectionClass($class);
351+
$reflection = new ReflectionClass($class);
352352

353353
$methods = $reflection->getMethods(\ReflectionMethod::IS_PUBLIC);
354354
if ($methods) {

0 commit comments

Comments
 (0)