Skip to content
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

[1.0][CacheResolver] Use binary on store method call. #301

Merged
merged 6 commits into from
Jan 16, 2014

Conversation

makasim
Copy link
Collaborator

@makasim makasim commented Jan 14, 2014

Annnnd finally we decouple the bundle logic from http response\request.

@makasim
Copy link
Collaborator Author

makasim commented Jan 15, 2014

@havvg ready for review


return $response;
//TODO: throw exception here ???
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, an exception should be thrown here, what about a Liip\ImagineBundle\Exception\Imagine\Cache\Resolver\StoreBinaryException?

In regards to making this an error state that is not handled by the resolver itself anymore, the log entry should be error instead of warning (same applies to AwsS3Resolver).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want to find a shorter exception name\namespace. Thinking....

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sub-namespace in Liip\ImagineBundle\Exception is derived from the actual namespace of the resolvers. However I'm open to a better concept :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@havvg what about Liip\ImagineBundle\Exception\Imagine\Cache\Resolver\NotStorableException like we have NotResolableException ?

@makasim
Copy link
Collaborator Author

makasim commented Jan 16, 2014

@havvg I fixed your comments, new changes:

  • NullLogger created in constructor, it allows to remove if $this->logger statement on each use of logger
  • AmazonS3Resolver and AwsS3Resolver now implements LoggerAwareInterface.


use Liip\ImagineBundle\Exception\ExceptionInterface;

class NotStorableException extends \RuntimeException implements ExceptionInterface
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 :)

@makasim
Copy link
Collaborator Author

makasim commented Jan 16, 2014

@havvg fix assertNull and warning comments.

@havvg
Copy link
Contributor

havvg commented Jan 16, 2014

The changes on the NullLogger now make the S3 resolvers depend on the psr/log package, so the package should at least be added to composer.json suggest section.

@makasim
Copy link
Collaborator Author

makasim commented Jan 16, 2014

@havvg it is already required

@havvg
Copy link
Contributor

havvg commented Jan 16, 2014

Ah, I missed that one. However it's not required as it, but an optional dependency when using either of the S3 resolvers, so let's move it to suggest and keep it in require-dev.

@makasim
Copy link
Collaborator Author

makasim commented Jan 16, 2014

@havvg I decided to revert NullLogger and LoggerAwareItnerface changes. Though I moved psr\log to require-dev and monolog\monolog to suggest.

havvg added a commit that referenced this pull request Jan 16, 2014
[1.0][CacheResolver] Use binary on store method call.
@havvg havvg merged commit 6fc4d98 into liip:develop Jan 16, 2014
@makasim makasim deleted the resolver-use-binary branch January 16, 2014 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants