Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "@deprecated" notices to code with "NOTE" texts #29

Merged
merged 1 commit into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ All notable changes to `Slytherin` will be documented in this file.
### Added
- `phpcsfixer.php` as custom rules for the `friendsofphp/php-cs-fixer` package
- Test cases for the complete code coverage after running `friendsofphp/php-cs-fixer`
- `@deprecated` notices for specified classes from previous versions

### Changed
- `Router::__construct` supports adding `RouteInterface` in the array
Expand Down
4 changes: 2 additions & 2 deletions src/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
use Rougin\Slytherin\System\Routing;

/**
* Application
* @deprecated since ~0.9, use "Routing" instead.
*
* NOTE: To be removed in v1.0.0. Use "Routing" instead.
* Application
*
* @package Slytherin
* @author Rougin Gutib <[email protected]>
Expand Down
4 changes: 2 additions & 2 deletions src/Application/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
use Rougin\Slytherin\Application as Slytherin;

/**
* Application
* @deprecated since ~0.9, use "\Application" instead.
*
* NOTE: To be removed in v1.0.0. Use "\Application" instead.
* Application
*
* @package Slytherin
* @author Rougin Gutib <[email protected]>
Expand Down
15 changes: 10 additions & 5 deletions src/Component/Collection.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ public function __construct()
}

/**
* @deprecated since ~0.9, use "set" instead.
*
* Adds an instance to the container.
* NOTE: To be removed in v1.0.0. Use "set" instead.
*
* @param string $id
* @param object $concrete
Expand Down Expand Up @@ -79,8 +80,9 @@ public function getDebugger()
}

/**
* @deprecated since ~0.4, use "getContainer" instead.
*
* Returns the dependency injector.
* NOTE: To be removed in v1.0.0. Use "getContainer" instead.
*
* @return \Rougin\Slytherin\Container\ContainerInterface
*/
Expand All @@ -101,8 +103,9 @@ public function getDispatcher()
}

/**
* @deprecated since ~0.4, use "getDebugger" instead.
*
* Returns the error handler.
* NOTE: To be removed in v1.0.0. Use "getDebugger" instead.
*
* @return \Rougin\Slytherin\Debug\ErrorHandlerInterface
*/
Expand Down Expand Up @@ -215,8 +218,9 @@ public function setDebugger(ErrorHandlerInterface $debugger)
}

/**
* @deprecated since ~0.4, use "setContainer" instead.
*
* Sets the dependency injector.
* NOTE: To be removed in v1.0.0. Use "setContainer" instead.
*
* @param \Rougin\Slytherin\Container\ContainerInterface $injector
* @return self
Expand All @@ -238,8 +242,9 @@ public function setDispatcher(Routing $dispatcher)
}

/**
* @deprecated since ~0.4, use "setDebugger" instead.
*
* Sets the error handler.
* NOTE: To be removed in v1.0.0. Use "setDebugger" instead.
*
* @param \Rougin\Slytherin\Debug\ErrorHandlerInterface $debugger
* @return self
Expand Down
6 changes: 3 additions & 3 deletions src/ComponentCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
namespace Rougin\Slytherin;

/**
* Component Collection
* @deprecated since ~0.4, use "Components" instead.
*
* NOTE: To be removed in v1.0.0. Use "Component\Collection" instead.
* Component Collection
*
* @package Slytherin
* @author Rougin Gutib <[email protected]>
*/
class ComponentCollection extends Component\Collection
class ComponentCollection extends Components
{
}
8 changes: 5 additions & 3 deletions src/Components.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@

namespace Rougin\Slytherin;

use Rougin\Slytherin\Component\Collection;

/**
* Component Collection
* @deprecated since ~0.4, use "Component\Collection" instead.
*
* NOTE: To be removed in v1.0.0. Use "ComponentCollection" instead.
* Component Collection
*
* @package Slytherin
* @author Rougin Gutib <[email protected]>
*/
class Components extends ComponentCollection
class Components extends Collection
{
}
4 changes: 2 additions & 2 deletions src/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
namespace Rougin\Slytherin;

