Skip to content

Commit

Permalink
PSR-4 autoloading for exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
tzatrepalek-inwk committed Jan 21, 2019
1 parent 6f79ad1 commit 0111e46
Show file tree
Hide file tree
Showing 9 changed files with 101 additions and 60 deletions.
2 changes: 1 addition & 1 deletion composer.bridgeless.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
},
"autoload": {
"psr-4": { "Nextras\\Migrations\\": "src/" },
"classmap": ["src/exceptions.php", "src/deprecated"]
"classmap": ["src/deprecated"]
},
"autoload-dev": {
"classmap": ["tests/inc"]
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
},
"autoload": {
"psr-4": { "Nextras\\Migrations\\": "src/" },
"classmap": ["src/exceptions.php", "src/deprecated"]
"classmap": ["src/deprecated"]
},
"autoload-dev": {
"classmap": ["tests/inc"]
Expand Down
14 changes: 14 additions & 0 deletions src/Exception.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php

/**
* This file is part of the Nextras community extensions of Nette Framework
*
* @license New BSD License
* @link https://github.com/nextras/migrations
*/

namespace Nextras\Migrations;

interface Exception
{
}
17 changes: 17 additions & 0 deletions src/ExecutionException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

/**
* This file is part of the Nextras community extensions of Nette Framework
*
* @license New BSD License
* @link https://github.com/nextras/migrations
*/

namespace Nextras\Migrations;

/**
* Executing migration has failed.
*/
class ExecutionException extends RuntimeException
{
}
17 changes: 17 additions & 0 deletions src/IOException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

/**
* This file is part of the Nextras community extensions of Nette Framework
*
* @license New BSD License
* @link https://github.com/nextras/migrations
*/

namespace Nextras\Migrations;

/**
* Permission denied, file not found...
*/
class IOException extends RuntimeException
{
}
17 changes: 17 additions & 0 deletions src/LockException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

/**
* This file is part of the Nextras community extensions of Nette Framework
*
* @license New BSD License
* @link https://github.com/nextras/migrations
*/

namespace Nextras\Migrations;

/**
* Lock cannot be released or acquired.
*/
class LockException extends RuntimeException
{
}
17 changes: 17 additions & 0 deletions src/LogicException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

/**
* This file is part of the Nextras community extensions of Nette Framework
*
* @license New BSD License
* @link https://github.com/nextras/migrations
*/

namespace Nextras\Migrations;

/**
* Error in usage or implementation.
*/
class LogicException extends \LogicException implements Exception
{
}
17 changes: 17 additions & 0 deletions src/RuntimeException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

/**
* This file is part of the Nextras community extensions of Nette Framework
*
* @license New BSD License
* @link https://github.com/nextras/migrations
*/

namespace Nextras\Migrations;

/**
* Error during runtime.
*/
abstract class RuntimeException extends \RuntimeException implements Exception
{
}
58 changes: 0 additions & 58 deletions src/exceptions.php

This file was deleted.

0 comments on commit 0111e46

Please sign in to comment.