Skip to content

Commit 1af813b

Browse files
committed
Remove offical support for Lumen
I'm proposing to drop official suport for Lumen for the following reasons: - Lumen itself is dead, per [1] > **Note:** In the years since releasing Lumen, PHP has made a variety of wonderful performance improvements. For this reason, along with the availability of [Laravel Octane](https://laravel.com/docs/octane), we no longer recommend that you begin new projects with Lumen. Instead, we recommend always beginning new projects with [Laravel](https://laravel.com). Laravel Octact is just Laravel and no one using ide-helper with it needs anything special. - For now, the change is mostly on the logistics side (readme, run tests, issues). In the past we had some special code but over time this was already removed. For now people still can use it and nothing will break out of the blue, but eventually it might There are a only a few Lumen related issues open currently which would be closed by this (barryvdh#1105, barryvdh#1069, barryvdh#438). [1] laravel/lumen@69b2657
1 parent 97fd0e0 commit 1af813b

File tree

5 files changed

+3
-130
lines changed

5 files changed

+3
-130
lines changed

.github/ISSUE_TEMPLATE/1_Bug_report.md

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ labels: bug
88
### Versions:
99
- ide-helper Version: #.#.#
1010
- Laravel Version: #.#.# <!-- remove if not applicable -->
11-
- Lumen Version: #.#.# <!-- remove if not applicable -->
1211
- PHP Version: #.#.#
1312

1413
### Description:

.github/ISSUE_TEMPLATE/3_Support_question.md

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ labels: question
88
### Versions:
99
- ide-helper Version: #.#.#
1010
- Laravel Version: #.#.# <!-- remove if not applicable -->
11-
- Lumen Version: #.#.# <!-- remove if not applicable -->
1211
- PHP Version: #.#.#
1312

1413
### Question:

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

-64
Original file line numberDiff line numberDiff line change
@@ -11,70 +11,6 @@ on:
1111
- cron: '0 0 * * *'
1212

