Repository navigation
1.12.0
- Add
ResourceLogger#179 #189 - JSON Shcema validation for HAL link #158 #165
- Improve validation error message #167
- Improve
OPTIONmethod output #159 - Generates FakeJson on the fly #160 #161 #162
- CamelCakeKeyModule #163 #164 #183 (Independet package)
- Class parameter #166
- Trigger E_USER_ERROR when exception caught in
toString(former error is E_USER_WARNING) #168 #172 - Omit host name and schema #169
newInstance()set methodget#171- Fix big typo #170
- Cleanup the code #173 #175 #178 #181 #184 #185
- Improve error message #174
- Support
HEADmethod #177 - Refactor HalRender to share in bear/sunday #180
- Support
httpresource #187 - Bug fix #186 #188 #190
FakeJson
$this->install(new FakeJsonModule);CamelCaseKeyModule
$this->install(new CamelCakeKeyModule);Default schema
use BEAR\Resource\Annotation\ContextSchemaclass FooModule
{
/**
* {@inheritdoc}
*/
protected function configure()
// ...
$this->bind()->annotatedWith(ContextSchema::class)->toInstance('app://self');
}
}Resource Logger
For production
Log only when the method is "UNSAFE". (POST, PUT, etc)
$this->install(new ProdLoggerModule);For development
Log all request as well as response.
$this->install(new DevLoggerModule);Your Logger
You may want to log login_id or special request/response information in a particular case. In that case, you can bind your own logger. The logger was called in each resource request.
$this->bind(LoggerInterface::class)->to(YourLogger::class);