mozart icon indicating copy to clipboard operation
mozart copied to clipboard

Namespaces in constants not replaced

Open danielhuesken opened this issue 6 years ago • 2 comments

I have found some constant functions in with the Namespaces are not replaced by the new one. Version 0.3.0 is used.

const_ns

danielhuesken avatar Feb 18 '19 12:02 danielhuesken

That's correct. It doesn't replace those (yet). This is already documented in #5, if I recall correctly.

Is this line of code inside the psr/log package, or in your own implementation? If it is in your own implementation, you could get around it, by just referring to the constant directly in your code (without the use of the constant() function):

PSR\Log\LogLevel::$loggingLevel

and Mozart will replace this just fine. If it's in an external package, please provide the (links to) lines of code that it is present in. Thank you!

coenjacobs avatar Feb 20 '19 21:02 coenjacobs

It is in The PayPal SDK https://github.com/paypal/PayPal-PHP-SDK/blob/master/lib/PayPal/Log/PayPalLogger.php#L69

danielhuesken avatar Feb 25 '19 13:02 danielhuesken