leafsphp / leaf

🍁 The easiest way to create clean, simple but powerful web apps and APIs quickly
https://leafphp.dev
MIT License
1.12k stars 68 forks source link

Unify namespace #208

Closed joanhey closed 1 year ago

joanhey commented 1 year ago

Description

As the App Class, use namespace Leaf, any function or class call will be relative to that namespace.

Actually exist a mix of fully qualified namespaces and normal. Now all use normal qualified.

Also added type hint to the properties.

image

joanhey commented 1 year ago

Typed properties need PHP 7.4, and after read the documentation the minimal PHP version is 7.2 (because in composer.json don't require any minimal php version). Added PR #210 to fix that.

If you want I can't remove the Typed properties. But also PHP 7.4 is EOL and not Pest tested versions lower than 7.4. https://www.php.net/supported-versions.php

mychidarko commented 1 year ago

Hey @joanhey I'm aware of the PHP 7.4 EOL. Leaf still supports PHP 7 just to help people with easy adoption/migration of older systems since a Leaf app in PHP 7 will be exactly the same in PHP 8.

Also, I've updated the minimum requirement for the next version from 7.2 to 7.4, so this is perfectly fine