Skip to content

Commit

Permalink
Merge pull request #135 from ahmedashraf093/feature/change-namespace
Browse files Browse the repository at this point in the history
Changing the namespace to RonasIT/AutoDoc solving #62
  • Loading branch information
DenTray authored Oct 10, 2024
2 parents 3f85697 + d5df708 commit 719a451
Show file tree
Hide file tree
Showing 62 changed files with 149 additions and 149 deletions.
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,22 @@
},
"autoload": {
"psr-4": {
"RonasIT\\Support\\AutoDoc\\": "src/"
"RonasIT\\AutoDoc\\": "src/"
},
"exclude-from-classmap": [
"src/Tests/"
]
},
"autoload-dev": {
"psr-4": {
"RonasIT\\Support\\Tests\\": "tests/",
"RonasIT\\Support\\Tests\\Support\\": "tests/support/"
"RonasIT\\AutoDoc\\Tests\\": "tests/",
"RonasIT\\AutoDoc\\Tests\\Support\\": "tests/support/"
}
},
"extra": {
"laravel": {
"providers": [
"RonasIT\\Support\\AutoDoc\\AutoDocServiceProvider"
"RonasIT\\AutoDoc\\AutoDocServiceProvider"
]
}
}
Expand Down
8 changes: 4 additions & 4 deletions config/auto-doc.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

use RonasIT\Support\AutoDoc\Drivers\LocalDriver;
use RonasIT\Support\AutoDoc\Drivers\RemoteDriver;
use RonasIT\Support\AutoDoc\Drivers\StorageDriver;
use RonasIT\AutoDoc\Drivers\LocalDriver;
use RonasIT\AutoDoc\Drivers\RemoteDriver;
use RonasIT\AutoDoc\Drivers\StorageDriver;

