-
Notifications
You must be signed in to change notification settings - Fork 52
Use PSR-4 rather than PSR-0 #62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| "ext-sqlite3": "*", | ||
| "ext-xmlreader": "*" | ||
| "ext-xmlreader": "*", | ||
| "ext-simplexml": "*" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SimpleXML is used in phpdotnet\phd\Package\IDE\API so I added that here
| namespace phpdotnet\phd\Options; | ||
|
|
||
| interface Options_Interface { | ||
| interface OptionsInterface { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Name here should be "Interface" which is not a valid class name
| @@ -1,7 +1,12 @@ | |||
| <?php | |||
| namespace phpdotnet\phd; | |||
| namespace phpdotnet\phd\Format\_Abstract; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Abstract cannot be a namespace part - using _Abstract here
| * @link https://doc.php.net/phd/ | ||
| */ | ||
| class Package_IDE_API_Function | ||
| class _Function |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function is not a valid PHP class name
|
See #52 |
Whoops not sure how I missed that, sorry for the noise. |
https://www.php-fig.org/psr/psr-0/:
Used the PHPStorm refactoring tools as well as some manual labor to move all the classes to their correct location and use namespaces rather than underscores. Also uses Composer's autoloader rather than the ad-hoc one.
Definitely needs some more testing to make sure it covers every possible class name access - there are some places where classes were accessed by strings but I think I got all of those.
PDF renderer removed in the process, as per #60 (comment).
Feel free to close if this is too ambitious or too much change all at once.