Robin S Posted June 18, 2017 Share Posted June 18, 2017 Without declaring the ProcessWire namespace at the top of a module file I don't get the benefit of code completion and warnings in my IDE (or rather I get a bunch of false-positive warnings without a namespace declared). So I'd like to declare it, but if I understand right this will make the module incompatible with PW 2.x. It would be great to be able to conditionally declare the namespace according to the PW version but that's not possible unfortunately. I suppose I could declare the namespace and comment it out just before pushing to GitHub, but it would be easy to forget. Any tips? Does anyone know if there's a way to indicate the namespace in a DocBlock comment so PhpStorm picks it up but it isn't an actual namespace declaration? Link to comment Share on other sites More sharing options...
LostKobrakai Posted June 18, 2017 Share Posted June 18, 2017 If you want to stay compatible with the 2.x branch I'd simply develop on a 2.8 or even 2.7 installation. 3 Link to comment Share on other sites More sharing options...
Robin S Posted June 18, 2017 Author Share Posted June 18, 2017 21 minutes ago, LostKobrakai said: If you want to stay compatible with the 2.x branch I'd simply develop on a 2.8 or even 2.7 installation. Good idea, thanks. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now