return [

Expand Down Expand Up @@ -110,7 +110,7 @@
|
| The name of driver, which will collect and save documentation
| Feel free to use your own driver class which should be inherited from
| `RonasIT\Support\AutoDoc\Interfaces\SwaggerDriverInterface` interface,
| `RonasIT\AutoDoc\Interfaces\SwaggerDriverInterface` interface,
| or one of our drivers from the `drivers` config:
*/
'driver' => env('SWAGGER_DRIVER', 'local'),
Expand Down
8 changes: 4 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,20 @@ passing PHPUnit tests.
> ```php
> 'providers' => [
> // ...
> RonasIT\Support\AutoDoc\AutoDocServiceProvider::class,
> RonasIT\AutoDoc\AutoDocServiceProvider::class,
> ],
> ```
1. Run `php artisan vendor:publish`
2. Add `\RonasIT\Support\AutoDoc\Http\Middleware\AutoDocMiddleware::class` middleware to the global HTTP middleware stack in `Http/Kernel.php`.
3. Add `\RonasIT\Support\AutoDoc\Tests\AutoDocTestCaseTrait` trait to `tests/TestCase.php`
2. Add `\RonasIT\AutoDoc\Http\Middleware\AutoDocMiddleware::class` middleware to the global HTTP middleware stack in `Http/Kernel.php`.
3. Add `\RonasIT\AutoDoc\Tests\AutoDocTestCaseTrait` trait to `tests/TestCase.php`
4. Configure documentation saving using one of the next ways:
- Add `SwaggerExtension` to the `<extensions>` block of your `phpunit.xml`.
**Please note that this way will be removed after updating**
**PHPUnit up to 10 version (https://github.com/sebastianbergmann/phpunit/issues/4676)**
```xml
<extensions>
<extension class="RonasIT\Support\AutoDoc\Tests\PhpUnitExtensions\SwaggerExtension"/>
<extension class="RonasIT\AutoDoc\Tests\PhpUnitExtensions\SwaggerExtension"/>
</extensions>
<testsuites>
<testsuite name="Feature">
Expand Down
4 changes: 2 additions & 2 deletions src/AutoDocServiceProvider.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

namespace RonasIT\Support\AutoDoc;
namespace RonasIT\AutoDoc;

use Illuminate\Support\ServiceProvider;
use RonasIT\Support\AutoDoc\Commands\PushDocumentationCommand;
use RonasIT\AutoDoc\Commands\PushDocumentationCommand;

class AutoDocServiceProvider extends ServiceProvider
{
Expand Down
4 changes: 2 additions & 2 deletions src/Commands/PushDocumentationCommand.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

namespace RonasIT\Support\AutoDoc\Commands;
namespace RonasIT\AutoDoc\Commands;

use Illuminate\Console\Command;
use RonasIT\Support\AutoDoc\Services\SwaggerService;
use RonasIT\AutoDoc\Services\SwaggerService;

class PushDocumentationCommand extends Command
{
Expand Down
4 changes: 2 additions & 2 deletions src/Drivers/BaseDriver.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace RonasIT\Support\AutoDoc\Drivers;
namespace RonasIT\AutoDoc\Drivers;

use RonasIT\Support\AutoDoc\Interfaces\SwaggerDriverInterface;
use RonasIT\AutoDoc\Interfaces\SwaggerDriverInterface;

abstract class BaseDriver implements SwaggerDriverInterface
{
Expand Down
4 changes: 2 additions & 2 deletions src/Drivers/LocalDriver.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

namespace RonasIT\Support\AutoDoc\Drivers;
namespace RonasIT\AutoDoc\Drivers;

use Illuminate\Contracts\Filesystem\FileNotFoundException;
use RonasIT\Support\AutoDoc\Exceptions\MissedProductionFilePathException;
use RonasIT\AutoDoc\Exceptions\MissedProductionFilePathException;

class LocalDriver extends BaseDriver
{
Expand Down
4 changes: 2 additions & 2 deletions src/Drivers/RemoteDriver.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

namespace RonasIT\Support\AutoDoc\Drivers;
namespace RonasIT\AutoDoc\Drivers;

use Illuminate\Contracts\Filesystem\FileNotFoundException;
use RonasIT\Support\AutoDoc\Exceptions\MissedRemoteDocumentationUrlException;
use RonasIT\AutoDoc\Exceptions\MissedRemoteDocumentationUrlException;

class RemoteDriver extends BaseDriver
{
Expand Down
4 changes: 2 additions & 2 deletions src/Drivers/StorageDriver.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php

namespace RonasIT\Support\AutoDoc\Drivers;
namespace RonasIT\AutoDoc\Drivers;

use Illuminate\Contracts\Filesystem\FileNotFoundException;
use Illuminate\Contracts\Filesystem\Filesystem;
use Illuminate\Support\Facades\Storage;
use RonasIT\Support\AutoDoc\Exceptions\MissedProductionFilePathException;
use RonasIT\AutoDoc\Exceptions\MissedProductionFilePathException;

class StorageDriver extends BaseDriver
{
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/DocFileNotExistsException.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace RonasIT\Support\AutoDoc\Exceptions;
namespace RonasIT\AutoDoc\Exceptions;

use Exception;

Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/EmptyContactEmailException.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace RonasIT\Support\AutoDoc\Exceptions;
namespace RonasIT\AutoDoc\Exceptions;

use Exception;

Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/EmptyDocFileException.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace RonasIT\Support\AutoDoc\Exceptions;
namespace RonasIT\AutoDoc\Exceptions;

use Exception;

Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/InvalidDriverClassException.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace RonasIT\Support\AutoDoc\Exceptions;
namespace RonasIT\AutoDoc\Exceptions;

use Exception;

Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/LegacyConfigException.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace RonasIT\Support\AutoDoc\Exceptions;
namespace RonasIT\AutoDoc\Exceptions;

use Exception;

Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/MissedProductionFilePathException.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace RonasIT\Support\AutoDoc\Exceptions;
namespace RonasIT\AutoDoc\Exceptions;

use Exception;

Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/MissedRemoteDocumentationUrlException.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace RonasIT\Support\AutoDoc\Exceptions;
namespace RonasIT\AutoDoc\Exceptions;

use Exception;

Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/SpecValidation/DuplicateFieldException.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace RonasIT\Support\AutoDoc\Exceptions\SpecValidation;
namespace RonasIT\AutoDoc\Exceptions\SpecValidation;

class DuplicateFieldException extends InvalidSwaggerSpecException
{
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/SpecValidation/DuplicateParamException.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace RonasIT\Support\AutoDoc\Exceptions\SpecValidation;
namespace RonasIT\AutoDoc\Exceptions\SpecValidation;

class DuplicateParamException extends InvalidSwaggerSpecException
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace RonasIT\Support\AutoDoc\Exceptions\SpecValidation;
namespace RonasIT\AutoDoc\Exceptions\SpecValidation;

class DuplicatePathPlaceholderException extends InvalidSwaggerSpecException
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace RonasIT\Support\AutoDoc\Exceptions\SpecValidation;
namespace RonasIT\AutoDoc\Exceptions\SpecValidation;

class InvalidFieldValueException extends InvalidSwaggerSpecException
{
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/SpecValidation/InvalidPathException.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace RonasIT\Support\AutoDoc\Exceptions\SpecValidation;
namespace RonasIT\AutoDoc\Exceptions\SpecValidation;

class InvalidPathException extends InvalidSwaggerSpecException
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace RonasIT\Support\AutoDoc\Exceptions\SpecValidation;
namespace RonasIT\AutoDoc\Exceptions\SpecValidation;

class InvalidStatusCodeException extends InvalidSwaggerSpecException
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace RonasIT\Support\AutoDoc\Exceptions\SpecValidation;
namespace RonasIT\AutoDoc\Exceptions\SpecValidation;

use Exception;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace RonasIT\Support\AutoDoc\Exceptions\SpecValidation;
namespace RonasIT\AutoDoc\Exceptions\SpecValidation;

use RonasIT\Support\AutoDoc\Services\SwaggerService;
use RonasIT\AutoDoc\Services\SwaggerService;

class InvalidSwaggerVersionException extends InvalidSwaggerSpecException
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace RonasIT\Support\AutoDoc\Exceptions\SpecValidation;
namespace RonasIT\AutoDoc\Exceptions\SpecValidation;

class MissingExternalRefException extends InvalidSwaggerSpecException
{
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/SpecValidation/MissingFieldException.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace RonasIT\Support\AutoDoc\Exceptions\SpecValidation;
namespace RonasIT\AutoDoc\Exceptions\SpecValidation;

class MissingFieldException extends InvalidSwaggerSpecException
{
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/SpecValidation/MissingLocalRefException.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace RonasIT\Support\AutoDoc\Exceptions\SpecValidation;
namespace RonasIT\AutoDoc\Exceptions\SpecValidation;

class MissingLocalRefException extends InvalidSwaggerSpecException
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace RonasIT\Support\AutoDoc\Exceptions\SpecValidation;
namespace RonasIT\AutoDoc\Exceptions\SpecValidation;

class MissingPathParamException extends InvalidSwaggerSpecException
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace RonasIT\Support\AutoDoc\Exceptions\SpecValidation;
namespace RonasIT\AutoDoc\Exceptions\SpecValidation;

class MissingPathPlaceholderException extends InvalidSwaggerSpecException
{
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/SpecValidation/MissingRefFileException.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace RonasIT\Support\AutoDoc\Exceptions\SpecValidation;
namespace RonasIT\AutoDoc\Exceptions\SpecValidation;

class MissingRefFileException extends InvalidSwaggerSpecException
{
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/SwaggerDriverClassNotFoundException.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace RonasIT\Support\AutoDoc\Exceptions;
namespace RonasIT\AutoDoc\Exceptions;

use Exception;

Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/UnsupportedDocumentationViewerException.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace RonasIT\Support\AutoDoc\Exceptions;
namespace RonasIT\AutoDoc\Exceptions;

use Exception;

Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/WrongSecurityConfigException.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace RonasIT\Support\AutoDoc\Exceptions;
namespace RonasIT\AutoDoc\Exceptions;

use Exception;

Expand Down
4 changes: 2 additions & 2 deletions src/Http/Controllers/AutoDocController.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

namespace RonasIT\Support\AutoDoc\Http\Controllers;
namespace RonasIT\AutoDoc\Http\Controllers;

use Illuminate\Http\Request;
use Illuminate\Routing\Controller as BaseController;
use RonasIT\Support\AutoDoc\Services\SwaggerService;
use RonasIT\AutoDoc\Services\SwaggerService;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;

class AutoDocController extends BaseController
Expand Down
4 changes: 2 additions & 2 deletions src/Http/Middleware/AutoDocMiddleware.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

namespace RonasIT\Support\AutoDoc\Http\Middleware;
namespace RonasIT\AutoDoc\Http\Middleware;

use Closure;
use RonasIT\Support\AutoDoc\Services\SwaggerService;
use RonasIT\AutoDoc\Services\SwaggerService;

/**
* @property SwaggerService $service
Expand Down
2 changes: 1 addition & 1 deletion src/Http/routes.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

use RonasIT\Support\AutoDoc\Http\Controllers\AutoDocController;
use RonasIT\AutoDoc\Http\Controllers\AutoDocController;

Route::group(['prefix' => config('auto-doc.global_prefix')], function () {
Route::get('/auto-doc/documentation', ['uses' => AutoDocController::class . '@documentation']);
Expand Down
2 changes: 1 addition & 1 deletion src/Interfaces/SwaggerDriverInterface.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace RonasIT\Support\AutoDoc\Interfaces;
namespace RonasIT\AutoDoc\Interfaces;

interface SwaggerDriverInterface
{
Expand Down
Loading

0 comments on commit 719a451

Please sign in to comment.