- Notifications
You must be signed in to change notification settings - Fork 28
merge for 1.0 #20
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
merge for 1.0 #20
Conversation
- Allow the users to define there own logging logic; with `setLogger` and `getLogger`. Following the `PSR-3 Logger Interface` standards. - Added a example how to use `setLogger`. See `examples\vips_class.php`. - `include '../src/Image.php';` didn't work in the examples. I've changed it to `require __DIR__ . '/../vendor/autoload.php';` for auto-loading. - Updated `phpunit` in `composer.json`. - Added a require for `"psr/log": "^1.0.1"` in `composer.json` to ensure that the PSR-3 interface and trait is included. - Added `PHP Parallel Lint` to check syntax of PHP files in parallel jobs. - Added a script to test the syntax of PHP files and unit tests. Usage: `composer test`. - phpcs indenting fixes. Fixes all `Whitespace found at end of line` errors. - Use the enumerations instead of the hard-coded strings. - `Property names SHOULD NOT be prefixed with a single underscore to indicate protected or private visibility.` following the `PSR-2: Coding Style Guide`. So I've removed those underscores. - After changing the underscores `wrap` was conflicting with the `wrap` function in libvips. I changed to `wrapResult` instead. - Added unit tests for the improved logging. (2 simple tests).
Improved logging, enumerations and more
we're now 0.9.0 as we get near 1.0
Importing enums isn't necessary because we are in the same namespace.
handy for project website
should all run in <400mb now, according to ps
there was a missing term in the equation we were using
and move the logging interface into Main
… add-default-logger
helps phpdoc not flop about horribly on the Image class
since Image.php works now
as errorLog() and debugLog()
tests now pass
ready for review and merge
I've added few inline comments. Is the version 1.0.0 still marked as experimental? If not then we can delete the Overall, I think this is ready for releasing. |
src/Image.php Outdated
| ||
namespace Jcupitt\Vips; | ||
| ||
use Psr\Log\LoggerInterface; |
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.
LoggerInterface
is no longer used in this class, so this can be removed.
* @internal | ||
*/ | ||
private static function _errorIsArray($result) | ||
private static function errorIsArray($result) |
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.
This function is named contradictory IMO.
*/ | ||
public function bandor(): Image | ||
{ | ||
// phpdoc hates OperationBoolean::OR, so use the string form here |
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.
These kind of exceptions can't be made in phpcs configuration instead?
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.
I don't think so, phpcs says that OperationBoolean::OR
is a syntax error and stops parsing.
OK, all comments addressed I think. I revised the README too. I'll try to fix the memory problem in |
Also, thank you both very much! Hooray! |
possible 1.0.0 ready for review
Changes:
Enum
Config
andUtils