Comments (6)
Can you give me an example?
from phpdependencyanalysis.
When you are talking about PHP built-in functions, such as in_array(), you can use your own NamespaceFilter plugin to return an empty array in this case. Please check the manual https://github.com/mamuz/PhpDependencyAnalysis/wiki/5.-Plugins , the example https://github.com/mamuz/PhpDependencyAnalysis/wiki/4.-Examples#usage-graph-on-package-level-with-a-namespacefilter and the test stub https://github.com/mamuz/PhpDependencyAnalysis/blob/master/tests/_data/Plugin/NamespaceFilter.php
from phpdependencyanalysis.
@Soufraz Did my answer help you?
from phpdependencyanalysis.
Sorry, I did not test yet. So, if I remember the generator was getting all php functions in the classes. But I'll try the filter suggested above .. Thanks!
from phpdependencyanalysis.
@mamuz @Soufraz Can you please help me understand how should I remove the inbuilt PHP functions and dependencies? I tried performing NameSpaceFilter which suggested above but it didn't happen. I running PhpDA on docker with the following configuration. Really appreciated it if you can help me remove PHP global functions and inbuilt one.
mode: 'call'
source: '../src/Controller'
filePattern: 'ContactsController.php'
ignore: 'tests'
formatter: 'PhpDA\Writer\Strategy\Svg'
target: './namespace-filter.svg'
namespaceFilter: 'MyDomain\Plugin\NamespaceFilter'
visitor:
- PhpDA\Parser\Visitor\TagCollector
- PhpDA\Parser\Visitor\SuperglobalCollector
visitorOptions:
PhpDA\Parser\Visitor\TagCollector: {minDepth: 1, sliceLength: 1}
classMap:
MyDomain\Plugin\NamespaceFilter: './NamespaceFilter.php'
from phpdependencyanalysis.
+1
I believe that exclude built-in functions feature is highly demanded
from phpdependencyanalysis.
Related Issues (20)
- Add a PHAR HOT 3
- Unable to invoke "dot" to create image file HOT 1
- Hanging on writing to dependency graph file HOT 1
- @see tag is interpreted wrong HOT 3
- Multiple output formats for one analysis run
- phpda not taking relative paths to config file
- Config File Name HOT 1
- can source in config be array? HOT 1
- Symfony 4? HOT 1
- PHP 7.1 Support HOT 2
- namespaceFilter plugin is never called on global namespace
- Packagist still on v1.3.1 - can you update it, or setup auto update HOT 2
- Question: Usage graph for single class HOT 1
- Is this a code analysis tool or a static analysis one? HOT 1
- Array union types aren't handled properly
- Write dependency graph is not working or is taking too much time HOT 1
- Syntax error thrown due to invalid subgraph groupid
- Composer package is no longer installable HOT 2
- Install fails in PHP 8.1 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phpdependencyanalysis.