-
Notifications
You must be signed in to change notification settings - Fork 45
2. Requirements
If you are not using the official docker image you will need need GraphViz
for graph creation on your host, which is an open source graph visualization software and available for the most platforms.
PHP is a dynamic language with a weak type system. It also contains a lot of statements, which resolves only in runtime. This tool is a static code analysis, thus it have some limitations. Here is a non-exhaustive list of unsupported php-features:
- Dynamic features such as
eval
and$$x
- Globals such as
global $x;
- Dynamic funcs such as
call_user_func
,call_user_func_array
,create_function
This tool analyzes abstract datatypes, so your application must be written in OOP-Style using Namespaces.
For a better violaton detection between dependencies you should apply naming conventions. Each package should have an own namespace and same is true for each layer.
- Namespace for Application Controllers:
Application\Controller\..
- Namespace for User Service:
User\Service\..
- Namespace for User Persistence Layer:
User\Repository\..
In this case you can declare Controller with namespace Application\Controller
to tell they are belonging to Application-Layer. Application-Layer is permitted to access to Service-Layer (User\Service
-Namespace) and is not permitted to access Persistence Layer (User\Repository
-Namespace).