codefog / contao-haste

Haste is a collection of tools and classes to ease working with Contao
http://codefog.pl/extension/haste.html
MIT License
43 stars 24 forks source link

Don't use global namespaced Contao classes #163

Closed bytehead closed 3 years ago

bytehead commented 3 years ago

Trying to get rid of Contao's global namespaced classes.

When using \Haste\Input\Input::getAutoItem(...) for example PHPStan will report following:

Class Input not found.                                                  
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols

PS: There is a workaround - while bootstrapping PHPStan you can boot the Contao Framework, but that's a bit overkill IMO.

qzminski commented 3 years ago

@Toflar @aschempp should be safe to merge, or do you see any potential issues with this?

qzminski commented 3 years ago

Just released as 4.25, thank you @bytehead !

bytehead commented 3 years ago

Thanks for merging! 🙏 You're welcome!