1313
jobs:
14-
php-lumen-integration-tests:
15-
runs-on: ubuntu-20.04
16-
timeout-minutes: 15
17-
env:
18-
COMPOSER_NO_INTERACTION: 1
19-
strategy:
20-
matrix:
21-
php: [8.2, 8.1, 8.0, 7.4, 7.3]
22-
lumen: [8.*]
23-
name: P${{ matrix.php }} - Lumen${{ matrix.lumen }}
24-
steps:
25-
- name: Checkout code
26-
uses: actions/checkout@v2
27-
with:
28-
path: src
29-
30-
- name: Setup PHP
31-
uses: shivammathur/setup-php@v2
32-
with:
33-
php-version: ${{ matrix.php }}
34-
coverage: none
35-
36-
- name: Install dependencies
37-
run: |
38-
composer create-project --prefer-dist laravel/lumen:${{ matrix.lumen }} --no-progress sample
39-
cd sample
40-
composer config minimum-stability dev
41-
composer require "league/flysystem:^1" --no-update --no-progress
42-
composer update --prefer-stable --prefer-dist --no-progress
43-
44-
- name: Add package from source
45-
run: |
46-
cd sample
47-
sed -e 's|"type": "project",|&\n"repositories": [ { "type": "path", "url": "../src" } ],|' -i composer.json
48-
composer require --dev "barryvdh/laravel-ide-helper:*"
49-
50-
- name: Insert service provider
51-
run: sed -e 's|// \$app->register(App\\\Providers\\\EventServiceProvider::class);|&\n$app->register(\\Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class);|' -i sample/bootstrap/app.php
52-
53-
- name: Execute generate run
54-
run: |
55-
cd sample
56-
php artisan ide-helper:generate
57-
58-
- name: Execute meta run
59-
run: |
60-
cd sample
61-
php artisan ide-helper:meta -v
62-
63-
- name: Check file existence
64-
run: |
65-
ls sample/_ide_helper.php
66-
ls sample/.phpstorm.meta.php
67-
68-
- name: Check logs
69-
run: |
70-
if [ `ls -1q "sample/storage/logs/" | wc -l` -gt 0 ]; then
71-
for logfile in sample/storage/logs/*; do
72-
echo "-- $logfile --"
73-
cat $logfile
74-
done
75-
exit 1
76-
fi
77-
7814
php-laravel-integration-tests:
7915
runs-on: ubuntu-20.04
8016
timeout-minutes: 15

CHANGELOG.md

+3
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.13.0...master)
66
--------------
77

8+
### Changed
9+
- Official support for Lumen has been dropped [#1425 / mfn](https://github.com/barryvdh/laravel-ide-helper/pull/1425)
10+
811
2023-02-04, 2.13.0
912
------------------
1013

README.md

-64
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@ It supports Laravel 8+ and PHP 7.3+
2323
- [Automatic PHPDocs generation for Laravel Fluent methods](#automatic-phpdocs-generation-for-laravel-fluent-methods)
2424
- [Auto-completion for factory builders](#auto-completion-for-factory-builders)
2525
- [PhpStorm Meta for Container instances](#phpstorm-meta-for-container-instances)
26-
- [Usage with Lumen](#usage-with-lumen)
27-
- [Enabling Facades](#enabling-facades)
28-
- [Adding the Service Provider](#adding-the-service-provider)
29-
- [Adding Additional Facades](#adding-additional-facades)
3026
- [License](#license)
3127

3228
## Installation
@@ -404,66 +400,6 @@ app(App\SomeClass::class);
404400
405401
You can change the generated filename via the config `meta_filename`. This can be useful for cases where you want to take advantage of PhpStorm's support of the _directory_ `.phpstorm.meta.php/`: all files placed there are parsed, should you want to provide additional files to PhpStorm.
406402

407-
## Usage with Lumen
408-
409-
This package is focused on Laravel development, but it can also be used in Lumen with some workarounds.
410-
Because Lumen works a little different, as it is like a bare bone version of Laravel and the main configuration
411-
parameters are instead located in `bootstrap/app.php`, some alterations must be made.
412-
413-
### Enabling Facades
414-
415-
While Laravel IDE Helper can generate automatically default Facades for code hinting,
416-
Lumen doesn't come with Facades activated. If you plan in using them, you must enable
417-
them under the `Create The Application` section, uncommenting this line:
418-
419-
```php
420-
// $app->withFacades();
421-
```
422-
423-
From there, you should be able to use the `create_alias()` function to add additional Facades into your application.
424-
425-
### Adding the Service Provider
426-
427-
You can install Laravel IDE Helper in `app/Providers/AppServiceProvider.php`,
428-
and uncommenting this line that registers the App Service Providers, so it can properly load.
429-
430-
```php
431-
// $app->register(App\Providers\AppServiceProvider::class);
432-
```
433-
434-
If you are not using that line, that is usually handy to manage gracefully multiple Laravel/Lumen installations,
435-
you will have to add this line of code under the `Register Service Providers` section of your `bootstrap/app.php`.
436-
437-
```php
438-
if ($app->environment() !== 'production') {
439-
$app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class);
440-
}
441-
```
442-
443-
After that, Laravel IDE Helper should work correctly. During the generation process,
444-
the script may throw exceptions saying that some Class(s) doesn't exist or there are some undefined indexes.
445-
This is normal, as Lumen has some default packages stripped away, like Cookies, Storage and Session.
446-
If you plan to add these packages, you will have to add them manually and create additional Facades if needed.
447-
448-
### Adding Additional Facades
449-
450-
Currently, Lumen IDE Helper doesn't take into account additional Facades created under `bootstrap/app.php` using `create_alias()`,
451-
so you need to create a `config/app.php` file and add your custom aliases under an `aliases` array again, like so:
452-
453-
```php
454-
return [
455-
'aliases' => [
456-
'CustomAliasOne' => Example\Support\Facades\CustomAliasOne::class,
457-
'CustomAliasTwo' => Example\Support\Facades\CustomAliasTwo::class,
458-
//...
459-
]
460-
];
461-
```
462-
463-
After you run `php artisan ide-helper:generate`, it's recommended (but not mandatory) to rename `config/app.php` to something else,
464-
until you have to re-generate the docs or after passing to production environment.
465-
Lumen 5.1+ will read this file for configuration parameters if it is present, and may overlap some configurations if it is completely populated.
466-
467403
## License
468404

469405
The Laravel IDE Helper Generator is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)

0 commit comments

Comments
 (0)