Skip to content

Commit

Permalink
Merge branch 'niden-T14359-tidy-up-di-classes' into 4.0.x
Browse files Browse the repository at this point in the history
* niden-T14359-tidy-up-di-classes:
  [#14359] - Fixing appveyor
  [#14359] - Updated changelog
  [#14359] - Renamed Injectable again
  [#14359] - Trying require
  [#14359] - trying a hack for codeception
  [#14359] - Renamed DI classes to abstract*
  [#14349] - Updated the changelog
  [#14349] - Adjusting the interfaces again
  [#14349] - Corrected class name
  [#14349] - Added _before in the helper class
  [#14349] - Fixing test
  [#14349] - Fixing tests
  [#14349] - Correcting tests
  [#14349] - Changed the interfaces and added escaper to the constructor
  • Loading branch information
niden committed Sep 7, 2019
2 parents e9540a4 + 4899007 commit cb74b41
Show file tree
Hide file tree
Showing 18 changed files with 31 additions and 90 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG-4.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- Changed `Phalcon\Session\Manager` to allow `router` in the constructor [#14351](https://github.com/phalcon/cphalcon/pull/14351)
- Changed `Phalcon\Flash\Direct` to allow `escaper` in the constructor [#14349](https://github.com/phalcon/cphalcon/issues/14349)
- Changed `Phalcon\Flash\Session` to allow `escaper` in the constructor [#14349](https://github.com/phalcon/cphalcon/issues/14349)
- Changed `Phalcon\Di\AbstractDIAware` to `Phalcon\Di\AbstractInjectionAware` [#14359](https://github.com/phalcon/cphalcon/issues/14359)

## Fixed
- Fixed `Phalcon\Helper\Str::includes` to return correct result [#14301](https://github.com/phalcon/cphalcon/issues/14301)
Expand All @@ -22,6 +23,9 @@
- Fixed `Phalcon\Security::getSessionToken` return value [#14346](https://github.com/phalcon/cphalcon/issues/14346)
- Fixed `Phalcon\Flash\*` interfaces for `message()` to return `string/null` [#14349](https://github.com/phalcon/cphalcon/issues/14349)

## Removed
- Removed `Phalcon\Plugin` - duplicate of `Phalcon\DI\Injectable` [#14359](https://github.com/phalcon/cphalcon/issues/14359)

# [4.0.0-beta.2](https://github.com/phalcon/cphalcon/releases/tag/v4.0.0-beta.2) (2019-08-18)

## Fixed
Expand Down
36 changes: 0 additions & 36 deletions ext/phalcon/plugin.zep.c

This file was deleted.

5 changes: 0 additions & 5 deletions ext/phalcon/plugin.zep.h

This file was deleted.

4 changes: 2 additions & 2 deletions phalcon/Assets/Manager.zep
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ use Phalcon\Assets\Asset\Css as AssetCss;
use Phalcon\Assets\Inline\Css as InlineCss;
use Phalcon\Assets\Inline\Js as InlineJs;
use Phalcon\Di\DiInterface;
use Phalcon\Di\AbstractDiAware;
use Phalcon\Di\AbstractInjectionAware;

/**
* Phalcon\Assets\Manager
*
* Manages collections of CSS/Javascript assets
*/
class Manager extends AbstractDiAware
class Manager extends AbstractInjectionAware
{
protected collections;

Expand Down
4 changes: 2 additions & 2 deletions phalcon/Cli/Router.zep
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
namespace Phalcon\Cli;

use Phalcon\Di\DiInterface;
use Phalcon\Di\AbstractDiAware;
use Phalcon\Di\AbstractInjectionAware;
use Phalcon\Cli\Router\Route;
use Phalcon\Cli\Router\Exception;

Expand All @@ -35,7 +35,7 @@ use Phalcon\Cli\Router\Exception;
* echo $router->getTaskName();
*```
*/
class Router extends AbstractDiAware
class Router extends AbstractInjectionAware
{
protected action;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use Phalcon\Di\InjectionAwareInterface;
/**
* This abstract class offers common access to the DI in a class
*/
abstract class AbstractDiAware implements InjectionAwareInterface
abstract class AbstractInjectionAware implements InjectionAwareInterface
{
/**
* Dependency Injector
Expand Down
4 changes: 2 additions & 2 deletions phalcon/Dispatcher/AbstractDispatcher.zep
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace Phalcon\Dispatcher;

use Exception;
use Phalcon\Di\DiInterface;
use Phalcon\Di\AbstractDiAware;
use Phalcon\Di\AbstractInjectionAware;
use Phalcon\Dispatcher\DispatcherInterface;
use Phalcon\Dispatcher\Exception as PhalconException;
use Phalcon\Events\EventsAwareInterface;
Expand All @@ -26,7 +26,7 @@ use Phalcon\Mvc\Model\BinderInterface;
* This class can't be instantiated directly, you can use it to create your own
* dispatchers.
*/
abstract class AbstractDispatcher extends AbstractDiAware implements DispatcherInterface, EventsAwareInterface
abstract class AbstractDispatcher extends AbstractInjectionAware implements DispatcherInterface, EventsAwareInterface
{
protected activeHandler;

Expand Down
4 changes: 2 additions & 2 deletions phalcon/Flash/AbstractFlash.zep
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace Phalcon\Flash;

use Phalcon\Di;
use Phalcon\Di\DiInterface;
use Phalcon\Di\AbstractDiAware;
use Phalcon\Di\AbstractInjectionAware;
use Phalcon\Escaper\EscaperInterface;
use Phalcon\Flash\Exception;

Expand All @@ -25,7 +25,7 @@ use Phalcon\Flash\Exception;
* $flash->error("Cannot open the file");
*```
*/
abstract class AbstractFlash extends AbstractDiAware implements FlashInterface
abstract class AbstractFlash extends AbstractInjectionAware implements FlashInterface
{
/**
* @var bool
Expand Down
4 changes: 2 additions & 2 deletions phalcon/Html/Tag.zep
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
namespace Phalcon\Html;

use Phalcon\Di\DiInterface;
use Phalcon\Di\AbstractDiAware;
use Phalcon\Di\AbstractInjectionAware;
use Phalcon\Escaper;
use Phalcon\Escaper\EscaperInterface;
use Phalcon\Helper\Arr;
Expand All @@ -25,7 +25,7 @@ use Phalcon\Mvc\Model\ResultsetInterface;
* Phalcon\Html\Tag is designed to simplify building of HTML tags. It provides a
* set of helpers to dynamically generate HTML.
*/
class Tag extends AbstractDiAware
class Tag extends AbstractInjectionAware
{
/**
* @var array
Expand Down
4 changes: 2 additions & 2 deletions phalcon/Http/Cookie.zep
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
namespace Phalcon\Http;

use Phalcon\Di\DiInterface;
use Phalcon\Di\AbstractDiAware;
use Phalcon\Di\AbstractInjectionAware;
use Phalcon\Crypt\CryptInterface;
use Phalcon\Crypt\Mismatch;
use Phalcon\Filter\FilterInterface;
Expand All @@ -22,7 +22,7 @@ use Phalcon\Session\ManagerInterface as SessionManagerInterface;
/**
* Provide OO wrappers to manage a HTTP cookie.
*/
class Cookie extends AbstractDiAware implements CookieInterface
class Cookie extends AbstractInjectionAware implements CookieInterface
{
protected domain;

Expand Down
4 changes: 2 additions & 2 deletions phalcon/Http/Request.zep
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
namespace Phalcon\Http;

use Phalcon\Di\DiInterface;
use Phalcon\Di\AbstractDiAware;
use Phalcon\Di\AbstractInjectionAware;
use Phalcon\Events\ManagerInterface;
use Phalcon\Filter\FilterInterface;
use Phalcon\Http\Request\File;
Expand Down Expand Up @@ -46,7 +46,7 @@ use stdClass;
* $request->getLanguages();
*```
*/
class Request extends AbstractDiAware implements RequestInterface
class Request extends AbstractInjectionAware implements RequestInterface
{
private filterService;

Expand Down
4 changes: 2 additions & 2 deletions phalcon/Http/Response/Cookies.zep
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
namespace Phalcon\Http\Response;

use Phalcon\Di\DiInterface;
use Phalcon\Di\AbstractDiAware;
use Phalcon\Di\AbstractInjectionAware;
use Phalcon\Http\CookieInterface;
use Phalcon\Http\Response\CookiesInterface;
use Phalcon\Http\Cookie\Exception;
Expand Down Expand Up @@ -64,7 +64,7 @@ use Phalcon\Http\Cookie\Exception;
* );
* ```
*/
class Cookies extends AbstractDiAware implements CookiesInterface
class Cookies extends AbstractInjectionAware implements CookiesInterface
{
protected cookies = [];

Expand Down
4 changes: 2 additions & 2 deletions phalcon/Mvc/Model.zep
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use Phalcon\Db\Column;
use Phalcon\Db\DialectInterface;
use Phalcon\Db\Enum;
use Phalcon\Db\RawValue;
use Phalcon\Di\AbstractDiAware;
use Phalcon\Di\AbstractInjectionAware;
use Phalcon\Di;
use Phalcon\Di\DiInterface;
use Phalcon\Events\ManagerInterface as EventsManagerInterface;
Expand Down Expand Up @@ -81,7 +81,7 @@ use Serializable;
* }
* ```
*/
abstract class Model extends AbstractDiAware implements EntityInterface, ModelInterface, ResultInterface, Serializable, JsonSerializable
abstract class Model extends AbstractInjectionAware implements EntityInterface, ModelInterface, ResultInterface, Serializable, JsonSerializable
{
const DIRTY_STATE_DETACHED = 2;
const DIRTY_STATE_PERSISTENT = 0;
Expand Down
4 changes: 2 additions & 2 deletions phalcon/Mvc/Router.zep
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
namespace Phalcon\Mvc;

use Phalcon\Di\DiInterface;
use Phalcon\Di\AbstractDiAware;
use Phalcon\Di\AbstractInjectionAware;
use Phalcon\Events\EventsAwareInterface;
use Phalcon\Events\ManagerInterface;
use Phalcon\Http\RequestInterface;
Expand Down Expand Up @@ -48,7 +48,7 @@ use Phalcon\Mvc\Router\RouteInterface;
* echo $router->getControllerName();
* ```
*/
class Router extends AbstractDiAware implements RouterInterface, EventsAwareInterface
class Router extends AbstractInjectionAware implements RouterInterface, EventsAwareInterface
{
const POSITION_FIRST = 0;
const POSITION_LAST = 1;
Expand Down
22 changes: 0 additions & 22 deletions phalcon/Plugin.zep

This file was deleted.

4 changes: 2 additions & 2 deletions phalcon/Security.zep
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
namespace Phalcon;

use Phalcon\Di\DiInterface;
use Phalcon\Di\AbstractDiAware;
use Phalcon\Di\AbstractInjectionAware;
use Phalcon\Http\RequestInterface;
use Phalcon\Security\Random;
use Phalcon\Security\Exception;
Expand All @@ -34,7 +34,7 @@ use Phalcon\Session\ManagerInterface as SessionInterface;
* }
*```
*/
class Security extends AbstractDiAware
class Security extends AbstractInjectionAware
{
const CRYPT_DEFAULT = 0;
const CRYPT_BLOWFISH = 4;
Expand Down
4 changes: 2 additions & 2 deletions phalcon/Session/Manager.zep
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace Phalcon\Session;
use InvalidArgumentException;
use RuntimeException;
use SessionHandlerInterface;
use Phalcon\DI\AbstractDiAware;
use Phalcon\DI\AbstractInjectionAware;
use Phalcon\Di\DiInterface;
use Phalcon\Helper\Arr;
use Phalcon\Session\ManagerInterface;
Expand All @@ -23,7 +23,7 @@ use Phalcon\Session\ManagerInterface;
*
* Session manager class
*/
class Manager extends AbstractDiAware implements ManagerInterface
class Manager extends AbstractInjectionAware implements ManagerInterface
{
/**
* @var <SessionHandlerInterface>|null
Expand Down
4 changes: 2 additions & 2 deletions phalcon/Url.zep
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
namespace Phalcon;

use Phalcon\Di\DiInterface;
use Phalcon\Di\AbstractDiAware;
use Phalcon\Di\AbstractInjectionAware;
use Phalcon\Mvc\RouterInterface;
use Phalcon\Mvc\Router\RouteInterface;
use Phalcon\Url\Exception;
Expand All @@ -34,7 +34,7 @@ use Phalcon\Url\UrlInterface;
* );
*```
*/
class Url extends AbstractDiAware implements UrlInterface
class Url extends AbstractInjectionAware implements UrlInterface
{
/**
* @var null | string
Expand Down

0 comments on commit cb74b41

Please sign in to comment.