diff --git a/.github/ISSUE_TEMPLATE/1_Bug_report.md b/.github/ISSUE_TEMPLATE/1_Bug_report.md index c130a0c..7ab2700 100644 --- a/.github/ISSUE_TEMPLATE/1_Bug_report.md +++ b/.github/ISSUE_TEMPLATE/1_Bug_report.md @@ -8,7 +8,6 @@ labels: bug ### Versions: - ide-helper Version: #.#.# - Laravel Version: #.#.# -- Lumen Version: #.#.# - PHP Version: #.#.# ### Description: diff --git a/.github/ISSUE_TEMPLATE/3_Support_question.md b/.github/ISSUE_TEMPLATE/3_Support_question.md index 20f4a76..3b4282d 100644 --- a/.github/ISSUE_TEMPLATE/3_Support_question.md +++ b/.github/ISSUE_TEMPLATE/3_Support_question.md @@ -8,7 +8,6 @@ labels: question ### Versions: - ide-helper Version: #.#.# - Laravel Version: #.#.# -- Lumen Version: #.#.# - PHP Version: #.#.# ### Question: diff --git a/.github/workflows/run-integration-tests.yml b/.github/workflows/run-integration-tests.yml index fca1bf4..cd0ebb9 100644 --- a/.github/workflows/run-integration-tests.yml +++ b/.github/workflows/run-integration-tests.yml @@ -11,70 +11,6 @@ on: - cron: '0 0 * * *' jobs: - php-lumen-integration-tests: - runs-on: ubuntu-20.04 - timeout-minutes: 15 - env: - COMPOSER_NO_INTERACTION: 1 - strategy: - matrix: - php: [8.2, 8.1, 8.0, 7.4, 7.3] - lumen: [8.*] - name: P${{ matrix.php }} - Lumen${{ matrix.lumen }} - steps: - - name: Checkout code - uses: actions/checkout@v2 - with: - path: src - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - coverage: none - - - name: Install dependencies - run: | - composer create-project --prefer-dist laravel/lumen:${{ matrix.lumen }} --no-progress sample - cd sample - composer config minimum-stability dev - composer require "league/flysystem:^1" --no-update --no-progress - composer update --prefer-stable --prefer-dist --no-progress - - - name: Add package from source - run: | - cd sample - sed -e 's|"type": "project",|&\n"repositories": [ { "type": "path", "url": "../src" } ],|' -i composer.json - composer require --dev "barryvdh/laravel-ide-helper:*" - - - name: Insert service provider - run: sed -e 's|// \$app->register(App\\\Providers\\\EventServiceProvider::class);|&\n$app->register(\\Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider::class);|' -i sample/bootstrap/app.php - - - name: Execute generate run - run: | - cd sample - php artisan ide-helper:generate - - - name: Execute meta run - run: | - cd sample - php artisan ide-helper:meta -v - - - name: Check file existence - run: | - ls sample/_ide_helper.php - ls sample/.phpstorm.meta.php - - - name: Check logs - run: | - if [ `ls -1q "sample/storage/logs/" | wc -l` -gt 0 ]; then - for logfile in sample/storage/logs/*; do - echo "-- $logfile --" - cat $logfile - done - exit 1 - fi - php-laravel-integration-tests: runs-on: ubuntu-20.04 timeout-minutes: 15 diff --git a/CHANGELOG.md b/CHANGELOG.md index a6a715a..70ed218 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ All notable changes to this project will be documented in this file. [Next release](https://github.com/barryvdh/laravel-ide-helper/compare/v2.13.0...master) -------------- +### Changed +- Official support for Lumen has been dropped [#1425 / mfn](https://github.com/barryvdh/laravel-ide-helper/pull/1425) +- Refactor resolving of null information for custom casted attribute types [#1330 / wimski](https://github.com/barryvdh/laravel-ide-helper/pull/1330) ### Fixed - Add support for attribute accessors marked as protected. [#1339 / pindab0ter](https://github.com/barryvdh/laravel-ide-helper/pull/1339) @@ -12,9 +15,6 @@ All notable changes to this project will be documented in this file. ### Added - Add support for `immutable_date:*` and `immutable_datetime:*` casts. [#1380 / thekonz](https://github.com/barryvdh/laravel-ide-helper/pull/1380) -### Changed -- Refactor resolving of null information for custom casted attribute types [#1330 / wimski](https://github.com/barryvdh/laravel-ide-helper/pull/1330) - 2023-02-04, 2.13.0 ------------------ diff --git a/README.md b/README.md index 4015ce2..92f04fa 100644 --- a/README.md +++ b/README.md @@ -23,10 +23,6 @@ It supports Laravel 8+ and PHP 7.3+ - [Automatic PHPDocs generation for Laravel Fluent methods](#automatic-phpdocs-generation-for-laravel-fluent-methods) - [Auto-completion for factory builders](#auto-completion-for-factory-builders) - [PhpStorm Meta for Container instances](#phpstorm-meta-for-container-instances) -- [Usage with Lumen](#usage-with-lumen) - - [Enabling Facades](#enabling-facades) - - [Adding the Service Provider](#adding-the-service-provider) - - [Adding Additional Facades](#adding-additional-facades) - [License](#license) ## Installation @@ -404,66 +400,6 @@ app(App\SomeClass::class); 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. -## Usage with Lumen - -This package is focused on Laravel development, but it can also be used in Lumen with some workarounds. -Because Lumen works a little different, as it is like a bare bone version of Laravel and the main configuration -parameters are instead located in `bootstrap/app.php`, some alterations must be made. - -### Enabling Facades - -While Laravel IDE Helper can generate automatically default Facades for code hinting, -Lumen doesn't come with Facades activated. If you plan in using them, you must enable -them under the `Create The Application` section, uncommenting this line: - -```php -// $app->withFacades(); -``` - -From there, you should be able to use the `create_alias()` function to add additional Facades into your application. - -### Adding the Service Provider - -You can install Laravel IDE Helper in `app/Providers/AppServiceProvider.php`, -and uncommenting this line that registers the App Service Providers, so it can properly load. - -```php -// $app->register(App\Providers\AppServiceProvider::class); -``` - -If you are not using that line, that is usually handy to manage gracefully multiple Laravel/Lumen installations, -you will have to add this line of code under the `Register Service Providers` section of your `bootstrap/app.php`. - -```php -if ($app->environment() !== 'production') { - $app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class); -} -``` - -After that, Laravel IDE Helper should work correctly. During the generation process, -the script may throw exceptions saying that some Class(s) doesn't exist or there are some undefined indexes. -This is normal, as Lumen has some default packages stripped away, like Cookies, Storage and Session. -If you plan to add these packages, you will have to add them manually and create additional Facades if needed. - -### Adding Additional Facades - -Currently, Lumen IDE Helper doesn't take into account additional Facades created under `bootstrap/app.php` using `create_alias()`, -so you need to create a `config/app.php` file and add your custom aliases under an `aliases` array again, like so: - -```php -return [ - 'aliases' => [ - 'CustomAliasOne' => Example\Support\Facades\CustomAliasOne::class, - 'CustomAliasTwo' => Example\Support\Facades\CustomAliasTwo::class, - //... - ] -]; -``` - -After you run `php artisan ide-helper:generate`, it's recommended (but not mandatory) to rename `config/app.php` to something else, -until you have to re-generate the docs or after passing to production environment. -Lumen 5.1+ will read this file for configuration parameters if it is present, and may overlap some configurations if it is completely populated. - ## License The Laravel IDE Helper Generator is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)