File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -172,9 +172,21 @@ func (p *PathMapper) readOriginalPathFromCache(path string) string {
172172}
173173
174174func (p * PathMapper ) buildClassNameFromPath (path string ) (string , string ) {
175- // todo add support for PSR4
175+ var (
176+ basePath string
177+ className string
178+ )
176179 match := regexpPackageClass .FindStringSubmatch (path )
177- basePath := match [1 ]
178- className := regexpDot .ReplaceAllString (match [3 ], "_" )
180+ if len (match ) == 4 {
181+ // Flow standard packages
182+ basePath = match [1 ]
183+ className = regexpDot .ReplaceAllString (match [3 ], "_" )
184+ } else {
185+ // Other (vendor) packages, todo add support for vendor package with Flow proxy class
186+ p .logger .Warn (h , "Vendor package detected" )
187+ p .logger .Warn ("Class mapping not supported currently for path: %s, \n " , path )
188+ basePath = path
189+ className = ""
190+ }
179191 return basePath , className
180192}
You can’t perform that action at this time.
0 commit comments