/**
* Configuration
* @deprecated since ~0.9, use "Integration/Configuration" instead.
*
* NOTE: To be removed in v1.0.0. Use "Integration/Configuration" instead.
* Configuration
*
* @package Slytherin
* @author Rougin Gutib <[email protected]>
Expand Down
3 changes: 2 additions & 1 deletion src/Container/AurynContainer.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ public function __construct(Injector $injector)
}

/**
* @deprecated since ~0.9, use "set" instead.
*
* Adds a new instance to the container.
* NOTE: To be removed in v1.0.0. Use "set" instead.
*
* @param string $id
* @param mixed|null $concrete
Expand Down
3 changes: 2 additions & 1 deletion src/Container/Container.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ public function __construct(array $items = array())
}

/**
* @deprecated since ~0.9, use "set" instead.
*
* Adds a new instance to the container.
* NOTE: To be removed in v1.0.0. Use "set" instead.
*
* @param string $id
* @param mixed $concrete
Expand Down
4 changes: 2 additions & 2 deletions src/Container/Exception/ContainerException.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
use Rougin\Slytherin\Container\ContainerException as Slytherin;

/**
* Container Exception
* @deprecated since ~0.9, use "Container\ContainerException" instead.
*
* NOTE: To be removed in v1.0.0. Use "Container\ContainerException" instead.
* Container Exception
*
* @package Slytherin
* @author Rougin Gutib <[email protected]>
Expand Down
4 changes: 2 additions & 2 deletions src/Container/Exception/NotFoundException.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
use Rougin\Slytherin\Container\NotFoundException as Slytherin;

/**
* Not Found Exception
* @deprecated since ~0.9, use "Container\NotFoundException" instead.
*
* NOTE: To be removed in v1.0.0. Use "Container\NotFoundException" instead.
* Not Found Exception
*
* @package Slytherin
* @author Rougin Gutib <[email protected]>
Expand Down
4 changes: 2 additions & 2 deletions src/Container/VanillaContainer.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
namespace Rougin\Slytherin\Container;

/**
* Container
* @deprecated since ~0.9, use "Container" instead.
*
* NOTE: To be removed in v1.0.0. Use "Container" instead.
* Container
*
* @package Slytherin
* @author Rougin Gutib <[email protected]>
Expand Down
4 changes: 2 additions & 2 deletions src/Debug/Debugger.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
use Rougin\Slytherin\Debug\Vanilla\Debugger as Slytherin;

/**
* Debugger
* @deprecated since ~0.8, use "Vanilla\Debugger" instead.
*
* NOTE: To be removed in v1.0.0. Use "VanillaDebugger" instead.
* Debugger
*
* @package Slytherin
* @author Rougin Gutib <[email protected]>
Expand Down
4 changes: 2 additions & 2 deletions src/Debug/DebuggerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
namespace Rougin\Slytherin\Debug;

/**
* Debugger Interface
* @deprecated since ~0.9, use "ErrorHandlerInterface" instead.
*
* NOTE: To be removed in v1.0.0. Use "ErrorHandlerInterface" instead.
* Debugger Interface
*
* @package Slytherin
* @author Rougin Gutib <[email protected]>
Expand Down
6 changes: 4 additions & 2 deletions src/Debug/ErrorHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ public function __construct($environment = 'development')
}

/**
* @deprecated since ~0.9, already not part of the "ErrorHandlerInterface".
*
* Sets up the environment to be used.
* NOTE: To be removed in v1.0.0. It is not part of the "ErrorHandlerInterface".
*
* @param string $environment
* @return self
Expand All @@ -40,8 +41,9 @@ public function setEnvironment($environment)
}

/**
* @deprecated since ~0.9, already not part of the "ErrorHandlerInterface".
*
* Returns the specified environment.
* NOTE: To be removed in v1.0.0. It is not part of the "ErrorHandlerInterface".
*
* @return string
*/
Expand Down
4 changes: 2 additions & 2 deletions src/Debug/Vanilla/Debugger.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
use Rougin\Slytherin\Debug\VanillaErrorHandler;

