- 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.
- Improved support for tests with data providers (simple or complex).
- Now Enlighten will show info about the data provider in the title of each example.
- Fixed issue when JSON responses returned a string instead of an array.
- Support for single line annotations with 1 annotation (for 2 annotations or more, please add them as separate lines)
To upgrade from v0.5. to v0.6*
- Publishing the migrations folder is not longer necessary, you can remove the directory
/database/migrations/enlighten
from your project. - Refresh the database using the artisan command
php artisan enlighten:migrate:fresh
- Delete any published views
rm -r resources/views/vendor/enlighten
and published assetsrm -r public/vendor/enlighten
- Re-publish the assets with
php artisan vendor:publish
and selectenlighten-build
- Run
php artisan view:clear
to delete any view cache.** - Remove the
printerClass="Styde\Enlighten\Tests\BasicResultPrinter"
from yourphpunit.xml
file.
- New artisan command to generate the documentation:
php artisan enlighten
; enlighten no longer runs withphp 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.
- 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
- 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
)
Support for PHP 8.
To upgrade from v0.4. to v0.5*
- Publish the migrations to your local environment with
php artisan vendor:publish --tag=enlighten-migrations
- Refresh the database using the new artisan command
php artisan enlighten:migrate:fresh
- Delete any published views
rm -r resources/views/vendor/enlighten
and published assetsrm -r public/vendor/enlighten
- Re-publish the assets with
php artisan vendor:publish
and selectenlighten-build
- Run
php artisan view:clear
to delete any view cache.**
- 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
andfeatures
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
- Static search on exported docs.
- Improving performance while collecting data during tests.
- Multiple improvements.
To upgrade from v0.3. to v0.4*
- Publish the migrations to your local environment with
php artisan vendor:publish --tag=enlighten-migrations
- Refresh the database using the new artisan command
php artisan enlighten:migrate:fresh
- Delete any published views
rm -r resources/views/vendor/enlighten
and published assetsrm -r public/vendor/enlighten
- Re-publish the assets with
php artisan vendor:publish
and selectenlighten-build
- Run
php artisan view:clear
to delete any view cache.**
-
🎉 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
- Changing snake case urls for slugs
- Refactoring routes controllers and views
- Fixed some performance issues
- Rework code-snippets presentation for unit tests.
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' => [],
]
],
- Support to create code-snippet examples using the
Enlighten::test()
facade or theenlighten()
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.
- 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
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
To upgrade from v0.1 to v0.2, please delete all the Enlighten tables and re-run the migrations in your local environment
- 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
- 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