Skip to content

Commit 19b94c8

Browse files
committed
Updates for Laravel 5.5
1 parent e59e0d0 commit 19b94c8

File tree

4 files changed

+19
-14
lines changed

4 files changed

+19
-14
lines changed

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Laravel SchemaSpy
22

3-
[Laravel SchemaSpy](https://github.com/Stolz/laravel-schema-spy) is a [Laravel artisan command](http://laravel.com/docs/master/commands) that acts as an interface for the program [SchemaSpy](http://schemaspy.sourceforge.net). With SchemaSpy you can analyze the schema metadata of a database and generate browser readable files with useful information such:
3+
[Laravel SchemaSpy](https://github.com/Stolz/laravel-schema-spy) is a [Laravel artisan command](https://laravel.com/docs/master/artisan) that acts as an interface for the program [SchemaSpy](http://schemaspy.sourceforge.net). With SchemaSpy you can analyze the schema metadata of a database and generate browser readable files with useful information such:
44

55
- Visual ER diagram.
66
- Proper table insertion/deletion order for database migrations.
@@ -9,25 +9,26 @@ SchemaSpy is much more than that so please check the [official site](http://sche
99

1010
## Requirements
1111

12-
SchemaSpy is a java-based command line tool so besides Laravel and [SchemaSpy](http://schemaspy.sourceforge.net) program itself you will need:
12+
Before installing the package make sure the following requirements are installed on your system:
1313

14-
- A working [JAVA >=5 nstallation](http://www.java.com/getjava/).
14+
- [JAVA >=5](http://www.java.com/getjava/).
15+
- [SchemaSpy](http://schemaspy.sourceforge.net) JAR file:
1516
- The proper JAVA connector for your database system (i.e: [MySQL](http://dev.mysql.com/downloads/connector/j/)).
1617
- The `dot` command from [Graphviz](http://www.graphviz.org/) should be accessible via the **PATH** environment variable.
1718

18-
Graphvis is not required to view the output, only the `dot` command that is used to generated the output.
19+
Graphviz itself is not required, only its `dot` command is used to generated the output.
1920

2021
## Installation
2122

2223
Install via [Composer](https://getcomposer.org/)
2324

2425
composer require stolz/laravel-schema-spy --dev
2526

26-
Once the package is installed you need to register the service provider with the application. Open up `config/app.php` and find the `providers` key.
27+
If you are using an old version of Laravel or if you have disabled its package discovery feature, then you have to manually edit `config/app.php` file and register the service provider under `providers` key
2728

2829
'providers' => array(
2930
...
30-
'Stolz\SchemaSpy\ServiceProvider',
31+
Stolz\SchemaSpy\ServiceProvider::class,
3132
...
3233

3334
## Usage

composer.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@
2626
"optimize-autoloader": true,
2727
"preferred-install": "dist"
2828
},
29+
"extra": {
30+
"laravel": {
31+
"providers": [
32+
"Stolz\\SchemaSpy\\ServiceProvider"
33+
]
34+
}
35+
},
2936
"minimum-stability": "dev",
3037
"license": "MIT"
3138
}

src/Command.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ protected function setParameters()
7272
*
7373
* @return mixed
7474
*/
75-
public function fire()
75+
public function handle()
7676
{
7777
// Set schemaSpy parameters
7878
$this->setParameters();

src/config.php

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,25 @@
77
| Directory where generated files will be written
88
|--------------------------------------------------------------------------
99
|
10-
| NOTE: For security reasons, setting this option to any path within your
10+
| SECURITY: For obvious reasons, setting this option to any path within your
1111
| public_path() directory will be a really bad idea.
1212
|
1313
| Default: app_path('database/schema')
1414
|
1515
*/
16-
1716
'output' => base_path('database/schema'),
1817

1918
/*
2019
|--------------------------------------------------------------------------
2120
| Base command to run schemaSpy.jar on your system
2221
|--------------------------------------------------------------------------
2322
|
24-
| No parameters here, instead use the 'parameters' array below!
23+
| Do not provide SchemaSpy parameters here, instead use the 'parameters' array below!
2524
|
2625
| Default: java -jar schemaSpy.jar
2726
|
2827
*/
29-
30-
'command' => 'java -jar schemaSpy.jar',
28+
'command' => 'java -jar /path/to/schemaSpy_5.0.0.jar',
3129

3230
/*
3331
|--------------------------------------------------------------------------
@@ -40,10 +38,9 @@
4038
| Full list of possible parameters: http://schemaspy.sourceforge.net/
4139
|
4240
*/
43-
4441
'parameters' => [
4542
'-t' => 'mysql',
46-
'-dp' => '/path/to/mysql-connector-java-5.1.30-bin.jar', // download from http://dev.mysql.com/downloads/connector/j/
43+
'-dp' => '/path/to/mysql-connector-java-5.1.44-bin.jar', // download from http://dev.mysql.com/downloads/connector/j/
4744
'-hq' => null,
4845
],
4946
);

0 commit comments

Comments
 (0)