Skip to content

Latest commit

 

History

History
237 lines (192 loc) · 8.59 KB

CHANGELOG.md

File metadata and controls

237 lines (192 loc) · 8.59 KB

Changelog

v0.7.0 - 2021-03-23

Upgrade from v0.6.* to v0.7

  1. We added 2 more columns to the examples table:
$table->string('data_name')->nullable();
$table->json('provided_data')->nullable();

to get these changes added automatically please run: php artisan enlighten:migrate:fresh or add the columns to the table directly through your database admin tool.

Changes

  1. Improved support for tests with data providers (simple or complex).
  2. Now Enlighten will show info about the data provider in the title of each example.
  3. Fixed issue when JSON responses returned a string instead of an array.
  4. Support for single line annotations with 1 annotation (for 2 annotations or more, please add them as separate lines)

v0.6.0 - 2021-02-05

To upgrade from v0.5. to v0.6*

  1. Publishing the migrations folder is not longer necessary, you can remove the directory /database/migrations/enlighten from your project.
  2. Refresh the database using the artisan command php artisan enlighten:migrate:fresh
  3. Delete any published views rm -r resources/views/vendor/enlighten and published assets rm -r public/vendor/enlighten
  4. Re-publish the assets with php artisan vendor:publish and select enlighten-build
  5. Run php artisan view:clear to delete any view cache.**
  6. Remove the printerClass="Styde\Enlighten\Tests\BasicResultPrinter" from your phpunit.xml file.

Added

  • New artisan command to generate the documentation: php artisan enlighten; enlighten no longer runs with php artisan test or /vendor/bin/phpunit
  • Parallel testing support php artisan enlighten --parallel --processes=4
  • Support for nunomaduro/collision
  • New option dashboard added to the config file, to enable or disable the /enlighten section
  • Improved report output for failed tests when running php artisan enlighten
  • Added the documentation link to the command output after running the tests with enlighten.

Fixed

  • Support documentation of file uploads
  • Removing redundant / at the beginning of assets urls (#48)
  • Redirect to /intro page when the runs table is empty
  • Removing Collection::chunkWhile method usage to solve compatibility issues with Laravel 7

Changed

  • Run enlighten migrations in isolation with php artisan enlighten:migrate command
  • The disabled option removed from the config file; now enlighten runs with a custom command (php artisan enlighten)

v.5.7 - 2020-12-12

Support for PHP 8.

v.5.0 - 2020-11-14

To upgrade from v0.4. to v0.5*

  1. Publish the migrations to your local environment with php artisan vendor:publish --tag=enlighten-migrations
  2. Refresh the database using the new artisan command php artisan enlighten:migrate:fresh
  3. Delete any published views rm -r resources/views/vendor/enlighten and published assets rm -r public/vendor/enlighten
  4. Re-publish the assets with php artisan vendor:publish and select enlighten-build
  5. Run php artisan view:clear to delete any view cache.**

Added

  • New annotation to sort groups (classes) and tests on the documentation.
/** @enlighten {"order": 1} **/
class UserTest
{
    /**
     * @test
     * @enlighten {"order": 1}
     **/
    public function it_can_create_users()
    {
        //
    }
}
  • New endpoints and features templates
// config/enlighten.php

return [
    'area_view' => 'features', // 'modules' or 'endpoints'
];
  • Support to use different templates on each area
return [
    'areas' => [
        [
            'slug' => 'api',
            'name' => 'API',
            'view' => 'endpoints',
        ],
        [
            'slug' => 'feature',
            'name' => 'Features',
            'view' => 'modules',
        ],
        [
            'slug' => 'unit',
            'name' => 'Unit',
            'view' => 'features',
        ],
    ],
];
  • Support for tests that follow redirection
  • Modules are now optional - if you use the features view.
  • New install command to set up enlighten on new projects 10x faster!
php artisan enlighten:install

Fixed

  • Static search on exported docs.
  • Improving performance while collecting data during tests.
  • Multiple improvements.

v.0.4 - 2020-11-05

To upgrade from v0.3. to v0.4*

  1. Publish the migrations to your local environment with php artisan vendor:publish --tag=enlighten-migrations
  2. Refresh the database using the new artisan command php artisan enlighten:migrate:fresh
  3. Delete any published views rm -r resources/views/vendor/enlighten and published assets rm -r public/vendor/enlighten
  4. Re-publish the assets with php artisan vendor:publish and select enlighten-build
  5. Run php artisan view:clear to delete any view cache.**

Added

  • 🎉 Export static documentation using php artisan enlighten:export

  • Multi language support

php artisan vendor:publish --tag=enligthen-translations
  • Support for multi-line title and description annotations
/** @test
 * @description This is a multi line
 * description for the current test method
 * that will be shown on the view.
 */
public function does_something()
{
    //
}
  • Allow users to hide sections in the view using the config file
// config/enlighten.php
return [
    // Add values to this array if you want to hide certain sections from your views.
    // For valid sections see \Styde\Enlighten\Section
    'hide' => [
        //
    ],
];
  • Allow Enlighten to work with tests with redirection follow. Fixes: #35

Changed

  • Changing snake case urls for slugs
  • Refactoring routes controllers and views
  • Fixed some performance issues
  • Rework code-snippets presentation for unit tests.

v0.3 - 2020-25-10

To upgrade from v0.2.8 to v0.3, please: 1. delete all the Enlighten tables, 2. Re-run the migrations in your local environment, 3. Delete any published views and 4. Run php artisan view:clear to delete the view cache.

Also make sure the response key in config/enlighten.php has the following structure:

    'response' => [
        'headers' => [
            'hide' => [],
            'overwrite' => [],
        ],
        'body' => [
            'hide' => [],
            'overwrite' => [],
        ]
    ],

New Features

  • Support to create code-snippet examples using the Enlighten::test() facade or the enlighten() helper in your test methods
  • Support to hide keys form JSON responses via config file
  • Layout redesign
  • Group database queries by request and show the request information associated with each query group.

Fixes & improvements

  • Support older GIT versions
  • Support for Laravel ^7.28
  • Support for PHP ^7.3
  • Generate default titles from tests methods with camel case format
  • Allow developers to implement their own way to get the "Area" from any test class name
  • Allow developers to get info from their own version control system

v0.2.8 - 2020-10-16

To upgrade from v0.2.5 to v0.2.6, please delete all the Enlighten tables and re-run the migrations in your local environment

  • The example group URLs now show the slug of the test class names instead of the ID, for the better readability and to preserve the same URLs after re-running the tests for the same run configuration.
  • Add .gitattributes to prevent tests and other unnecessary files from being published.
  • Fix for issues: #12 #11 and #8
  • Other minor fixes and improvements

v0.2 - 2020-10-14

To upgrade from v0.1 to v0.2, please delete all the Enlighten tables and re-run the migrations in your local environment

New features

  • Support tests with multiple HTTP requests
  • Show exceptions and stack trace on failed / error tests
  • Show validation errors in Validation Exceptions
  • Show database queries in each test example
  • Show an explicit message that Enlighten requires Laravel TestCase in order to work
  • Improve database name convention over configuration (learn more in README.md)
  • Add "See in Enlighten" link when a test fails (doesn't work with Collision yet)
  • Add search bar
  • Improved generated titles for test methods that start with test_
  • Simplify logic in views to allow users to easily customise views

Fixes && Improvements

  • Reset test run to avoid obsolete or repeated information
  • Save HTTP request and response as two separate methods, so if the request fails at least we get info from the request