/**
* Debugger
* @deprecated since ~0.9, use "VanillaErrorHandler" instead.
*
* NOTE: To be removed in v1.0.0. Use "VanillaErrorHandler" instead.
* Debugger
*
* @package Slytherin
* @author Rougin Gutib <[email protected]>
Expand Down
4 changes: 2 additions & 2 deletions src/Debug/VanillaErrorHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
namespace Rougin\Slytherin\Debug;

/**
* Error Handler
* @deprecated since ~0.9, use "ErrorHandler" instead.
*
* NOTE: To be removed in v1.0.0. Use "ErrorHandler" instead.
* Error Handler
*
* @package Slytherin
* @author Rougin Gutib <[email protected]>
Expand Down
4 changes: 2 additions & 2 deletions src/Debug/Whoops/Debugger.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
use Rougin\Slytherin\Debug\WhoopsErrorHandler;

/**
* Debugger
* @deprecated since ~0.9, use "WhoopsErrorHandler" instead.
*
* NOTE: To be removed in v1.0.0. Use "WhoopsErrorHandler" instead.
* Debugger
*
* @package Slytherin
* @author Rougin Gutib <[email protected]>
Expand Down
4 changes: 2 additions & 2 deletions src/Debug/WhoopsDebugger.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
use Rougin\Slytherin\Debug\Whoops\Debugger as Slytherin;

/**
* Whoops Debugger
* @deprecated since ~0.8, use "Whoops\Debugger" instead.
*
* NOTE: To be removed in v1.0.0. Use "Whoops\Debugger" instead.
* Whoops Debugger
*
* @package Slytherin
* @author Rougin Gutib <[email protected]>
Expand Down
12 changes: 8 additions & 4 deletions src/Debug/WhoopsErrorHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ public function __construct(Run $whoops, $environment = 'development')
}

/**
* @deprecated since ~0.9, already not part of the "ErrorHandlerInterface".
*
* Sets up the environment to be used.
* NOTE: To be removed in v1.0.0. It is not part of the "ErrorHandlerInterface".
*
* @param string $environment
* @return self
Expand All @@ -53,8 +54,9 @@ public function setEnvironment($environment)
}

/**
* @deprecated since ~0.9, already not part of the "ErrorHandlerInterface".
*
* Returns the specified environment.
* NOTE: To be removed in v1.0.0. It is not part of the "ErrorHandlerInterface".
*
* @return string
*/
Expand All @@ -64,8 +66,9 @@ public function getEnvironment()
}

/**
* @deprecated since ~0.9, use magic method "__call" instead.
*
* Returns a listing of handlers.
* NOTE: To be removed in v1.0.0. Use the magic method "__call" instead.
*
* @return \Whoops\Handler\HandlerInterface[]
*/
Expand All @@ -91,8 +94,9 @@ public function display()
}

/**
* @deprecated since ~0.9, use magic method "__call" instead.
*
* Sets a handler.
* NOTE: To be removed in v1.0.0. Use __call" instead.
*
* @param \Whoops\Handler\HandlerInterface|callable $handler
* @return void
Expand Down
4 changes: 2 additions & 2 deletions src/Dispatching/BaseRouter.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
use Rougin\Slytherin\Routing\Router as Slytherin;

/**
* Base Router
* @deprecated since ~0.9, use "Routing\Router" instead.
*
* NOTE: To be removed in v1.0.0. Use "Routing\Router" instead.
* Base Router
*
* @package Slytherin
* @author Rougin Gutib <[email protected]>
Expand Down
4 changes: 2 additions & 2 deletions src/Dispatching/Dispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
use Rougin\Slytherin\Dispatching\Vanilla\Dispatcher as Slytherin;

/**
* Dispatcher
* @deprecated since ~0.8, use "Vanilla\Dispatcher" instead.
*
* NOTE: To be removed in v1.0.0. Use "Vanilla\Dispatcher" instead.
* Dispatcher
*
* @package Slytherin
* @author Rougin Gutib <[email protected]>
Expand Down
4 changes: 2 additions & 2 deletions src/Dispatching/DispatcherInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
use Rougin\Slytherin\Routing\DispatcherInterface as Slytherin;

/**
* Dispatcher Interface
* @deprecated since ~0.9, use "Routing\DispatcherInterface" instead.
*
* NOTE: To be removed in v1.0.0. Use "Routing\DispatcherInterface" instead.
* Dispatcher Interface
*
* @package Slytherin
* @author Rougin Gutib <[email protected]>
Expand Down
4 changes: 2 additions & 2 deletions src/Dispatching/FastRoute/Dispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
use Rougin\Slytherin\Routing\FastRoute\Dispatcher as Slytherin;

/**
* FastRoute Dispatcher
* @deprecated since ~0.9, use "Routing\FastRoute\Dispatcher" instead.
*
* NOTE: To be removed in v1.0.0. Use "Routing\FastRoute\Dispatcher" instead.
* FastRoute Dispatcher
*
* @package Slytherin
* @author Rougin Gutib <[email protected]>
Expand Down
4 changes: 2 additions & 2 deletions src/Dispatching/FastRoute/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
use Rougin\Slytherin\Routing\FastRoute\Router as Slytherin;

/**
* FastRoute Router
* @deprecated since ~0.9, use "Routing\FastRoute\Router" instead.
*
* NOTE: To be removed in v1.0.0. Use "Routing\FastRoute\Router" instead.
* FastRoute Router
*
* @package Slytherin
* @author Rougin Gutib <[email protected]>
Expand Down
Loading
Loading